diff --git a/VERSION b/VERSION
index ffb821f0..b5c7922f 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.7.29
\ No newline at end of file
+0.7.30
\ No newline at end of file
diff --git a/asset-manifest.json b/asset-manifest.json
index e263648d..7c623948 100644
--- a/asset-manifest.json
+++ b/asset-manifest.json
@@ -1,9 +1,9 @@
{
"files": {
"main.css": "/static/css/main.34b80300.css",
- "main.js": "/static/js/main.9ed251f3.js",
+ "main.js": "/static/js/main.1d1b0ad8.js",
"widget.css": "/static/css/widget.d13f8dd3.css",
- "widget.js": "/static/js/widget.ac3c142b.js",
+ "widget.js": "/static/js/widget.e6c1f353.js",
"static/js/308.4d112326.chunk.js": "/static/js/308.4d112326.chunk.js",
"static/js/549.5615531f.chunk.js": "/static/js/549.5615531f.chunk.js",
"static/js/694.1e89ad69.chunk.js": "/static/js/694.1e89ad69.chunk.js",
@@ -14,10 +14,10 @@
"static/js/875.63eefd4c.chunk.js": "/static/js/875.63eefd4c.chunk.js",
"static/js/261.fa5e8388.chunk.js": "/static/js/261.fa5e8388.chunk.js",
"static/js/625.a6bbf2f1.chunk.js": "/static/js/625.a6bbf2f1.chunk.js",
- "static/js/264.91f3546c.chunk.js": "/static/js/264.91f3546c.chunk.js",
+ "static/js/71.267b6f9e.chunk.js": "/static/js/71.267b6f9e.chunk.js",
"static/js/879.c94b008c.chunk.js": "/static/js/879.c94b008c.chunk.js",
- "static/css/957.cdf1fe26.chunk.css": "/static/css/957.cdf1fe26.chunk.css",
- "static/js/957.4eed77ab.chunk.js": "/static/js/957.4eed77ab.chunk.js",
+ "static/css/195.cdf1fe26.chunk.css": "/static/css/195.cdf1fe26.chunk.css",
+ "static/js/195.f6ecafec.chunk.js": "/static/js/195.f6ecafec.chunk.js",
"static/js/812.edacbb15.chunk.js": "/static/js/812.edacbb15.chunk.js",
"static/js/566.551a69d5.chunk.js": "/static/js/566.551a69d5.chunk.js",
"static/js/64.78198cfe.chunk.js": "/static/js/64.78198cfe.chunk.js",
@@ -34,14 +34,14 @@
"static/js/610.3ea800a8.chunk.js": "/static/js/610.3ea800a8.chunk.js",
"static/js/128.0e928812.chunk.js": "/static/js/128.0e928812.chunk.js",
"static/js/227.4245e14f.chunk.js": "/static/js/227.4245e14f.chunk.js",
- "static/js/945.7925cf56.chunk.js": "/static/js/945.7925cf56.chunk.js",
+ "static/js/945.11b0d1d3.chunk.js": "/static/js/945.11b0d1d3.chunk.js",
"static/js/919.23e2f4de.chunk.js": "/static/js/919.23e2f4de.chunk.js",
"static/js/887.968f913c.chunk.js": "/static/js/887.968f913c.chunk.js",
"static/js/757.2756e1f7.chunk.js": "/static/js/757.2756e1f7.chunk.js",
"static/js/658.0a3095f3.chunk.js": "/static/js/658.0a3095f3.chunk.js",
"static/js/400.6fec3118.chunk.js": "/static/js/400.6fec3118.chunk.js",
"static/js/489.b843221e.chunk.js": "/static/js/489.b843221e.chunk.js",
- "static/js/574.71823edd.chunk.js": "/static/js/574.71823edd.chunk.js",
+ "static/js/691.ccab93ee.chunk.js": "/static/js/691.ccab93ee.chunk.js",
"static/media/index.cjs": "/static/media/index.c05687ef19f5bac24939.cjs",
"service-worker.js": "/service-worker.js",
"static/media/join.wav": "/static/media/join.32e45d691d059a55188a.wav",
@@ -60,6 +60,6 @@
},
"entrypoints": [
"static/css/main.34b80300.css",
- "static/js/main.9ed251f3.js"
+ "static/js/main.1d1b0ad8.js"
]
}
\ No newline at end of file
diff --git a/index.html b/index.html
index c86087f2..9386d92f 100644
--- a/index.html
+++ b/index.html
@@ -1 +1 @@
-
VoceChat WebAPP
\ No newline at end of file
+VoceChat WebAPP
\ No newline at end of file
diff --git a/locales/en/setting.json b/locales/en/setting.json
index 406d0d3e..73242be8 100644
--- a/locales/en/setting.json
+++ b/locales/en/setting.json
@@ -53,6 +53,12 @@
"everyone": "Everyone",
"invite": "Invitation Link Only"
},
+ "admin_create_group": {
+ "title": "Only Admins create group",
+ "desc": "If enabled, only admins can create group.",
+ "enable": "Enable",
+ "disable": "Disabled"
+ },
"guest_mode": {
"title": "Guest Mode",
"desc": "If enabled, visitors will see public channels on this server.",
diff --git a/service-worker.js b/service-worker.js
index ad928813..27aac560 100644
--- a/service-worker.js
+++ b/service-worker.js
@@ -1 +1 @@
-(()=>{"use strict";var e={142:()=>{try{self["workbox:core:7.0.0"]&&_()}catch(e){}},558:()=>{try{self["workbox:expiration:7.0.0"]&&_()}catch(e){}},434:()=>{try{self["workbox:precaching:7.0.0"]&&_()}catch(e){}},636:()=>{try{self["workbox:routing:7.0.0"]&&_()}catch(e){}},642:()=>{try{self["workbox:strategies:7.0.0"]&&_()}catch(e){}}},t={};function s(n){var a=t[n];if(void 0!==a)return a.exports;var r=t[n]={exports:{}};return e[n](r,r.exports,s),r.exports}s(142);const n=(e,...t)=>{let s=e;return t.length>0&&(s+=` :: ${JSON.stringify(t)}`),s};class a extends Error{constructor(e,t){super(n(e,t)),this.name=e,this.details=t}}const r=new Set;const i={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!==typeof registration?registration.scope:""},c=e=>[i.prefix,e,i.suffix].filter((e=>e&&e.length>0)).join("-"),o=e=>e||c(i.precache),h=e=>e||c(i.runtime);function l(e,t){const s=new URL(e);for(const n of t)s.searchParams.delete(n);return s.href}let u;function d(e){e.then((()=>{}))}class f{constructor(){this.promise=new Promise(((e,t)=>{this.resolve=e,this.reject=t}))}}const p=e=>new URL(String(e),location.href).href.replace(new RegExp(`^${location.origin}`),"");function g(e){return new Promise((t=>setTimeout(t,e)))}function w(e,t){const s=t();return e.waitUntil(s),s}async function m(e,t){let s=null;if(e.url){s=new URL(e.url).origin}if(s!==self.location.origin)throw new a("cross-origin-copy-response",{origin:s});const n=e.clone(),r={headers:new Headers(n.headers),status:n.status,statusText:n.statusText},i=t?t(r):r,c=function(){if(void 0===u){const t=new Response("");if("body"in t)try{new Response(t.body),u=!0}catch(e){u=!1}u=!1}return u}()?n.body:await n.blob();return new Response(c,i)}const y=(e,t)=>t.some((t=>e instanceof t));let v,b;const R=new WeakMap,x=new WeakMap,C=new WeakMap,E=new WeakMap,L=new WeakMap;let q={get(e,t,s){if(e instanceof IDBTransaction){if("done"===t)return x.get(e);if("objectStoreNames"===t)return e.objectStoreNames||C.get(e);if("store"===t)return s.objectStoreNames[1]?void 0:s.objectStore(s.objectStoreNames[0])}return T(e[t])},set:(e,t,s)=>(e[t]=s,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function D(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(b||(b=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(k(this),t),T(R.get(this))}:function(...t){return T(e.apply(k(this),t))}:function(t,...s){const n=e.call(k(this),t,...s);return C.set(n,t.sort?t.sort():[t]),T(n)}}function U(e){return"function"===typeof e?D(e):(e instanceof IDBTransaction&&function(e){if(x.has(e))return;const t=new Promise(((t,s)=>{const n=()=>{e.removeEventListener("complete",a),e.removeEventListener("error",r),e.removeEventListener("abort",r)},a=()=>{t(),n()},r=()=>{s(e.error||new DOMException("AbortError","AbortError")),n()};e.addEventListener("complete",a),e.addEventListener("error",r),e.addEventListener("abort",r)}));x.set(e,t)}(e),y(e,v||(v=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,q):e)}function T(e){if(e instanceof IDBRequest)return function(e){const t=new Promise(((t,s)=>{const n=()=>{e.removeEventListener("success",a),e.removeEventListener("error",r)},a=()=>{t(T(e.result)),n()},r=()=>{s(e.error),n()};e.addEventListener("success",a),e.addEventListener("error",r)}));return t.then((t=>{t instanceof IDBCursor&&R.set(t,e)})).catch((()=>{})),L.set(t,e),t}(e);if(E.has(e))return E.get(e);const t=U(e);return t!==e&&(E.set(e,t),L.set(t,e)),t}const k=e=>L.get(e);const N=["get","getKey","getAll","getAllKeys","count"],I=["put","add","delete","clear"],K=new Map;function M(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!==typeof t)return;if(K.get(t))return K.get(t);const s=t.replace(/FromIndex$/,""),n=t!==s,a=I.includes(s);if(!(s in(n?IDBIndex:IDBObjectStore).prototype)||!a&&!N.includes(s))return;const r=async function(e,...t){const r=this.transaction(e,a?"readwrite":"readonly");let i=r.store;return n&&(i=i.index(t.shift())),(await Promise.all([i[s](...t),a&&r.done]))[0]};return K.set(t,r),r}q=(e=>({...e,get:(t,s,n)=>M(t,s)||e.get(t,s,n),has:(t,s)=>!!M(t,s)||e.has(t,s)}))(q);s(558);const P="cache-entries",S=e=>{const t=new URL(e,location.href);return t.hash="",t.href};class O{constructor(e){this._db=null,this._cacheName=e}_upgradeDb(e){const t=e.createObjectStore(P,{keyPath:"id"});t.createIndex("cacheName","cacheName",{unique:!1}),t.createIndex("timestamp","timestamp",{unique:!1})}_upgradeDbAndDeleteOldDbs(e){this._upgradeDb(e),this._cacheName&&function(e,{blocked:t}={}){const s=indexedDB.deleteDatabase(e);t&&s.addEventListener("blocked",(e=>t(e.oldVersion,e))),T(s).then((()=>{}))}(this._cacheName)}async setTimestamp(e,t){const s={url:e=S(e),timestamp:t,cacheName:this._cacheName,id:this._getId(e)},n=(await this.getDb()).transaction(P,"readwrite",{durability:"relaxed"});await n.store.put(s),await n.done}async getTimestamp(e){const t=await this.getDb(),s=await t.get(P,this._getId(e));return null===s||void 0===s?void 0:s.timestamp}async expireEntries(e,t){const s=await this.getDb();let n=await s.transaction(P).store.index("timestamp").openCursor(null,"prev");const a=[];let r=0;for(;n;){const s=n.value;s.cacheName===this._cacheName&&(e&&s.timestamp=t?a.push(n.value):r++),n=await n.continue()}const i=[];for(const c of a)await s.delete(P,c.id),i.push(c.url);return i}_getId(e){return this._cacheName+"|"+S(e)}async getDb(){return this._db||(this._db=await function(e,t,{blocked:s,upgrade:n,blocking:a,terminated:r}={}){const i=indexedDB.open(e,t),c=T(i);return n&&i.addEventListener("upgradeneeded",(e=>{n(T(i.result),e.oldVersion,e.newVersion,T(i.transaction),e)})),s&&i.addEventListener("blocked",(e=>s(e.oldVersion,e.newVersion,e))),c.then((e=>{r&&e.addEventListener("close",(()=>r())),a&&e.addEventListener("versionchange",(e=>a(e.oldVersion,e.newVersion,e)))})).catch((()=>{})),c}("workbox-expiration",1,{upgrade:this._upgradeDbAndDeleteOldDbs.bind(this)})),this._db}}class W{constructor(e,t={}){this._isRunning=!1,this._rerunRequested=!1,this._maxEntries=t.maxEntries,this._maxAgeSeconds=t.maxAgeSeconds,this._matchOptions=t.matchOptions,this._cacheName=e,this._timestampModel=new O(e)}async expireEntries(){if(this._isRunning)return void(this._rerunRequested=!0);this._isRunning=!0;const e=this._maxAgeSeconds?Date.now()-1e3*this._maxAgeSeconds:0,t=await this._timestampModel.expireEntries(e,this._maxEntries),s=await self.caches.open(this._cacheName);for(const n of t)await s.delete(n,this._matchOptions);this._isRunning=!1,this._rerunRequested&&(this._rerunRequested=!1,d(this.expireEntries()))}async updateTimestamp(e){await this._timestampModel.setTimestamp(e,Date.now())}async isURLExpired(e){if(this._maxAgeSeconds){const t=await this._timestampModel.getTimestamp(e),s=Date.now()-1e3*this._maxAgeSeconds;return void 0===t||t{t&&(t.originalRequest=e)},this.cachedResponseWillBeUsed=async({event:e,state:t,cachedResponse:s})=>{if("install"===e.type&&t&&t.originalRequest&&t.originalRequest instanceof Request){const e=t.originalRequest.url;s?this.notUpdatedURLs.push(e):this.updatedURLs.push(e)}return s}}}class j{constructor({precacheController:e}){this.cacheKeyWillBeUsed=async({request:e,params:t})=>{const s=(null===t||void 0===t?void 0:t.cacheKey)||this._precacheController.getCacheKeyForURL(e.url);return s?new Request(s,{headers:e.headers}):e},this._precacheController=e}}s(642);function F(e){return"string"===typeof e?new Request(e):e}class H{constructor(e,t){this._cacheKeys={},Object.assign(this,t),this.event=t.event,this._strategy=e,this._handlerDeferred=new f,this._extendLifetimePromises=[],this._plugins=[...e.plugins],this._pluginStateMap=new Map;for(const s of this._plugins)this._pluginStateMap.set(s,{});this.event.waitUntil(this._handlerDeferred.promise)}async fetch(e){const{event:t}=this;let s=F(e);if("navigate"===s.mode&&t instanceof FetchEvent&&t.preloadResponse){const e=await t.preloadResponse;if(e)return e}const n=this.hasCallback("fetchDidFail")?s.clone():null;try{for(const e of this.iterateCallbacks("requestWillFetch"))s=await e({request:s.clone(),event:t})}catch(i){if(i instanceof Error)throw new a("plugin-error-request-will-fetch",{thrownErrorMessage:i.message})}const r=s.clone();try{let e;e=await fetch(s,"navigate"===s.mode?void 0:this._strategy.fetchOptions);for(const s of this.iterateCallbacks("fetchDidSucceed"))e=await s({event:t,request:r,response:e});return e}catch(c){throw n&&await this.runCallbacks("fetchDidFail",{error:c,event:t,originalRequest:n.clone(),request:r.clone()}),c}}async fetchAndCachePut(e){const t=await this.fetch(e),s=t.clone();return this.waitUntil(this.cachePut(e,s)),t}async cacheMatch(e){const t=F(e);let s;const{cacheName:n,matchOptions:a}=this._strategy,r=await this.getCacheKey(t,"read"),i=Object.assign(Object.assign({},a),{cacheName:n});s=await caches.match(r,i);for(const c of this.iterateCallbacks("cachedResponseWillBeUsed"))s=await c({cacheName:n,matchOptions:a,cachedResponse:s,request:r,event:this.event})||void 0;return s}async cachePut(e,t){const s=F(e);await g(0);const n=await this.getCacheKey(s,"write");if(!t)throw new a("cache-put-with-no-response",{url:p(n.url)});const i=await this._ensureResponseSafeToCache(t);if(!i)return!1;const{cacheName:c,matchOptions:o}=this._strategy,h=await self.caches.open(c),u=this.hasCallback("cacheDidUpdate"),d=u?await async function(e,t,s,n){const a=l(t.url,s);if(t.url===a)return e.match(t,n);const r=Object.assign(Object.assign({},n),{ignoreSearch:!0}),i=await e.keys(t,r);for(const c of i)if(a===l(c.url,s))return e.match(c,n)}(h,n.clone(),["__WB_REVISION__"],o):null;try{await h.put(n,u?i.clone():i)}catch(f){if(f instanceof Error)throw"QuotaExceededError"===f.name&&await async function(){for(const e of r)await e()}(),f}for(const a of this.iterateCallbacks("cacheDidUpdate"))await a({cacheName:c,oldResponse:d,newResponse:i.clone(),request:n,event:this.event});return!0}async getCacheKey(e,t){const s=`${e.url} | ${t}`;if(!this._cacheKeys[s]){let n=e;for(const e of this.iterateCallbacks("cacheKeyWillBeUsed"))n=F(await e({mode:t,request:n,event:this.event,params:this.params}));this._cacheKeys[s]=n}return this._cacheKeys[s]}hasCallback(e){for(const t of this._strategy.plugins)if(e in t)return!0;return!1}async runCallbacks(e,t){for(const s of this.iterateCallbacks(e))await s(t)}*iterateCallbacks(e){for(const t of this._strategy.plugins)if("function"===typeof t[e]){const s=this._pluginStateMap.get(t),n=n=>{const a=Object.assign(Object.assign({},n),{state:s});return t[e](a)};yield n}}waitUntil(e){return this._extendLifetimePromises.push(e),e}async doneWaiting(){let e;for(;e=this._extendLifetimePromises.shift();)await e}destroy(){this._handlerDeferred.resolve(null)}async _ensureResponseSafeToCache(e){let t=e,s=!1;for(const n of this.iterateCallbacks("cacheWillUpdate"))if(t=await n({request:this.request,response:t,event:this.event})||void 0,s=!0,!t)break;return s||t&&200!==t.status&&(t=void 0),t}}class V{constructor(e={}){this.cacheName=h(e.cacheName),this.plugins=e.plugins||[],this.fetchOptions=e.fetchOptions,this.matchOptions=e.matchOptions}handle(e){const[t]=this.handleAll(e);return t}handleAll(e){e instanceof FetchEvent&&(e={event:e,request:e.request});const t=e.event,s="string"===typeof e.request?new Request(e.request):e.request,n="params"in e?e.params:void 0,a=new H(this,{event:t,request:s,params:n}),r=this._getResponse(a,s,t);return[r,this._awaitComplete(r,a,s,t)]}async _getResponse(e,t,s){let n;await e.runCallbacks("handlerWillStart",{event:s,request:t});try{if(n=await this._handle(t,e),!n||"error"===n.type)throw new a("no-response",{url:t.url})}catch(r){if(r instanceof Error)for(const a of e.iterateCallbacks("handlerDidError"))if(n=await a({error:r,event:s,request:t}),n)break;if(!n)throw r}for(const a of e.iterateCallbacks("handlerWillRespond"))n=await a({event:s,request:t,response:n});return n}async _awaitComplete(e,t,s,n){let a,r;try{a=await e}catch(r){}try{await t.runCallbacks("handlerDidRespond",{event:n,request:s,response:a}),await t.doneWaiting()}catch(i){i instanceof Error&&(r=i)}if(await t.runCallbacks("handlerDidComplete",{event:n,request:s,response:a,error:r}),t.destroy(),r)throw r}}class $ extends V{constructor(e={}){e.cacheName=o(e.cacheName),super(e),this._fallbackToNetwork=!1!==e.fallbackToNetwork,this.plugins.push($.copyRedirectedCacheableResponsesPlugin)}async _handle(e,t){const s=await t.cacheMatch(e);return s||(t.event&&"install"===t.event.type?await this._handleInstall(e,t):await this._handleFetch(e,t))}async _handleFetch(e,t){let s;const n=t.params||{};if(!this._fallbackToNetwork)throw new a("missing-precache-entry",{cacheName:this.cacheName,url:e.url});{0;const a=n.integrity,r=e.integrity,i=!r||r===a;if(s=await t.fetch(new Request(e,{integrity:"no-cors"!==e.mode?r||a:void 0})),a&&i&&"no-cors"!==e.mode){this._useDefaultCacheabilityPluginIfNeeded();await t.cachePut(e,s.clone());0}}return s}async _handleInstall(e,t){this._useDefaultCacheabilityPluginIfNeeded();const s=await t.fetch(e);if(!await t.cachePut(e,s.clone()))throw new a("bad-precaching-response",{url:e.url,status:s.status});return s}_useDefaultCacheabilityPluginIfNeeded(){let e=null,t=0;for(const[s,n]of this.plugins.entries())n!==$.copyRedirectedCacheableResponsesPlugin&&(n===$.defaultPrecacheCacheabilityPlugin&&(e=s),n.cacheWillUpdate&&t++);0===t?this.plugins.push($.defaultPrecacheCacheabilityPlugin):t>1&&null!==e&&this.plugins.splice(e,1)}}$.defaultPrecacheCacheabilityPlugin={cacheWillUpdate:async({response:e})=>!e||e.status>=400?null:e},$.copyRedirectedCacheableResponsesPlugin={cacheWillUpdate:async({response:e})=>e.redirected?await m(e):e};class G{constructor({cacheName:e,plugins:t=[],fallbackToNetwork:s=!0}={}){this._urlsToCacheKeys=new Map,this._urlsToCacheModes=new Map,this._cacheKeysToIntegrities=new Map,this._strategy=new $({cacheName:o(e),plugins:[...t,new j({precacheController:this})],fallbackToNetwork:s}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}get strategy(){return this._strategy}precache(e){this.addToCacheList(e),this._installAndActiveListenersAdded||(self.addEventListener("install",this.install),self.addEventListener("activate",this.activate),this._installAndActiveListenersAdded=!0)}addToCacheList(e){const t=[];for(const s of e){"string"===typeof s?t.push(s):s&&void 0===s.revision&&t.push(s.url);const{cacheKey:e,url:n}=A(s),r="string"!==typeof s&&s.revision?"reload":"default";if(this._urlsToCacheKeys.has(n)&&this._urlsToCacheKeys.get(n)!==e)throw new a("add-to-cache-list-conflicting-entries",{firstEntry:this._urlsToCacheKeys.get(n),secondEntry:e});if("string"!==typeof s&&s.integrity){if(this._cacheKeysToIntegrities.has(e)&&this._cacheKeysToIntegrities.get(e)!==s.integrity)throw new a("add-to-cache-list-conflicting-integrities",{url:n});this._cacheKeysToIntegrities.set(e,s.integrity)}if(this._urlsToCacheKeys.set(n,e),this._urlsToCacheModes.set(n,r),t.length>0){const e=`Workbox is precaching URLs without revision info: ${t.join(", ")}\nThis is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(e)}}}install(e){return w(e,(async()=>{const t=new B;this.strategy.plugins.push(t);for(const[a,r]of this._urlsToCacheKeys){const t=this._cacheKeysToIntegrities.get(r),s=this._urlsToCacheModes.get(a),n=new Request(a,{integrity:t,cache:s,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:r},request:n,event:e}))}const{updatedURLs:s,notUpdatedURLs:n}=t;return{updatedURLs:s,notUpdatedURLs:n}}))}activate(e){return w(e,(async()=>{const e=await self.caches.open(this.strategy.cacheName),t=await e.keys(),s=new Set(this._urlsToCacheKeys.values()),n=[];for(const a of t)s.has(a.url)||(await e.delete(a),n.push(a.url));return{deletedURLs:n}}))}getURLsToCacheKeys(){return this._urlsToCacheKeys}getCachedURLs(){return[...this._urlsToCacheKeys.keys()]}getCacheKeyForURL(e){const t=new URL(e,location.href);return this._urlsToCacheKeys.get(t.href)}getIntegrityForCacheKey(e){return this._cacheKeysToIntegrities.get(e)}async matchPrecache(e){const t=e instanceof Request?e.url:e,s=this.getCacheKeyForURL(t);if(s){return(await self.caches.open(this.strategy.cacheName)).match(s)}}createHandlerBoundToURL(e){const t=this.getCacheKeyForURL(e);if(!t)throw new a("non-precached-url",{url:e});return s=>(s.request=new Request(e),s.params=Object.assign({cacheKey:t},s.params),this.strategy.handle(s))}}let Q;const J=()=>(Q||(Q=new G),Q);s(636);const z=e=>e&&"object"===typeof e?e:{handle:e};class X{constructor(e,t,s="GET"){this.handler=z(t),this.match=e,this.method=s}setCatchHandler(e){this.catchHandler=z(e)}}class Y extends X{constructor(e,t,s){super((({url:t})=>{const s=e.exec(t.href);if(s&&(t.origin===location.origin||0===s.index))return s.slice(1)}),t,s)}}class Z{constructor(){this._routes=new Map,this._defaultHandlerMap=new Map}get routes(){return this._routes}addFetchListener(){self.addEventListener("fetch",(e=>{const{request:t}=e,s=this.handleRequest({request:t,event:e});s&&e.respondWith(s)}))}addCacheListener(){self.addEventListener("message",(e=>{if(e.data&&"CACHE_URLS"===e.data.type){const{payload:t}=e.data;0;const s=Promise.all(t.urlsToCache.map((t=>{"string"===typeof t&&(t=[t]);const s=new Request(...t);return this.handleRequest({request:s,event:e})})));e.waitUntil(s),e.ports&&e.ports[0]&&s.then((()=>e.ports[0].postMessage(!0)))}}))}handleRequest({request:e,event:t}){const s=new URL(e.url,location.href);if(!s.protocol.startsWith("http"))return void 0;const n=s.origin===location.origin,{params:a,route:r}=this.findMatchingRoute({event:t,request:e,sameOrigin:n,url:s});let i=r&&r.handler;const c=e.method;if(!i&&this._defaultHandlerMap.has(c)&&(i=this._defaultHandlerMap.get(c)),!i)return void 0;let o;try{o=i.handle({url:s,request:e,event:t,params:a})}catch(l){o=Promise.reject(l)}const h=r&&r.catchHandler;return o instanceof Promise&&(this._catchHandler||h)&&(o=o.catch((async n=>{if(h){0;try{return await h.handle({url:s,request:e,event:t,params:a})}catch(r){r instanceof Error&&(n=r)}}if(this._catchHandler)return this._catchHandler.handle({url:s,request:e,event:t});throw n}))),o}findMatchingRoute({url:e,sameOrigin:t,request:s,event:n}){const a=this._routes.get(s.method)||[];for(const r of a){let a;const i=r.match({url:e,sameOrigin:t,request:s,event:n});if(i)return a=i,(Array.isArray(a)&&0===a.length||i.constructor===Object&&0===Object.keys(i).length||"boolean"===typeof i)&&(a=void 0),{route:r,params:a}}return{}}setDefaultHandler(e,t="GET"){this._defaultHandlerMap.set(t,z(e))}setCatchHandler(e){this._catchHandler=z(e)}registerRoute(e){this._routes.has(e.method)||this._routes.set(e.method,[]),this._routes.get(e.method).push(e)}unregisterRoute(e){if(!this._routes.has(e.method))throw new a("unregister-route-but-not-found-with-method",{method:e.method});const t=this._routes.get(e.method).indexOf(e);if(!(t>-1))throw new a("unregister-route-route-not-registered");this._routes.get(e.method).splice(t,1)}}let ee;const te=()=>(ee||(ee=new Z,ee.addFetchListener(),ee.addCacheListener()),ee);function se(e,t,s){let n;if("string"===typeof e){const a=new URL(e,location.href);0;n=new X((({url:e})=>e.href===a.href),t,s)}else if(e instanceof RegExp)n=new Y(e,t,s);else if("function"===typeof e)n=new X(e,t,s);else{if(!(e instanceof X))throw new a("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});n=e}return te().registerRoute(n),n}class ne extends X{constructor(e,t){super((({request:s})=>{const n=e.getURLsToCacheKeys();for(const a of function*(e,{ignoreURLParametersMatching:t=[/^utm_/,/^fbclid$/],directoryIndex:s="index.html",cleanURLs:n=!0,urlManipulation:a}={}){const r=new URL(e,location.href);r.hash="",yield r.href;const i=function(e,t=[]){for(const s of[...e.searchParams.keys()])t.some((e=>e.test(s)))&&e.searchParams.delete(s);return e}(r,t);if(yield i.href,s&&i.pathname.endsWith("/")){const e=new URL(i.href);e.pathname+=s,yield e.href}if(n){const e=new URL(i.href);e.pathname+=".html",yield e.href}if(a){const e=a({url:r});for(const t of e)yield t.href}}(s.url,t)){const t=n.get(a);if(t){return{cacheKey:t,integrity:e.getIntegrityForCacheKey(t)}}}}),e.strategy)}}const ae={cacheWillUpdate:async({response:e})=>200===e.status||0===e.status?e:null};var re;self.addEventListener("activate",(()=>self.clients.claim())),function(e){J().precache(e)}([{'revision':'bd9497bfc8bcc158be6705536460829f','url':'/index.html'},{'revision':null,'url':'/static/css/446.319a0232.chunk.css'},{'revision':null,'url':'/static/css/664.8a09720a.chunk.css'},{'revision':null,'url':'/static/css/957.cdf1fe26.chunk.css'},{'revision':null,'url':'/static/css/main.34b80300.css'},{'revision':null,'url':'/static/css/widget.d13f8dd3.css'},{'revision':null,'url':'/static/js/128.0e928812.chunk.js'},{'revision':null,'url':'/static/js/200.7fd884c2.chunk.js'},{'revision':null,'url':'/static/js/227.4245e14f.chunk.js'},{'revision':null,'url':'/static/js/261.fa5e8388.chunk.js'},{'revision':null,'url':'/static/js/264.91f3546c.chunk.js'},{'revision':null,'url':'/static/js/265.e5ddcab0.chunk.js'},{'revision':null,'url':'/static/js/29.0622ef4f.chunk.js'},{'revision':null,'url':'/static/js/308.4d112326.chunk.js'},{'revision':null,'url':'/static/js/318.23e14e69.chunk.js'},{'revision':null,'url':'/static/js/400.6fec3118.chunk.js'},{'revision':null,'url':'/static/js/409.8aa153f9.chunk.js'},{'revision':null,'url':'/static/js/446.25c397da.chunk.js'},{'revision':null,'url':'/static/js/487.93e50bd5.chunk.js'},{'revision':null,'url':'/static/js/489.b843221e.chunk.js'},{'revision':null,'url':'/static/js/549.5615531f.chunk.js'},{'revision':null,'url':'/static/js/566.551a69d5.chunk.js'},{'revision':null,'url':'/static/js/574.71823edd.chunk.js'},{'revision':null,'url':'/static/js/610.3ea800a8.chunk.js'},{'revision':null,'url':'/static/js/625.a6bbf2f1.chunk.js'},{'revision':null,'url':'/static/js/64.78198cfe.chunk.js'},{'revision':null,'url':'/static/js/658.0a3095f3.chunk.js'},{'revision':null,'url':'/static/js/664.79d15709.chunk.js'},{'revision':null,'url':'/static/js/694.1e89ad69.chunk.js'},{'revision':null,'url':'/static/js/757.2756e1f7.chunk.js'},{'revision':null,'url':'/static/js/770.16942382.chunk.js'},{'revision':null,'url':'/static/js/812.edacbb15.chunk.js'},{'revision':null,'url':'/static/js/875.63eefd4c.chunk.js'},{'revision':null,'url':'/static/js/879.c94b008c.chunk.js'},{'revision':null,'url':'/static/js/88.75be6853.chunk.js'},{'revision':null,'url':'/static/js/887.968f913c.chunk.js'},{'revision':null,'url':'/static/js/911.85085ca5.chunk.js'},{'revision':null,'url':'/static/js/919.23e2f4de.chunk.js'},{'revision':null,'url':'/static/js/945.7925cf56.chunk.js'},{'revision':null,'url':'/static/js/957.4eed77ab.chunk.js'},{'revision':null,'url':'/static/js/973.7e1412c7.chunk.js'},{'revision':null,'url':'/static/js/main.9ed251f3.js'},{'revision':null,'url':'/static/js/widget.ac3c142b.js'},{'revision':null,'url':'/static/media/edit.18de09b48249f213cf85.svg'},{'revision':null,'url':'/static/media/getFetch.c4cca45e22bc1b2c7d0d.cjs'},{'revision':null,'url':'/static/media/index.294a0edb7af7d19b781b.cjs'},{'revision':null,'url':'/static/media/index.40b335a788697b39d89d.cjs'},{'revision':null,'url':'/static/media/index.4a92f16a45a8dc264e40.cjs'},{'revision':null,'url':'/static/media/index.675293235c1d3a61a78f.cjs'},{'revision':null,'url':'/static/media/index.c05687ef19f5bac24939.cjs'},{'revision':null,'url':'/static/media/join.32e45d691d059a55188a.wav'},{'revision':null,'url':'/static/media/metamask.f04d5fb63394197766d0.svg'},{'revision':null,'url':'/static/media/more.d35b0228affb89f48593.svg'},{'revision':null,'url':'/static/media/msg.sound.2c23efd582318e940e57.wav'},{'revision':null,'url':'/static/media/picture.57a395fb7f41e8e3c5d1.svg'},{'revision':null,'url':'/static/media/play.ada446bc1d007eef6447.svg'},{'revision':null,'url':'/static/media/reaction.dfc99cbb32dd13e55782.svg'},{'revision':null,'url':'/static/media/reply.c7c79a9d5cee92f51ec5.svg'},{'revision':null,'url':'/static/media/upload.image.9f8c7fc90042d2ff4eb7.svg'},{'revision':'26e1fb07daa217d499de58e99a66034b','url':'/widget.html'}]),function(e){const t=J();se(new ne(t,e))}(re);const ie=new RegExp("/[^/?]+\\.[^/]+$");var ce;se((({request:e,url:t})=>{if("navigate"!==e.mode)return!1;const s=t.pathname;return!(s.startsWith("/_")||s.startsWith("/VERSION")||s.startsWith("/api")||s.startsWith("/locales/")||s.startsWith("/widget"))&&!s.match(ie)}),(ce="/index.html",J().createHandlerBoundToURL(ce))),se((({url:e})=>e.origin===self.location.origin&&e.pathname.endsWith(".png")),new class extends V{constructor(e={}){super(e),this.plugins.some((e=>"cacheWillUpdate"in e))||this.plugins.unshift(ae)}async _handle(e,t){const s=t.fetchAndCachePut(e).catch((()=>{}));t.waitUntil(s);let n,r=await t.cacheMatch(e);if(r)0;else{0;try{r=await s}catch(i){i instanceof Error&&(n=i)}}if(!r)throw new a("no-response",{url:e.url,error:n});return r}}({cacheName:"images",plugins:[new class{constructor(e={}){this.cachedResponseWillBeUsed=async({event:e,request:t,cacheName:s,cachedResponse:n})=>{if(!n)return null;const a=this._isResponseDateFresh(n),r=this._getCacheExpiration(s);d(r.expireEntries());const i=r.updateTimestamp(t.url);if(e)try{e.waitUntil(i)}catch(c){0}return a?n:null},this.cacheDidUpdate=async({cacheName:e,request:t})=>{const s=this._getCacheExpiration(e);await s.updateTimestamp(t.url),await s.expireEntries()},this._config=e,this._maxAgeSeconds=e.maxAgeSeconds,this._cacheExpirations=new Map,e.purgeOnQuotaError&&function(e){r.add(e)}((()=>this.deleteCacheAndMetadata()))}_getCacheExpiration(e){if(e===h())throw new a("expire-custom-caches-only");let t=this._cacheExpirations.get(e);return t||(t=new W(e,this._config),this._cacheExpirations.set(e,t)),t}_isResponseDateFresh(e){if(!this._maxAgeSeconds)return!0;const t=this._getDateHeaderTimestamp(e);if(null===t)return!0;return t>=Date.now()-1e3*this._maxAgeSeconds}_getDateHeaderTimestamp(e){if(!e.headers.has("date"))return null;const t=e.headers.get("date"),s=new Date(t).getTime();return isNaN(s)?null:s}async deleteCacheAndMetadata(){for(const[e,t]of this._cacheExpirations)await self.caches.delete(e),await t.delete();this._cacheExpirations=new Map}}({maxEntries:50})]})),self.addEventListener("message",(e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()}))})();
\ No newline at end of file
+(()=>{"use strict";var e={142:()=>{try{self["workbox:core:7.0.0"]&&_()}catch(e){}},558:()=>{try{self["workbox:expiration:7.0.0"]&&_()}catch(e){}},434:()=>{try{self["workbox:precaching:7.0.0"]&&_()}catch(e){}},636:()=>{try{self["workbox:routing:7.0.0"]&&_()}catch(e){}},642:()=>{try{self["workbox:strategies:7.0.0"]&&_()}catch(e){}}},t={};function s(n){var a=t[n];if(void 0!==a)return a.exports;var r=t[n]={exports:{}};return e[n](r,r.exports,s),r.exports}s(142);const n=(e,...t)=>{let s=e;return t.length>0&&(s+=` :: ${JSON.stringify(t)}`),s};class a extends Error{constructor(e,t){super(n(e,t)),this.name=e,this.details=t}}const r=new Set;const i={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!==typeof registration?registration.scope:""},c=e=>[i.prefix,e,i.suffix].filter((e=>e&&e.length>0)).join("-"),o=e=>e||c(i.precache),h=e=>e||c(i.runtime);function l(e,t){const s=new URL(e);for(const n of t)s.searchParams.delete(n);return s.href}let u;function d(e){e.then((()=>{}))}class f{constructor(){this.promise=new Promise(((e,t)=>{this.resolve=e,this.reject=t}))}}const p=e=>new URL(String(e),location.href).href.replace(new RegExp(`^${location.origin}`),"");function g(e){return new Promise((t=>setTimeout(t,e)))}function w(e,t){const s=t();return e.waitUntil(s),s}async function m(e,t){let s=null;if(e.url){s=new URL(e.url).origin}if(s!==self.location.origin)throw new a("cross-origin-copy-response",{origin:s});const n=e.clone(),r={headers:new Headers(n.headers),status:n.status,statusText:n.statusText},i=t?t(r):r,c=function(){if(void 0===u){const t=new Response("");if("body"in t)try{new Response(t.body),u=!0}catch(e){u=!1}u=!1}return u}()?n.body:await n.blob();return new Response(c,i)}const y=(e,t)=>t.some((t=>e instanceof t));let v,b;const R=new WeakMap,x=new WeakMap,C=new WeakMap,E=new WeakMap,L=new WeakMap;let q={get(e,t,s){if(e instanceof IDBTransaction){if("done"===t)return x.get(e);if("objectStoreNames"===t)return e.objectStoreNames||C.get(e);if("store"===t)return s.objectStoreNames[1]?void 0:s.objectStore(s.objectStoreNames[0])}return T(e[t])},set:(e,t,s)=>(e[t]=s,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function D(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(b||(b=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(k(this),t),T(R.get(this))}:function(...t){return T(e.apply(k(this),t))}:function(t,...s){const n=e.call(k(this),t,...s);return C.set(n,t.sort?t.sort():[t]),T(n)}}function U(e){return"function"===typeof e?D(e):(e instanceof IDBTransaction&&function(e){if(x.has(e))return;const t=new Promise(((t,s)=>{const n=()=>{e.removeEventListener("complete",a),e.removeEventListener("error",r),e.removeEventListener("abort",r)},a=()=>{t(),n()},r=()=>{s(e.error||new DOMException("AbortError","AbortError")),n()};e.addEventListener("complete",a),e.addEventListener("error",r),e.addEventListener("abort",r)}));x.set(e,t)}(e),y(e,v||(v=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,q):e)}function T(e){if(e instanceof IDBRequest)return function(e){const t=new Promise(((t,s)=>{const n=()=>{e.removeEventListener("success",a),e.removeEventListener("error",r)},a=()=>{t(T(e.result)),n()},r=()=>{s(e.error),n()};e.addEventListener("success",a),e.addEventListener("error",r)}));return t.then((t=>{t instanceof IDBCursor&&R.set(t,e)})).catch((()=>{})),L.set(t,e),t}(e);if(E.has(e))return E.get(e);const t=U(e);return t!==e&&(E.set(e,t),L.set(t,e)),t}const k=e=>L.get(e);const N=["get","getKey","getAll","getAllKeys","count"],I=["put","add","delete","clear"],K=new Map;function M(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!==typeof t)return;if(K.get(t))return K.get(t);const s=t.replace(/FromIndex$/,""),n=t!==s,a=I.includes(s);if(!(s in(n?IDBIndex:IDBObjectStore).prototype)||!a&&!N.includes(s))return;const r=async function(e,...t){const r=this.transaction(e,a?"readwrite":"readonly");let i=r.store;return n&&(i=i.index(t.shift())),(await Promise.all([i[s](...t),a&&r.done]))[0]};return K.set(t,r),r}q=(e=>({...e,get:(t,s,n)=>M(t,s)||e.get(t,s,n),has:(t,s)=>!!M(t,s)||e.has(t,s)}))(q);s(558);const P="cache-entries",S=e=>{const t=new URL(e,location.href);return t.hash="",t.href};class O{constructor(e){this._db=null,this._cacheName=e}_upgradeDb(e){const t=e.createObjectStore(P,{keyPath:"id"});t.createIndex("cacheName","cacheName",{unique:!1}),t.createIndex("timestamp","timestamp",{unique:!1})}_upgradeDbAndDeleteOldDbs(e){this._upgradeDb(e),this._cacheName&&function(e,{blocked:t}={}){const s=indexedDB.deleteDatabase(e);t&&s.addEventListener("blocked",(e=>t(e.oldVersion,e))),T(s).then((()=>{}))}(this._cacheName)}async setTimestamp(e,t){const s={url:e=S(e),timestamp:t,cacheName:this._cacheName,id:this._getId(e)},n=(await this.getDb()).transaction(P,"readwrite",{durability:"relaxed"});await n.store.put(s),await n.done}async getTimestamp(e){const t=await this.getDb(),s=await t.get(P,this._getId(e));return null===s||void 0===s?void 0:s.timestamp}async expireEntries(e,t){const s=await this.getDb();let n=await s.transaction(P).store.index("timestamp").openCursor(null,"prev");const a=[];let r=0;for(;n;){const s=n.value;s.cacheName===this._cacheName&&(e&&s.timestamp=t?a.push(n.value):r++),n=await n.continue()}const i=[];for(const c of a)await s.delete(P,c.id),i.push(c.url);return i}_getId(e){return this._cacheName+"|"+S(e)}async getDb(){return this._db||(this._db=await function(e,t,{blocked:s,upgrade:n,blocking:a,terminated:r}={}){const i=indexedDB.open(e,t),c=T(i);return n&&i.addEventListener("upgradeneeded",(e=>{n(T(i.result),e.oldVersion,e.newVersion,T(i.transaction),e)})),s&&i.addEventListener("blocked",(e=>s(e.oldVersion,e.newVersion,e))),c.then((e=>{r&&e.addEventListener("close",(()=>r())),a&&e.addEventListener("versionchange",(e=>a(e.oldVersion,e.newVersion,e)))})).catch((()=>{})),c}("workbox-expiration",1,{upgrade:this._upgradeDbAndDeleteOldDbs.bind(this)})),this._db}}class W{constructor(e,t={}){this._isRunning=!1,this._rerunRequested=!1,this._maxEntries=t.maxEntries,this._maxAgeSeconds=t.maxAgeSeconds,this._matchOptions=t.matchOptions,this._cacheName=e,this._timestampModel=new O(e)}async expireEntries(){if(this._isRunning)return void(this._rerunRequested=!0);this._isRunning=!0;const e=this._maxAgeSeconds?Date.now()-1e3*this._maxAgeSeconds:0,t=await this._timestampModel.expireEntries(e,this._maxEntries),s=await self.caches.open(this._cacheName);for(const n of t)await s.delete(n,this._matchOptions);this._isRunning=!1,this._rerunRequested&&(this._rerunRequested=!1,d(this.expireEntries()))}async updateTimestamp(e){await this._timestampModel.setTimestamp(e,Date.now())}async isURLExpired(e){if(this._maxAgeSeconds){const t=await this._timestampModel.getTimestamp(e),s=Date.now()-1e3*this._maxAgeSeconds;return void 0===t||t{t&&(t.originalRequest=e)},this.cachedResponseWillBeUsed=async({event:e,state:t,cachedResponse:s})=>{if("install"===e.type&&t&&t.originalRequest&&t.originalRequest instanceof Request){const e=t.originalRequest.url;s?this.notUpdatedURLs.push(e):this.updatedURLs.push(e)}return s}}}class j{constructor({precacheController:e}){this.cacheKeyWillBeUsed=async({request:e,params:t})=>{const s=(null===t||void 0===t?void 0:t.cacheKey)||this._precacheController.getCacheKeyForURL(e.url);return s?new Request(s,{headers:e.headers}):e},this._precacheController=e}}s(642);function F(e){return"string"===typeof e?new Request(e):e}class H{constructor(e,t){this._cacheKeys={},Object.assign(this,t),this.event=t.event,this._strategy=e,this._handlerDeferred=new f,this._extendLifetimePromises=[],this._plugins=[...e.plugins],this._pluginStateMap=new Map;for(const s of this._plugins)this._pluginStateMap.set(s,{});this.event.waitUntil(this._handlerDeferred.promise)}async fetch(e){const{event:t}=this;let s=F(e);if("navigate"===s.mode&&t instanceof FetchEvent&&t.preloadResponse){const e=await t.preloadResponse;if(e)return e}const n=this.hasCallback("fetchDidFail")?s.clone():null;try{for(const e of this.iterateCallbacks("requestWillFetch"))s=await e({request:s.clone(),event:t})}catch(i){if(i instanceof Error)throw new a("plugin-error-request-will-fetch",{thrownErrorMessage:i.message})}const r=s.clone();try{let e;e=await fetch(s,"navigate"===s.mode?void 0:this._strategy.fetchOptions);for(const s of this.iterateCallbacks("fetchDidSucceed"))e=await s({event:t,request:r,response:e});return e}catch(c){throw n&&await this.runCallbacks("fetchDidFail",{error:c,event:t,originalRequest:n.clone(),request:r.clone()}),c}}async fetchAndCachePut(e){const t=await this.fetch(e),s=t.clone();return this.waitUntil(this.cachePut(e,s)),t}async cacheMatch(e){const t=F(e);let s;const{cacheName:n,matchOptions:a}=this._strategy,r=await this.getCacheKey(t,"read"),i=Object.assign(Object.assign({},a),{cacheName:n});s=await caches.match(r,i);for(const c of this.iterateCallbacks("cachedResponseWillBeUsed"))s=await c({cacheName:n,matchOptions:a,cachedResponse:s,request:r,event:this.event})||void 0;return s}async cachePut(e,t){const s=F(e);await g(0);const n=await this.getCacheKey(s,"write");if(!t)throw new a("cache-put-with-no-response",{url:p(n.url)});const i=await this._ensureResponseSafeToCache(t);if(!i)return!1;const{cacheName:c,matchOptions:o}=this._strategy,h=await self.caches.open(c),u=this.hasCallback("cacheDidUpdate"),d=u?await async function(e,t,s,n){const a=l(t.url,s);if(t.url===a)return e.match(t,n);const r=Object.assign(Object.assign({},n),{ignoreSearch:!0}),i=await e.keys(t,r);for(const c of i)if(a===l(c.url,s))return e.match(c,n)}(h,n.clone(),["__WB_REVISION__"],o):null;try{await h.put(n,u?i.clone():i)}catch(f){if(f instanceof Error)throw"QuotaExceededError"===f.name&&await async function(){for(const e of r)await e()}(),f}for(const a of this.iterateCallbacks("cacheDidUpdate"))await a({cacheName:c,oldResponse:d,newResponse:i.clone(),request:n,event:this.event});return!0}async getCacheKey(e,t){const s=`${e.url} | ${t}`;if(!this._cacheKeys[s]){let n=e;for(const e of this.iterateCallbacks("cacheKeyWillBeUsed"))n=F(await e({mode:t,request:n,event:this.event,params:this.params}));this._cacheKeys[s]=n}return this._cacheKeys[s]}hasCallback(e){for(const t of this._strategy.plugins)if(e in t)return!0;return!1}async runCallbacks(e,t){for(const s of this.iterateCallbacks(e))await s(t)}*iterateCallbacks(e){for(const t of this._strategy.plugins)if("function"===typeof t[e]){const s=this._pluginStateMap.get(t),n=n=>{const a=Object.assign(Object.assign({},n),{state:s});return t[e](a)};yield n}}waitUntil(e){return this._extendLifetimePromises.push(e),e}async doneWaiting(){let e;for(;e=this._extendLifetimePromises.shift();)await e}destroy(){this._handlerDeferred.resolve(null)}async _ensureResponseSafeToCache(e){let t=e,s=!1;for(const n of this.iterateCallbacks("cacheWillUpdate"))if(t=await n({request:this.request,response:t,event:this.event})||void 0,s=!0,!t)break;return s||t&&200!==t.status&&(t=void 0),t}}class V{constructor(e={}){this.cacheName=h(e.cacheName),this.plugins=e.plugins||[],this.fetchOptions=e.fetchOptions,this.matchOptions=e.matchOptions}handle(e){const[t]=this.handleAll(e);return t}handleAll(e){e instanceof FetchEvent&&(e={event:e,request:e.request});const t=e.event,s="string"===typeof e.request?new Request(e.request):e.request,n="params"in e?e.params:void 0,a=new H(this,{event:t,request:s,params:n}),r=this._getResponse(a,s,t);return[r,this._awaitComplete(r,a,s,t)]}async _getResponse(e,t,s){let n;await e.runCallbacks("handlerWillStart",{event:s,request:t});try{if(n=await this._handle(t,e),!n||"error"===n.type)throw new a("no-response",{url:t.url})}catch(r){if(r instanceof Error)for(const a of e.iterateCallbacks("handlerDidError"))if(n=await a({error:r,event:s,request:t}),n)break;if(!n)throw r}for(const a of e.iterateCallbacks("handlerWillRespond"))n=await a({event:s,request:t,response:n});return n}async _awaitComplete(e,t,s,n){let a,r;try{a=await e}catch(r){}try{await t.runCallbacks("handlerDidRespond",{event:n,request:s,response:a}),await t.doneWaiting()}catch(i){i instanceof Error&&(r=i)}if(await t.runCallbacks("handlerDidComplete",{event:n,request:s,response:a,error:r}),t.destroy(),r)throw r}}class $ extends V{constructor(e={}){e.cacheName=o(e.cacheName),super(e),this._fallbackToNetwork=!1!==e.fallbackToNetwork,this.plugins.push($.copyRedirectedCacheableResponsesPlugin)}async _handle(e,t){const s=await t.cacheMatch(e);return s||(t.event&&"install"===t.event.type?await this._handleInstall(e,t):await this._handleFetch(e,t))}async _handleFetch(e,t){let s;const n=t.params||{};if(!this._fallbackToNetwork)throw new a("missing-precache-entry",{cacheName:this.cacheName,url:e.url});{0;const a=n.integrity,r=e.integrity,i=!r||r===a;if(s=await t.fetch(new Request(e,{integrity:"no-cors"!==e.mode?r||a:void 0})),a&&i&&"no-cors"!==e.mode){this._useDefaultCacheabilityPluginIfNeeded();await t.cachePut(e,s.clone());0}}return s}async _handleInstall(e,t){this._useDefaultCacheabilityPluginIfNeeded();const s=await t.fetch(e);if(!await t.cachePut(e,s.clone()))throw new a("bad-precaching-response",{url:e.url,status:s.status});return s}_useDefaultCacheabilityPluginIfNeeded(){let e=null,t=0;for(const[s,n]of this.plugins.entries())n!==$.copyRedirectedCacheableResponsesPlugin&&(n===$.defaultPrecacheCacheabilityPlugin&&(e=s),n.cacheWillUpdate&&t++);0===t?this.plugins.push($.defaultPrecacheCacheabilityPlugin):t>1&&null!==e&&this.plugins.splice(e,1)}}$.defaultPrecacheCacheabilityPlugin={cacheWillUpdate:async({response:e})=>!e||e.status>=400?null:e},$.copyRedirectedCacheableResponsesPlugin={cacheWillUpdate:async({response:e})=>e.redirected?await m(e):e};class G{constructor({cacheName:e,plugins:t=[],fallbackToNetwork:s=!0}={}){this._urlsToCacheKeys=new Map,this._urlsToCacheModes=new Map,this._cacheKeysToIntegrities=new Map,this._strategy=new $({cacheName:o(e),plugins:[...t,new j({precacheController:this})],fallbackToNetwork:s}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}get strategy(){return this._strategy}precache(e){this.addToCacheList(e),this._installAndActiveListenersAdded||(self.addEventListener("install",this.install),self.addEventListener("activate",this.activate),this._installAndActiveListenersAdded=!0)}addToCacheList(e){const t=[];for(const s of e){"string"===typeof s?t.push(s):s&&void 0===s.revision&&t.push(s.url);const{cacheKey:e,url:n}=A(s),r="string"!==typeof s&&s.revision?"reload":"default";if(this._urlsToCacheKeys.has(n)&&this._urlsToCacheKeys.get(n)!==e)throw new a("add-to-cache-list-conflicting-entries",{firstEntry:this._urlsToCacheKeys.get(n),secondEntry:e});if("string"!==typeof s&&s.integrity){if(this._cacheKeysToIntegrities.has(e)&&this._cacheKeysToIntegrities.get(e)!==s.integrity)throw new a("add-to-cache-list-conflicting-integrities",{url:n});this._cacheKeysToIntegrities.set(e,s.integrity)}if(this._urlsToCacheKeys.set(n,e),this._urlsToCacheModes.set(n,r),t.length>0){const e=`Workbox is precaching URLs without revision info: ${t.join(", ")}\nThis is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(e)}}}install(e){return w(e,(async()=>{const t=new B;this.strategy.plugins.push(t);for(const[a,r]of this._urlsToCacheKeys){const t=this._cacheKeysToIntegrities.get(r),s=this._urlsToCacheModes.get(a),n=new Request(a,{integrity:t,cache:s,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:r},request:n,event:e}))}const{updatedURLs:s,notUpdatedURLs:n}=t;return{updatedURLs:s,notUpdatedURLs:n}}))}activate(e){return w(e,(async()=>{const e=await self.caches.open(this.strategy.cacheName),t=await e.keys(),s=new Set(this._urlsToCacheKeys.values()),n=[];for(const a of t)s.has(a.url)||(await e.delete(a),n.push(a.url));return{deletedURLs:n}}))}getURLsToCacheKeys(){return this._urlsToCacheKeys}getCachedURLs(){return[...this._urlsToCacheKeys.keys()]}getCacheKeyForURL(e){const t=new URL(e,location.href);return this._urlsToCacheKeys.get(t.href)}getIntegrityForCacheKey(e){return this._cacheKeysToIntegrities.get(e)}async matchPrecache(e){const t=e instanceof Request?e.url:e,s=this.getCacheKeyForURL(t);if(s){return(await self.caches.open(this.strategy.cacheName)).match(s)}}createHandlerBoundToURL(e){const t=this.getCacheKeyForURL(e);if(!t)throw new a("non-precached-url",{url:e});return s=>(s.request=new Request(e),s.params=Object.assign({cacheKey:t},s.params),this.strategy.handle(s))}}let Q;const J=()=>(Q||(Q=new G),Q);s(636);const z=e=>e&&"object"===typeof e?e:{handle:e};class X{constructor(e,t,s="GET"){this.handler=z(t),this.match=e,this.method=s}setCatchHandler(e){this.catchHandler=z(e)}}class Y extends X{constructor(e,t,s){super((({url:t})=>{const s=e.exec(t.href);if(s&&(t.origin===location.origin||0===s.index))return s.slice(1)}),t,s)}}class Z{constructor(){this._routes=new Map,this._defaultHandlerMap=new Map}get routes(){return this._routes}addFetchListener(){self.addEventListener("fetch",(e=>{const{request:t}=e,s=this.handleRequest({request:t,event:e});s&&e.respondWith(s)}))}addCacheListener(){self.addEventListener("message",(e=>{if(e.data&&"CACHE_URLS"===e.data.type){const{payload:t}=e.data;0;const s=Promise.all(t.urlsToCache.map((t=>{"string"===typeof t&&(t=[t]);const s=new Request(...t);return this.handleRequest({request:s,event:e})})));e.waitUntil(s),e.ports&&e.ports[0]&&s.then((()=>e.ports[0].postMessage(!0)))}}))}handleRequest({request:e,event:t}){const s=new URL(e.url,location.href);if(!s.protocol.startsWith("http"))return void 0;const n=s.origin===location.origin,{params:a,route:r}=this.findMatchingRoute({event:t,request:e,sameOrigin:n,url:s});let i=r&&r.handler;const c=e.method;if(!i&&this._defaultHandlerMap.has(c)&&(i=this._defaultHandlerMap.get(c)),!i)return void 0;let o;try{o=i.handle({url:s,request:e,event:t,params:a})}catch(l){o=Promise.reject(l)}const h=r&&r.catchHandler;return o instanceof Promise&&(this._catchHandler||h)&&(o=o.catch((async n=>{if(h){0;try{return await h.handle({url:s,request:e,event:t,params:a})}catch(r){r instanceof Error&&(n=r)}}if(this._catchHandler)return this._catchHandler.handle({url:s,request:e,event:t});throw n}))),o}findMatchingRoute({url:e,sameOrigin:t,request:s,event:n}){const a=this._routes.get(s.method)||[];for(const r of a){let a;const i=r.match({url:e,sameOrigin:t,request:s,event:n});if(i)return a=i,(Array.isArray(a)&&0===a.length||i.constructor===Object&&0===Object.keys(i).length||"boolean"===typeof i)&&(a=void 0),{route:r,params:a}}return{}}setDefaultHandler(e,t="GET"){this._defaultHandlerMap.set(t,z(e))}setCatchHandler(e){this._catchHandler=z(e)}registerRoute(e){this._routes.has(e.method)||this._routes.set(e.method,[]),this._routes.get(e.method).push(e)}unregisterRoute(e){if(!this._routes.has(e.method))throw new a("unregister-route-but-not-found-with-method",{method:e.method});const t=this._routes.get(e.method).indexOf(e);if(!(t>-1))throw new a("unregister-route-route-not-registered");this._routes.get(e.method).splice(t,1)}}let ee;const te=()=>(ee||(ee=new Z,ee.addFetchListener(),ee.addCacheListener()),ee);function se(e,t,s){let n;if("string"===typeof e){const a=new URL(e,location.href);0;n=new X((({url:e})=>e.href===a.href),t,s)}else if(e instanceof RegExp)n=new Y(e,t,s);else if("function"===typeof e)n=new X(e,t,s);else{if(!(e instanceof X))throw new a("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});n=e}return te().registerRoute(n),n}class ne extends X{constructor(e,t){super((({request:s})=>{const n=e.getURLsToCacheKeys();for(const a of function*(e,{ignoreURLParametersMatching:t=[/^utm_/,/^fbclid$/],directoryIndex:s="index.html",cleanURLs:n=!0,urlManipulation:a}={}){const r=new URL(e,location.href);r.hash="",yield r.href;const i=function(e,t=[]){for(const s of[...e.searchParams.keys()])t.some((e=>e.test(s)))&&e.searchParams.delete(s);return e}(r,t);if(yield i.href,s&&i.pathname.endsWith("/")){const e=new URL(i.href);e.pathname+=s,yield e.href}if(n){const e=new URL(i.href);e.pathname+=".html",yield e.href}if(a){const e=a({url:r});for(const t of e)yield t.href}}(s.url,t)){const t=n.get(a);if(t){return{cacheKey:t,integrity:e.getIntegrityForCacheKey(t)}}}}),e.strategy)}}const ae={cacheWillUpdate:async({response:e})=>200===e.status||0===e.status?e:null};var re;self.addEventListener("activate",(()=>self.clients.claim())),function(e){J().precache(e)}([{'revision':'07bd11e1955bbb8648ede86078d92b13','url':'/index.html'},{'revision':null,'url':'/static/css/195.cdf1fe26.chunk.css'},{'revision':null,'url':'/static/css/446.319a0232.chunk.css'},{'revision':null,'url':'/static/css/664.8a09720a.chunk.css'},{'revision':null,'url':'/static/css/main.34b80300.css'},{'revision':null,'url':'/static/css/widget.d13f8dd3.css'},{'revision':null,'url':'/static/js/128.0e928812.chunk.js'},{'revision':null,'url':'/static/js/195.f6ecafec.chunk.js'},{'revision':null,'url':'/static/js/200.7fd884c2.chunk.js'},{'revision':null,'url':'/static/js/227.4245e14f.chunk.js'},{'revision':null,'url':'/static/js/261.fa5e8388.chunk.js'},{'revision':null,'url':'/static/js/265.e5ddcab0.chunk.js'},{'revision':null,'url':'/static/js/29.0622ef4f.chunk.js'},{'revision':null,'url':'/static/js/308.4d112326.chunk.js'},{'revision':null,'url':'/static/js/318.23e14e69.chunk.js'},{'revision':null,'url':'/static/js/400.6fec3118.chunk.js'},{'revision':null,'url':'/static/js/409.8aa153f9.chunk.js'},{'revision':null,'url':'/static/js/446.25c397da.chunk.js'},{'revision':null,'url':'/static/js/487.93e50bd5.chunk.js'},{'revision':null,'url':'/static/js/489.b843221e.chunk.js'},{'revision':null,'url':'/static/js/549.5615531f.chunk.js'},{'revision':null,'url':'/static/js/566.551a69d5.chunk.js'},{'revision':null,'url':'/static/js/610.3ea800a8.chunk.js'},{'revision':null,'url':'/static/js/625.a6bbf2f1.chunk.js'},{'revision':null,'url':'/static/js/64.78198cfe.chunk.js'},{'revision':null,'url':'/static/js/658.0a3095f3.chunk.js'},{'revision':null,'url':'/static/js/664.79d15709.chunk.js'},{'revision':null,'url':'/static/js/691.ccab93ee.chunk.js'},{'revision':null,'url':'/static/js/694.1e89ad69.chunk.js'},{'revision':null,'url':'/static/js/71.267b6f9e.chunk.js'},{'revision':null,'url':'/static/js/757.2756e1f7.chunk.js'},{'revision':null,'url':'/static/js/770.16942382.chunk.js'},{'revision':null,'url':'/static/js/812.edacbb15.chunk.js'},{'revision':null,'url':'/static/js/875.63eefd4c.chunk.js'},{'revision':null,'url':'/static/js/879.c94b008c.chunk.js'},{'revision':null,'url':'/static/js/88.75be6853.chunk.js'},{'revision':null,'url':'/static/js/887.968f913c.chunk.js'},{'revision':null,'url':'/static/js/911.85085ca5.chunk.js'},{'revision':null,'url':'/static/js/919.23e2f4de.chunk.js'},{'revision':null,'url':'/static/js/945.11b0d1d3.chunk.js'},{'revision':null,'url':'/static/js/973.7e1412c7.chunk.js'},{'revision':null,'url':'/static/js/main.1d1b0ad8.js'},{'revision':null,'url':'/static/js/widget.e6c1f353.js'},{'revision':null,'url':'/static/media/edit.18de09b48249f213cf85.svg'},{'revision':null,'url':'/static/media/getFetch.c4cca45e22bc1b2c7d0d.cjs'},{'revision':null,'url':'/static/media/index.294a0edb7af7d19b781b.cjs'},{'revision':null,'url':'/static/media/index.40b335a788697b39d89d.cjs'},{'revision':null,'url':'/static/media/index.4a92f16a45a8dc264e40.cjs'},{'revision':null,'url':'/static/media/index.675293235c1d3a61a78f.cjs'},{'revision':null,'url':'/static/media/index.c05687ef19f5bac24939.cjs'},{'revision':null,'url':'/static/media/join.32e45d691d059a55188a.wav'},{'revision':null,'url':'/static/media/metamask.f04d5fb63394197766d0.svg'},{'revision':null,'url':'/static/media/more.d35b0228affb89f48593.svg'},{'revision':null,'url':'/static/media/msg.sound.2c23efd582318e940e57.wav'},{'revision':null,'url':'/static/media/picture.57a395fb7f41e8e3c5d1.svg'},{'revision':null,'url':'/static/media/play.ada446bc1d007eef6447.svg'},{'revision':null,'url':'/static/media/reaction.dfc99cbb32dd13e55782.svg'},{'revision':null,'url':'/static/media/reply.c7c79a9d5cee92f51ec5.svg'},{'revision':null,'url':'/static/media/upload.image.9f8c7fc90042d2ff4eb7.svg'},{'revision':'128ea7e1013a688a3cb2342ca0aeecd3','url':'/widget.html'}]),function(e){const t=J();se(new ne(t,e))}(re);const ie=new RegExp("/[^/?]+\\.[^/]+$");var ce;se((({request:e,url:t})=>{if("navigate"!==e.mode)return!1;const s=t.pathname;return!(s.startsWith("/_")||s.startsWith("/VERSION")||s.startsWith("/api")||s.startsWith("/locales/")||s.startsWith("/widget"))&&!s.match(ie)}),(ce="/index.html",J().createHandlerBoundToURL(ce))),se((({url:e})=>e.origin===self.location.origin&&e.pathname.endsWith(".png")),new class extends V{constructor(e={}){super(e),this.plugins.some((e=>"cacheWillUpdate"in e))||this.plugins.unshift(ae)}async _handle(e,t){const s=t.fetchAndCachePut(e).catch((()=>{}));t.waitUntil(s);let n,r=await t.cacheMatch(e);if(r)0;else{0;try{r=await s}catch(i){i instanceof Error&&(n=i)}}if(!r)throw new a("no-response",{url:e.url,error:n});return r}}({cacheName:"images",plugins:[new class{constructor(e={}){this.cachedResponseWillBeUsed=async({event:e,request:t,cacheName:s,cachedResponse:n})=>{if(!n)return null;const a=this._isResponseDateFresh(n),r=this._getCacheExpiration(s);d(r.expireEntries());const i=r.updateTimestamp(t.url);if(e)try{e.waitUntil(i)}catch(c){0}return a?n:null},this.cacheDidUpdate=async({cacheName:e,request:t})=>{const s=this._getCacheExpiration(e);await s.updateTimestamp(t.url),await s.expireEntries()},this._config=e,this._maxAgeSeconds=e.maxAgeSeconds,this._cacheExpirations=new Map,e.purgeOnQuotaError&&function(e){r.add(e)}((()=>this.deleteCacheAndMetadata()))}_getCacheExpiration(e){if(e===h())throw new a("expire-custom-caches-only");let t=this._cacheExpirations.get(e);return t||(t=new W(e,this._config),this._cacheExpirations.set(e,t)),t}_isResponseDateFresh(e){if(!this._maxAgeSeconds)return!0;const t=this._getDateHeaderTimestamp(e);if(null===t)return!0;return t>=Date.now()-1e3*this._maxAgeSeconds}_getDateHeaderTimestamp(e){if(!e.headers.has("date"))return null;const t=e.headers.get("date"),s=new Date(t).getTime();return isNaN(s)?null:s}async deleteCacheAndMetadata(){for(const[e,t]of this._cacheExpirations)await self.caches.delete(e),await t.delete();this._cacheExpirations=new Map}}({maxEntries:50})]})),self.addEventListener("message",(e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()}))})();
\ No newline at end of file
diff --git a/static/css/957.cdf1fe26.chunk.css b/static/css/195.cdf1fe26.chunk.css
similarity index 100%
rename from static/css/957.cdf1fe26.chunk.css
rename to static/css/195.cdf1fe26.chunk.css
diff --git a/static/js/957.4eed77ab.chunk.js b/static/js/195.f6ecafec.chunk.js
similarity index 73%
rename from static/js/957.4eed77ab.chunk.js
rename to static/js/195.f6ecafec.chunk.js
index 46fbdbf8..8337dd6a 100644
--- a/static/js/957.4eed77ab.chunk.js
+++ b/static/js/195.f6ecafec.chunk.js
@@ -1 +1 @@
-"use strict";(globalThis.webpackChunkvocechat_web=globalThis.webpackChunkvocechat_web||[]).push([[957],{63734:(e,s,t)=>{t.d(s,{A:()=>c});var a,l=t(81084);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var s=1;sl.createElement("svg",i({width:16,height:16,viewBox:"0 0 16 16",fill:"#6C737F",xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":s},t),e?l.createElement("title",{id:s},e):null,a||(a=l.createElement("path",{d:"M8.11904 0C3.91105 0 0.5 3.41105 0.5 7.61905C0.5 11.827 3.91105 15.2381 8.11904 15.2381C12.3271 15.2381 15.7381 11.827 15.7381 7.61905C15.7381 3.41105 12.3263 0 8.11904 0ZM11.7053 10.128L10.628 11.2053L8.11904 8.69714L5.61009 11.2053L4.53277 10.128L7.04095 7.61905L4.532 5.1101L5.60934 4.03353L8.11829 6.54248L10.6272 4.03353L11.7045 5.1101L9.19638 7.61905L11.7053 10.128Z"}))),c=(0,l.forwardRef)(r)},6691:(e,s,t)=>{t.d(s,{A:()=>c});var a,l=t(81084);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var s=1;sl.createElement("svg",i({width:20,height:20,viewBox:"0 0 20 20",fill:"#667085",xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":s},t),e?l.createElement("title",{id:s},e):null,a||(a=l.createElement("path",{d:"M6 4C6 2.89543 6.89543 2 8 2H14C15.1046 2 16 2.89543 16 4V14C16 15.1046 15.1046 16 14 16H8C6.89543 16 6 15.1046 6 14V4ZM4 6.00001C4 5.25973 4.4022 4.61339 5 4.26758V14.5C5 15.8807 6.11929 17 7.5 17H13.7324C13.3866 17.5978 12.7403 18 12 18H7.5C5.567 18 4 16.433 4 14.5V6.00001Z"}))),c=(0,l.forwardRef)(r)},71389:(e,s,t)=>{t.d(s,{A:()=>c});var a,l=t(81084);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var s=1;sl.createElement("svg",i({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":s},t),e?l.createElement("title",{id:s},e):null,a||(a=l.createElement("path",{d:"M12 3.25C13.4346 3.25 14.6126 4.34848 14.7388 5.75019L19 5.75C19.4142 5.75 19.75 6.08579 19.75 6.5C19.75 6.8797 19.4678 7.19349 19.1018 7.24315L19 7.25H18.417L17.1499 18.2292C17.0335 19.2384 16.179 20 15.1631 20H8.83688C7.821 20 6.9665 19.2384 6.85006 18.2292L5.582 7.25H5C4.6203 7.25 4.30651 6.96785 4.25685 6.60177L4.25 6.5C4.25 6.1203 4.53215 5.80651 4.89823 5.75685L5 5.75L9.26119 5.75019C9.38741 4.34848 10.5654 3.25 12 3.25ZM10.5 9.5C10.2545 9.5 10.0504 9.65477 10.0081 9.85886L10 9.9375V16.0625L10.0081 16.1411C10.0504 16.3452 10.2545 16.5 10.5 16.5C10.7455 16.5 10.9496 16.3452 10.9919 16.1411L11 16.0625V9.9375L10.9919 9.85886C10.9496 9.65477 10.7455 9.5 10.5 9.5ZM13.5 9.5C13.2545 9.5 13.0504 9.65477 13.0081 9.85886L13 9.9375V16.0625L13.0081 16.1411C13.0504 16.3452 13.2545 16.5 13.5 16.5C13.7455 16.5 13.9496 16.3452 13.9919 16.1411L14 16.0625V9.9375L13.9919 9.85886C13.9496 9.65477 13.7455 9.5 13.5 9.5ZM12 4.75C11.3952 4.75 10.8908 5.17947 10.775 5.75005H13.225C13.1092 5.17947 12.6048 4.75 12 4.75Z",fill:"#D92D20"}))),c=(0,l.forwardRef)(r)},31872:(e,s,t)=>{t.d(s,{A:()=>c});var a,l=t(81084);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var s=1;sl.createElement("svg",i({width:24,height:24,viewBox:"0 0 24 24",fill:"#667085",xmlns:"http://www.w3.org/2000/svg",ref:r,"aria-labelledby":s},t),e?l.createElement("title",{id:s},e):null,a||(a=l.createElement("path",{d:"M13.7036 5.75927L18.2405 10.2962L9.33146 19.2052C9.08325 19.4534 8.77457 19.6325 8.43593 19.7249L3.84998 20.9756C3.34808 21.1124 2.88755 20.6519 3.02443 20.15L4.27515 15.5641C4.3675 15.2254 4.54664 14.9167 4.79484 14.6685L13.7036 5.75927ZM20.0604 3.93956C21.3132 5.19232 21.3132 7.22343 20.0604 8.47618L19.1907 9.34506L14.6538 4.80903L15.5238 3.93956C16.7766 2.68681 18.8077 2.68681 20.0604 3.93956Z"}))),c=(0,l.forwardRef)(r)},27820:(e,s,t)=>{t.d(s,{A:()=>m});var a=t(2497),l=(t(45347),t(95380)),i=t(80724),r=t(92316),c=t(52205),n=t(99264);const d=({uid:e,popover:s=!0,cid:t,textOnly:a=!1})=>{const d=(0,i.GV)((e=>e.users.byId),c.bN)[e];return d?a?(0,n.jsx)(n.Fragment,{children:`@${d.name}`}):s?(0,n.jsx)(l.Ay,{interactive:!0,placement:"top",trigger:"click",content:(0,n.jsx)(r.A,{uid:e,type:"card",cid:t}),children:(0,n.jsx)("span",{className:"px-0.5 text-primary-400 cursor-pointer",children:`@${d.name}`})}):(0,n.jsx)("span",{className:"px-0.5 text-primary-400",children:`@${d.name}`}):null};var o=t(81084),u=t(54697),x=t(13050);const j="data:image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EU33O9tTy63q7Kt8PQBXx91Aoor17AG3wBX0cRlEmnKdF/B0VwHHsPiVF/gcQoGRKjgcTuRprFs7X6fDPNMljSLMe7rxFBfeWQi7tNRFABbnMzEcRycQKZo0wjv0JVlUJUVd5QVRevkmk/4kSmdSHzK2SaEybTmmMm016n+5AJ0X3z53Rfl+i+DHDI++MNk5TzMCFp04Zwcc+E5HXRRXz/6h2UqQ9ZUZRpjUpYMaBMa4oyrUjE92IfI3VLtYDUbVq10gdIXc73L0M7y/HY0M5jaWjnXxcfJMaT64jxZGxr6v5YwcYTx5q6/9/lLwwJNCus1PtUAAAAAElFTkSuQmCC";function M({url:e=""}){const s=(0,c.wA)(),[t,a]=(0,o.useState)(""),[l,{isLoading:r}]=(0,u.Q5)(),d=(0,i.GV)((s=>s.footprint.og[e]),c.bN),[M,m]=(0,o.useState)(null);(0,o.useEffect)((()=>{if(d){var s;const e=(null===d||void 0===d?void 0:d.title)||(null===d||void 0===d?void 0:d.site_name)||"",t=(null===d||void 0===d?void 0:d.description)||"",l=(null===d||void 0===d||null===(s=d.images.find((e=>!!e.url)))||void 0===s?void 0:s.url)||"",i=(null===d||void 0===d?void 0:d.favicon_url)||j;a(i),m({title:e,description:t,ogImage:l})}else e&&l(e)}),[e,d]);if(r)return(0,n.jsx)("div",{className:"h-28"});if(!e||!M||!M.title)return null;const{title:g,description:N,ogImage:h}=M,p="flex items-center border border-solid border-gray-300 dark:border-gray-600 box-border rounded-md w-[80%] md:w-[380px]";return h?(0,n.jsxs)("a",{className:`${p} flex-col !items-start p-3`,href:e,target:"_blank",rel:"noreferrer",children:[(0,n.jsx)("h3",{className:"text-primary-500 w-full truncate",children:g}),(0,n.jsx)("p",{className:"text-xs text-gray-400 mb-2 w-full truncate",children:N}),(0,n.jsx)("div",{className:"w-full h-[180px]",children:(0,n.jsx)("img",{className:"w-full h-full object-cover",onError:()=>{s((0,x.M3)({key:e,value:{...d,images:[]}}))},src:h,alt:"og image"})})]}):(0,n.jsxs)("a",{className:`${p} gap-2 px-2 py-3`,href:e,target:"_blank",rel:"noreferrer",children:[t&&(0,n.jsx)("div",{className:"flex rounded",children:(0,n.jsx)("img",{className:"object-contain w-12 h-12",onError:()=>{a(j)},src:t,alt:"favicon"})}),(0,n.jsxs)("div",{className:"flex flex-col",children:[(0,n.jsx)("h3",{className:"text-sm text-gray-900 dark:text-gray-100",children:g}),(0,n.jsx)("p",{className:"hidden md:block text-xs text-gray-500 w-[288px] truncate",children:N}),(0,n.jsx)("span",{className:"text-[10px] text-gray-500 w-[288px] truncate",children:e})]})]})}const m=({url:e=!0,mention:s=!0,mentionTextOnly:t=!1,mentionPopOver:l=!0,linkPreview:i=!0,text:r,cid:c})=>(0,n.jsx)(a.A,{options:{render:{email:({content:e,attributes:{href:s}})=>t?(0,n.jsx)(n.Fragment,{children:e}):(0,n.jsx)("a",{className:"text-primary-500",href:s,rel:"noreferrer",children:e}),url:({content:s,attributes:{href:t}})=>e&&s.startsWith("http")?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("a",{className:"text-primary-500",target:"_blank",href:t,rel:"noreferrer",children:s}),i&&(0,n.jsx)(M,{url:t})]}):(0,n.jsx)(n.Fragment,{children:s}),mention:({content:e})=>{if(!s)return(0,n.jsx)(n.Fragment,{children:e});if(/@[0-9]+/.test(e)){const s=e.trim().slice(1);return(0,n.jsx)(d,{uid:+s,cid:c,popover:l,textOnly:t})}return(0,n.jsx)(n.Fragment,{children:e})}}},children:r})},61082:(e,s,t)=>{t.d(s,{A:()=>i});var a=t(81084),l=t(13631);function i(){const[e,s]=(0,a.useState)(!1),[t,i]=(0,a.useState)(),{data:r}=(0,l.Hx)(void 0,{refetchOnMountOrArgChange:!0}),[c,{isSuccess:n}]=(0,l.Vi)();(0,a.useEffect)((()=>{r&&i(r)}),[r]),(0,a.useEffect)((()=>{s(!n&&JSON.stringify(r)!==JSON.stringify(t))}),[r,t,n]);return{config:t,changed:e,updateGithubAuthConfig:e=>{i((s=>s?{...s,...e}:e))},updateGithubAuthConfigToServer:async()=>{t&&await c(t)},isSuccess:n}}},55146:(e,s,t)=>{t.d(s,{A:()=>i});var a=t(81084),l=t(13631);function i(){const[e,s]=(0,a.useState)(!1),[t,i]=(0,a.useState)(""),{data:r}=(0,l.LX)(void 0,{refetchOnMountOrArgChange:!0}),[c,{isSuccess:n}]=(0,l.pA)();(0,a.useEffect)((()=>{r&&i(r.client_id)}),[r]),(0,a.useEffect)((()=>{s(!n&&(null===r||void 0===r?void 0:r.client_id)!==t)}),[r,t,n]);return{config:r,changed:e,clientId:t,updateClientId:i,updateClientIdToServer:async()=>{t&&await c({client_id:t})},updateGoogleAuthConfig:c,isSuccess:n}}},85666:(e,s,t)=>{t.d(s,{A:()=>c});var a=t(81084),l=t(13631),i=t(80724),r=t(52205);const c=(e=!1)=>{var s;const t=(0,i.GV)((e=>e.users.ids.length),r.bN),c=(0,i.GV)((e=>e.server.upgraded),r.bN),n=(0,i.GV)((e=>e.authData.guest),r.bN),{data:d,refetch:o,isLoading:u}=(0,l.xI)(void 0,{refetchOnMountOrArgChange:e,skip:n}),[x,{isLoading:j,isSuccess:M}]=(0,l._8)(),[m,{isSuccess:g,isLoading:N,reset:h}]=(0,l.bb)();(0,a.useEffect)((()=>{g&&(o(),h())}),[g]);return{upgraded:c,reachLimit:t>=(null!==(s=null===d||void 0===d?void 0:d.user_limit)&&void 0!==s?s:Number.MAX_SAFE_INTEGER),license:d,checked:M,isLoading:u,checking:j,upserting:N,upserted:g,checkLicense:e=>{x(e)},upsertLicense:async e=>{const s=await x(e);return!(!("data"in s)||!s.data.sign)&&await m(e)}}}},2890:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{A:()=>MyAccount});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(81084),react_hot_toast__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(71017),react_i18next__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(43307),_app_services_user__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(25303),_app_store__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(80724),_components_AvatarUploader__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(87965),_components_styled_Button__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(32642),_ProfileBasicEditModal__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(97507),_RemoveAccountConfirmModal__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(5427),_UpdatePasswordModal__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(29690),react_redux__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(52205),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(99264);function MyAccount(){const{t:t}=(0,react_i18next__WEBPACK_IMPORTED_MODULE_2__.Bd)("member"),{t:ct}=(0,react_i18next__WEBPACK_IMPORTED_MODULE_2__.Bd)(),[passwordModal,setPasswordModal]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1),[editModal,setEditModal]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(""),[removeConfirmVisible,setRemoveConfirmVisible]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1),[uploadAvatar,{isSuccess:uploadSuccess}]=(0,_app_services_user__WEBPACK_IMPORTED_MODULE_3__.pl)(),EditModalInfo={name:{label:t("username"),title:t("change_name"),intro:t("change_name_desc")},email:{label:t("email"),title:t("change_email"),intro:t("change_email_desc")}},loginUser=(0,_app_store__WEBPACK_IMPORTED_MODULE_4__.GV)((e=>{var s;return e.users.byId[(null===(s=e.authData.user)||void 0===s?void 0:s.uid)||0]}),react_redux__WEBPACK_IMPORTED_MODULE_11__.bN);(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)((()=>{uploadSuccess&&react_hot_toast__WEBPACK_IMPORTED_MODULE_1__.Ay.success(ct("tip.update"))}),[uploadSuccess]);const handleBasicEdit=e=>{const{edit:s}=e.currentTarget.dataset;setEditModal(s)},closeBasicEditModal=()=>{setEditModal("")},togglePasswordModal=()=>{setPasswordModal((e=>!e))},toggleRemoveAccountModalVisible=()=>{setRemoveConfirmVisible((e=>!e))};if(!loginUser)return null;const{uid:uid,avatar:avatar,name:name,email:email}=loginUser;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsxs)("div",{className:"flex flex-col items-start gap-8",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsxs)("div",{className:"md:p-6 flex flex-col items-center w-full md:w-[512px] md:bg-gray-100 md:dark:bg-gray-800 md:rounded-2xl",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_components_AvatarUploader__WEBPACK_IMPORTED_MODULE_5__.A,{url:avatar,name:name,uploadImage:uploadAvatar}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsxs)("div",{className:"mt-2 mb-16 font-bold text-lg text-gray-800 dark:text-white",children:[name," ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsxs)("span",{className:"font-normal text-gray-500",children:["#",uid]})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsxs)("div",{className:"w-full flex items-start justify-between mb-6",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsxs)("div",{className:"flex flex-col text-gray-500 dark:text-gray-50",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)("span",{className:"text-xs uppercase font-semibold",children:t("username")}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsxs)("span",{className:"text-sm ",children:[name," ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsxs)("span",{className:"text-gray-600 dark:text-gray-400",children:[" #",uid]})]})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_components_styled_Button__WEBPACK_IMPORTED_MODULE_6__.A,{"data-edit":"name",onClick:handleBasicEdit,className:"",children:ct("action.edit")})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsxs)("div",{className:"w-full flex items-start justify-between mb-6",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsxs)("div",{className:"flex flex-col text-gray-500 dark:text-gray-50",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)("span",{className:"text-xs uppercase font-semibold",children:t("email")}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)("span",{className:"text-sm",children:email})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_components_styled_Button__WEBPACK_IMPORTED_MODULE_6__.A,{"data-edit":"email",onClick:handleBasicEdit,children:ct("action.edit")})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsxs)("div",{className:"w-full flex items-start justify-between mb-6",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsxs)("div",{className:"flex flex-col text-gray-500 dark:text-gray-50",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)("span",{className:"text-xs uppercase font-semibold",children:t("password")}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)("span",{className:"text-sm",children:"*********"})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_components_styled_Button__WEBPACK_IMPORTED_MODULE_6__.A,{onClick:togglePasswordModal,children:ct("action.edit")})]})]}),1!=uid&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_components_styled_Button__WEBPACK_IMPORTED_MODULE_6__.A,{className:"danger",onClick:toggleRemoveAccountModalVisible,children:t("delete_account")})]}),editModal&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_ProfileBasicEditModal__WEBPACK_IMPORTED_MODULE_7__.A,{type:"email"==editModal?"email":"text",valueKey:editModal,...EditModalInfo[editModal],value:eval(editModal),closeModal:closeBasicEditModal}),passwordModal&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_UpdatePasswordModal__WEBPACK_IMPORTED_MODULE_9__.A,{closeModal:togglePasswordModal}),removeConfirmVisible&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_RemoveAccountConfirmModal__WEBPACK_IMPORTED_MODULE_8__.A,{closeModal:toggleRemoveAccountModalVisible})]})}},97507:(e,s,t)=>{t.d(s,{A:()=>x});var a=t(81084),l=t(71017),i=t(43307),r=t(25303),c=t(26521),n=t(32642),d=t(87740),o=t(55371),u=t(99264);const x=({label:e="Username",valueKey:s="name",value:t="",type:x="text",title:j="Change your username",intro:M="Enter a new username and your existing password.",closeModal:m})=>{const g=(0,a.useRef)(null),{t:N}=(0,i.Bd)(),[h,p]=(0,a.useState)(t),[_,{isLoading:D,isSuccess:y}]=(0,r.sU)();return(0,a.useEffect)((()=>{y&&(l.Ay.success(N("tip.update")),m())}),[y]),(0,u.jsx)(c.A,{id:"modal-modal",children:(0,u.jsx)(o.A,{title:j,description:M,buttons:(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(n.A,{className:"cancel",onClick:m,children:N("action.cancel")}),(0,u.jsx)(n.A,{onClick:()=>{if(!g||!g.current)return;const e=g.current;e.checkValidity()?_({[s]:h}):e.reportValidity()},children:D?"Updating":N("action.done")})]}),children:(0,u.jsxs)("form",{ref:g,className:"flex flex-col gap-2 w-full",action:"/",children:[(0,u.jsx)("label",{htmlFor:s,className:"text-sm text-left text-gray-500",children:e}),(0,u.jsx)(d.A,{name:s,value:h,onChange:e=>{p(e.target.value)},type:x,required:!0})]})})})}},5427:(e,s,t)=>{t.d(s,{A:()=>x});var a=t(81084),l=t(71017),i=t(43307),r=t(97282),c=t(26521),n=t(32642),d=t(55371),o=t(93335),u=t(99264);const x=({closeModal:e})=>{const{t:s}=(0,i.Bd)("member"),[t,{isLoading:x,isSuccess:j}]=(0,r.fe)(),{clearLocalData:M}=(0,o.A)();return(0,a.useEffect)((()=>{j&&M(!0)}),[j]),(0,u.jsx)(c.A,{id:"modal-modal",children:(0,u.jsx)(d.A,{title:s("remove_account"),description:s("remove_account_desc"),buttons:(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(n.A,{onClick:e,children:s("action.cancel",{ns:"common"})}),(0,u.jsx)(n.A,{disabled:x,onClick:async()=>{try{await t()}catch(e){l.Ay.error("Remove Account Failed!")}},className:"danger",children:s("remove")})]})})})}},29690:(e,s,t)=>{t.d(s,{A:()=>x});var a=t(81084),l=t(71017),i=t(43307),r=t(97282),c=t(26521),n=t(32642),d=t(87740),o=t(55371),u=t(99264);const x=({closeModal:e})=>{const{t:s}=(0,i.Bd)("member"),{t:t}=(0,i.Bd)(),{data:x}=(0,r.kU)(),[j,M]=(0,a.useState)({current:"",newPassword:"",confirmPassword:""}),[m,{isLoading:g,isSuccess:N}]=(0,r.zo)(),h=e=>{const{type:s}=e.target.dataset;M((t=>({...t,[s]:e.target.value})))};(0,a.useEffect)((()=>{N&&(l.Ay.success(t("tip.update")),e())}),[N]);const{current:p,newPassword:_,confirmPassword:D}=j,y=(null===x||void 0===x?void 0:x.password)&&!p||!_||!D||_!==D||g,w="my-4 w-full flex flex-col items-start gap-2",f="text-gray-400 font-semibold";return(0,u.jsx)(c.A,{id:"modal-modal",children:(0,u.jsxs)(o.A,{title:s("change_pwd"),description:s("change_pwd_desc"),buttons:(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(n.A,{className:"cancel",onClick:e,children:s("action.cancel",{ns:"common"})}),(0,u.jsx)(n.A,{disabled:y,onClick:()=>{const{current:e,newPassword:s}=j;m({old_password:e,new_password:s})},children:g?"Updating":s("action.update",{ns:"common"})})]}),children:[(null===x||void 0===x?void 0:x.password)&&(0,u.jsxs)("div",{className:w,children:[(0,u.jsx)("label",{className:f,htmlFor:"current",children:s("current_pwd")}),(0,u.jsx)(d.A,{type:"password",id:"current",name:"current",value:p,"data-type":"current",onChange:h})]}),(0,u.jsxs)("div",{className:w,children:[(0,u.jsx)("label",{className:f,htmlFor:"newPassword",children:s("new_pwd")}),(0,u.jsx)(d.A,{type:"password",name:"newPassword",value:_,"data-type":"newPassword",onChange:h})]}),(0,u.jsxs)("div",{className:w,children:[(0,u.jsx)("label",{className:f,htmlFor:"confirmPassword",children:s("confirm_new_pwd")}),(0,u.jsx)(d.A,{onBlur:()=>{const{newPassword:e,confirmPassword:s}=j;e!==s&&l.Ay.error("Not same with new password")},type:"password",name:"confirmPassword",value:D,"data-type":"confirmPassword",onChange:h})]})]})})}},21181:(e,s,t)=>{t.r(s),t.d(s,{default:()=>os});var a=t(81084),l=t(43307),i=t(80772),r=t(76644),c=t(212),n=t(71017),d=t(26521),o=t(32642),u=t(99765),x=t(55371),j=t(93335),M=t(99264);const m=({closeModal:e})=>{const{t:s}=(0,l.Bd)("auth"),{t:t}=(0,l.Bd)(),[i,r]=(0,a.useState)(!1),{logout:c,exited:m,exiting:g,clearLocalData:N}=(0,j.A)();return(0,a.useEffect)((()=>{m&&(i&&N(),n.Ay.success(t("tip.logout")))}),[m,i]),(0,M.jsx)(d.A,{id:"modal-modal",children:(0,M.jsx)(x.A,{title:s("logout.title"),description:s("logout.desc"),buttons:(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(o.A,{className:"cancel",onClick:e,children:t("action.cancel")}),(0,M.jsx)(o.A,{onClick:()=>{c()},className:"danger",children:g?"Logging out":t("action.logout")})]}),children:(0,M.jsxs)("div",{className:"text-sm text-gray-400 flex justify-end items-center",children:[(0,M.jsx)("label",{htmlFor:"clear_cb",className:"cursor-pointer text-orange-500 mr-3",children:s("logout.clear_local")}),(0,M.jsx)(u.A,{className:" cursor-pointer",name:"clear_cb",checked:i,onChange:e=>{r(e.target.checked)}})]})})})};var g=t(80724),N=t(71610),h=t(3632),p=t(32664),_=t.n(p),D=t(2589),y=t(52205),w=t(21444);const f=()=>{var e;const s=(0,g.GV)((e=>e.server.version),y.bN),[t,i]=(0,a.useState)(!1),{t:r}=(0,l.Bd)("setting",{keyPrefix:"version"}),c=null!==(e="1725028594")?e:0;return(0,M.jsxs)("ul",{className:"flex flex-col gap-2 dark:text-white",children:[(0,M.jsxs)("li",{children:[r("client_version"),": ","0.7.29"]}),(0,M.jsxs)("li",{children:[r("server_version"),": ",s]}),(0,M.jsxs)("li",{children:[r("build_time"),": ",c," ",(0,M.jsxs)("span",{className:"text-gray-700 dark:text-gray-300",children:["(",_()(1e3*c).fromNow(),")"]})]}),(0,M.jsx)("li",{children:(0,M.jsxs)(o.A,{disabled:t,onClick:()=>{i(!0),(0,D.h)(),setTimeout((()=>{(0,w.Mm)()}),2e3)},children:[" ",t?(0,M.jsx)(h.A,{size:18,color:"#fff"}):r("sync")]})})]})};var A=t(95380),v=t(30968),I=t(13631),b=t(87740),T=t(34334),L=t(4709);let k;function E(e="smtp"){const{t:s}=(0,l.Bd)(),[t,i]=(0,a.useState)(!1),[r,c]=(0,a.useState)(void 0),[d,{isSuccess:o,isLoading:u}]=(0,I.n6)(),[x,{isSuccess:j,isLoading:M}]=(0,I.q)(),[m,{isSuccess:g,isLoading:N}]=(0,I.u9)(),[h,{isSuccess:p,isLoading:_}]=(0,I.JW)(),{refetch:D,data:y}=(0,I.ud)(void 0,{skip:"agora"!==e}),{refetch:w,data:f}=(0,I.T7)(void 0,{skip:"login"!==e}),{refetch:A,data:v}=(0,I.Mu)(void 0,{skip:"smtp"!==e}),{refetch:b,data:T}=(0,I.rt)(void 0,{skip:"firebase"!==e}),E={login:d,smtp:x,agora:m,firebase:h}[e],O={smtp:A,agora:D,firebase:b,login:w}[e],C={login:o,smtp:j,agora:g,firebase:p}[e],z={login:u,smtp:M,agora:N,firebase:_}[e];return(0,a.useEffect)((()=>{C&&(n.Ay.success(s("tip.update")),O())}),[C]),(0,a.useEffect)((()=>{const e=v||T||f||y;e&&(k=e,c(e))}),[v,T,f,y]),(0,a.useEffect)((()=>{r&&0!=Object.keys(r).length&&((0,L.isEqual)(k,r)?i(!1):i(!0))}),[r]),{originalValues:k,updating:z,updated:C,reset:()=>{c(void 0)},changed:t,updateConfig:E,agoraConfig:y,values:r,setValues:c,toggleEnable:()=>{c((e=>e&&"enabled"in e?{...e,enabled:!e.enabled}:e))}}}function O(){const{t:e}=(0,l.Bd)("setting"),{t:s}=(0,l.Bd)(),{updateConfig:t,values:i}=E("login"),{data:r}=(0,I.B)(),[c,{data:d,isSuccess:u,isLoading:x}]=(0,I.jJ)();(0,a.useEffect)((()=>{u&&((0,v.cJ)(),n.Ay.success(s("tip.update")))}),[u]);const j=null===i||void 0===i?void 0:i.third_party;return(0,M.jsxs)("div",{className:"max-w-[500px] flex flex-col gap-4 items-start",children:[(0,M.jsx)(T.A,{onClick:(e=>{t({...i,...e})}).bind(null,{third_party:!j}),checked:j}),(0,M.jsxs)("div",{className:"w-full flex flex-col items-start gap-2",children:[(0,M.jsxs)("label",{htmlFor:"secret",className:"text-sm text-gray-500 dark:text-gray-100",children:[" ",e("third_app.key"),":"]}),(0,M.jsx)(b.A,{disabled:!j,type:"password",id:"secret",value:d||r})]}),(0,M.jsx)(A.Ay,{interactive:!0,placement:"right-start",trigger:"click",content:(0,M.jsxs)("div",{className:"p-3 rounded-lg border border-orange-400 border-solid flex flex-col gap-3 w-[250px] bg-white",children:[(0,M.jsx)("div",{className:"text-orange-500 text-xs",children:e("third_app.update_tip")}),(0,M.jsxs)("div",{className:"flex justify-end gap-3 w-full",children:[(0,M.jsx)(o.A,{onClick:()=>(0,v.cJ)(),className:"cancel mini",children:s("action.cancel")}),(0,M.jsx)(o.A,{disabled:x,className:"mini danger",onClick:()=>c(),children:s("action.yes")})]})]}),children:(0,M.jsxs)(o.A,{disabled:!j,children:[" ",e("third_app.update")]})}),(0,M.jsxs)("div",{className:"text-xs text-orange-400",children:[e("third_app.key_tip"),(0,M.jsxs)("a",{className:"text-primary-500 font-bold",href:"https://doc.voce.chat/login-with-other-account",target:"_blank",rel:"noopener noreferrer",children:["\ud83d\udd17 ",e("third_app.how_to")]})]})]})}var C=t(6691),z=t(58156);const S=`${location.origin}/api/swagger`,U=()=>{const e=(0,g.GV)((e=>e.authData.token),y.bN),{copy:s}=(0,z.A)(),{t:t}=(0,l.Bd)("setting");return(0,M.jsxs)("section",{className:"flex flex-col justify-start items-start gap-4",children:[(0,M.jsx)("div",{className:"font-semibold dark:text-white",children:t("api_doc.desc")}),(0,M.jsx)("div",{className:"flex flex-col gap-2 w-full",children:(0,M.jsxs)("h2",{className:"text-gray-700 dark:text-white text-lg font-semibold flex gap-1",children:[t("api_doc.access"),(0,M.jsx)("a",{href:S,target:"_blank",rel:"noopener noreferrer",className:"underline text-primary-600",children:S})]})}),(0,M.jsxs)("div",{className:"flex flex-col gap-2 w-full",children:[(0,M.jsx)("h2",{className:"text-gray-700 dark:text-white text-lg font-semibold",children:t("api_doc.use_method")}),(0,M.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,M.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,M.jsx)("h3",{className:"text-gray-700 dark:text-white ",children:t("api_doc.step_1")}),(0,M.jsx)("img",{className:"border border-solid rounded-md border-gray-300 shadow-lg md:w-[50%]",src:"https://s.voce.chat/web_client/assets/img/api.doc.step1.png",alt:"step 1"})]}),(0,M.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,M.jsxs)("h3",{className:"text-gray-700 dark:text-white flex flex-col items-start gap-2",children:[t("api_doc.step_2")," ",(0,M.jsxs)("span",{className:"text-gray-400 dark:text-white text-xs",children:["(",t("api_doc.step_2_desc"),")"]})]}),(0,M.jsx)("div",{className:"flex flex-col border border-solid border-green-500 bg-green-100 rounded-md p-2 w-fit break-words text-sm relative",children:(0,M.jsxs)("p",{className:"break-all md:max-w-4xl font-bold",children:[e,(0,M.jsx)(C.A,{onClick:()=>{s(e)},className:"absolute right-2 bottom-2 cursor-pointer"})]})}),(0,M.jsx)("img",{className:"border border-solid rounded-md border-gray-300 shadow-lg md:w-[85%]",src:"https://s.voce.chat/web_client/assets/img/api.doc.step2.jpg",alt:"step 2"})]}),(0,M.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,M.jsx)("h3",{className:"text-gray-700 dark:text-white flex items-center gap-2",children:t("api_doc.last")}),(0,M.jsx)("img",{className:"border border-solid rounded-md border-gray-300 shadow-lg md:w-[85%]",src:"https://s.voce.chat/web_client/assets/img/api.doc.step3.png",alt:"step 3"})]})]})]})]})};var P=t(25303),Y=t(87965),B=t(71389),Q=t(45774),R=t(3661);const G=({closeModal:e,uid:s})=>{const{copy:t}=(0,z.A)(),[i,{error:r,isSuccess:c,isLoading:u,data:j=""}]=(0,P.zr)(),m=(0,a.useRef)(null),{t:g}=(0,l.Bd)("setting",{keyPrefix:"bot"}),{t:N}=(0,l.Bd)();(0,a.useEffect)((()=>{if(r)switch(r.status){case 406:n.oR.error("Invalid Webhook URL!");break;case 409:n.oR.error("Name Already Exists!")}}),[r]);return(0,M.jsx)(d.A,{id:"modal-modal",children:(0,M.jsx)(x.A,{title:g("create_key_title"),description:g("create_key_desc"),buttons:c?(0,M.jsx)(o.A,{onClick:()=>{t(j),n.oR.success("API Key Copied!"),e()},children:g("key_copy_and_close")}):(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(o.A,{className:"cancel",onClick:e,children:N("action.cancel")}),(0,M.jsx)(o.A,{onClick:()=>{var e;if(!m||!m.current)return;const t=m.current;t.checkValidity()?i({uid:s,name:(null===(e=t.querySelector("input"))||void 0===e?void 0:e.value)||""}):t.reportValidity()},children:u?"...":N("action.done")})]}),children:c?(0,M.jsxs)("div",{className:"flex flex-col gap-2 text-sm",children:[(0,M.jsx)("div",{className:"border-green-600 bg-green-200/50 rounded border border-solid p-2 max-w-md w-full whitespace-pre-wrap break-all",children:j})," ",(0,M.jsxs)("div",{className:"text-red-400",children:["\u26a0\ufe0f ",g("create_key_warning")]})]}):(0,M.jsx)("form",{ref:m,className:"w-full flex flex-col gap-2 items-center",action:"/",children:(0,M.jsxs)("div",{className:"flex flex-col gap-1 w-full",children:[(0,M.jsx)("label",{htmlFor:"name",className:"text-sm text-gray-500",children:"Name"}),(0,M.jsx)(b.A,{name:"name",required:!0,placeholder:"Please input API Key name"})]})})})})},W=({closeModal:e,uid:s,kid:t})=>{const[i,{isSuccess:r,isLoading:c}]=(0,P.fM)(),{t:u}=(0,l.Bd)("setting",{keyPrefix:"bot"}),{t:j}=(0,l.Bd)();return(0,a.useEffect)((()=>{r&&(n.oR.success(j("tip.delete")),e())}),[r]),(0,M.jsx)(d.A,{id:"modal-modal",children:(0,M.jsx)(x.A,{title:`${u("delete_key_title")} ${name}`,description:u("delete_key_desc"),buttons:(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(o.A,{className:"cancel",onClick:e,children:j("action.cancel")}),(0,M.jsx)(o.A,{className:"danger",onClick:()=>{i({uid:s,kid:t})},children:c?"Deleting":j("action.done")})]})})})},V="p-1 whitespace-nowrap text-xs text-gray-500 dark:text-gray-200 align-middle px-1",K=({uid:e})=>{const{t:s}=(0,l.Bd)("setting",{keyPrefix:"bot"}),[t,i]=(0,a.useState)(),[r,c]=(0,a.useState)(),{data:n,refetch:d}=(0,P.Xf)(e),o=e=>{e||d(),i(e)},u=e=>{e||d(),c(e)};if(!n)return null;const x=["w-20","w-[166px]","w-36","w-15","w-10"];return(0,M.jsxs)("div",{className:"flex flex-col gap-2 items-start",children:[(0,M.jsxs)("div",{className:"border-t border-solid border-b border-gray-100 dark:border-gray-500 py-2 w-full",children:[(0,M.jsxs)("table",{className:"min-w-full table-fixed font-mono",children:[(0,M.jsx)("thead",{children:(0,M.jsx)("tr",{children:[s("col_key_name"),s("col_key_value"),s("col_key_create_time"),s("col_key_last_used"),""].map(((e,s)=>(0,M.jsx)("th",{scope:"col",className:(0,Q.A)("text-xs text-gray-900 dark:text-gray-50 px-1 text-left pb-2",x[s]),children:e},e)))})}),(0,M.jsx)("tbody",{children:n.length>0?n.map((s=>{const{id:t,name:a,key:l,created_at:i,last_used:r}=s;return(0,M.jsxs)("tr",{className:"group",children:[(0,M.jsx)("td",{className:V,children:a}),(0,M.jsx)("td",{className:`${V} w-40`,children:`${l.slice(0,4)} ... ... ${l.slice(-6)}`}),(0,M.jsx)("td",{className:V,children:_()(i).format("YYYY-MM-DD HH:mm:ss")}),(0,M.jsx)("td",{className:V,children:r?_()(r).format("YYYY-MM-DD HH:mm:ss"):"Unused"}),(0,M.jsx)("td",{className:`${V} invisible group-hover:visible`,children:(0,M.jsx)("button",{onClick:u.bind(null,{kid:t,uid:e}),children:(0,M.jsx)(B.A,{})})})]},t)})):(0,M.jsx)("tr",{children:(0,M.jsx)("td",{colSpan:4,className:"text-center text-xs text-gray-400 py-2",children:s("no_api_key")})})})]}),(0,M.jsxs)("button",{onClick:o.bind(null,e),className:"text-green-600 text-xs py-0.5 flex items-center gap-1 m-auto my-2 bg-green-50 rounded-full px-2 ",children:[(0,M.jsx)(R.A,{className:"!w-4 !h-4 fill-green-600"})," ",s("add_api_key")]})]}),t&&(0,M.jsx)(G,{uid:t,closeModal:o.bind(null,void 0)}),r&&(0,M.jsx)(W,{uid:r.uid,kid:r.kid,closeModal:u.bind(null,void 0)})]})};var F=t(45123);const Z=({closeModal:e})=>{const[s,{isSuccess:t,isLoading:i,error:r}]=(0,P.i0)(),{t:c}=(0,l.Bd)("setting",{keyPrefix:"bot"}),[u,j]=(0,a.useState)({name:"",webhook_url:""}),{t:m}=(0,l.Bd)(),g=e=>{const{value:s}=e.target,{name:t=""}=e.target.dataset;j((e=>({...e,[t]:s})))};(0,a.useEffect)((()=>{if(r)switch(r.status){case 406:n.oR.error("Invalid Webhook URL!");break;case 409:n.oR.error("Name conflict with existed username, try the proposed name below."),j((e=>({...e,name:`${e.name}-bot`})))}}),[r]),(0,a.useEffect)((()=>{t&&(n.oR.success("Create Bot Successfully!"),e())}),[t]);const{name:N,webhook_url:h}=u;return(0,M.jsx)(d.A,{id:"modal-modal",children:(0,M.jsx)(x.A,{title:c("create_title"),description:c("create_desc"),buttons:(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(o.A,{className:"cancel",onClick:e,children:m("action.cancel")}),(0,M.jsx)(o.A,{disabled:!u.name,onClick:()=>{if(""===u.name.trim())return;const{name:e,webhook_url:t}=u,a=new URL(F.tx).hostname;s({is_bot:!0,is_admin:!1,gender:1,email:`bot_${(new Date).getTime()}@${a}`,password:"",name:e,webhook_url:""===t.trim()?void 0:t})},children:i?"Creating":m("action.done")})]}),children:(0,M.jsxs)("div",{className:"w-full flex flex-col gap-2",children:[(0,M.jsxs)("div",{className:"flex flex-col items-start gap-1 w-full",children:[(0,M.jsx)("label",{htmlFor:"name",className:"text-sm text-gray-500",children:"Name"}),(0,M.jsx)(b.A,{onChange:g,value:N,"data-name":"name",placeholder:"Please input bot name"})]}),(0,M.jsxs)("div",{className:"flex flex-col items-start gap-1 w-full",children:[(0,M.jsx)("label",{htmlFor:"webhook_url",className:"text-sm text-gray-500",children:"Webhook URL (Optional)"}),(0,M.jsx)(b.A,{onChange:g,value:h,"data-name":"webhook_url",type:"url",placeholder:"Please input webhook url"})]})]})})})},H=({closeModal:e,uid:s,name:t})=>{const[i,{isSuccess:r,isLoading:c}]=(0,P.Gv)(),{t:u}=(0,l.Bd)("setting",{keyPrefix:"bot"}),{t:j}=(0,l.Bd)();return(0,a.useEffect)((()=>{r&&(n.oR.success(j("tip.delete")),e())}),[r]),(0,M.jsx)(d.A,{id:"modal-modal",children:(0,M.jsx)(x.A,{title:`${u("delete_title")} ${t}`,description:u("delete_desc"),buttons:(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(o.A,{className:"cancel",onClick:e.bind(null),children:j("action.cancel")}),(0,M.jsx)(o.A,{className:"danger",onClick:()=>{i(s)},children:c?"Deleting":j("action.done")})]})})})};var J,X=t(93604),q=t(63734),$=t(31872);function ee(){return ee=Object.assign?Object.assign.bind():function(e){for(var s=1;sa.createElement("svg",ee({width:24,height:24,viewBox:"0 0 24 24",stroke:"#616161",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:l,"aria-labelledby":s},t),e?a.createElement("title",{id:s},e):null,J||(J=a.createElement("path",{d:"M17 21V13H7V21M7 3V8H15M19 21H5C4.46957 21 3.96086 20.7893 3.58579 20.4142C3.21071 20.0391 3 19.5304 3 19V5C3 4.46957 3.21071 3.96086 3.58579 3.58579C3.96086 3.21071 4.46957 3 5 3H16L21 8V19C21 19.5304 20.7893 20.0391 20.4142 20.4142C20.0391 20.7893 19.5304 21 19 21Z",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}))),te=(0,a.forwardRef)(se),ae=({uid:e})=>{const s=(0,a.useRef)(null),[t,l]=(0,a.useState)(!1),[i,r]=(0,a.useState)(""),{data:c,isSuccess:d,refetch:o}=(0,P.pR)(e),[u,{isSuccess:x,isLoading:j}]=(0,P.H7)();(0,a.useEffect)((()=>{d&&c&&r(c.name||"")}),[c,d]),(0,a.useEffect)((()=>{x&&o()}),[x]);const m=async()=>{if(t&&s){const t=s.current;if(null===t||void 0===t||!t.checkValidity())return void(null===t||void 0===t||t.reportValidity());const a=new FormData(t).get("name"),l=await u({id:e,name:a});if("error"in l){if(409===l.error.status)n.oR.error("Conflict with existed username");return}}l((e=>!e))};return(0,M.jsxs)("div",{className:"flex gap-2",children:[(0,M.jsx)("form",{action:"/",ref:s,onSubmit:e=>{e.preventDefault(),m()},children:(0,M.jsx)("input",{readOnly:!t,required:!0,autoFocus:!0,name:"name",defaultValue:i,className:(0,Q.A)("text-gray-900 dark:text-gray-100 w-auto",t?"ring-1 ring-gray-500 bg-gray-50 px-2 py-1 dark:bg-slate-900":"bg-transparent")})}),(0,M.jsx)("button",{type:"button",title:"edit name",disabled:j,onClick:m,children:j?(0,M.jsx)(X.A,{size:16}):t?(0,M.jsx)(te,{className:"stroke-gray-500 !w-5 !h-5"}):(0,M.jsx)($.A,{className:"fill-gray-500 !w-5 !h-5"})}),t&&!j&&(0,M.jsx)("button",{type:"button",disabled:j,onClick:()=>{l(!1);const e=s.current;if(e){e.querySelector("input").value=(null===c||void 0===c?void 0:c.name)||""}},children:(0,M.jsx)(q.A,{className:"!w-5 !h-5 fill-gray-500"})})]})},le=({uid:e})=>{const s=(0,a.useRef)(null),[t,l]=(0,a.useState)(!1),[i,r]=(0,a.useState)(""),{data:c,isSuccess:d,refetch:o}=(0,P.pR)(e),[u,{isSuccess:x,isLoading:j}]=(0,P.H7)();(0,a.useEffect)((()=>{d&&c&&r(c.webhook_url||"")}),[c,d]),(0,a.useEffect)((()=>{x&&o()}),[x]);const m=async()=>{if(t&&s){const t=s.current;if(null===t||void 0===t||!t.checkValidity())return void(null===t||void 0===t||t.reportValidity());const a=new FormData(t).get("webhook"),l=await u({id:e,webhook_url:a});if("error"in l){if(406===l.error.status)n.oR.error("Not Valid URL!");return}}l((e=>!e))};return(0,M.jsx)("div",{children:i||t||x?(0,M.jsxs)("div",{className:"flex gap-2",children:[(0,M.jsx)("form",{action:"/",ref:s,onSubmit:e=>{e.preventDefault(),m()},children:(0,M.jsx)("input",{readOnly:!t,required:!0,autoFocus:!0,type:"url",name:"webhook",defaultValue:i,className:(0,Q.A)("text-sm text-gray-400 dark:text-gray-100 dark:bg-slate-900 px-2 py-1",t?"ring-1 ring-gray-500 bg-gray-50":"bg-transparent")})}),(0,M.jsx)("button",{type:"button",disabled:j,onClick:m,children:j?(0,M.jsx)(X.A,{size:16}):t?(0,M.jsx)(te,{className:"stroke-gray-500 !w-5 !h-5"}):(0,M.jsx)($.A,{className:"fill-gray-500 !w-5 !h-5"})}),t&&!j&&(0,M.jsx)("button",{type:"button",disabled:j,onClick:()=>{l(!1);const e=s.current;if(e){e.querySelector("input").value=(null===c||void 0===c?void 0:c.webhook_url)||""}},children:(0,M.jsx)(q.A,{className:"!w-5 !h-5 fill-gray-500"})})]}):(0,M.jsx)("button",{type:"button",className:"rounded-full bg-primary-50 text-green-600 text-xs py-0.5 px-2",onClick:()=>{l(!0)},children:"Set Webhook"})})},ie=({uid:e,webhook:s,closeModal:t})=>{const[i,r]=(0,a.useState)(s),[c,{isSuccess:u,isLoading:j}]=(0,P.H7)(),m=(0,a.useRef)(null),{t:g}=(0,l.Bd)("setting",{keyPrefix:"bot"}),{t:N}=(0,l.Bd)();return(0,a.useEffect)((()=>{u&&(n.oR.success(N("tip.update")),t())}),[u]),(0,M.jsx)(d.A,{id:"modal-modal",children:(0,M.jsx)(x.A,{title:g("webhook_title"),description:g("webhook_desc"),buttons:(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(o.A,{className:"cancel",onClick:t.bind(null,void 0),children:N("action.cancel")}),(0,M.jsx)(o.A,{disabled:!i,onClick:()=>{var s;if(!m||!m.current)return;const t=m.current;if(!t.checkValidity())return void t.reportValidity();const a=(null===(s=new FormData(t).get("webhook"))||void 0===s?void 0:s.toString())||"";c({id:e,webhook_url:a})},children:j?"Updating":N("action.done")})]}),children:(0,M.jsxs)("form",{ref:m,className:"w-full flex flex-col gap-2",action:"/",children:[(0,M.jsx)("label",{htmlFor:"webhook",className:"text-sm text-gray-500",children:"Webhook URL"}),(0,M.jsx)(b.A,{name:"webhook",value:i,onChange:e=>{r(e.target.value)},type:"url"})]})})})},re=({title:e,desc:s})=>(0,M.jsxs)("div",{className:"flex flex-col text-sm",children:[(0,M.jsx)("h2",{className:"font-semibold dark:text-white",children:e}),(0,M.jsx)("p",{className:"text-gray-400 text-xs",children:s})]}),ce="p-6 whitespace-nowrap text-sm font-medium text-gray-900 dark:text-gray-100 align-top";function ne(){const[e,{isSuccess:s}]=(0,P.tt)(),[t,i]=(0,a.useState)(!1),[r,c]=(0,a.useState)(void 0),[d,u]=(0,a.useState)(void 0),x=(0,g.GV)((e=>Object.values(e.users.byId).filter((e=>!!e.is_bot))),y.bN),{t:j}=(0,l.Bd)("setting",{keyPrefix:"bot"}),{t:m}=(0,l.Bd)(),N=()=>{i((e=>!e))},h=e=>{u(e)};return(0,a.useEffect)((()=>{s&&n.oR.success(m("tip.update"))}),[s]),(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)("div",{className:"flex flex-col justify-start items-start gap-4",children:[(0,M.jsxs)("div",{className:"flex flex-col gap-4 max-w-[634px] mb-4",children:[(0,M.jsx)(re,{title:j("bot_tip_title"),desc:j("bot_tip_desc")}),(0,M.jsx)(re,{title:j("webhook_tip_title"),desc:j("webhook_tip_desc")})]}),(0,M.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,M.jsxs)("h2",{className:"font-semibold flex gap-4 items-center dark:text-white",children:[j("manage"),(0,M.jsxs)("a",{href:"https://doc.voce.chat/bot/bot-and-webhook",target:"_blank",className:"text-sm text-blue-400 underline-offset-1 underline",rel:"noopener noreferrer",children:["\ud83d\udd17 ",j("how_to_use")]})]}),(0,M.jsx)("p",{className:"text-gray-400 text-xs",children:j("manage_desc")})]}),(0,M.jsx)("div",{className:"w-full md:w-fit overflow-auto md:overflow-hidden",children:(0,M.jsxs)("table",{className:"min-w-full table-auto",children:[(0,M.jsx)("thead",{className:"border-b dark:border-b-gray-500 bg-gray-50 dark:bg-gray-600",children:(0,M.jsx)("tr",{children:[j("col_avatar"),j("col_name"),j("col_api_key"),j("col_webhook"),j("col_opt")].map((e=>(0,M.jsx)("th",{scope:"col",className:"text-sm font-bold text-gray-900 dark:text-gray-100 px-6 py-4 text-left",children:e},e)))})}),(0,M.jsx)("tbody",{children:x.map((s=>{const{uid:t,name:a,avatar:l}=s;return(0,M.jsxs)("tr",{className:"bg-white dark:bg-gray-800 border-b dark:border-b-gray-500 transition duration-300 ease-in-out md:hover:bg-gray-100 dark:md:hover:bg-transparent",children:[(0,M.jsx)("td",{className:"px-4 py-2",children:(0,M.jsx)(Y.A,{size:60,uid:t,url:l,uploadImage:e,name:a})}),(0,M.jsxs)("td",{className:`${ce}`,children:[(0,M.jsx)(ae,{uid:t}),(0,M.jsxs)("div",{className:"text-xs text-gray-500",children:["#",t]})]}),(0,M.jsx)("td",{className:`${ce} py-2`,children:(0,M.jsx)(K,{uid:t})}),(0,M.jsx)("td",{className:ce,children:(0,M.jsx)(le,{uid:t})}),(0,M.jsx)("td",{className:ce,children:(0,M.jsx)("button",{type:"button",onClick:h.bind(null,{uid:t,name:a}),children:(0,M.jsx)(B.A,{className:"hover:opacity-80"})})})]},t)}))})]})}),(0,M.jsx)("div",{className:"flex gap-4",children:(0,M.jsx)(o.A,{onClick:N,className:"small",children:m("action.add")})})]}),t&&(0,M.jsx)(Z,{closeModal:N}),r&&(0,M.jsx)(ie,{closeModal:e=>{c(e)},...r}),d&&(0,M.jsx)(H,{closeModal:h,...d})]})}var de=t(90800),oe=t(73050),ue=t(216);const xe=({link:e,text:s})=>(0,M.jsxs)("div",{className:"tip",children:[(0,M.jsx)(ue.A,{className:"dark:fill-gray-300"}),(0,M.jsx)("a",{href:e,target:"_blank",className:"link",rel:"noreferrer",children:s})]});function je(){const{t:e}=(0,l.Bd)("setting",{keyPrefix:"agora"}),{changed:s,reset:t,values:a,setValues:i,toggleEnable:r,updateConfig:c}=E("agora"),n=e=>{const s=e.target.value,{type:t=""}=e.target.dataset;i((e=>e?{...e,[t]:s}:e))};if(!a)return null;const{url:d,project_id:o,app_id:u,app_certificate:x,customer_id:j,customer_secret:m,enabled:g=!1}=a,N=d||"https://api.agora.io";return(0,M.jsxs)("div",{className:"setting-container",children:[(0,M.jsxs)("div",{className:"inputs",children:[(0,M.jsxs)("div",{className:"input row",children:[(0,M.jsxs)(oe.A,{className:"flex items-center gap-2",children:["Enable",(0,M.jsx)(xe,{link:"https://doc.voce.chat/setting/setting-agora",text:e("how_to")})]}),(0,M.jsx)(T.A,{onClick:r,checked:g})]}),(0,M.jsxs)("div",{className:"input",children:[(0,M.jsx)(oe.A,{htmlFor:"url",children:"Agora URL"}),(0,M.jsx)(b.A,{disabled:!g,"data-type":"url",onChange:n,value:N,name:"url",placeholder:"Agora URL"})]}),(0,M.jsxs)("div",{className:"input",children:[(0,M.jsx)(oe.A,{htmlFor:"project_id",children:"Project ID"}),(0,M.jsx)(b.A,{spellCheck:!1,disabled:!g,"data-type":"project_id",onChange:n,value:o,name:"project_id",placeholder:"Project ID"})]}),(0,M.jsxs)("div",{className:"input",children:[(0,M.jsx)(oe.A,{htmlFor:"app_id",children:"App ID"}),(0,M.jsx)(b.A,{spellCheck:!1,disabled:!g,"data-type":"app_id",onChange:n,value:u,name:"app_id",placeholder:"APP ID"})]}),(0,M.jsxs)("div",{className:"input",children:[(0,M.jsx)(oe.A,{htmlFor:"app_certificate",children:"APP Certificate"}),(0,M.jsx)(b.A,{spellCheck:!1,disabled:!g,"data-type":"app_certificate",onChange:n,value:x,name:"app_certificate",placeholder:"APP Certificate"})]}),(0,M.jsxs)("div",{className:"input",children:[(0,M.jsx)(oe.A,{htmlFor:"customer_id",children:"Customer ID"}),(0,M.jsx)(b.A,{spellCheck:!1,disabled:!g,"data-type":"customer_id",onChange:n,value:j,name:"customer_id",placeholder:"Customer ID for RESTful API"})]}),(0,M.jsxs)("div",{className:"input",children:[(0,M.jsx)(oe.A,{htmlFor:"customer_secret",children:"Customer Secret"}),(0,M.jsx)(b.A,{spellCheck:!1,disabled:!g,"data-type":"customer_secret",onChange:n,value:m,name:"customer_secret",placeholder:"Customer Secret for RESTful API"})]})]}),s&&(0,M.jsx)(de.A,{saveHandler:()=>{const e=a;e.url||(e.url="https://api.agora.io"),c(e)},resetHandler:t})]})}var Me=t(11433),me=t(49912);function ge(){const{values:e,setValues:s,updateConfig:t,changed:a,reset:i}=E("firebase"),{t:r}=(0,l.Bd)("setting"),c={disable:r("firebase.disable"),official:r("firebase.use_official"),custom:r("firebase.custom")};let n="";if(e){const{use_official:s,enabled:t=!1}=e;n=t?s?"official":"custom":"disable"}const d=e=>{const t=e.target.value,{type:a=""}=e.target.dataset;s((e=>e?{...e,[a]:t}:e))};if(!e)return null;const{token_url:o,project_id:u,private_key:x,client_email:j}=e;return(0,M.jsxs)("div",{className:"setting-container max-md:w-full max-md:h-auto",children:[(0,M.jsx)(Me.A,{options:Object.values(c),values:Object.keys(c),value:n,onChange:t=>{let a=null;switch(t){case"custom":a={...e,enabled:!0,use_official:!1};break;case"official":a={...e,enabled:!0,use_official:!0};break;case"disable":a={...e,enabled:!1}}a&&s(a)}}),(0,M.jsxs)("fieldset",{className:"inputs",disabled:"custom"!==n,children:[(0,M.jsxs)("div",{className:"input",children:[(0,M.jsx)(oe.A,{htmlFor:"name",children:r("firebase.token_url")}),(0,M.jsx)(b.A,{"data-type":"token_url",onChange:d,value:o,name:"token_url",placeholder:r("firebase.token_url")})]}),(0,M.jsxs)("div",{className:"input",children:[(0,M.jsx)(oe.A,{htmlFor:"project_id",children:r("firebase.project_id")}),(0,M.jsx)(b.A,{"data-type":"project_id",onChange:d,value:u,name:"project_id",placeholder:r("firebase.project_id")})]}),(0,M.jsxs)("div",{className:"input",children:[(0,M.jsx)(oe.A,{htmlFor:"private_key",children:r("firebase.private_key")}),(0,M.jsx)(me.A,{rows:10,spellCheck:!1,"data-type":"private_key",onChange:d,value:x,name:"private_key",placeholder:r("firebase.private_key")})]}),(0,M.jsxs)("div",{className:"input",children:[(0,M.jsx)(oe.A,{htmlFor:"client_email",children:r("firebase.client_email")}),(0,M.jsx)(b.A,{"data-type":"client_email",onChange:d,value:j,name:"client_email",placeholder:r("firebase.client_email")})]})]}),a&&(0,M.jsx)(de.A,{saveHandler:()=>{t(e)},resetHandler:()=>{i()}})]})}var Ne,he=t(61082),pe=t(55146),_e=t(96018);function De(){return De=Object.assign?Object.assign.bind():function(e){for(var s=1;sa.createElement("svg",De({width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:l,"aria-labelledby":s},t),e?a.createElement("title",{id:s},e):null,Ne||(Ne=a.createElement("path",{d:"M8.00004 1.33301C4.32004 1.33301 1.33337 4.31967 1.33337 7.99967C1.33337 11.6797 4.32004 14.6663 8.00004 14.6663C11.68 14.6663 14.6667 11.6797 14.6667 7.99967C14.6667 4.31967 11.68 1.33301 8.00004 1.33301ZM11.3334 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uMTk1OTJjNS44MDI1NS01LjgwMjU1IDUuODAyNTUtMTUuMTk1OTEgMC0yMC45OTg0N2wtODcuNjM2NzMtODcuNjYyNzVjLTUuODAyNTUtNS44MDI1NS0xNS4xOTU5Mi01LjgwMjU1LTIwLjk5ODQ3IDBsLTE1LjE5NTkyIDE1LjE5NTkyYy01Ljg1NDYgNS44MDI1NS01Ljg1NDYgMTUuMjIxOTQtLjAyNjAyIDIwLjk5ODQ3eiIgZmlsbD0iI0Y3RjdGNyIvPgogICAgPHBhdGggZmlsbD0iIzQ0NCIgb3BhY2l0eT0iLjMiIGQ9Ik0xOTguNjg5OCAyMjguNDY0NDNsLTUxLjQ5NDQtNDAuMTIzNDdoMTEuMzk2OTV6TTE0NC4zNTkxOCAxMDEuNjY2OThsNDAuNTY1ODIgNDAuNTY1ODFoMTMuNzY0OHoiLz4KICA8L2c+Cjwvc3ZnPg==","underline":true},{"title":"Custom","value":"","selected":false}]'),Ae=({issuers:e=[],onChange:s})=>{const{t:t}=(0,l.Bd)(),[i,r]=(0,a.useState)(null),[c,n]=(0,a.useState)(""),d=!c&&!(null!==i&&void 0!==i&&i.value)||!(null!==i&&void 0!==i&&i.title)||e.some((e=>e.domain===c));return(0,M.jsx)("div",{className:"py-4 w-full flex flex-col gap-4",children:(0,M.jsxs)("ul",{className:"flex flex-col gap-4",children:[e.map((({enable:t,favicon:a,domain:l})=>(0,M.jsxs)("li",{className:"flex items-center justify-between gap-10",children:[(0,M.jsxs)("div",{className:"flex-1 flex items-center justify-between",children:[(0,M.jsx)(we,{className:"cursor-pointer",onClick:()=>{s(e.filter((e=>e.domain!==l)))}}),(0,M.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[Boolean(a)&&(0,M.jsx)("img",{src:a,alt:"logo",className:"w-8 h-8"}),(0,M.jsx)(b.A,{readOnly:!0,value:l,prefix:"https://",placeholder:"Issuer Domain",className:"w-[280px]"})]})]}),(0,M.jsx)("div",{className:"w-14 flex justify-end",children:(0,M.jsx)(T.A,{checked:t,onClick:()=>{s(e.map((e=>({...e,enable:e.domain===l?!t:e.enable}))))}})})]},l))),(0,M.jsxs)("li",{className:"flex items-center justify-between gap-10 cursor-pointer",children:[(0,M.jsxs)("div",{className:"flex-1 flex items-center justify-between",children:[(0,M.jsx)(_e.A,{options:fe.map((s=>({...s,selected:e.some((e=>e.domain===s.value))}))),current:i,updateSelect:r}),(0,M.jsx)("div",{className:"flex items-center justify-between gap-4",children:(0,M.jsx)(b.A,{onChange:e=>{n(e.target.value)},readOnly:!(null===i||void 0===i||!i.value),value:(null===i||void 0===i?void 0:i.value)||c,prefix:"https://",placeholder:"domain.com",className:"w-[280px]"})})]}),(0,M.jsx)("div",{className:"w-14 flex justify-end",children:(0,M.jsx)(o.A,{disabled:d,onClick:()=>{const t=fe.find((e=>e.value===(null===i||void 0===i?void 0:i.value)));if(!t)return;const{icon:a,value:l}=t;s(e.concat({enable:!0,favicon:a||"",domain:l||c})),r(null),n("")},children:t("action.add")})})]})]})})};t(24555);const ve=({to:e,children:s})=>(0,M.jsx)("a",{href:e,className:"text-primary-500",target:"_blank",rel:"noreferrer",children:s});function Ie({link:e="#"}){return(0,M.jsx)(A.Ay,{delay:[0,500],interactive:!0,arrow:v.qO,placement:"bottom",content:(0,M.jsx)("div",{className:"py-2 px-3 bg-gray-800 text-xs text-white rounded-lg",children:(0,M.jsx)(l.x6,{ns:"setting",i18nKey:"login.more_details",children:(0,M.jsx)(ve,{to:e})})}),children:(0,M.jsx)(ue.A,{className:"icon"})})}function be(){const{t:e}=(0,l.Bd)("setting",{keyPrefix:"login"}),{t:s}=(0,l.Bd)(),{changed:t,clientId:a,updateClientId:i,updateClientIdToServer:r}=(0,pe.A)(),{config:c,changed:d,updateGithubAuthConfigToServer:o,updateGithubAuthConfig:u}=(0,he.A)(),{values:x,updateConfig:j,setValues:m,reset:g,changed:N}=E("login"),h=e=>{const{key:s}=e.target.dataset;s&&u({[s]:e.target.value})},p=e=>{m((s=>s?{...s,...e}:s))};if(!x)return null;const{google:_,magic_link:D,github:y,metamask:w,password:f,oidc:A=[]}=x,v=t||N||d;return(0,M.jsxs)("div",{className:"setting-container max-md:w-full max-md:h-auto",children:[(0,M.jsxs)("div",{className:"inputs",children:[(0,M.jsx)("div",{className:"input",children:(0,M.jsxs)("div",{className:"row",children:[(0,M.jsxs)("div",{className:"title",children:[(0,M.jsx)("div",{className:"txt",children:(0,M.jsx)(oe.A,{children:e("password")})}),(0,M.jsx)("span",{className:"desc dark:!text-gray-400",children:e("password_desc")})]}),(0,M.jsx)(T.A,{onClick:p.bind(null,{password:!f}),checked:f})]})}),(0,M.jsx)("div",{className:"input",children:(0,M.jsxs)("div",{className:"row",children:[(0,M.jsxs)("div",{className:"title",children:[(0,M.jsx)("div",{className:"txt",children:(0,M.jsx)(oe.A,{children:e("magic_link")})}),(0,M.jsx)("span",{className:"desc dark:!text-gray-400",children:e("magic_link_desc")})]}),(0,M.jsx)(T.A,{onClick:p.bind(null,{magic_link:!D}),checked:D})]})}),(0,M.jsxs)("div",{className:"input",children:[(0,M.jsxs)("div",{className:"row",children:[(0,M.jsxs)("div",{className:"title",children:[(0,M.jsxs)("div",{className:"txt",children:[(0,M.jsx)(oe.A,{children:e("google")}),(0,M.jsx)(Ie,{link:"https://doc.voce.chat/setting/third_login/login-google"})]}),(0,M.jsx)("span",{className:"desc dark:!text-gray-400",children:e("google_desc")})]}),(0,M.jsx)(T.A,{onClick:p.bind(null,{google:!_}),checked:_})]}),(0,M.jsx)("div",{className:"row",children:(0,M.jsx)(b.A,{disabled:!_,onChange:e=>{i(e.target.value)},placeholder:"Client ID",value:a})})]}),(0,M.jsxs)("div",{className:"input",children:[(0,M.jsxs)("div",{className:"row",children:[(0,M.jsxs)("div",{className:"title",children:[(0,M.jsxs)("div",{className:"txt",children:[(0,M.jsx)(oe.A,{children:e("github")}),(0,M.jsx)(Ie,{link:"https://doc.voce.chat/setting/third_login/login-github"})]}),(0,M.jsx)("span",{className:"desc dark:!text-gray-400",children:e("github_desc")})]}),(0,M.jsx)(T.A,{onClick:p.bind(null,{github:!y}),checked:y})]}),(0,M.jsxs)("div",{className:"row inputs",children:[(0,M.jsx)(b.A,{disabled:!y,"data-key":"client_id",onChange:h,placeholder:"GitHub Client ID",value:null===c||void 0===c?void 0:c.client_id}),(0,M.jsx)(b.A,{disabled:!y,"data-key":"client_secret",onChange:h,placeholder:"GitHub Client Secret",value:null===c||void 0===c?void 0:c.client_secret})]})]}),(0,M.jsx)("div",{className:"input",children:(0,M.jsxs)("div",{className:"row",children:[(0,M.jsxs)("div",{className:"title",children:[(0,M.jsxs)("div",{className:"txt",children:[(0,M.jsx)(oe.A,{children:e("metamask")}),(0,M.jsx)(Ie,{link:"https://doc.voce.chat/setting/third_login/login-metamask"})]}),(0,M.jsx)("span",{className:"desc dark:!text-gray-400",children:e("metamask_desc")})]}),(0,M.jsx)(T.A,{onClick:p.bind(null,{metamask:!w}),checked:w})]})}),(0,M.jsxs)("div",{className:"input",children:[(0,M.jsx)("div",{className:"row",children:(0,M.jsxs)("div",{className:"title",children:[(0,M.jsxs)("div",{className:"txt",children:[(0,M.jsx)(oe.A,{children:e("oidc")}),(0,M.jsx)(Ie,{link:"https://doc.voce.chat/setting/third_login/login-webid"})]}),(0,M.jsx)("span",{className:"desc dark:!text-gray-400",children:e("oidc_desc")})]})}),(0,M.jsx)("div",{className:"row",children:(0,M.jsx)(Ae,{issuers:A,onChange:e=>{m((s=>s?{...s,oidc:e}:s))}})})]})]}),v&&(0,M.jsx)(de.A,{saveHandler:async()=>{const{google:e}=x;N&&j(x),e&&t&&(await r(),N||n.Ay.success(s("tip.update"))),y&&d&&(await o(),N||n.Ay.success(s("tip.update")))},resetHandler:g})]})}function Te(){const{t:e}=(0,l.Bd)("setting",{keyPrefix:"smtp"}),[s,t]=(0,a.useState)(""),[i,{isSuccess:r,isError:c}]=(0,I.lg)(),{reset:d,updateConfig:u,values:x,originalValues:j,setValues:m,changed:g,toggleEnable:N}=E("smtp"),h=e=>{const s=e.target.value,{type:t=""}=e.target.dataset;m((e=>e?{...e,[t]:s}:e))};if((0,a.useEffect)((()=>{r&&n.Ay.success("Send Test Email Successfully"),c&&n.Ay.error("Send Test Email Fail")}),[r,c]),!x)return null;const{host:p,port:_,from:D,username:y,password:w,enabled:f=!1}=x;return(0,M.jsxs)("div",{className:"setting-container max-md:w-full",children:[(0,M.jsxs)("div",{className:"inputs",children:[(0,M.jsxs)("div",{className:"input row",children:[(0,M.jsxs)(oe.A,{className:"flex items-center gap-2",children:[e("enable")," ",(0,M.jsx)(xe,{link:"https://doc.voce.chat/setting/smtp/smtp-gmail",text:e("how_to")})]}),(0,M.jsx)(T.A,{onClick:N,checked:f})]}),(0,M.jsxs)("div",{className:"input",children:[(0,M.jsx)(oe.A,{htmlFor:"host",children:e("host")}),(0,M.jsx)(b.A,{disabled:!f,"data-type":"host",onChange:h,value:p,name:"host",placeholder:"SMTP Host"})]}),(0,M.jsxs)("div",{className:"input",children:[(0,M.jsx)(oe.A,{htmlFor:"port",children:e("port")}),(0,M.jsx)(b.A,{disabled:!f,type:"number","data-type":"port",onChange:h,value:_,name:"port",placeholder:"SMTP Port"})]}),(0,M.jsxs)("div",{className:"input",children:[(0,M.jsx)(oe.A,{htmlFor:"from",children:e("from")}),(0,M.jsx)(b.A,{disabled:!f,"data-type":"from",onChange:h,value:D,name:"from",placeholder:"SMTP From"})]}),(0,M.jsxs)("div",{className:"input",children:[(0,M.jsx)(oe.A,{htmlFor:"username",children:e("username")}),(0,M.jsx)(b.A,{disabled:!f,"data-type":"username",onChange:h,value:y,name:"username",placeholder:"SMTP Username"})]}),(0,M.jsxs)("div",{className:"input",children:[(0,M.jsx)(oe.A,{htmlFor:"password",children:e("password")}),(0,M.jsx)(b.A,{type:"password",disabled:!f,"data-type":"password",onChange:h,value:w,name:"password",placeholder:"SMTP Password"})]})]}),(0,M.jsxs)("div",{className:"flex gap-4 whitespace-nowrap mt-6",children:[(0,M.jsx)(b.A,{type:"email",disabled:!j.enabled,onChange:e=>{const s=e.target.value;t(s)},value:s,name:"email",placeholder:"test@email.com"}),(0,M.jsx)(o.A,{disabled:!f||!s,onClick:()=>{i({to:s,subject:"test title",content:"test content"})},children:e("send_test_email")})]}),g&&(0,M.jsx)(de.A,{saveHandler:()=>{var e;u({...x,port:Number(null!==(e=null===x||void 0===x?void 0:x.port)&&void 0!==e?e:0)})},resetHandler:d})]})}const Le=({title:e,desc:s,children:t})=>(0,M.jsxs)("div",{className:"text-sm",children:[(0,M.jsx)("p",{className:"text-gray-600 dark:text-gray-100 font-semibold",children:e}),(0,M.jsx)("p",{className:"flex justify-between w-full text-gray-400 mb-2 text-xs",children:s}),t]}),ke=()=>{const e=(0,g.GV)((e=>{var s;return null!==(s=e.server.max_file_expiry_mode)&&void 0!==s?s:"Off"}),y.bN),{t:s}=(0,l.Bd)("setting",{keyPrefix:"data.auto_delete_file"}),{t:t}=(0,l.Bd)(),{refetch:i}=(0,I.Mv)(),[r,c]=(0,a.useState)(e),[u,{isSuccess:j,isLoading:m}]=(0,I.u3)();(0,a.useEffect)((()=>{j&&(i(),n.oR.success(t("tip.update")))}),[j]);return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(Le,{title:s("title"),desc:s("desc"),children:(0,M.jsx)(Me.A,{options:[s("off"),s("day1"),s("day7"),s("day30"),s("day90"),s("day180")],values:["Off","Day1","Day7","Day30","Day90","Day180"],value:e,onChange:e=>{c(e)}})}),r!==e&&(0,M.jsx)(d.A,{id:"modal-modal",children:(0,M.jsx)(x.A,{title:"Are you sure?",description:"Off"==r?"":s("confirm_desc"),buttons:(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(o.A,{className:"cancel",onClick:()=>{c(e)},children:t("action.cancel")}),(0,M.jsx)(o.A,{onClick:()=>{u({max_file_expiry_mode:r})},className:"danger",children:m?"Updating":t("action.yes")})]})})})]})},Ee=({context:e,title:s,desc:t,closeModal:i})=>{const{t:r}=(0,l.Bd)(),[c,{isLoading:u,isSuccess:j}]=(0,I.J9)(),[m,{isLoading:g,isSuccess:N}]=(0,I.kw)(),h=j||N;(0,a.useEffect)((()=>{h&&(n.Ay.success("Clear success"),i())}),[h]);const p=g||u;return(0,M.jsx)(d.A,{id:"modal-modal",children:(0,M.jsx)(x.A,{title:s,description:t,buttons:(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(o.A,{className:"cancel",onClick:i,children:r("action.cancel")}),(0,M.jsx)(o.A,{onClick:()=>{switch(e){case"chat":m();break;case"files":c()}},className:"danger",children:p?"Clearing":r("action.remove")})]})})})},Oe=({empty:e=!1,version:s,children:t})=>{const{t:a}=(0,l.Bd)(),i=(0,g.GV)((e=>e.server.version),y.bN);if(!i)return null;return(0,w.Gm)(i,s)<0?e?null:(0,M.jsxs)("div",{className:"flex flex-col gap-2 items-start border border-solid border-orange-500 p-3 rounded-lg w-fit",children:[(0,M.jsx)("span",{className:"text-gray-400 text-sm",children:(0,M.jsx)(l.x6,{i18nKey:"server_update.version_needed",children:(0,M.jsx)("strong",{className:"font-bold",children:{version:s}})})}),(0,M.jsx)("span",{className:"text-gray-400 text-sm",children:(0,M.jsx)(l.x6,{i18nKey:"server_update.current_version",children:(0,M.jsx)("strong",{className:"font-bold",children:{version:i}})})}),(0,M.jsx)("span",{className:"text-gray-400 text-sm",children:a("server_update.update_tip")}),(0,M.jsxs)("a",{className:"text-blue-500 underline",href:"https://doc.voce.chat/install/install-by-docker#update-vocechat-docker",target:"_blank",rel:"noopener noreferrer",children:[a("server_update.howto")," \ud83d\udcd6"," "]})]}):t};function Ce(){const[e,s]=(0,a.useState)(null),{t:t}=(0,l.Bd)("setting"),i=e=>{s(e)},r={chat:t("data.clear_msgs.desc"),files:t("data.clear_files.desc")};return(0,M.jsxs)("div",{className:"relative w-full md:w-[512px] flex flex-col gap-6",children:[(0,M.jsx)(Oe,{version:"0.3.10",empty:!0,children:(0,M.jsx)(Le,{title:t("data.clear_msgs.title"),desc:t("data.clear_msgs.desc"),children:(0,M.jsx)(o.A,{onClick:i.bind(null,"chat"),className:"danger",children:t("data.clear_msgs.btn")})})}),(0,M.jsx)(Le,{title:t("data.clear_files.title"),desc:t("data.clear_files.desc"),children:(0,M.jsx)(o.A,{onClick:i.bind(null,"files"),className:"danger",children:t("data.clear_files.btn")})}),(0,M.jsx)(ke,{}),e&&(0,M.jsx)(Ee,{closeModal:i.bind(null,null),context:e,title:"Are you sure?",desc:r[e]})]})}var ze=t(85666),Se=t(53374);const Ue=e=>{const s=_()();let t=s;switch(e){case"year":t=s.add(100,"year");break;case"month":t=s.add(1,"month");break;case"quarter":t=s.add(3,"month")}return t.format("YYYY-MM-DD")},Pe=(0,F.JZ)(),Ye=({closeModal:e})=>{const{t:s}=(0,l.Bd)("setting"),{t:t}=(0,l.Bd)(),[i,{isLoading:r,isSuccess:c}]=(0,I.Bh)(),[u,j]=(0,a.useState)(location.hostname),[m,g]=(0,a.useState)(!1),[N,h]=(0,a.useState)(`${Pe[0].pid}|${Pe[0].limit}|${Pe[0].type}|${Pe[0].sub_dur||""}`),p=()=>{g((e=>!e))},_=N.includes("booking");return(0,M.jsx)(d.A,{id:"modal-modal",children:(0,M.jsx)(x.A,{title:s("license.renew"),description:s("license.renew_select"),buttons:(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(o.A,{onClick:e,className:"ghost",children:t("action.cancel")}),_?(0,M.jsx)(o.A,{onClick:()=>{window.open("https://calendly.com/hansu","_blank")},children:"Booking a meeting!"}):(0,M.jsx)(A.Ay,{visible:m,interactive:!0,placement:"top-end",offset:[-50,-40],trigger:"click",content:(0,M.jsxs)("div",{className:"p-3 rounded-lg border border-solid border-gray-200 dark:border-gray-900 flex flex-col items-start gap-3 w-[430px] bg-white dark:bg-gray-800 shadow shadow-gray-200 dark:shadow-gray-900 drop-shadow-xl",children:[(0,M.jsx)("div",{className:"text-gray-500 text-sm",children:s("license.tip_domain")}),(0,M.jsx)(b.A,{value:u,onChange:e=>{j(e.target.value)}}),(0,M.jsxs)("div",{className:"flex justify-between items-center w-full mt-4",children:[(0,M.jsxs)("span",{className:"text-xs text-orange-500 text-left",children:[" ",s("license.tip_port")]}),(0,M.jsxs)("div",{className:"flex gap-3 whitespace-nowrap",children:[(0,M.jsx)(o.A,{className:"mini cancel",onClick:p,children:t("action.cancel")}),(0,M.jsx)(o.A,{className:"mini",disabled:r||c,onClick:async()=>{const e=`https://${u}`;if(!Se.t6(e))return void n.Ay.error("Invalid Host");if(""!==new URL(e).port||u.endsWith(":443"))return void n.Ay.error(s("license.tip_port"));const[t,a,l,r="month"]=N.split("|"),c={user_limit:Number(a),expire:Ue("subscription"==l?r:"year"),domain:u.startsWith("localhost")?"*":u},d=await i({type:l,priceId:t,metadata:c,cancel_url:location.href,success_url:`${location.origin}/#/cb/payment_success`});"error"in d?n.Ay.error("Payment link initialized failed!"):(d.data,location.href=d.data.session_url)},children:r?"Initialize Payment URL":c?"Redirecting":s("license.tip_confirm")})]})]})]}),children:(0,M.jsxs)("button",{onClick:p,className:"text-sm text-white bg-primary-400 break-keep shadow rounded-lg px-3.5 py-2.5 md:hover:bg-primary-500 active:bg-primary-500 disabled:bg-gray-300",children:[" ",s("license.renew")]})})]}),children:(0,M.jsx)(Me.A,{options:Pe.map((({title:e,desc:s,price:t})=>`${e} ${s?`[${s}]`:""}${t?`[${t}]`:""}`)),values:Pe.map((({pid:e,limit:s,type:t="payment",sub_dur:a="month"})=>`${e}|${s}|${t}|${a}`)),value:N,onChange:e=>{h(e)}})})})},Be=({closeModal:e,updateLicense:s,updating:t,updated:i})=>{const[r,c]=(0,a.useState)(""),{t:u}=(0,l.Bd)("setting"),{t:j}=(0,l.Bd)();return(0,a.useEffect)((()=>{i&&(n.Ay.success(j("tip.update")),e())}),[i]),(0,M.jsx)(d.A,{id:"modal-modal",children:(0,M.jsx)(x.A,{buttons:(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(o.A,{onClick:e,className:"ghost",children:j("action.cancel")}),(0,M.jsx)(o.A,{disabled:t||i||!r,onClick:async()=>{const e=await s(r);"boolean"!=typeof e||e||n.Ay.error("Check License Invalid!")},children:t?"Updating":i?"Update Successfully":u("license.update")})]}),children:(0,M.jsx)(me.A,{rows:18,placeholder:u("license.update_placeholder"),value:r,onChange:e=>{c(e.target.value)}})})})},Qe=({label:e,data:s,foldable:t=!1,...a})=>{const l=(0,Q.A)("font-bold w-full cursor-pointer dark:text-green-500",t?"truncate":"whitespace-pre-wrap break-all");return s?(0,M.jsxs)("div",{className:"whitespace-nowrap flex flex-col items-start justify-start text-lg",children:[(0,M.jsx)("span",{className:"text-sm text-green-500",children:e}),Array.isArray(s)?(0,M.jsx)("ul",{className:l,children:s.map((e=>(0,M.jsx)("li",{children:e},e)))}):(0,M.jsx)("span",{className:l,...a,children:s})]}):null};function Re(){var e;const{t:s,i18n:t}=(0,l.Bd)("setting"),{license:i,reachLimit:r,upsertLicense:c,upserting:n,upserted:d}=(0,ze.A)(!0),[u,x]=(0,a.useState)(!1),[j,m]=(0,a.useState)(!1),[g,N]=(0,a.useState)(!0),h=()=>{x((e=>!e))},p=()=>{m((e=>!e))};return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)("div",{className:"max-w-3xl flex flex-col justify-start items-start gap-4",children:[(0,M.jsxs)("div",{className:(0,Q.A)("relative w-full p-3 rounded border-solid border flex flex-col gap-4 shadow",r?"border-red-600 bg-red-200/50":"border-green-600 bg-green-100 dark:bg-green-900"),children:[(0,M.jsx)(Qe,{label:s("license.signed"),data:null!==i&&void 0!==i&&i.sign?"Yes":"Not Yet"}),(0,M.jsx)(Qe,{label:s("license.domain"),data:null===i||void 0===i?void 0:i.domains}),(0,M.jsx)(Qe,{label:s("license.user_limit"),data:(null!==(e=null===i||void 0===i?void 0:i.user_limit)&&void 0!==e?e:0)>=999999?"No Limit":null===i||void 0===i?void 0:i.user_limit}),(0,M.jsx)(Qe,{label:s("license.expire"),data:_()(null===i||void 0===i?void 0:i.expired_at).format("YYYY-MM-DD h:mm:ss A")}),(0,M.jsx)(Qe,{label:s("license.create"),data:_()(null===i||void 0===i?void 0:i.created_at).format("YYYY-MM-DD h:mm:ss A")}),(0,M.jsx)(Qe,{label:s("license.value"),data:null===i||void 0===i?void 0:i.base58,foldable:g,title:g?"Click to see full text":"Click to fold text",onClick:()=>{N((e=>!e))}})]}),(0,M.jsxs)("div",{className:"flex gap-2",children:[(0,M.jsx)(o.A,{onClick:h,children:s("license.renew")}),(0,M.jsx)(o.A,{onClick:p,className:"ghost",children:s("license.update")})]}),(0,M.jsxs)("div",{className:"flex flex-col gap-4 bg-primary-500 text-white rounded drop-shadow-xl p-5",children:[(0,M.jsxs)("h2",{className:"text-2xl font-bold",children:[s("license.tip.title")," \ud83c\udf81"]}),(0,M.jsxs)("p",{className:"flex flex-col",children:[(0,M.jsx)("span",{children:s("license.tip.user_test")}),(0,M.jsxs)("span",{children:[s("license.tip.contact"),t.language.startsWith("zh")?"Privoce":(0,M.jsx)("a",{className:"underline text-lg text-green-200",href:"https://calendly.com/hansu/han-meeting",target:"_blank",rel:"noopener noreferrer",children:"https://calendly.com/hansu/han-meeting"})]})]})]})]}),u&&(0,M.jsx)(Ye,{closeModal:h}),j&&(0,M.jsx)(Be,{updated:d,updating:n,updateLicense:c,closeModal:p})]})}var Ge=t(2890);const We=()=>{const e=(0,g.GV)((e=>{var s;return null!==(s=e.server.chat_layout_mode)&&void 0!==s?s:"Left"}),y.bN),{t:s}=(0,l.Bd)("setting",{keyPrefix:"overview.chat_layout"}),{t:t}=(0,l.Bd)(),{refetch:i}=(0,I.Mv)(),[r,{isSuccess:c}]=(0,I.u3)();(0,a.useEffect)((()=>{c&&(i(),n.oR.success(t("tip.update")))}),[c]);return(0,M.jsx)(Le,{title:s("title"),desc:s("desc"),children:(0,M.jsx)(Me.A,{options:[s("left"),s("self_right")],values:["Left","SelfRight"],value:e,onChange:e=>{r({chat_layout_mode:e})}})})},Ve=()=>{const e=(0,g.GV)((e=>!!e.server.contact_verification_enable),y.bN),{t:s}=(0,l.Bd)("setting",{keyPrefix:"overview.contact_verify"}),{t:t}=(0,l.Bd)(),{refetch:i}=(0,I.Mv)(),[r,{isSuccess:c}]=(0,I.u3)();(0,a.useEffect)((()=>{c&&(i(),n.oR.success(t("tip.update")))}),[c]);return(0,M.jsx)(Le,{title:s("title"),desc:s("desc"),children:(0,M.jsx)(Me.A,{options:[s("enable"),s("disable")],values:["true","false"],value:`${e}`,onChange:()=>{r({contact_verification_enable:!e})}})})},Ke=()=>{const[e,s]=(0,a.useState)(localStorage.theme||"auto"),{t:t}=(0,l.Bd)("setting");return(0,M.jsx)(Le,{title:t("overview.theme.title"),desc:t("overview.theme.desc"),children:(0,M.jsx)(Me.A,{options:[t("overview.theme.auto"),t("overview.theme.dark"),t("overview.theme.light")],values:["auto","dark","light"],value:e,onChange:e=>{(e=>{if(s(e),localStorage.theme=e,document.documentElement.classList.remove("dark"),document.documentElement.classList.remove("light"),"auto"!==e)document.documentElement.classList.add(e);else{const e=window.matchMedia("(prefers-color-scheme: dark)").matches;document.documentElement.classList.add(e?"dark":"light")}})(e)}})})},Fe=()=>{const{data:e,isSuccess:s}=(0,I.X)(),[t,i]=(0,a.useState)(location.origin),{t:r}=(0,l.Bd)("setting"),{t:c}=(0,l.Bd)(),[d,{isLoading:u,isSuccess:x}]=(0,I.PX)();return(0,a.useEffect)((()=>{x&&n.oR.success(c("tip.update"))}),[x]),(0,a.useEffect)((()=>{s&&e&&i(e)}),[s,e]),(0,M.jsx)(Le,{title:r("overview.url.title"),desc:r("overview.url.desc"),children:(0,M.jsxs)("div",{className:"flex items-center gap-4 mt-2",children:[(0,M.jsx)(b.A,{placeholder:"frontend url",value:t,onChange:e=>{i(e.target.value)}}),(0,M.jsxs)(o.A,{disabled:!t||u,className:"small",onClick:()=>{d(t)},children:[" ",c("action.update")]})]})})},Ze=["en","zh","jp","tr","pt","es"],He=()=>{const{t:e,i18n:s}=(0,l.Bd)("setting");return(0,M.jsx)(Le,{title:e("overview.lang.title"),desc:e("overview.lang.desc"),children:(0,M.jsx)(Me.A,{options:[e("overview.lang.en"),e("overview.lang.zh"),e("overview.lang.jp"),e("overview.lang.tr"),e("overview.lang.pt"),e("overview.lang.es")],values:Ze,value:s.language.split("-")[0],onChange:e=>{(e=>{s.changeLanguage(e)})(e)}})})},Je=()=>{const e=(0,g.GV)((e=>!!e.server.show_user_online_status),y.bN),{t:s}=(0,l.Bd)("setting",{keyPrefix:"overview.online_status"}),{t:t}=(0,l.Bd)(),{refetch:i}=(0,I.Mv)(),[r,{isSuccess:c}]=(0,I.u3)();(0,a.useEffect)((()=>{c&&(i(),n.oR.success(t("tip.update")))}),[c]);return(0,M.jsx)(Le,{title:s("title"),desc:s("desc"),children:(0,M.jsx)(Me.A,{options:[s("enable"),s("disable")],values:["true","false"],value:`${e}`,onChange:()=>{r({show_user_online_status:!e})}})})};var Xe=t(859);const qe=()=>{const e=(0,y.wA)(),s=(0,g.GV)((e=>!!e.ui.msgSound),y.bN),{t:t}=(0,l.Bd)("setting",{keyPrefix:"overview.message_sound"});return(0,M.jsx)(Le,{title:t("title"),desc:t("desc"),children:(0,M.jsx)(Me.A,{options:[t("enable"),t("disable")],values:["true","false"],value:`${s}`,onChange:()=>{e((0,Xe.iy)(!s))}})})},$e=()=>{const{t:e}=(0,l.Bd)("setting"),{t:s}=(0,l.Bd)(),t=(0,g.GV)((e=>{var s;return null===(s=e.authData.user)||void 0===s?void 0:s.is_admin}),y.bN),i=(0,g.GV)((e=>e.server),y.bN),[r,{isSuccess:c}]=(0,I.PZ)(),[d]=(0,I.NI)(),[o,u]=(0,a.useState)(!1),[x,j]=(0,a.useState)(i),m=e=>{const s=e.target.value,{type:t=""}=e.target.dataset;j((e=>({...e,[t]:s})))};(0,a.useEffect)((()=>{i&&j(i)}),[i]),(0,a.useEffect)((()=>{c&&n.Ay.success(s("tip.update"))}),[c]),(0,a.useEffect)((()=>{if(i&&x){const{name:e,description:s}=x,{name:t,description:a}=i;u(t!==e||a!==s)}}),[i,x]);const{name:N,description:h,logo:p}=x;return x?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)("div",{className:"flex gap-4",children:[(0,M.jsx)("div",{className:"w-24 h-24",children:(0,M.jsx)(Y.A,{disabled:!t,url:c?`${p}?t=${+new Date}`:p,name:N,uploadImage:r})}),t&&(0,M.jsx)("div",{className:"flex flex-col justify-between items-start",children:(0,M.jsx)("div",{className:"text-sm text-gray-600 dark:text-gray-100",children:e("overview.upload_desc")})})]}),(0,M.jsxs)("div",{className:"flex flex-col items-start gap-6 mb-3",children:[(0,M.jsxs)("div",{className:"w-full flex flex-col items-start gap-2",children:[(0,M.jsx)(oe.A,{htmlFor:"name",children:e("overview.name")}),(0,M.jsx)(b.A,{disabled:!t,"data-type":"name",onChange:m,value:N,name:"name",id:"name",placeholder:"Server Name"})]}),(0,M.jsxs)("div",{className:"w-full flex flex-col items-start gap-2",children:[(0,M.jsx)(oe.A,{htmlFor:"desc",children:e("overview.desc")}),(0,M.jsx)(me.A,{disabled:!t,"data-type":"description",onChange:m,value:null!==h&&void 0!==h?h:"",rows:4,name:"desc",id:"desc",placeholder:"Tell the world a bit about this server"})]})]}),o&&(0,M.jsx)(de.A,{saveHandler:()=>{const{name:e,description:s}=x;d({name:e,description:s})},resetHandler:()=>{j(i)}})]}):null};function es(){const{t:e}=(0,l.Bd)("setting"),s=(0,g.GV)((e=>{var s;return null===(s=e.authData.user)||void 0===s?void 0:s.is_admin}),y.bN),{values:t,updateConfig:a}=E("login");if(!t)return null;const{who_can_sign_up:i,guest:r=!1}=t;return(0,M.jsxs)("div",{className:"relative w-full md:w-[512px] flex flex-col gap-6",children:[(0,M.jsx)($e,{}),s&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(Fe,{}),(0,M.jsx)("div",{className:"flex flex-col",children:(0,M.jsx)("h4",{className:"font-bold text-gray-700 dark:text-white",children:e("overview.title_feat")})}),(0,M.jsx)(Le,{title:e("overview.sign_up.title"),desc:e("overview.sign_up.desc"),children:(0,M.jsx)(Me.A,{options:[e("overview.sign_up.everyone"),e("overview.sign_up.invite")],values:["EveryOne","InvitationOnly"],value:i,onChange:e=>{var s;s=e,a({...t,who_can_sign_up:s})}})}),(0,M.jsx)(Le,{title:e("overview.guest_mode.title"),desc:e("overview.guest_mode.desc"),children:(0,M.jsx)(Me.A,{options:[e("overview.guest_mode.enable"),e("overview.guest_mode.disable")],values:["true","false"],value:`${r}`,onChange:e=>{(e=>{const s="true"===e;a({...t,guest:s})})(e)}})}),(0,M.jsx)(Je,{}),(0,M.jsx)(We,{}),(0,M.jsx)(Ve,{})]}),(0,M.jsx)(He,{}),(0,M.jsx)(Ke,{}),(0,M.jsx)(qe,{})]})}var ss=t(63101),ts=t(26375),as=t(27820);const ls=({paramKey:e,paramDefault:s,remarks:t})=>(0,M.jsxs)("tr",{className:"bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-50 border-b transition duration-300 ease-in-out md:hover:bg-gray-100 dark:md:hover:bg-gray-900",children:[(0,M.jsx)("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium",children:e}),(0,M.jsx)("td",{className:"text-sm font-light px-6 py-4 whitespace-nowrap",children:"theme-color"==e?(0,M.jsxs)("span",{style:{color:s},children:[" ",s]}):s}),(0,M.jsx)("td",{className:"text-sm font-light px-6 py-4",children:(0,M.jsx)(as.A,{linkPreview:!1,text:t,mention:!1})})]});function is(){const e=(0,g.GV)((e=>{var s;return null===(s=e.authData.user)||void 0===s?void 0:s.uid}),y.bN),s=`${location.origin}/widget.html?host=${e}`,{t:t}=(0,l.Bd)("setting",{keyPrefix:"widget"}),{t:a}=(0,l.Bd)("widget"),{t:i}=(0,l.Bd)(),{copied:r,copy:c}=(0,z.A)({enableToast:!1});return(0,M.jsxs)("div",{className:"flex flex-col justify-start items-start",children:[(0,M.jsx)("div",{className:"font-semibold dark:text-white",children:t("tip")}),(0,M.jsxs)("label",{htmlFor:"code",className:"font-semibold dark:text-white",children:[t("code"),":"]}),(0,M.jsx)(ss.A,{id:"code",language:"html",style:ts.A,className:"rounded",children:`\x3c!-- ${t("code_comment")} --\x3e\n