*/!function(o,a){"use strict";e.exports?e.exports=a(n(153),n(154),n(155)):(i=[n(153),n(154),n(155)],void 0===(s="function"==typeof(r=a)?r.apply(t,i):r)||(e.exports=s))}(0,(function(e,t,n,r){"use strict";var i=r&&r.URI;function s(e,t){var n=arguments.length>=1,r=arguments.length>=2;if(!(this instanceof s))return n?r?new s(e,t):new s(e):new s;if(void 0===e){if(n)throw new TypeError("undefined is not a valid argument for URI");e="undefined"!=typeof location?location.href+"":""}if(null===e&&n)throw new TypeError("null is not a valid argument for URI");return this.href(e),void 0!==t?this.absoluteTo(t):this}s.version="1.19.6";var o=s.prototype,a=Object.prototype.hasOwnProperty;function c(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}functionl(e){returnvoid0===e?"Undefined":String(Object.prototype.toString.call(e)).slice(8,-1)}functionu(e){return"Array"===l(e)}functiond(e,t){varn,r,i={};if("RegExp"===l(t))i=null;elseif(u(t))for(n=0,r=t.length;n<r;n++)i[t[n]]=!0;elsei[t]=!0;for(n=0,r=e.length;n<r;n++){(i&&void0!==i[e[n]]||!i&&t.test(e[n]))&&(e.splice(n,1),r--,n--)}returne}functionh(e,t){varn,r;if(u(t)){for(n=0,r=t.length;n<r;n++)if(!h(e,t[n]))return!1;return!0}vari=l(t);for(n=0,r=e.length;n<r;n++)if("RegExp"===i){if("string"==typeofe[n]&&e[n].match(t))return!0}elseif(e[n]===t)return!0;return!1}functionf(e,t){if(!u(e)||!u(t))return!1;if(e.length!==t.length)return!1;e.sort(),t.sort();for(varn=0,r=e.length;n<r;n++)if(e[n]!==t[n])return!1;return!0}functionp(e){returne.replace(/^\/+|\/+$/g,"")}functiong(e){returnescape(e)}functionm(e){returnencodeURIComponent(e).replace(/[!'()*]/g,g).replace(/\*/g,"%2A")}s._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,preventInvalidHostname:s.preventInvalidHostname,duplicateQueryParameters:s.duplicateQueryParameters,escapeQuerySpace:s.escapeQuerySpace}},s.preventInvalidHostname=!1,s.duplicateQueryParameters=!1,s.escapeQuerySpace=!0,s.protocol_expression=/^[a-z][a-z0-9.+-]*$/i,s.idn_expression=/[^a-z0-9\._-]/i,s.punycode_expression=/(xn--)/i,s.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,s.ip6_expression=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,s.find_uri_expression=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/gi,s.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},s.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},s.hostProtocols=["http","https"],s.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,s.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},s.getDomAttribute=function(e){if(e&&e
!function(n,r){vari=Array.prototype,s=Object.prototype,o=i.slice,a=s.hasOwnProperty,c=i.forEach,l={},u={forEach:function(e,t,n){varr,i,s;if(null!==e)if(c&&e.forEach===c)e.forEach(t,n);elseif(e.length===+e.length){for(r=0,i=e.length;r<i;r++)if(rine&&t.call(n,e[r],r,e)===l)return}elsefor(sine)if(a.call(e,s)&&t.call(n,e[s],s,e)===l)return},extend:function(e){returnthis.forEach(o.call(arguments,1),(function(t){for(varnint)e[n]=t[n]})),e}},d=function(e){if(this.defaults={locale_data:{messages:{"":{domain:"messages",lang:"en",plural_forms:"nplurals=2; plural=(n != 1);"}}},domain:"messages",debug:!1},this.options=u.extend({},this.defaults,e),this.textdomain(this.options.domain),e.domain&&!this.options.locale_data[this.options.domain])thrownewError("Text domain set to non-existent domain: `"+e.domain+"`")};functionh(e){returnd.PF.compile(e||"nplurals=2; plural=(n != 1);")}functionf(e,t){this._key=e,this._i18n=t}d.context_delimiter=String.fromCharCode(4),u.extend(f.prototype,{onDomain:function(e){returnthis._domain=e,this},withContext:function(e){returnthis._context=e,this},ifPlural:function(e,t){returnthis._val=e,this._pkey=t,this},fetch:function(e){return"[object Array]"!={}.toString.call(e)&&(e=[].slice.call(arguments,0)),(e&&e.length?d.sprintf:function(e){returne})(this._i18n.dcnpgettext(this._domain,this._context,this._key,this._pkey,this._val),e)}}),u.extend(d.prototype,{translate:function(e){returnnewf(e,this)},textdomain:function(e){if(!e)returnthis._textdomain;this._textdomain=e},gettext:function(e){returnthis.dcnpgettext.call(this,void0,void0,e)},dgettext:function(e,t){returnthis.dcnpgettext.call(this,e,void0,t)},dcgettext:function(e,t){returnthis.dcnpgettext.call(this,e,void0,t)},ngettext:function(e,t,n){returnthis.dcnpgettext.call(this,void0,void0,e,t,n)},dngettext:function(e,t,n,r){returnthis.dcnpgettext.call(this,e,void0,t,n,r)},dcngettext:function(e,t,n,r){returnthis.dcnpgettext.call(this,e,void0,t,n,r)},pgettext:function(e,t){returnthis.dcnpgettext.call(this,void0,e,t)},dpgettext:function(e,t,n){returnthis.dcnpgettext.call(this,e,t,n)},dcpgettext:function(e,t,n){returnthis.dcnpgettext.call(this,e,t,n)},npgettext:function(e,t,n,r){returnthis.dcnpgettext.call(this,void0,e,t,n,r)},dnpgettext:function(e,t,n,r,i){returnthis.dcnpgettext.call(this,e,t,n,r,i)},dcnpgettext:function(e,t,n,r,i){vars;if(r=r||n,e=e||this._textdomain,!this.options)return(s=newd).dcnpgettext.call(s,void0,void0,n,r,i);if(!this.options.locale_data)thrownewError("No locale data provided.");if(!this.options.locale_data[e])thrownewError("Domain `"+e+"` was not found.");if(!this.options.locale_data[e][""])thrownewError("No locale meta information provided.");if(!n)thrownewError("No translation key found.");varo,a,c,l=t?t+d.context_delimiter+n:n,u=this.options.locale_data,f=u[e],p=(u.messages||this.defaults.locale_data.messages)[""],g=f[""].plural_forms||f[""]["Plural-Forms"]||f[""]["plural-forms"]||p.plural_forms||p["Plural-Forms"]||p["plural-forms"];if(void0===i)c=0;else{if("number"!=typeofi&&(i=parseInt(i,10),isNaN(i)))thrownewError("The number that was passed in is not a number.");c=h(g)(i)}if(!f)thrownewError("No domain named `"+e+"` could be found.");return!(o=f[l])||c>o.length?(this.options.missing_key_callback&&this.options.missing_key_callback(l,e),a=[n,r],!0===this.options.debug&&console.log(a[h(g)(i)]),a[h()(i)]):(a=o[c])||(a=[n,r])[h()(i)]}});varp,g,m=function(){functione(e){returnObject.prototype.toString.call(e).slice(8,-1).toLowerCase()}functiont(e,t){for(varn=[];t>0;n[--t]=e);returnn.join("")}varn=function(){returnn.cache.hasOwnProperty(arguments[0])||(n.cache[arguments[0]]=n.parse(arguments[0])),n.format.call(null,n.cache[arguments[0]],arguments)};returnn.format=function(n,r){vari,s,o,a,c,l,u,d=1,h=n.length,f="",p=[];for(s=0;s<h;s++)if("string"===(f=e(n[s])))p.push(n[s]);elseif("array"===f){if((a=n[s])[2])for(i=r[d],o=0;o<a[2].length;o++){if(!i.hasOwnProperty(a[2][o]))throwm('[sprintf] property "%s" does not exist',a[2][o]);i=i[a[2][o]]}elsei=a[1]?r[a[1]]:r[d
*/Hs.getJIDFromURI=function(e){return e.startsWith("xmpp:")&&e.endsWith("?join")?e.replace(/^xmpp:/,"").replace(/\?join$/,""):e},Hs.toStanza=function(e){constt=Vs.parseFromString(e,"text/xml");if(t.getElementsByTagNameNS(Ws,"parsererror").length)thrownewError("Parser Error: "+e);returnt.firstElementChild},Hs.getLongestSubstring=function(e,t){returnt.reduce((function(t,n){returne.startsWith(n)&&n.length>t.length?n:t}),"")},Hs.prefixMentions=function(e){lett=e.get("message");return(e.get("references")||[]).sort((e,t)=>t.begin-e.begin).forEach(e=>{t=`${t.slice(0,e.begin)}@${t.slice(e.begin)}`}),t},Hs.isValidJID=function(e){return"string"==typeofe&&(2===qs(e.split("@")).length&&!e.startsWith("@")&&!e.endsWith("@"))},Hs.isValidMUCJID=function(e){return!e.startsWith("@")&&!e.endsWith("@")},Hs.isSameBareJID=function(e,t){return"string"==typeofe&&"string"==typeoft&&Us.getBareJidFromJid(e).toLowerCase()===Us.getBareJidFromJid(t).toLowerCase()},Hs.isSameDomain=function(e,t){return"string"==typeofe&&"string"==typeoft&&Us.getDomainFromJid(e).toLowerCase()===Us.getDomainFromJid(t).toLowerCase()},Hs.isNewMessage=function(e){returneinstanceofElement?!(pr()(`result[xmlns="${Us.NS.MAM}"]`,e).length&&pr()(`delay[xmlns="${Us.NS.DELAY}"]`,e).length):(einstanceofBs&&(e=e.attributes),!(e.is_delayed&&e.is_archived))},Hs.shouldCreateMessage=function(e){returne.retracted||!Hs.isEmptyMessage(e)},Hs.shouldCreateGroupchatMessage=function(e){returne.nick&&(Hs.shouldCreateMessage(e)||e.is_tombstone)},Hs.isEmptyMessage=function(e){returneinstanceofBs&&(e=e.attributes),!(e.oob_url||e.file||e.is_encrypted&&e.plaintext||e.message)},Hs.isOnlyChatStateNotification=function(e){returneinstanceofElement?null===e.querySelector("body")&&(null!==e.querySelector("active")||null!==e.querySelector("composing")||null!==e.querySelector("inactive")||null!==e.querySelector("paused")||null!==e.querySelector("gone")):(einstanceofBs&&(e=e.attributes),e.chat_state&&Hs.isEmptyMessage(e))},Hs.isOnlyMessageDeliveryReceipt=function(e){returneinstanceofElement?null===e.querySelector("body")&&null!==e.querySelector("received"):(einstanceofBs&&(e=e.attributes),e.received&&Hs.isEmptyMessage(e))},Hs.isChatRoom=function(e){returne&&"chatroom"===e.get("type")},Hs.isErrorObject=function(e){returneinstanceofError},Hs.isErrorStanza=function(e){return!!Mn(e)&&"error"===e.getAttribute("type")},Hs.isForbiddenError=function(e){return!!Mn(e)&&pr()(`error[type="auth"] forbidden[xmlns="${Us.NS.STANZAS}"]`,e).length>0},Hs.isServiceUnavailableError=function(e){return!!Mn(e)&&pr()(`error[type="cancel"] service-unavailable[xmlns="${Us.NS.STANZAS}"]`,e).length>0},Hs.merge=functione(t,n){for(constrinn)N(t[r])?e(t[r],n[r]):t[r]=n[r]},Hs.getOuterWidth=function(e,t=!1){letn=e.offsetWidth;if(!t)returnn;constr=window.getComputedStyle(e);returnn+=parseInt(r.marginLeft?r.marginLeft:0,10)+parseInt(r.marginRight?r.marginRight:0,10),n},Hs.stringToElement=function(e){vart=document.createElement("div");returnt.innerHTML=e,t.firstElementChild},Hs.matchesSelector=function(e,t){constn=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector;return!!n&&n.call(e,t)},Hs.queryChildren=function(e,t){returnArray.from(e.childNodes).filter(e=>Hs.matchesSelector(e,t))},Hs.contains=function(e,t){constn=(e,n)=>e.get(n).toLowerCase().includes(t.toLowerCase());returnfunction(t){if("object"==typeofe)returnObject.keys(e).reduce((e,r)=>e||n(t,r),!1);if("string"==typeofe)returnn(t,e);thrownewTypeError("contains: wrong attribute type. Must be string or array.")}},Hs.isOfType=function(e,t){returnt.get("type")==e},Hs.isInstance=function(e,t){returntinstanceofe},Hs.getAttribute=function(e,t){returnt.get(e)},Hs.contains.not=function(e,t){returnfunction(n){return!Hs.contains(e,t)(n)}},Hs.rootContains=function(e,t){returne!==document||e.contains?e.contains?e.contains(t):window.HTMLElement.prototype.contains.call(e,t):document.head.contains(t)||document.body.contains(t)},Hs.createFragmentFromText=function(e){vart,n
constsc=e=>null===e||!("object"==typeofe||"function"==typeofe),oc=e=>Array.isArray(e)||!(!e||!e[Symbol.iterator]);classac{constructor(e,t,n){this.dirty=!0,this.element=e,this.name=t,this.strings=n,this.parts=[];for(lete=0;e<n.length-1;e++)this.parts[e]=this._createPart()}_createPart(){returnnewcc(this)}_getValue(){conste=this.strings,t=e.length-1,n=this.parts;if(1===t&&""===e[0]&&""===e[1]){conste=n[0].value;if("symbol"==typeofe)returnString(e);if("string"==typeofe||!oc(e))returne}letr="";for(leti=0;i<t;i++){r+=e[i];constt=n[i];if(void0!==t){conste=t.value;if(sc(e)||!oc(e))r+="string"==typeofe?e:String(e);elsefor(consttofe)r+="string"==typeoft?t:String(t)}}returnr+=e[t],r}commit(){this.dirty&&(this.dirty=!1,this.element.setAttribute(this.name,this._getValue()))}}classcc{constructor(e){this.value=void0,this.committer=e}setValue(e){e===Za||sc(e)&&e===this.value||(this.value=e,Xa(e)||(this.committer.dirty=!0))}commit(){for(;Xa(this.value);){conste=this.value;this.value=Za,e(this)}this.value!==Za&&this.committer.commit()}}classlc{constructor(e){this.value=void0,this.__pendingValue=void0,this.options=e}appendInto(e){this.startNode=e.appendChild(Va()),this.endNode=e.appendChild(Va())}insertAfterNode(e){this.startNode=e,this.endNode=e.nextSibling}appendIntoPart(e){e.__insert(this.startNode=Va()),e.__insert(this.endNode=Va())}insertAfterPart(e){e.__insert(this.startNode=Va()),this.endNode=e.endNode,e.endNode=this.startNode}setValue(e){this.__pendingValue=e}commit(){if(null===this.startNode.parentNode)return;for(;Xa(this.__pendingValue);){conste=this.__pendingValue;this.__pendingValue=Za,e(this)}conste=this.__pendingValue;e!==Za&&(sc(e)?e!==this.value&&this.__commitText(e):einstanceofic?this.__commitTemplateResult(e):einstanceofNode?this.__commitNode(e):oc(e)?this.__commitIterable(e):e===ec?(this.value=ec,this.clear()):this.__commitText(e))}__insert(e){this.endNode.parentNode.insertBefore(e,this.endNode)}__commitNode(e){this.value!==e&&(this.clear(),this.__insert(e),this.value=e)}__commitText(e){constt=this.startNode.nextSibling,n="string"==typeof(e=null==e?"":e)?e:String(e);t===this.endNode.previousSibling&&3===t.nodeType?t.data=n:this.__commitNode(document.createTextNode(n)),this.value=e}__commitTemplateResult(e){constt=this.options.templateFactory(e);if(this.valueinstanceoftc&&this.value.template===t)this.value.update(e.values);else{constn=newtc(t,e.processor,this.options),r=n._clone();n.update(e.values),this.__commitNode(r),this.value=n}}__commitIterable(e){Array.isArray(this.value)||(this.value=[],this.clear());constt=this.value;letn,r=0;for(constiofe)n=t[r],void0===n&&(n=newlc(this.options),t.push(n),0===r?n.appendIntoPart(this):n.insertAfterPart(t[r-1])),n.setValue(i),n.commit(),r++;r<t.length&&(t.length=r,this.clear(n&&n.endNode))}clear(e=this.startNode){La(this.startNode.parentNode,e.nextSibling,this.endNode)}}classuc{constructor(e,t,n){if(this.value=void0,this.__pendingValue=void0,2!==n.length||""!==n[0]||""!==n[1])thrownewError("Boolean attributes can only contain a single expression");this.element=e,this.name=t,this.strings=n}setValue(e){this.__pendingValue=e}commit(){for(;Xa(this.__pendingValue);){conste=this.__pendingValue;this.__pendingValue=Za,e(this)}if(this.__pendingValue===Za)return;conste=!!this.__pendingValue;this.value!==e&&(e?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name),this.value=e),this.__pendingValue=Za}}classdcextendsac{constructor(e,t,n){super(e,t,n),this.single=2===n.length&&""===n[0]&&""===n[1]}_createPart(){returnnewhc(this)}_getValue(){returnthis.single?this.parts[0].value:super._getValue()}commit(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())}}classhcextendscc{}letfc=!1;(()=>{try{conste={getcapture(){returnfc=!0,!1}};window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch(e){}})();classpc{constructor(e,t,n){this.value=void0,this.__pendingValue=void0,this.element=e,this.eventName=t,this.eventContext=n,this.__boundHandleEvent=e=>this.handleEven
constMc=window.ShadowRoot&&(void0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"inDocument.prototype&&"replace"inCSSStyleSheet.prototype,Rc=Symbol();class$c{constructor(e,t){if(t!==Rc)thrownewError("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e}getstyleSheet(){returnvoid0===this._styleSheet&&(Mc?(this._styleSheet=newCSSStyleSheet,this._styleSheet.replaceSync(this.cssText)):this._styleSheet=null),this._styleSheet}toString(){returnthis.cssText}}constDc=(e,...t)=>{constn=t.reduce((t,n,r)=>t+(e=>{if(einstanceof$c)returne.cssText;if("number"==typeofe)returne;thrownewError(`Value passed to 'css' function must be a 'css' function result: ${e}. Use 'unsafeCSS' to pass non-literal values, but\n take care to ensure page security.`)})(n)+e[r+1],e[0]);returnnew$c(n,Rc)};
(window.litElementVersions||(window.litElementVersions=[])).push("2.4.0");constPc={};classLcextendsNc{staticgetStyles(){returnthis.styles}static_getUniqueStyles(){if(this.hasOwnProperty(JSCompiler_renameProperty("_styles",this)))return;conste=this.getStyles();if(Array.isArray(e)){constt=(e,n)=>e.reduceRight((e,n)=>Array.isArray(n)?t(n,e):(e.add(n),e),n),n=t(e,newSet),r=[];n.forEach(e=>r.unshift(e)),this._styles=r}elsethis._styles=void0===e?[]:[e];this._styles=this._styles.map(e=>{if(einstanceofCSSStyleSheet&&!Mc){constt=Array.prototype.slice.call(e.cssRules).reduce((e,t)=>e+t.cssText,"");returnnew$c(String(t),Rc)}returne})}initialize(){super.initialize(),this.constructor._getUniqueStyles(),this.renderRoot=this.createRenderRoot(),window.ShadowRoot&&this.renderRootinstanceofwindow.ShadowRoot&&this.adoptStyles()}createRenderRoot(){returnthis.attachShadow({mode:"open"})}adoptStyles(){conste=this.constructor._styles;0!==e.length&&(void0===window.ShadyCSS||window.ShadyCSS.nativeShadow?Mc?this.renderRoot.adoptedStyleSheets=e.map(e=>einstanceofCSSStyleSheet?e:e.styleSheet):this._needsShimAdoptedStyleSheets=!0:window.ShadyCSS.ScopingShim.prepareAdoptedCssText(e.map(e=>e.cssText),this.localName))}connectedCallback(){super.connectedCallback(),this.hasUpdated&&void0!==window.ShadyCSS&&window.ShadyCSS.styleElement(this)}update(e){constt=this.render();super.update(e),t!==Pc&&this.constructor.render(t,this.renderRoot,{scopeName:this.localName,eventContext:this}),this._needsShimAdoptedStyleSheets&&(this._needsShimAdoptedStyleSheets=!1,this.constructor._styles.forEach(e=>{constt=document.createElement("style");t.textContent=e.cssText,this.renderRoot.appendChild(t)}))}render(){returnPc}}Lc.finalized=!0,Lc.render=(e,t,n)=>{if(!n||"object"!=typeofn||!n.scopeName)thrownewError("The `scopeName` option is required.");constr=n.scopeName,i=_c.has(t),s=xc&&11===t.nodeType&&!!t.host,o=s&&!Cc.has(r),a=o?document.createDocumentFragment():t;if(bc(e,a,Object.assign({templateFactory:Ec(r)},n)),o){conste=_c.get(a);_c.delete(a);constn=e.valueinstanceoftc?e.value.template:void0;kc(r,a,n),La(t,t.firstChild),t.appendChild(a),_c.set(t,e)}!i&&s&&window.ShadyCSS.styleElement(t.host)};varzc=n(91);
const{Strophe:yl,$iq:wl,utils:Sl}=sl.env;sl.plugins.add("converse-disco",{initialize(){functione(){if(!Vc.stream_features){conste="converse.stream-features-"+yl.getBareJidFromJid(Vc.jid);Qc.promises.add("streamFeaturesAdded"),Vc.stream_features=newia,Vc.stream_features.browserStorage=Vc.createStore(e,"session")}}functiont(){Qc.trigger("streamFeaturesAdded")}Qc.promises.add("discoInitialized"),Qc.promises.add("streamFeaturesAdded"),Vc.DiscoEntity=Bs.extend({idAttribute:"jid",initialize(e,t){this.waitUntilFeaturesDiscovered=Sl.getResolveablePromise(),this.dataforms=newia;letn="converse.dataforms-"+this.get("jid");this.dataforms.browserStorage=Vc.createStore(n,"session"),this.features=newia,n="converse.features-"+this.get("jid"),this.features.browserStorage=Vc.createStore(n,"session"),this.listenTo(this.features,"add",this.onFeatureAdded),this.fields=newia,n="converse.fields-"+this.get("jid"),this.fields.browserStorage=Vc.createStore(n,"session"),this.listenTo(this.fields,"add",this.onFieldAdded),this.identities=newia,n="converse.identities-"+this.get("jid"),this.identities.browserStorage=Vc.createStore(n,"session"),this.fetchFeatures(t),this.items=newVc.DiscoEntities,n="converse.disco-items-"+this.get("jid"),this.items.browserStorage=Vc.createStore(n,"session"),this.items.fetch()},asyncgetIdentity(e,t){returnawaitthis.waitUntilFeaturesDiscovered,this.identities.findWhere({category:e,type:t})},asynchasFeature(e){if(awaitthis.waitUntilFeaturesDiscovered,this.features.findWhere({var:e}))returnthis},onFeatureAdded(e){e.entity=this,Qc.trigger("serviceDiscovered",e)},onFieldAdded(e){e.entity=this,Qc.trigger("discoExtensionFieldDiscovered",e)},asyncfetchFeatures(e){if(e.ignore_cache)this.queryInfo();else{conste=this.features.browserStorage.name,t=awaitthis.features.browserStorage.store.getItem(e);t&&0===t.length||null===t?this.queryInfo():(this.features.fetch({add:!0,success:()=>{this.waitUntilFeaturesDiscovered.resolve(this),this.trigger("featuresDiscovered")}}),this.identities.fetch({add:!0}))}},asyncqueryInfo(){lete;try{e=awaitQc.disco.info(this.get("jid"),null)}catch(e){returnnull===e?Dn.error("Timeout for disco#info query for "+this.get("jid")):Dn.error(e),voidthis.waitUntilFeaturesDiscovered.resolve(this)}this.onInfo(e)},onDiscoItems(e){pr()(`query[xmlns="${yl.NS.DISCO_ITEMS}"] item`,e).forEach(e=>{if(e.getAttribute("node"))return;constt=e.getAttribute("jid");if(void0===this.items.get(t)){conste=Vc.disco_entities.get(t);e?this.items.add(e):this.items.create({jid:t})}})},asyncqueryForItems(){if(0===this.identities.where({category:"server"}).length)return;conste=awaitQc.disco.items(this.get("jid"));this.onDiscoItems(e)},onInfo(e){Array.from(e.querySelectorAll("identity")).forEach(e=>{this.identities.create({category:e.getAttribute("category"),type:e.getAttribute("type"),name:e.getAttribute("name")})}),pr()(`x[type="result"][xmlns="${yl.NS.XFORM}"]`,e).forEach(e=>{constt={};pr()("field",e).forEach(e=>{varn;t[e.getAttribute("var")]={value:null===(n=e.querySelector("value"))||void0===n?void0:n.textContent,type:e.getAttribute("type")}}),this.dataforms.create(t)}),e.querySelector(`feature[var="${yl.NS.DISCO_ITEMS}"]`)&&this.queryForItems(),Array.from(e.querySelectorAll("feature")).forEach(t=>{this.features.create({var:t.getAttribute("var"),from:e.getAttribute("from")})}),pr()('x[type="result"][xmlns="jabber:x:data"] field',e).forEach(t=>{varn;this.fields.create({var:t.getAttribute("var"),value:null===(n=t.querySelector("value"))||void0===n?void0:n.textContent,from:e.getAttribute("from")})}),this.waitUntilFeaturesDiscovered.resolve(this),this.trigger("featuresDiscovered")}}),Vc.DiscoEntities=ia.extend({model:Vc.DiscoEntity,fetchEntities(){returnnewPromise((e,t)=>{this.fetch({add:!0,success:e,error(e,n){Dn.error(n),t(newError("Could not fetch disco entities"))}})})}});constn=this;functionr(e){constt=e.getElementsByTagName("query")[0].getAttribute("node"),r={xmlns:yl.NS.DISCO_INFO};t&&(r.node=t);consti=wl({type:"result",id:e.getAttribute("id")}),s=e.getAttribute("from");returnnull!==s&&i.
const{Strophe:ru,$iq:iu,sizzle:su}=sl.env,ou=sl.env.utils;functionau(e){returnsu(`event[xmlns="${ru.NS.PUBSUB}#event"] items[node="${ru.NS.BOOKMARKS}"]`,e).length&&Qc.waitUntil("bookmarksInitialized").then(()=>Vc.bookmarks.createBookmarksFromStanza(e)).catch(e=>Dn.fatal(e)),!0}ru.addNamespace("BOOKMARKS","storage:bookmarks"),sl.plugins.add("converse-bookmarks",{dependencies:["converse-chatboxes","converse-muc"],overrides:{ChatRoom:{getDisplayName(){const{_converse:e}=this.__super__;if(this.get("bookmarked")&&e.bookmarks){constt=e.bookmarks.findWhere({jid:this.get("jid")});if(t)returnt.get("name")}returnthis.__super__.getDisplayName.apply(this,arguments)},getAndPersistNickname(e){const{_converse:t}=this.__super__;returne=e||t.getNicknameFromBookmark(this.get("jid")),this.__super__.getAndPersistNickname.call(this,e)}}},initialize(){const{__:e}=Vc;Qc.settings.extend({allow_bookmarks:!0,allow_public_bookmarks:!1,muc_respect_autojoin:!0}),Qc.promises.add("bookmarksInitialized"),Vc.getNicknameFromBookmark=function(e){if(!Vc.bookmarks||!Qc.settings.get("allow_bookmarks"))returnnull;constt=Vc.bookmarks.findWhere({jid:e});returnt?t.get("nick"):void0},Vc.Bookmark=Bs.extend({idAttribute:"jid",getDisplayName(){returnru.xmlunescape(this.get("name"))}}),Vc.Bookmarks=ia.extend({model:Vc.Bookmark,comparator:e=>e.get("name").toLowerCase(),initialize(){this.on("add",e=>this.openBookmarkedRoom(e).then(e=>this.markRoomAsBookmarked(e)).catch(e=>Dn.fatal(e))),this.on("remove",this.markRoomAsUnbookmarked,this),this.on("remove",this.sendBookmarkStanza,this);conste="converse.room-bookmarks"+Vc.bare_jid;this.fetched_flag=e+"fetched",this.browserStorage=Vc.createStore(e)},asyncopenBookmarkedRoom(e){if(Qc.settings.get("muc_respect_autojoin")&&e.get("autojoin")){(awaitQc.rooms.create(e.get("jid"),{nick:e.get("nick")})).maybeShow()}returne},fetchBookmarks(){conste=ou.getResolveablePromise();returnwindow.sessionStorage.getItem(this.fetched_flag)?this.fetch({success:()=>e.resolve(),error:()=>e.resolve()}):this.fetchBookmarksFromServer(e),e},createBookmark(e){this.create(e),this.sendBookmarkStanza().catch(t=>this.onBookmarkError(t,e))},sendBookmarkStanza(){conste=iu({type:"set",from:Vc.connection.jid}).c("pubsub",{xmlns:ru.NS.PUBSUB}).c("publish",{node:ru.NS.BOOKMARKS}).c("item",{id:"current"}).c("storage",{xmlns:ru.NS.BOOKMARKS});returnthis.forEach(t=>{e.c("conference",{name:t.get("name"),autojoin:t.get("autojoin"),jid:t.get("jid")}).c("nick").t(t.get("nick")).up().up()}),e.up().up().up(),e.c("publish-options").c("x",{xmlns:ru.NS.XFORM,type:"submit"}).c("field",{var:"FORM_TYPE",type:"hidden"}).c("value").t("http://jabber.org/protocol/pubsub#publish-options").up().up().c("field",{var:"pubsub#persist_items"}).c("value").t("true").up().up().c("field",{var:"pubsub#access_model"}).c("value").t("whitelist"),Qc.sendIQ(e)},onBookmarkError(t,n){Dn.error("Error while trying to add bookmark"),Dn.error(t),Qc.alert("error",e("Error"),[e("Sorry, something went wrong while trying to save your bookmark.")]),this.findWhere({jid:n.jid}).destroy()},fetchBookmarksFromServer(e){constt=iu({from:Vc.connection.jid,type:"get"}).c("pubsub",{xmlns:ru.NS.PUBSUB}).c("items",{node:ru.NS.BOOKMARKS});Qc.sendIQ(t).then(t=>this.onBookmarksReceived(e,t)).catch(t=>this.onBookmarksReceivedError(e,t))},markRoomAsBookmarked(e){constt=Vc.chatboxes.get(e.get("jid"));void0!==t&&t.save("bookmarked",!0)},markRoomAsUnbookmarked(e){constt=Vc.chatboxes.get(e.get("jid"));void0!==t&&t.save("bookmarked",!1)},createBookmarksFromStanza(e){constt=ru.NS.BOOKMARKS;su(`items[node="${t}"] item storage[xmlns="${t}"] conference`,e).forEach(e=>{vart;constn=e.getAttribute("jid"),r=this.get(n),i={jid:n,name:e.getAttribute("name")||n,autojoin:"true"===e.getAttribute("autojoin"),nick:(null===(t=e.querySelector("nick"))||void0===t?void0:t.textContent)||""};r?r.save(i):this.create(i)})},onBookmarksReceived(e,t){if(this.createBookmarksFromStanza(t),window.sessionStorage.setItem(this.fetched_flag,!0),void0!==e)returne.resolve()},onBookmarksReceivedError(t,n){if(null===n)Dn.error("Error:
functionpu(e){vart,n;e&&(null===(n=Vc.session)||void0===n||n.set({carbons_enabled:!1}));if(!Qc.settings.get("message_carbons")||null!==(t=Vc.session)&&void0!==t&&t.get("carbons_enabled"))return;constr=newTa.e.Builder("iq",{from:Vc.connection.jid,id:"enablecarbons",type:"set"}).c("enable",{xmlns:Ta.e.NS.CARBONS});Vc.connection.addHandler(e=>{e.querySelectorAll("error").length>0?Dn.warn("An error occurred while trying to enable message carbons."):(Vc.session.set({carbons_enabled:!0}),Dn.debug("Message carbons have been enabled.")),Vc.session.save()},null,"iq",null,"enablecarbons"),Vc.connection.send(r)}uu.addNamespace("CAPS","http://jabber.org/protocol/caps"),sl.plugins.add("converse-caps",{overrides:{XMPPStatus:{constructPresence(){conste=this.__super__.constructPresence.apply(this,arguments);vart;returne.root().cnode((t=this.__super__._converse,du("c",{xmlns:uu.NS.CAPS,hash:"sha-1",node:"https://conversejs.org",ver:fu(t)}).nodeTree)),e}}}}),sl.plugins.add("converse-carbons",{initialize(){Qc.settings.extend({message_carbons:!0}),Qc.listen.on("afterResourceBinding",pu)}});
const{Strophe:Au,$iq:Cu,dayjs:ku}=sl.env,{NS:ju}=Au,Tu=sl.env.utils,Ou={fetchNewestMessages(){if(this.disable_mam)return;conste=this.getMostRecentMessage();if(e&&!Qc.settings.get("clear_messages_on_reconnection")){constt=e.get("stanza_id "+this.get("jid"));t?this.fetchArchivedMessages({after:t},"forwards"):this.fetchArchivedMessages({start:e.get("time")},"forwards")}elsethis.fetchArchivedMessages({before:""})},asynchandleMAMResult(e,t,n,r){awaitQc.emojis.initialize();consti=this.get("type")===Vc.CHATROOMS_TYPE;e.messages=e.messages.map(e=>i?go.parseMUCMessage(e,this,Vc):go.parseMessage(e,Vc));consts={query:t,chatbox:this,messages:e.messages};if(awaitQc.trigger("MAMResult",s,{synchronous:!0}),e.messages.forEach(e=>this.queueMessage(e)),e.error){constt=e.error.retry_event_id=Tu.getUniqueId();Qc.listen.once(t,()=>this.fetchArchivedMessages(n,r)),this.createMessageFromError(e.error)}},asyncfetchArchivedMessages(e={},t){if(this.disable_mam)return;constn=this.get("type")===Vc.CHATROOMS_TYPE,r=n?this.get("jid"):Vc.bare_jid;if(!awaitQc.disco.supports(ju.MAM,r))return;consti=Qc.settings.get("archived_messages_page_size"),s=Object.assign({groupchat:n,max:i,with:this.get("jid")},e),o=awaitQc.archive.query(s);returnawaitthis.handleMAMResult(o,s,e,t),t&&o.rsm&&!o.complete?("forwards"===t?e=o.rsm.next(i,e.before).query:"backwards"===t&&(e=o.rsm.previous(i,e.after).query),this.fetchArchivedMessages(e,t)):void0}};sl.plugins.add("converse-mam",{dependencies:["converse-disco","converse-muc"],initialize(){functione(e){Qc.settings.get("muc_show_logs_before_join")&&e.features.get("mam_enabled")&&!e.get("prejoin_mam_fetched")&&(e.fetchNewestMessages(),e.save({prejoin_mam_fetched:!0}))}Qc.settings.extend({archived_messages_page_size:"50",message_archiving:void0,message_archiving_timeout:2e4}),Object.assign(Vc.ChatBox.prototype,Ou),Vc.onMAMError=function(e){null!=e&&e.querySelectorAll("feature-not-implemented").length?Dn.warn("Message Archive Management (XEP-0313) not supported by "+e.getAttribute("from")):(Dn.error(`Error while trying to set archiving preferences for ${e.getAttribute("from")}.`),Dn.error(e))},Vc.onMAMPreferences=function(e,t){constn=pr()(`prefs[xmlns="${ju.MAM}"]`,e).pop();if(n.getAttribute("default")!==Qc.settings.get("message_archiving")){conste=Cu({type:"set"}).c("prefs",{xmlns:ju.MAM,default:Qc.settings.get("message_archiving")});Array.from(n.children).forEach(t=>e.cnode(t).up()),Qc.sendIQ(e).then(()=>t.save({preferences:{default:Qc.settings.get("message_archiving")}})).catch(Vc.onMAMError)}elset.save({preferences:{default:Qc.settings.get("message_archiving")}})},Qc.listen.on("addClientFeatures",()=>Qc.disco.own.features.add(ju.MAM)),Qc.listen.on("serviceDiscovered",(function(e){constt=e.get("preferences")||{};e.get("var")===ju.MAM&&void0!==Qc.settings.get("message_archiving")&&t.default!==Qc.settings.get("message_archiving")&&Qc.sendIQ(Cu({type:"get"}).c("prefs",{xmlns:ju.MAM})).then(t=>Vc.onMAMPreferences(t,e)).catch(Vc.onMAMError)})),Qc.listen.on("chatRoomViewInitialized",t=>{Qc.settings.get("muc_show_logs_before_join")&&(e(t.model),t.model.features.on("change:mam_enabled",()=>e(t.model)))}),Qc.listen.on("enteredNewRoom",e=>e.features.get("mam_enabled")&&e.fetchNewestMessages()),Qc.listen.on("chatReconnected",e=>{e.get("type")===Vc.PRIVATE_CHAT_TYPE&&e.fetchNewestMessages()}),Qc.listen.on("afterMessagesFetched",e=>{e.get("type")!==Vc.PRIVATE_CHAT_TYPE||Vc.connection.restored||e.fetchNewestMessages()}),Object.assign(Qc,{archive:{asyncquery(e){if(!Qc.connection.connected())thrownewError("Can't call `api.archive.query` before having established an XMPP session");constt={type:"set"};if(e&&e.groupchat){if(!e.with)thrownewError('You need to specify a "with" value containing the chat room JID, when querying groupchat messages.');t.to=e.with}constn=t.to||Vc.bare_jid;if(!awaitQc.disco.supports(ju.MAM,n))returnDn.warn(`Did not fetch MAM archive for ${n} because it doesn't support ${ju.MAM}`),{messages:[]};constr=Tu.getUniqueId(),i=Cu(t).c("query",{xmlns:ju.MAM,queryid:r});if(e){i.c("x",{xmlns:ju
const{Strophe:Nu,$iq:Iu}=sl.env,Mu=sl.env.utils;Nu.addNamespace("PING","urn:xmpp:ping"),sl.plugins.add("converse-ping",{initialize(){lete;functiont(t){e=newDate;constn=t.getAttribute("from"),r=t.getAttribute("id"),i=Iu({type:"result",to:n,id:r});returnVc.connection.sendIQ(i),!0}Qc.settings.extend({ping_interval:60}),setTimeout(()=>{if(Qc.settings.get("ping_interval")>0){constt=newDate;returne||(e=t),!((t-e)/1e3>Qc.settings.get("ping_interval"))||Qc.ping()}},1e3);constn=function(){void0!==Vc.connection.disco&&Qc.disco.own.features.add(Nu.NS.PING),Vc.connection.addHandler(t,Nu.NS.PING,"iq","get"),Vc.connection.addHandler(()=>{if(Qc.settings.get("ping_interval")>0)returne=newDate,!0})};Qc.listen.on("connected",n),Qc.listen.on("reconnected",n),Qc.listen.on("windowStateChanged",(function(e){"visible"===e.state&&Qc.connection.connected()&&Qc.ping(null,5e3)})),Object.assign(Qc,{asyncping(t,n){if(e=newDate,t=t||Nu.getDomainFromJid(Vc.bare_jid),Vc.connection){conste=Iu({type:"get",to:t,id:Mu.getUniqueId("ping")}).c("ping",{xmlns:Nu.NS.PING}),r=awaitQc.sendIQ(e,n||1e4,!1);returnnull===r?(Dn.warn("Timeout while pinging "+t),t===Nu.getDomainFromJid(Vc.bare_jid)&&Qc.connection.reconnect()):Mu.isErrorStanza(r)&&(Dn.error("Error while pinging "+t),Dn.error(r)),!0}return!1}})}});
const{Strophe:Ru,$iq:$u}=sl.env;Ru.addNamespace("PUBSUB_ERROR",Ru.NS.PUBSUB+"#errors"),sl.plugins.add("converse-pubsub",{dependencies:["converse-disco"],initialize(){Object.assign(Vc.api,{pubsub:{asyncpublish(e,t,n,r,i=!0){consts=$u({from:Vc.bare_jid,type:"set",to:e}).c("pubsub",{xmlns:Ru.NS.PUBSUB}).c("publish",{node:t}).cnode(n.tree()).up().up();r&&(e=e||Vc.bare_jid,awaitQc.disco.supports(Ru.NS.PUBSUB+"#publish-options",e)?(s.c("publish-options").c("x",{xmlns:Ru.NS.XFORM,type:"submit"}).c("field",{var:"FORM_TYPE",type:"hidden"}).c("value").t(Ru.NS.PUBSUB+"#publish-options").up().up(),Object.keys(r).forEach(e=>s.c("field",{var:e}).c("value").t(r[e]).up().up())):Dn.warn(`_converse.api.publish: ${e} does not support #publish-options, so we didn't set them even though they were provided.`));try{awaitQc.sendIQ(s)}catch(e){if(!(einstanceofElement&&i&&e.querySelector(`precondition-not-met[xmlns="${Ru.NS.PUBSUB_ERROR}"]`)))throwe;{conste=s.nodeTree;e.querySelector("publish-options").outerHTML="",Dn.warn("PubSub: Republishing without publish options. "+e.outerHTML),awaitQc.sendIQ(e)}}}}})}});varDu=function(e){return"number"==typeofe||Ee(e)&&"[object Number]"==O(e)};varPu=function(e){returnDu(e)&&e!=+e};
const{Strophe:dd,$iq:hd,dayjs:fd}=sl.env,pd=sl.env.utils;sl.plugins.add("converse-vcard",{dependencies:["converse-status","converse-roster"],overrides:{XMPPStatus:{getNickname(){const{_converse:e}=this.__super__,t=this.__super__.getNickname.apply(this);return!t&&e.xmppstatus.vcard?e.xmppstatus.vcard.get("nickname"):t},getFullname(){const{_converse:e}=this.__super__,t=this.__super__.getFullname.apply(this);return!t&&e.xmppstatus.vcard?e.xmppstatus.vcard.get("fullname"):t}},RosterContact:{getDisplayName(){return!this.get("nickname")&&this.vcard?this.vcard.getDisplayName():this.__super__.getDisplayName.apply(this)},getFullname(){returnthis.vcard?this.vcard.get("fullname"):this.__super__.getFullname.apply(this)}}},initialize(){functione(e,t,n){constr=hd(t?{type:e,to:t}:{type:e});returnn?r.cnode(n):r.c("vCard",{xmlns:dd.NS.VCARD}),r}asyncfunctiont(t,n){constr=dd.getBareJidFromJid(n)===t.bare_jid?null:n;leti;try{i=awaitQc.sendIQ(e("get",r))}catch(i){return{stanza:i,jid:n,vcard_error:(newDate).toISOString()}}returnasyncfunction(e,t){constn=t.querySelector("vCard");letr={};vari,s,o,a,c,l,u;if(null!==n&&(r={stanza:t,fullname:null===(i=n.querySelector("FN"))||void0===i?void0:i.textContent,nickname:null===(s=n.querySelector("NICKNAME"))||void0===s?void0:s.textContent,image:null===(o=n.querySelector("PHOTO BINVAL"))||void0===o?void0:o.textContent,image_type:null===(a=n.querySelector("PHOTO TYPE"))||void0===a?void0:a.textContent,url:null===(c=n.querySelector("URL"))||void0===c?void0:c.textContent,role:null===(l=n.querySelector("ROLE"))||void0===l?void0:l.textContent,email:null===(u=n.querySelector("EMAIL USERID"))||void0===u?void0:u.textContent,vcard_updated:(newDate).toISOString(),vcard_error:void0}),r.image){conste=pd.base64ToArrayBuffer(r.image),t=awaitcrypto.subtle.digest("SHA-1",e);r.image_hash=pd.arrayBufferToHex(t)}returnr}(0,i)}asyncfunctionn(e){lett;if(einstanceofVc.Message){if("error"===e.get("type"))return;t=e.get("from")}elset=e.get("jid");awaitQc.waitUntil("VCardsInitialized"),e.vcard=Vc.vcards.findWhere({jid:t}),e.vcard||(e.vcard=Vc.vcards.create({jid:t})),e.vcard.on("change",()=>e.trigger("vcard:change"))}asyncfunctionr(e){awaitQc.waitUntil("VCardsInitialized"),["error","info"].includes(e.get("type"))||(e.vcard=function(e){vart;constn=null==e||null===(t=e.collection)||void0===t?void0:t.chatbox,r=dd.getResourceFromJid(e.get("from"));if(n&&n.get("nick")===r)returnVc.xmppstatus.vcard;{constt=e.occupant&&e.occupant.get("jid")||e.get("from");returnt?Vc.vcards.findWhere({jid:t})||Vc.vcards.create({jid:t}):voidDn.error("Could not assign VCard for message because no JID found! msgid: "+e.get("msgid"))}}(e))}Qc.promises.add("VCardsInitialized"),Vc.VCard=Bs.extend({defaults:{image:Vc.DEFAULT_IMAGE,image_type:Vc.DEFAULT_IMAGE_TYPE},set(e,t,n){letr;return"object"==typeofe?(r=e,n=t):(r={})[e]=t,"image"inr&&!r.image?(r.image=Vc.DEFAULT_IMAGE,r.image_type=Vc.DEFAULT_IMAGE_TYPE,Bs.prototype.set.call(this,r,n)):Bs.prototype.set.apply(this,arguments)},getDisplayName(){returnthis.get("nickname")||this.get("fullname")||this.get("jid")}}),Vc.VCards=ia.extend({model:Vc.VCard,initialize(){this.on("add",e=>e.get("jid")&&Qc.vcard.update(e))}}),Vc.initVCardCollection=asyncfunction(){Vc.vcards=newVc.VCards,Vc.vcards.browserStorage=Vc.createStore(Vc.bare_jid+"-converse.vcards"),awaitnewPromise(e=>{Vc.vcards.fetch({success:e,error:e},{silent:!0})});conste=Vc.vcards;if(Vc.session){constt=Vc.session.get("bare_jid");Vc.xmppstatus.vcard=e.findWhere({jid:t})||e.create({jid:t})}Qc.trigger("VCardsInitialized")},Qc.listen.on("chatBoxInitialized",e=>n(e)),Qc.listen.on("chatRoomInitialized",e=>n(e)),Qc.listen.on("chatRoomMessageInitialized",e=>r(e)),Qc.listen.on("addClientFeatures",()=>Qc.disco.own.features.add(dd.NS.VCARD)),Qc.listen.on("clearSession",()=>{Vc.shouldClearCache()&&(Qc.promises.add("VCardsInitialized"),Vc.vcards&&(Vc.vcards.clearStore(),deleteVc.vcards))}),Qc.listen.on("messageInitialized",e=>n(e)),Qc.listen.on("rosterContactInitialized",e=>n(e)),Qc.listen.on("statusInitialized",
const{Strophe:Pd}=sl.env,Ld=sl.env.utils;sl.plugins.add("converse-bookmark-views",{dependencies:["converse-chatboxes","converse-muc","converse-muc-views"],initialize(){Qc.settings.extend({hide_open_bookmarks:!0}),Object.assign(Vc,{removeBookmarkViaEvent(e){e.preventDefault();constt=e.target.getAttribute("data-bookmark-name"),n=e.target.getAttribute("data-room-jid");confirm(wd('Are you sure you want to remove the bookmark "%1$s"?',t))&&Dd(Vc.bookmarks.where({jid:n}),Bs.prototype.destroy)},addBookmarkViaEvent(e){e.preventDefault();constt=e.target.getAttribute("data-room-jid");Qc.rooms.open(t,{bring_to_foreground:!0}),Vc.chatboxviews.get(t).renderBookmarkForm()}});conste={setBookmarkState(){if(void0!==Vc.bookmarks){Vc.bookmarks.where({jid:this.model.get("jid")}).length?this.model.save("bookmarked",!0):this.model.save("bookmarked",!1)}},renderBookmarkForm(){if(this.hideChatRoomContents(),!this.bookmark_form){this.bookmark_form=newVc.MUCBookmarkForm({model:this.model,chatroomview:this});this.el.querySelector(".chatroom-body").insertAdjacentElement("beforeend",this.bookmark_form.el)}Ld.showElement(this.bookmark_form.el)},toggleBookmark(e){null==e||e.preventDefault();constt=Vc.bookmarks.where({jid:this.model.get("jid")});t.length?t.forEach(e=>e.destroy()):this.renderBookmarkForm()}};Object.assign(Vc.ChatRoomView.prototype,e),Vc.MUCBookmarkForm=Md.extend({className:"muc-bookmark-form chatroom-form-container",initialize(e){this.chatroomview=e.chatroomview,this.render()},toHTML(){return(e=>{constt=wd("Bookmark this groupchat"),n=wd("Would you like this groupchat to be automatically joined upon startup?"),r=wd("Cancel"),i=wd("The name for this bookmark:"),s=wd("What should your nickname for this groupchat be?"),o=wd("Save");returnwc`
constYh=(e,t)=>{constn=e.startNode.parentNode,r=void0===t?e.endNode:t.startNode,i=n.insertBefore(Va(),r);n.insertBefore(Va(),r);consts=newlc(e.options);returns.insertAfterNode(i),s},Kh=(e,t)=>(e.setValue(t),e.commit(),e),Xh=(e,t,n)=>{constr=e.startNode.parentNode,i=n?n.startNode:e.endNode,s=t.endNode.nextSibling;s!==i&&Pa(r,t.startNode,s,i)},Zh=e=>{La(e.startNode.parentNode,e.startNode,e.endNode.nextSibling)},ef=(e,t,n)=>{constr=newMap;for(leti=t;i<=n;i++)r.set(e[i],i);returnr},tf=newWeakMap,nf=newWeakMap,rf=Ka((e,t,n)=>{letr;returnvoid0===n?n=t:void0!==t&&(r=t),t=>{if(!(tinstanceoflc))thrownewError("repeat can only be used in text bindings");consti=tf.get(t)||[],s=nf.get(t)||[],o=[],a=[],c=[];letl,u,d=0;for(consttofe)c[d]=r?r(t,d):d,a[d]=n(t,d),d++;leth=0,f=i.length-1,p=0,g=a.length-1;for(;h<=f&&p<=g;)if(null===i[h])h++;elseif(null===i[f])f--;elseif(s[h]===c[p])o[p]=Kh(i[h],a[p]),h++,p++;elseif(s[f]===c[g])o[g]=Kh(i[f],a[g]),f--,g--;elseif(s[h]===c[g])o[g]=Kh(i[h],a[g]),Xh(t,i[h],o[g+1]),h++,g--;elseif(s[f]===c[p])o[p]=Kh(i[f],a[p]),Xh(t,i[f],i[h]),f--,p++;elseif(void0===l&&(l=ef(c,p,g),u=ef(s,h,f)),l.has(s[h]))if(l.has(s[f])){conste=u.get(c[p]),n=void0!==e?i[e]:null;if(null===n){conste=Yh(t,i[h]);Kh(e,a[p]),o[p]=e}elseo[p]=Kh(n,a[p]),Xh(t,n,i[h]),i[e]=null;p++}elseZh(i[f]),f--;elseZh(i[h]),h++;for(;p<=g;){conste=Yh(t,o[g+1]);Kh(e,a[p]),o[p++]=e}for(;h<=f;){conste=i[h++];null!==e&&Zh(e)}tf.set(t,o),nf.set(t,c)}}),sf=wd("No message history available.");functionof(e){constt=e.collection.models,n=t.indexOf(e),r=t[n-1];if(!r||Sn()(e.get("time")).isAfter(Sn()(r.get("time")),"day")){constt=Sn()(e.get("time")).startOf("day");returni={type:"date",time:t.toISOString(),datestring:t.format("dddd MMM Do YYYY")},wc`
constuf=newWeakMap,df=Ka(e=>t=>{if(!(tinstanceoflc))thrownewError("unsafeHTML can only be used in text bindings");constn=uf.get(t);if(void0!==n&&sc(e)&&e===n.value&&t.value===n.fragment)return;constr=document.createElement("template");r.innerHTML=e;consti=document.importNode(r.content,!0);t.setValue(i),uf.set(t,{value:e,fragment:i})});Qc.elements.define("converse-chat-content",classextendsKd{staticgetproperties(){return{chatview:{type:Object},messages:{type:Array},notifications:{type:String}}}render(){conste=lf.a.filterXSS(this.notifications,{whiteList:{}});returnwc`
<inputtype="file"@change=${this.onFileSelection}class="fileupload"multiple=""style="display:none"/>`}return""}getSpoilerButton(){const e=this.model;if(!this.is_groupchat&&0===e.presence.resources.length)return;let t;t=this.composing_spoiler?wd("Click to write as a normal (non-spoiler) message"):wd("Click to write your message as a spoiler");const n=wc`
constwf=newWeakMap,Sf=window.navigator.userAgent.indexOf("Trident/")>0,xf=Ka(e=>t=>{if(!(tinstanceoflc))thrownewError("unsafeSVG can only be used in text bindings");constn=wf.get(t);if(void0!==n&&sc(e)&&e===n.value&&t.value===n.fragment)return;constr=document.createElement("template"),i=r.content;lets;Sf?(r.innerHTML=`<svg>${e}</svg>`,s=i.firstChild):(s=document.createElementNS("http://www.w3.org/2000/svg","svg"),i.appendChild(s),s.innerHTML=e),i.removeChild(s),Pa(i,s.firstChild);consto=document.importNode(i,!0);t.setValue(o),wf.set(t,{value:e,fragment:o})});window.customElements.define("converse-fontawesome",classextendsKd{constructor(){super();conste=n.e(138).then(n.t.bind(null,543,7));this.data=e.then(e=>wc`${xf(e.default())}`)}render(){returnwc`${th(this.data,"")}`}});varEf=function(e,t,n){varr=null==e?0:e.length;returnr?(t=n||void0===t?1:pi(t),ks(e,t<0?0:t,r)):[]};varAf=function(e,t){varn=[];return_o(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n};varCf=function(e,t){return(Oe(e)?st:Af)(e,Es(t,3))};varkf=function(e){returne&&e.length?e[0]:void0};varjf=function(e){return"function"==typeofe?e:vr};varTf=function(e,t){return(Oe(e)?ve:_o)(e,jf(t))};varOf=function(e,t){returnzr(t,(function(t){returne[t]}))};varNf=function(e){returnnull==e?[]:Of(e,Ye(e))},If=Math.max;varMf=function(e,t,n,r){e=Qe(e)?e:Nf(e),n=n&&!r?pi(n):0;vari=e.length;returnn<0&&(n=If(i+n,0)),Zt(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Co(e,t,n)>-1};varRf=function(e){return(null==e?0:e.length)?ks(e,0,-1):[]};var$f=function(e,t){return(Oe(e)?zr:Ko)(e,Es(t,3))};varDf=function(e,t,n){for(varr=-1,i=e.length;++r<i;){vars=e[r],o=t(s);if(null!=o&&(void0===a?o==o&&!Or(o):n(o,a)))vara=o,c=s}returnc};varPf=function(e,t){returne>t};varLf=function(e){returne&&e.length?Df(e,vr,Pf):void0};varzf=function(e,t){returne<t};varFf=function(e){returne&&e.length?Df(e,vr,zf):void0};varBf=function(e,t,n,r){vari=-1,s=null==e?0:e.length;for(r&&s&&(n=e[++i]);++i<s;)n=t(n,e[i],i,e);returnn};varqf=function(e,t,n,r,i){returni(e,(function(e,i,s){n=r?(r=!1,e):t(n,e,i,s)})),n};varUf=function(e,t,n){varr=Oe(e)?Bf:qf,i=arguments.length<3;returnr(e,Es(t,4),n,i,_o)};varHf=function(e,t,n,r){vari=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);returnn},Vf=Fi(!0);varWf=vo((function(e,t){returne&&Vf(e,t,Ye)}),!0);varGf=function(e,t,n){varr=Oe(e)?Hf:qf,i=arguments.length<3;returnr(e,Es(t,4),n,i,Wf)};varJf=function(e){if("function"!=typeofe)thrownewTypeError("Expected a function");returnfunction(){vart=arguments;switch(t.length){case0:return!e.call(this);case1:return!e.call(this,t[0]);case2:return!e.call(this,t[0],t[1]);case3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}};varQf=function(e,t){return(Oe(e)?st:Af)(e,Jf(Es(t,3)))};varYf=function(e,t){if("function"!=typeofe)thrownewTypeError("Expected a function");returnt=void0===t?t:pi(t),Ar(e,t)},Kf=Math.floor,Xf=Math.random;varZf=function(e,t){returne+Kf(Xf()*(t-e+1))};varep=function(e){vart=e.length;returnt?e[Zf(0,t-1)]:void0};vartp=function(e){returnep(Nf(e))};varnp=function(e){return(Oe(e)?ep:tp)(e)};varrp=function(e,t){varn=-1,r=e.length,i=r-1;for(t=void0===t?r:t;++n<t;){vars=Zf(n,i),o=e[s];e[s]=e[n],e[n]=o}returne.length=t,e};varip=function(e){returnrp(it(e))};varsp=function(e){returnrp(Nf(e))};varop=function(e){return(Oe(e)?ip:sp)(e)},ap=ws("length"),cp=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");varlp=function(e){returncp.test(e)},up="[\\ud800-\\udfff]",dp="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",hp="\\ud83c[\\udffb-\\udfff]",fp="[^\\ud800-\\udfff]",pp="(?:\\ud83c[\\udde6-\\uddff]){2}",gp="[\\ud800-\\udbff][\\udc00-\\udfff]",mp="(?:"+dp+"|"+hp+")"+"?",vp="[\\ufe0e\\ufe0f]?"+mp+("(?:\\u200d(?:"+[fp,pp,gp].join("|")+")[\\ufe0e\\ufe0f]?"+mp+")*"),_p="(?:"+[fp+dp+"?",dp,pp,gp,up].join("|")+")",bp=RegExp(hp+"(?="+hp+")|"+_p+vp,"g");varyp=function(e){for(vart=bp.lastIndex=0;bp.test(e);)++t;returnt};varwp=function(e){returnlp(e)?yp(e):ap(e)};varSp=function(e){if(n
`})(Object.assign(n,this.model.toJSON(),{_converse:Vc,dropdown_btns:s.map(e=>this.getHeadingDropdownItem(e)),standalone_btns:i.map(e=>this.getHeadingStandaloneButton(e)),display_name:this.model.getDisplayName()}))},getHeadingButtons(){const e=[{a_class:"show-user-details-modal",handler:e=>this.showUserDetailsModal(e),i18n_text:wd("Details"),i18n_title:wd("See more information about this person"),icon_class:"fa-id-card",name:"details",standalone:"overlayed"===Qc.settings.get("view_mode")}];return Qc.settings.get("singleton")||e.push({a_class:"close-chatbox-button",handler:e=>this.close(e),i18n_text:wd("Close"),i18n_title:wd("Close and end this conversation"),icon_class:"fa-times",name:"close",standalone:"overlayed"===Qc.settings.get("view_mode")}),Vc.api.hook("getHeadingButtons",this,e)},getToolbarOptions:()=>({}),maybeScrollDown(e){!(!(null!=e&&e.get("is_archived"))&&"me"===(null==e?void 0:e.get("sender")))&&this.model.get("scrolled")||this.model.isHidden()||this.debouncedScrollDown()},scrollDown(e){var t,n;if(null==e||null===(t=e.preventDefault)||void 0===t||t.call(e),null==e||null===(n=e.stopPropagation)||void 0===n||n.call(e),this.model.get("scrolled")&&eg.safeSave(this.model,{scrolled:!1,scrollTop:null}),this.msgs_container.scrollTo){const e=this.msgs_container.scrollTop?"smooth":"auto";this.msgs_container.scrollTo({top:this.msgs_container.scrollHeight,behavior:e})}else this.msgs_container.scrollTop=this.msgs_container.scrollHeight;this.onScrolledDown()},maintainScrollTop(){const e=this.model.get("scrollTop");e?this.msgs_container.scrollTop=e:this.scrollDown()},insertIntoDOM(){return Vc.chatboxviews.insertRowColumn(this.el),Qc.trigger("chatBoxInsertedIntoDOM",this),this},addSpinner(e=!1){if(null===this.el.querySelector(".spinner")){const t=eg.getElementFromTemplateResult(Wh());e?(this.content.insertAdjacentElement("beforeend",t),this.scrollDown()):this.content.insertAdjacentElement("afterbegin",t)}},clearSpinner(){this.content.querySelectorAll(".spinner").forEach(eg.removeElement)},onStatusMessageChanged(e){this.renderHeading(),Qc.trigger("contactStatusMessageChanged",{contact:e.attributes,message:e.get("status")})},markFollowups(e){const t=e.getAttribute("data-from"),n=e.previousElementSibling,r=Zp(e.getAttribute("data-isodate")),i=e.nextElementSibling;eg.hasClass("chat-msg--action",e)||eg.hasClass("chat-msg--action",n)||eg.hasClass("chat-info",e)||eg.hasClass("chat-info",n)||n.getAttribute("data-from")!==t||!r.isBefore(Zp(n.getAttribute("data-isodate")).add(10,"minutes"))||e.getAttribute("data-encrypted")!==n.getAttribute("data-encrypted")||eg.addClass("chat-msg--followup",e),i&&(!eg.hasClass("chat-msg--action",e)&&eg.hasClass("chat-info",e)&&i.getAttribute("data-from")===t&&Zp(i.getAttribute("data-isodate")).isBefore(r.add(10,"minutes"))&&e.getAttribute("data-encrypted")===i.getAttribute("data-encrypted")?eg.addClass("chat-msg--followup",i):eg.removeClass("chat-msg--followup",i))},parseMessageForCommands(e){const t=e.replace(/^\s*/,"").match(/^\/(.*)\s*$/);if(t){if("clear"===t[1])return this.clearMessages(),!0;if("close"===t[1])return this.close(),!0;if("help"===t[1])return this.model.set({show_help_messages:!0}),!0}},async onFormSubmitted(e){var t;e.preventDefault();const n=this.el.querySelector(".chat-textarea"),r=n.value.trim();if(Qc.settings.get("message_limit")&&r.length>Qc.settings.get("message_limit")||!r.replace(/\s/g,"").length)return;if(!Vc.connection.authenticated){const e=wd("Sorry, the connection has been lost, and your message could not be sent");return Qc.alert("error",wd("Error"),e),void Qc.connection.reconnect()}let i,s={};this.model.get("composing_spoiler")&&(s=this.el.querySelector("form.sendXMPPMessage input.spoiler-hint"),i=s.value),eg.addClass("disabled",n),n.setAttribute("disabled","disabled"),null===(t=this.el.querySelector("converse-emoji-dropdown"))||void 0===t||t.hideMenu();const o=this.parseMessageForCommands(r),a=o?null:await this.model.sendMessage(r,i);(o||a)&&(s.value="",n.value="",eg.removeClass("correcting",n),n.style.height="auto",this.updateCharCounter(n.value)),a&&Qc.trigge
<pclass="brand-subtitle"><atarget="_blank"rel="nofollow"href="https://conversejs.org">OpenSource</a> XMPP chat client brought to you by <a target="_blank" rel="nofollow" href="https://opkode.com">Opkode</a></p>
${e.show_trust_checkbox?(e=>{constt=wd("To improve performance, we cache your data in this browser. Uncheck this box if this is a public computer or if you want your data to be deleted when you log out. It's important that you explicitly log out, otherwise not all cached data might be deleted. Please note, when using an untrusted device, OMEMO encryption is NOT available."),n=wd("This is a trusted device");returnwc`
${Vc.allow_registration&&!Qc.settings.get("auto_login")&&Vc.pluggable.plugins["converse-register"].enabled(Vc)?(()=>{conste=wd("Create an account"),t=wd("Don't have a chat account?");returnwc`
${"CONNECTING"===Vc.CONNECTION_STATUS[e.connection_status]?Wh({classes:"hor_centered"}):(e=>{constt=wd("Disconnected"),n=wd("Click here to log in anonymously");returnwc`
sl.plugins.add("converse-singleton",{enabled:e=>e.api.settings.get("singleton"),initialize(){if(Qc.settings.extend({allow_logout:!1,allow_muc_invitations:!1,hide_muc_server:!0}),!Array.isArray(Qc.settings.get("auto_join_rooms"))&&!Array.isArray(Qc.settings.get("auto_join_private_chats")))thrownewError("converse-singleton: auto_join_rooms must be an Array");if(Qc.settings.get("auto_join_rooms").length>1||Qc.settings.get("auto_join_private_chats").length>1)thrownewError("It doesn't make sense to have singleton set to true and auto_join_rooms or auto_join_private_chats set to more then one, since only one chat room may be open at any time.")}}),
sl.plugins.add("converse-mam-views",{dependencies:["converse-mam","converse-chatview","converse-muc-views"],initialize(){Qc.listen.on("chatBoxScrolledUp",asynce=>{if(e.model.messages.length){constt=e.model.get("type")===Vc.CHATROOMS_TYPE,n=e.model.getOldestMessage();if(n){constr=t?e.model.get("jid"):Vc.bare_jid,i=n&&n.get("stanza_id "+r);e.addSpinner(),i?awaite.model.fetchArchivedMessages({before:i}):awaite.model.fetchArchivedMessages({end:n.get("time")}),e.clearSpinner(),Vc.router.history.navigate("#"+n.get("msgid"))}}})}});Qc.elements.define("converse-minimized-chat",classextendsKd{staticgetproperties(){return{model:{type:Object},title:{type:String},type:{type:String},num_unread:{type:Number}}}render(){return(e=>{constt=wd("Click to restore this chat");returnwc`
`};const Vg={offline:"Offline",unavailable:"Unavailable",xa:"Extended Away",away:"Away",dnd:"Do not disturb",chat:"Chattty",online:"Online"};const Wg=sl.env.utils;Qc.elements.define("converse-muc-sidebar",class extends Kd{static get properties(){return{chatroom:{type:Object},occupants:{type:Object}}}connectedCallback(){super.connectedCallback(),this.listenTo(this.occupants,"add",this.requestUpdate),this.listenTo(this.occupants,"remove",this.requestUpdate),this.listenTo(this.occupants,"change",this.requestUpdate)}render(){return(e=>{const t=e=>wd("Click to mention %1$s in your message.",e.get("nick")),n=wd("Participants"),r=e.occupants.map(e=>Hg(Object.assign({jid:"",hint_show:Vg[e.get("show")],hint_occupant:t(e)},e.toJSON())));return wc`
`})(Object.assign(this.chatroom.toJSON(),{occupants:[...this.occupants.models]}))}shouldShow(){return!this.chatroom.get("hidden_occupants")&&this.chatroom.session.get("connection_status")===sl.ROOMSTATUS.ENTERED}setVisibility(){this.shouldShow()?Wg.showElement(this):Wg.hideElement(this)}});var Gg=e=>{const t=wd("Join"),n=wd("Enter a new Groupchat");return wc`
`};const{u:Jg,Strophe:Qg}=sl.env;var Yg=Gd.extend({id:"add-chatroom-modal",events:{"submit form.add-chatroom":"openChatRoom","keyup .roomjid-input":"checkRoomidPolicy","change .roomjid-input":"checkRoomidPolicy"},initialize(){Gd.prototype.initialize.apply(this,arguments),this.listenTo(this.model,"change:muc_domain",this.render),this.muc_roomid_policy_error_msg=null},toHTML(){let e="";if(!Qc.settings.get("locked_muc_domain")){const t=this.model.get("muc_domain")||Qc.settings.get("muc_domain");e=t?"name@"+t:wd("name@conference.example.org")}return Gg(Object.assign(this.model.toJSON(),{_converse:Vc,label_room_address:Qc.settings.get("muc_domain")?wd("Groupchat name"):wd("Groupchat address"),chatroom_placeholder:e,muc_roomid_policy_error_msg:this.muc_roomid_policy_error_msg,muc_roomid_policy_hint:Qc.settings.get("muc_roomid_policy_hint")}))},afterRender(){this.el.addEventListener("shown.bs.modal",()=>{this.el.querySelector('input[name="chatroom"]').focus()},!1)},parseRoomDataFromEvent(e){const t=new FormData(e),n=t.get("chatroom");let r;if(Qc.settings.get("locked_muc_nickname")){if(r=Vc.getDefaultMUCNickname(),!r)throw new Error("Using locked_muc_nickname but no nickname found!")}else r=t.get("nickname").trim();return{jid:n,nick:r}},openChatRoom(e){e.preventDefault();const t=this.parseRoomDataFromEvent(e.target);let n;""===t.nick&&(t.nick=void 0),Qc.settings.get("locked_muc_domain")||Qc.settings.get("muc_domain")&&!Jg.isValidJID(t.jid)?n=`${Qg.escapeNode(t.jid)}@${Qc.settings.get("muc_domain")}`:(n=t.jid,this.model.setDomain(n)),Qc.rooms.open(n,Object.assign(t,{jid:n}),!0),this.modal.hide(),e.target.reset()},checkRoomidPolicy(){if(Qc.settings.get("muc_roomid_policy")&&Qc.settings.get("muc_domain")){let e=this.el.querySelector(".roomjid-input").value;!sl.locked_muc_domain&&Jg.isValidJID(e)||(e=`${Qg.escapeNode(e)}@${Qc.settings.get("muc_domain")}`);const t=Qg.getNodeFromJid(e),n=Qg.getDomainFromJid(e);Qc.settings.get("muc_domain")!==n||Qc.settings.get("muc_roomid_policy").test(t)?this.muc_roomid_policy_error_msg=null:this.muc_roomid_policy_error_msg=wd("Groupchat id is invalid."),this.render()}}});const Kg=sl.env.utils;var Xg=Gd.extend({id:"muc-invite-modal",initialize(){Gd.prototype.initialize.apply(this,arguments),this.listenTo(this.model,"change",this.render),this.initInviteWidget()},toHTML(){return(e=>{const t=wd("Invite"),n=wd("Invite someone to this groupchat"),r=wd("user@example.org"),i=wd("Please enter a valid XMPP address"),s=wd("XMPP Address"),o=wd("Optional reason for the invitation");return wc`
${rf(e.items,e=>e.jid,t=>((e,t)=>{constn=wd("Show more information on this groupchat"),r=wd("Click to open this groupchat");returnwc`
<liclass="room-item list-group-item">
<divclass="available-chatroom d-flex flex-row">
<aclass="open-room available-room w-100"
@click=${e.openRoom}
data-room-jid="${t.jid}"
data-room-name="${t.name}"
title="${r}"
href="#">${t.name||t.jid}</a>
<aclass="right room-info icon-room-info"
@click=${e.toggleRoomInfo}
data-room-jid="${t.jid}"
title="${n}"
href="#"></a>
</div>
</li>
`})(e,t))}
</ul>
</div>
<divclass="modal-footer">${Bd}</div>
</div>
</div>
`},em=n(174),tm=n.n(em);const{u:nm,Strophe:rm,$iq:im,sizzle:sm}=sl.env;function om(e){const t=nm.ancestor(e.target,".room-item"),n=t.querySelector("div.room-info");n?(nm.slideIn(n).then(nm.removeElement),t.querySelector("a.room-info").classList.remove("selected")):(t.insertAdjacentElement("beforeend",nm.getElementFromTemplateResult(Wh())),Qc.disco.info(e.target.getAttribute("data-room-jid"),null).then(e=>function(e,t){var n,r;e.querySelector("span.spinner").remove(),e.querySelector("a.room-info").classList.add("selected"),e.insertAdjacentHTML("beforeEnd",tm()({jid:t.getAttribute("from"),desc:null===(n=kf(sm('field[var="muc#roominfo_description"] value',t)))||void 0===n?void 0:n.textContent,occ:null===(r=kf(sm('field[var="muc#roominfo_occupants"] value',t)))||void 0===r?void 0:r.textContent,hidden:sm('feature[var="muc_hidden"]',t).length,membersonly:sm('feature[var="muc_membersonly"]',t).length,moderated:sm('feature[var="muc_moderated"]',t).length,nonanonymous:sm('feature[var="muc_nonanonymous"]',t).length,open:sm('feature[var="muc_open"]',t).length,passwordprotected:sm('feature[var="muc_passwordprotected"]',t).length,persistent:sm('feature[var="muc_persistent"]',t).length,publicroom:sm('feature[var="muc_publicroom"]',t).length,semianonymous:sm('feature[var="muc_semianonymous"]',t).length,temporary:sm('feature[var="muc_temporary"]',t).length,unmoderated:sm('feature[var="muc_unmoderated"]',t).length,label_desc:wd("Description:"),label_jid:wd("Groupchat Address (JID):"),label_occ:wd("Participants:"),label_features:wd("Features:"),label_requires_auth:wd("Requires authentication"),label_hidden:wd("Hidden"),label_requires_invite:wd("Requires an invitation"),label_moderated:wd("Moderated"),label_non_anon:wd("Non-anonymous"),label_open_room:wd("Open"),label_permanent_room:wd("Permanent"),label_public:wd("Public"),label_semi_anon:wd("Semi-anonymous"),label_temp_room:wd("Temporary"),label_unmoderated:wd("Unmoderated")}))}(t,e)).catch(e=>Dn.error(e)))}var am=Gd.extend({id:"list-chatrooms-modal",initialize(){this.items=[],this.loading_items=!1,Gd.prototype.initialize.apply(this,arguments),Qc.settings.get("muc_domain")&&!this.model.get("muc_domain")&&this.model.save("muc_domain",Qc.settings.get("muc_domain")),this.listenTo(this.model,"change:muc_domain",this.onDomainChange),this.el.addEventListener("shown.bs.modal",()=>Qc.settings.get("locked_muc_domain")?this.updateRoomsList():this.el.querySelector('input[name="server"]').focus())},toHTML(){const e=this.model.get("muc_domain")||Qc.settings.get("muc_domain");return Zg(Object.assign(this.model.toJSON(),{show_form:!Qc.settings.get("locked_muc_domain"),server_placeholder:e||wd("conference.example.org"),items:this.items,loading_items:this.loading_items,openRoom:e=>this.openRoom(e),setDomainFromEvent:e=>this.setDomainFromEvent(e),submitForm:e=>this.showRooms(e),toggleRoomInfo:e=>this.toggleRoomInfo(e)}))},openRoom(e){e.preventDefault();const t=e.target.getAttribute("data-room-jid"),n=e.target.getAttribute("data-room-name");this.modal.hide(),Qc.rooms.open(t,{name:n},!0)},toggleRoomInfo(e){e.preventDefault(),om(e)},onDomainChange(){Qc.settings.get("auto_list_rooms")&&this.updateRoomsList()},onRoomsFound(e){this.loading_items=!1;const t=e?sm("query item",e):[];return t.length?(this.model.set({feedback_text:wd("Groupchats found")},{silent:!0}),this.items=t.map(go.getAttributes)):(this.items=[],this.model.set({feedback_text:wd("No groupchats found")},{silent:!0})),this.render(),!0},updateRoomsList(){const e=im({to:this.model.get("muc_domain"),from:Vc.connection.jid,type:"get"}).c("query",{xmlns:rm.NS.DISCO_ITEMS});Qc.sendIQ(e).then(e=>this.onRoomsFound(e)).catch(()=>this.onRoomsFound())},showRooms(e){e.preventDefault(),this.loading_items=!0,this.render();const t=new FormData(e.target);this.model.setDomain(t.get("server")),this.updateRoomsList()},setDomainFromEvent(e){this.model.setDomain(e.target.value)},setNick(e){this.model.save({nick:e.target.value})}});function cm(e){return"moderator"===e?wd("Moderators are privileged users who can change the roles of other users (except those with ad
`;var hm=e=>{const t=wd("Affiliation"),n=wd("Moderator Tools"),r=wd("No users with that affiliation found."),i=wd("No users with that role found."),s=wd("Type here to filter the search results"),o=wd("Role"),a=wd("Show users"),c=wd("Roles are assigned to users to grant or deny them certain abilities in a multi-user chat. They're assigned either explicitly or implicitly as part of an affiliation. A role that's not due to an affiliation, is only valid for the duration of the user's session."),l=wd("An affiliation is a long-lived entitlement which typically implies a certain role and which grants privileges and responsibilities. For example admins and owners automatically have the moderator role."),u=e.queryable_roles.length&&e.queryable_affiliations.length;return wc`
`},bm=Gd.extend({id:"room-details-modal",initialize(){Gd.prototype.initialize.apply(this,arguments),this.listenTo(this.model,"change",this.render),this.listenTo(this.model.features,"change",this.render),this.listenTo(this.model.occupants,"add",this.render),this.listenTo(this.model.occupants,"change",this.render)},toHTML(){return _m(Object.assign(this.model.toJSON(),{config:this.model.config.toJSON(),display_name:wd("Groupchat info for %1$s",this.model.getDisplayName()),features:this.model.features.toJSON(),num_occupants:this.model.occupants.length}))}});var ym=e=>{const t=wd("You're not allowed to send messages in this room");return e.entered?e.can_edit?wc`
`),this.el),this.notifications=this.el.querySelector(".chat-content__notifications"),this.content=this.el.querySelector(".chat-content"),this.msgs_container=this.el.querySelector(".chat-content__messages"),this.help_container=this.el.querySelector(".chat-content__help"),this.renderBottomPanel(),Qc.settings.get("muc_show_logs_before_join")||this.model.session.get("connection_status")===sl.ROOMSTATUS.ENTERED||this.showSpinner(),await this.renderHeading(),!this.model.get("hidden")&&this.show()},getNotifications(){const e=this.model.notifications.toJSON();return(Qc.settings.get("muc_show_join_leave")?[...sl.CHAT_STATES,...sl.MUC_TRAFFIC_STATES,...sl.MUC_ROLE_CHANGES]:sl.CHAT_STATES).reduce((t,n)=>{const r=e[n];if(null==r||!r.length)return t;const i=r.map(e=>{var t;return(null===(t=this.model.getOccupant(e))||void 0===t?void 0:t.getDisplayName())||e});if(1===i.length){if("composing"===n)return`${t}${wd("%1$s is typing",i[0])}\n`;if("paused"===n)return`${t}${wd("%1$s has stopped typing",i[0])}\n`;if(n===Vc.GONE)return`${t}${wd("%1$s has gone away",i[0])}\n`;if("entered"===n)return`${t}${wd("%1$s has entered the groupchat",i[0])}\n`;if("exited"===n)return`${t}${wd("%1$s has left the groupchat",i[0])}\n`;if("op"===n)return`${t}${wd("%1$s is now a moderator",i[0])}\n`;if("deop"===n)return`${t}${wd("%1$s is no longer a moderator",i[0])}\n`;if("voice"===n)return`${t}${wd("%1$s has been given a voice",i[0])}\n`;if("mute"===n)return`${t}${wd("%1$s has been muted",i[0])}\n`}else if(i.length>1){let e;if(i.length>3)e=Array.from(i).slice(0,2).join(", ")+" and others";else{const t=i.pop();e=wd("%1$s and %2$s",i.join(", "),t)}if("composing"===n)return`${t}${wd("%1$s are typing",e)}\n`;if("paused"===n)return`${t}${wd("%1$s have stopped typing",e)}\n`;if(n===Vc.GONE)return`${t}${wd("%1$s have gone away",e)}\n`;if("entered"===n)return`${t}${wd("%1$s have entered the groupchat",e)}\n`;if("exited"===n)return`${t}${wd("%1$s have left the groupchat",e)}\n`;if("op"===n)return`${t}${wd("%1$s are now moderators",i[0])}\n`;if("deop"===n)return`${t}${wd("%1$s are no longer moderators",i[0])}\n`;if("voice"===n)return`${t}${wd("%1$s have been given voices",i[0])}\n`;if("mute"===n)return`${t}${wd("%1$s have been muted",i[0])}\n`}return t},"")},getHelpMessages(){const e=Qc.settings.get("muc_disable_slash_commands"),t=Array.isArray(e)?e:[];return["<strong>/admin</strong>: "+wd("Change user's affiliation to admin"),"<strong>/ban</strong>: "+wd("Ban user by changing their affiliation to outcast"),"<strong>/clear</strong>: "+wd("Clear the chat area"),"<strong>/close</strong>: "+wd("Close this groupchat"),"<strong>/deop</strong>: "+wd("Change user role to participant"),"<strong>/destroy</strong>: "+wd("Remove this groupchat"),"<strong>/help</strong>: "+wd("Show this menu"),"<strong>/kick</strong>: "+wd("Kick user from groupchat"),"<strong>/me</strong>: "+wd("Write in 3rd person"),"<strong>/member</strong>: "+wd("Grant membership to a user"),"<strong>/modtools</strong>: "+wd("Opens up the moderator tools GUI"),"<strong>/mute</strong>: "+wd("Remove user's ability to post messages"),"<strong>/nick</strong>: "+wd("Change your nickname"),"<strong>/op</strong>: "+wd("Grant moderator role to user"),"<strong>/owner</strong>: "+wd("Grant ownership of this groupchat"),"<strong>/register</strong>: "+wd("Register your nickname"),"<strong>/revoke</strong>: "+wd("Revoke the user's current affiliation"),"<strong>/subject</strong>: "+wd("Set groupchat subject"),"<strong>/topic</strong>: "+wd("Set groupchat subject (alias for /subject)"),"<strong>/voice</strong>: "+wd("Allow muted user to post messages")].filter(e=>t.every(t=>!e.startsWith(t+"<",9))).filter(e=>this.getAllowedCommands().some(t=>e.startsWith(t+"<",9)))},async renderHeading(){const e=await this.generateHeadingTemplate();bc(e,this.el.querySelector(".chat-head-chatroom"))},renderBottomPanel(){const e=this.el.querySelector(".bottom-panel"),t=this.model.session.get("connection_status")===sl.ROOMSTATUS.ENTERED,n=t&&!(this.model.features.get("moderated")&&"visitor"===this.model.getOwnRole());bc(ym({can_edit:n,entered:
<aclass="controlbox-heading__btn show-list-muc-modal fa fa-list-ul"title="${e.title_list_rooms}"data-toggle="modal"data-target="#list-chatrooms-modal"></a>
<aclass="controlbox-heading__btn show-add-muc-modal fa fa-plus"title="${e.title_new_room}"data-toggle="modal"data-target="#add-chatrooms-modal"></a>
`})({closeConfigForm:e=>this.closeConfigForm(e),fields:i.map(e=>km.xForm2webForm(e,n,s)),instructions:null===(e=n.querySelector("instructions"))||void 0===e?void 0:e.textContent,submitConfigForm:e=>this.submitConfigForm(e),title:null===(t=n.querySelector("title"))||void 0===t?void 0:t.textContent})},async submitConfigForm(e){e.preventDefault();const t=Am(":input:not([type=button]):not([type=submit])",e.target).map(km.webForm2xForm).filter(e=>e);try{await this.model.sendConfiguration(t)}catch(e){Dn.error(e);const t=wd("Sorry, an error occurred while trying to submit the config form.")+" "+wd("Check your browser's developer console for details.");Qc.alert("error",wd("Error"),t)}await this.model.refreshDiscoInfo(),this.chatroomview.closeForm()},closeConfigForm(e){e.preventDefault(),this.chatroomview.closeForm()}}),e.MUCPasswordForm=Md.extend({className:"chatroom-form-container muc-password-form",initialize(e){this.chatroomview=e.chatroomview,this.listenTo(this.model,"change:validation_message",this.render),this.render()},toHTML(){return(e=>{const t=wd("This groupchat requires a password"),n=wd("Password: "),r=wd("Submit");return wc`
constPm=sl.env.utils,Lm=tg.extend({className:"chatbox headlines hidden",events:{"click .close-chatbox-button":"close","click .toggle-chatbox-button":"minimize","keypress textarea.chat-textarea":"onKeyDown"},asyncinitialize(){this.initDebounced(),this.model.disable_mam=!0,this.listenTo(this.model,"change:hidden",e=>e.get("hidden")?this.hide():this.show()),this.listenTo(this.model,"destroy",this.remove),this.listenTo(this.model,"show",this.show),this.render(),this.listenTo(this.model.messages,"add",this.onMessageAdded),this.listenTo(this.model.messages,"remove",this.renderChatHistory),this.listenTo(this.model.messages,"rendered",this.maybeScrollDown),this.listenTo(this.model.messages,"reset",this.renderChatHistory),awaitthis.model.messages.fetched,this.insertIntoDOM(),this.model.maybeShow(),this.scrollDown(),Qc.trigger("headlinesBoxViewInitialized",this)},render(){this.el.setAttribute("id",this.model.get("box_id"));conste=Qp(Object.assign(this.model.toJSON(),{info_close:"",label_personal_message:"",show_send_button:!1,show_toolbar:!1,unread_msgs:""}));returnbc(e,this.el),this.content=this.el.querySelector(".chat-content"),this.msgs_container=this.el.querySelector(".chat-content__messages"),this.renderChatContent(),this.renderHeading(),this},getNotifications:()=>[],getHeadingButtons(){conste=[];returnQc.settings.get("singleton")||e.push({a_class:"close-chatbox-button",handler:e=>this.close(e),i18n_text:wd("Close"),i18n_title:wd("Close these announcements"),icon_class:"fa-times",name:"close",standalone:"overlayed"===Qc.settings.get("view_mode")}),Vc.api.hook("getHeadingButtons",this,e)},renderMessageForm:function(){},afterShown:function(){}}),zm=Md.extend({tagName:"div",className:"controlbox-section",id:"headline",events:{"click .open-headline":"openHeadline"},initialize(){this.listenTo(this.model,"add",this.renderIfHeadline),this.listenTo(this.model,"remove",this.renderIfHeadline),this.listenTo(this.model,"destroy",this.renderIfHeadline),this.render(),this.insertIntoDOM()},toHTML(){returne={heading_headline:wd("Announcements"),headlineboxes:this.model.filter(e=>e.get("type")===Vc.HEADLINES_TYPE),open_title:wd("Click to open this server message")},wc`
const{Strophe:qm}=sl.env,Um=sl.env.utils,Hm="Notification"inwindow;letVm;functionWm(){if(Qc.settings.get("update_title")){vare;Vm=null!==(e=Vm)&&void0!==e?e:newsl.env.Favico({type:"circle",animation:"pop"});constt=Vc.chatboxes.models.reduce((e,t)=>e+(t.get("num_unread")||0),0);Vm.badge(t)}}sl.env.Favico=Bm.a,sl.plugins.add("converse-notification",{dependencies:["converse-chatboxes"],initialize(){Qc.settings.extend({update_title:!0,notify_all_room_messages:!1,show_desktop_notifications:!0,show_chat_state_notifications:!1,chatstate_notification_blacklist:[],play_sounds:!0,sounds_path:Qc.settings.get("assets_path")+"/sounds/",notification_icon:"logo/conversejs-filled.svg",notification_delay:5e3,notify_nicknames_without_references:!1}),Vc.shouldNotifyOfGroupMessage=function(e){if(null==e||!e.body)return!1;constt=e.from,n=e.from_muc,r=Qc.settings.get("notify_all_room_messages"),i=Vc.chatboxes.get(n),s=qm.getResourceFromJid(t),o=s&&qm.unescapeNode(s)||"";leta=!1;constc=i.get("nick");Qc.settings.get("notify_nicknames_without_references")&&(a=newRegExp(`\\b${c}\\b`).test(e.body));constl=e.references.map(e=>e.value).includes(c),u=o!==c,d=!0===r||Array.isArray(r)&&r.includes(n)||l||a;returnu&&!!d},Vc.isMessageToHiddenChat=function(e){vart,n;returnnull!==(t=null===(n=Vc.chatboxes.get(e.from))||void0===n?void0:n.isHidden())&&void0!==t&&t},Vc.shouldNotifyOfMessage=function(e){const{attrs:t,stanza:n}=e;if(!t||null!==n.querySelector("forwarded"))return!1;if("groupchat"===t.type)returnVc.shouldNotifyOfGroupMessage(t);if(t.is_headline)returnVc.isMessageToHiddenChat(t);constr=qm.getBareJidFromJid(t.from)===Vc.bare_jid;return!Um.isOnlyChatStateNotification(n)&&!Um.isOnlyMessageDeliveryReceipt(n)&&!r&&("all"===Qc.settings.get("show_desktop_notifications")||Vc.isMessageToHiddenChat(t))},Vc.playSoundNotification=function(){if(Qc.settings.get("play_sounds")&&void0!==window.Audio){conste=newAudio(Qc.settings.get("sounds_path")+"msg_received.ogg"),t=e.canPlayType("audio/ogg");if("probably"===t)returne.play();constn=newAudio(Qc.settings.get("sounds_path")+"msg_received.mp3"),r=n.canPlayType("audio/mp3");"probably"===r?n.play():"maybe"===t?e.play():"maybe"===r&&n.play()}},Vc.areDesktopNotificationsEnabled=function(){returnHm&&Qc.settings.get("show_desktop_notifications")&&"granted"===Notification.permission},Vc.showMessageNotification=function(e){const{attrs:t}=e;if(t.is_error)return;if(!Vc.areDesktopNotificationsEnabled())return;letn,r;consti=t.from,s=qm.getBareJidFromJid(i);if("headline"===t.type){if(s.includes("@")&&!Qc.settings.get("allow_non_roster_messaging"))return;n=wd("Notification from %1$s",s)}elseif(s.includes("@"))if("groupchat"===t.type)n=wd("%1$s says",qm.getResourceFromJid(i));else{if(void0===Vc.roster)returnvoidDn.error("Could not send notification, because roster is undefined");if(r=Vc.roster.get(s),void0!==r)n=wd("%1$s says",r.getDisplayName());else{if(!Qc.settings.get("allow_non_roster_messaging"))return;n=wd("%1$s says",s)}}elsen=wd("Notification from %1$s",s);consto=t.is_encrypted?wd("Encrypted message received"):t.body;if(!o)return;consta=newNotification(n,{body:o,lang:Vc.locale,icon:Qc.settings.get("notification_icon"),requireInteraction:!Vc.notification_delay});Qc.settings.get("notification_delay")&&setTimeout(a.close.bind(a),Qc.settings.get("notification_delay")),a.onclick=function(e){e.preventDefault(),window.focus();Vc.chatboxes.get(s).maybeShow(!0)},a.onclick.bind(Vc)},Vc.showChatStateNotification=function(e){if(Vc.chatstate_notification_blacklist.includes(e.jid))return;constt=e.chat_status;letn=null;if("offline"===t?n=wd("has gone offline"):"away"===t?n=wd("has gone away"):"dnd"===t?n=wd("is busy"):"online"===t&&(n=wd("has come online")),null===n)return;constr=newNotification(e.getDisplayName(),{body:n,lang:Vc.locale,icon:Vc.notification_icon});setTimeout(r.close.bind(r),5e3)},Vc.showContactRequestNotification=function(e){constt=newNotification(e.getDisplayName(),{body:wd("wants to be your contact"),lang:Vc.locale,icon:Vc.notification_icon});setTimeout(t.close.bind(t),5e3)
`;async function Xm(){const e=[...await Qc.rooms.get(),...await Qc.contacts.get()];return[...new Set(e.map(e=>Gm.getDomainFromJid(e.get("jid"))))]}const Zm=e=>{const t=wd("On which entity do you want to run commands?"),n=wd("Certain XMPP services and entities allow privileged users to execute ad-hoc commands on them."),r=wd("Commands found"),i=wd("List available commands"),s=wd("XMPP Address"),o=wd("No commands found");return wc`
`};Qc.elements.define("converse-adhoc-commands",class extends Kd{static get properties(){return{alert:{type:String},alert_type:{type:String},nonce:{type:String},showform:{type:String},view:{type:String}}}constructor(){super(),this.view="choose-service",this.showform="",this.commands=[]}render(){return Zm({alert:this.alert,alert_type:this.alert_type,commands:this.commands,fetchCommands:e=>this.fetchCommands(e),hideCommandForm:e=>this.hideCommandForm(e),runCommand:e=>this.runCommand(e),showform:this.showform,toggleCommandForm:e=>this.toggleCommandForm(e),view:this.view})}async fetchCommands(e){e.preventDefault(),delete this.alert_type,delete this.alert;const t=new FormData(e.target).get("jid").trim();let n;try{n=await Qc.disco.supports(Gm.NS.ADHOC,t)}catch(e){Dn.error(e)}if(n)try{this.commands=await Qc.adhoc.getCommands(t),this.view="list-commands"}catch(e){return Dn.error(e),this.alert_type="danger",this.alert=wd("Sorry, an error occurred while looking for commands on that entity."),this.commands=[],void Dn.error(e)}else this.alert_type="danger",this.alert=wd("The specified entity doesn't support ad-hoc commands")}async toggleCommandForm(e){e.preventDefault();const t=e.target.getAttribute("data-command-node"),n=this.commands.filter(e=>e.node===t)[0];this.showform!==t&&await async function(e){const t=e.node,n=e.jid,r=Jm({type:"set",to:n}).c("command",{xmlns:Gm.NS.ADHOC,node:t,action:"execute"});try{var i;const t=await Qc.sendIQ(r),n=Qm(`command[xmlns="${Gm.NS.ADHOC}"]`,t).pop();e.sessionid=n.getAttribute("sessionid"),e.instructions=null===(i=Qm('x[type="form"][xmlns="jabber:x:data"] instructions',n).pop())||void 0===i?void 0:i.textContent,e.fields=Qm('x[type="form"][xmlns="jabber:x:data"] field',n).map(e=>Ym.xForm2webForm(e,n))}catch(t){null===t?Dn.error("Error: timeout while trying to execute command for "+n):(Dn.error("Error while trying to execute command for "+n),Dn.error(t)),e.fields=[]}}(n),this.showform=t}hideCommandForm(e){e.preventDefault(),this.showform=""}async runCommand(e){e.preventDefault();const t=new FormData(e.target),n=t.get("command_jid").trim(),r=t.get("command_node").trim(),i=this.commands.filter(e=>e.node===r)[0],s=Qm(":input:not([type=button]):not([type=submit])",e.target).filter(e=>!["command_jid","command_node"].includes(e.getAttribute("name"))).map(Ym.webForm2xForm).filter(e=>e),o=Jm({to:n,type:"set"}).c("command",{sessionid:i.sessionid,node:i.node,xmlns:Gm.NS.ADHOC}).c("x",{xmlns:Gm.NS.XFORM,type:"submit"});let a;s.forEach(e=>o.cnode(e).up());try{a=await Qc.sendIQ(o)}catch(e){i.alert_type="danger",i.alert=wd("Sorry, an error occurred while trying to execute the command. See the developer console for details"),Dn.error("Error while trying to execute an ad-hoc command"),Dn.error(e)}var c;a?i.alert=null===(c=a.querySelector("note"))||void 0===c?void 0:c.textContent:i.alert="Done";i.alert_type="primary",this.nonce=Ym.getUniqueId()}});var ev=e=>{const t=wd("Settings"),n=wd("%1$s Open Source %2$s XMPP chat client brought to you by %3$s Opkode %2$s",'<a target="_blank" rel="nofollow" href="https://conversejs.org">',"</a>",'<a target="_blank" rel="nofollow" href="https://opkode.com">'),r=wd("%1$s Translate %2$s it into your own language",'<a target="_blank" rel="nofollow" href="https://hosted.weblate.org/projects/conversejs/#languages">',"</a>"),i=Qc.settings.get("show_client_info"),s=Qc.settings.get("allow_adhoc_commands");return wc`
${e.view.other_devices.length?(e=>{constt=wd("Other OMEMO-enabled devices"),n=wd("Checkbox to select fingerprints of all other OMEMO devices"),r=wd("Remove checked devices and close"),i=wd("Select all");returnwc`
const{sizzle:av,u:cv}=sl.env;sl.plugins.add("converse-profile",{dependencies:["converse-status","converse-modal","converse-vcard","converse-chatboxviews"],initialize(){Qc.settings.extend({allow_adhoc_commands:!0,show_client_info:!0}),Vc.ProfileModal=Gd.extend({id:"user-profile-modal",events:{"submit .profile-form":"onFormSubmitted"},initialize(){this.listenTo(this.model,"change",this.render),Gd.prototype.initialize.apply(this,arguments),Qc.trigger("profileModalInitialized",this.model)},toHTML(){return(e=>{constt=wd("Your Profile"),n=wd("Email"),r=wd("Full Name"),i=wd("XMPP Address (JID)"),s=wd("Nickname"),o=wd("Role"),a=wd("Save and close"),c=wd("Use commas to separate multiple roles. Your roles are shown next to your name on your chat messages."),l=wd("URL"),u=wd("OMEMO"),d=wd("Profile"),h=wc`
`})(Object.assign(this.model.toJSON(),this.model.vcard.toJSON(),this.getAvatarData(),{view:this}))},getAvatarData(){return{height:128,width:128,image:"data:"+this.model.vcard.get("image_type")+";base64,"+this.model.vcard.get("image")}},afterRender(){this.tabs=av(".nav-item .nav-link",this.el).map(e=>new Fd.a.Tab(e))},async setVCard(e){try{await Qc.vcard.set(Vc.bare_jid,e)}catch(e){return Dn.fatal(e),void this.alert([wd("Sorry, an error happened while trying to save your profile data."),wd("You can check your browser's developer console for any error output.")].join(" "))}this.modal.hide()},onFormSubmitted(e){e.preventDefault();const t=new FileReader,n=new FormData(e.target),r=n.get("image"),i={fn:n.get("fn"),nickname:n.get("nickname"),role:n.get("role"),email:n.get("email"),url:n.get("url")};r.size?(t.onloadend=()=>{Object.assign(i,{image:btoa(t.result),image_type:r.type}),this.setVCard(i)},t.readAsBinaryString(r)):(Object.assign(i,{image:this.model.vcard.get("image"),image_type:this.model.vcard.get("image_type")}),this.setVCard(i))}}),Vc.ChatStatusModal=Gd.extend({id:"modal-status-change",events:{"submit form#set-xmpp-status":"onFormSubmitted","click .clear-input":"clearStatusMessage"},toHTML(){return e=Object.assign(this.model.toJSON(),this.model.vcard.toJSON(),{label_away:wd("Away"),label_busy:wd("Busy"),label_cancel:wd("Cancel"),label_close:wd("Close"),label_custom_status:wd("Custom status"),label_offline:wd("Offline"),label_online:wd("Online"),label_save:wd("Save"),label_xa:wd("Away for long"),modal_title:wd("Change chat status"),placeholder_status_message:wd("Personal status message")}),wc`
const{Strophe:pv,sizzle:gv,$build:mv,$iq:vv,$msg:_v}=sl.env,bv=sl.env.utils;pv.addNamespace("OMEMO_DEVICELIST",pv.NS.OMEMO+".devicelist"),pv.addNamespace("OMEMO_VERIFICATION",pv.NS.OMEMO+".verification"),pv.addNamespace("OMEMO_WHITELISTED",pv.NS.OMEMO+".whitelisted"),pv.addNamespace("OMEMO_BUNDLES",pv.NS.OMEMO+".bundles");constyv={name:"AES-GCM",length:128};classwvextendsError{constructor(e,t){super(e,t),this.name="IQError",this.iq=t}}functionSv(e,t){returnt.is_encrypted&&t.encrypted.key?!0===t.encrypted.prekey?asyncfunction(e){constt=Cv(e.from,parseInt(e.encrypted.device_id,10)),n=bv.base64ToArrayBuffer(e.encrypted.key);letr;try{r=awaitt.decryptPreKeyWhisperMessage(n,"binary")}catch(t){returnDn.error(`${t.name}${t.message}`),Object.assign(e,jv(t))}try{constt=awaitkv(e,r);returnawaitVc.omemo_store.generateMissingPreKeys(),awaitVc.omemo_store.publishBundle(),t?Object.assign(e,{plaintext:t}):Object.assign(e,{is_only_key:!0})}catch(t){returnDn.error(`${t.name}${t.message}`),Object.assign(e,jv(t))}}(t):asyncfunction(e){constt=e.from_muc?e.from_real_jid:e.from;t||Object.assign(e,{error_text:wd("Sorry, could not decrypt a received OMEMO because we don't have the JID for that user."),error_type:"Decryption",is_ephemeral:!1,is_error:!0,type:"error"});constn=Cv(t,parseInt(e.encrypted.device_id,10)),r=bv.base64ToArrayBuffer(e.encrypted.key);try{constt=awaitn.decryptWhisperMessage(r,"binary"),i=awaitkv(e,t);returnObject.assign(e,{plaintext:i})}catch(t){returnDn.error(`${t.name}${t.message}`),Object.assign(e,jv(t))}}(t):t}functionxv(){Vc.chatboxes.on("add",e=>{Pv(e),e.get("type")===Vc.CHATROOMS_TYPE&&(e.occupants.on("add",t=>asyncfunction(e,t){if(t.isSelf()||!e.features.get("nonanonymous")||!e.features.get("membersonly"))return;if(e.get("omemo_active")){awaitVc.contactHasOMEMOSupport(t.get("jid"))||(e.createMessage({message:wd("%1$s doesn't appear to have a client that supports OMEMO. Encrypted chat will no longer be possible in this grouchat.",t.get("nick")),type:"error"}),e.save({omemo_active:!1,omemo_supported:!1}))}}(e,t)),e.features.on("change",()=>Pv(e)))})}functionEv(e){e.listenTo(e.model.messages,"add",t=>{t.get("is_encrypted")&&!t.get("is_error")&&e.model.save("omemo_supported",!0)}),e.listenTo(e.model,"change:omemo_supported",()=>{vart;!e.model.get("omemo_supported")&&e.model.get("omemo_active")?e.model.set("omemo_active",!1):null===(t=e.el.querySelector("converse-chat-toolbar"))||void0===t||t.requestUpdate()}),e.listenTo(e.model,"change:omemo_active",()=>{e.el.querySelector("converse-chat-toolbar").requestUpdate()})}constAv=sl.env.omemo={asyncencryptMessage(e){constt=crypto.getRandomValues(newwindow.Uint8Array(12)),n=awaitcrypto.subtle.generateKey(yv,!0,["encrypt","decrypt"]),r={name:"AES-GCM",iv:t,tagLength:128},i=awaitcrypto.subtle.encrypt(r,n,bv.stringToArrayBuffer(e)),s=i.byteLength-16,o=i.slice(0,s),a=i.slice(s),c=awaitcrypto.subtle.exportKey("raw",n);return{key:c,tag:a,key_and_tag:bv.appendArrayBuffer(c,a),payload:bv.arrayBufferToBase64(o),iv:bv.arrayBufferToBase64(t)}},asyncdecryptMessage(e){constt=awaitcrypto.subtle.importKey("raw",e.key,yv,!0,["encrypt","decrypt"]),n=bv.appendArrayBuffer(bv.base64ToArrayBuffer(e.payload),e.tag),r={name:"AES-GCM",iv:bv.base64ToArrayBuffer(e.iv),tagLength:128};returnbv.arrayBufferToString(awaitcrypto.subtle.decrypt(r,t,n))}};functionCv(e,t){constn=newlibsignal.SignalProtocolAddress(e,t);returnnewwindow.libsignal.SessionCipher(Vc.omemo_store,n)}asyncfunctionkv(e,t){constn=e.encrypted,r=Vc.devicelists.getDeviceList(e.from);awaitr._devices_promise;leti=r.get(n.device_id);if(i||(i=awaitr.devices.create({id:n.device_id,jid:e.from},{promise:!0})),n.payload){conste=t.slice(0,16),r=t.slice(16),s=awaitAv.decryptMessage(Object.assign(n,{key:e,tag:r}));returni.save("active",!0),s}}functionjv(e){return"debug"===Qc.settings.get("loglevel")?{error_text:wd("Sorry, could not decrypt a received OMEMO message due to an error.")+`${e.name}${e.message}`,error_type:"Decryption",is_ephemeral:!0,is_error:!0,type:"error"}:{}}functionTv(e){co
const{Strophe:Bv,$iq:qv}=sl.env;Bv.addNamespace("PUSH","urn:xmpp:push:0"),sl.plugins.add("converse-push",{initialize(){asyncfunctione(e){e=e||Vc.bare_jid;constt=Vc.session.get("push_enabled")||[];if(t.includes(e))return;constn=Qc.settings.get("push_app_servers").filter(e=>!e.disable),r=Qc.settings.get("push_app_servers").filter(e=>e.disable),i=n.map(t=>asyncfunction(e,t){if(!t.jid||!t.node)return;if(!awaitQc.disco.getIdentity("pubsub","push",t.jid))returnDn.warn(`Not enabling push the service "${t.jid}", it doesn't have the right disco identtiy.`);constn=awaitPromise.all([Qc.disco.supports(Bv.NS.PUSH,t.jid),Qc.disco.supports(Bv.NS.PUSH,e)]);if(!n[0]&&!n[1])returnvoidDn.warn(`Not enabling push app server "${t.jid}", no disco support from your server.`);constr=qv({type:"set"});returne!==Vc.bare_jid&&r.attrs({to:e}),r.c("enable",{xmlns:Bv.NS.PUSH,jid:t.jid,node:t.node}),t.secret&&r.c("x",{xmlns:Bv.NS.XFORM,type:"submit"}).c("field",{var:"FORM_TYPE"}).c("value").t(Bv.NS.PUBSUB+"#publish-options").up().up().c("field",{var:"secret"}).c("value").t(t.secret),Qc.sendIQ(r)}(e,t)),s=r.map(t=>asyncfunction(e,t){if(!t.jid)return;if(!awaitQc.disco.supports(Bv.NS.PUSH,e||Vc.bare_jid))returnvoidDn.warn(`Not disabling push app server "${t.jid}", no disco support from your server.`);constn=qv({type:"set"});e!==Vc.bare_jid&&n.attrs({to:e}),n.c("disable",{xmlns:Bv.NS.PUSH,jid:t.jid}),t.node&&n.attrs({node:t.node}),Qc.sendIQ(n).catch(e=>{Dn.error("Could not disable push app server for "+t.jid),Dn.error(e)})}(e,t));try{awaitPromise.all(i.concat(s))}catch(e){Dn.error("Could not enable or disable push App Server"),e&&Dn.error(e)}finally{t.push(e)}Vc.session.save("push_enabled",t)}functiont(t){t.get("type")==Vc.CHATROOMS_TYPE&&e(Bv.getDomainFromJid(t.get("jid")))}Qc.settings.extend({push_app_servers:[],enable_muc_push:!1}),Qc.listen.on("statusInitialized",()=>e()),Qc.settings.get("enable_muc_push")&&Qc.listen.on("chatBoxesInitialized",()=>Vc.chatboxes.on("add",t))}});varUv=n(176),Hv=n.n(Uv),Vv=n(177),Wv=n.n(Vv),Gv=n(178),Jv=n.n(Gv);
const{Strophe:Qv,sizzle:Yv,$iq:Kv}=sl.env,Xv=sl.env.utils;Qv.addNamespace("REGISTER","jabber:iq:register");constZv=Object.keys(Qv.Status).reduce((e,t)=>Math.max(e,Qv.Status[t]),0);Qv.Status.REGIFAIL=Zv+1,Qv.Status.REGISTERED=Zv+2,Qv.Status.CONFLICT=Zv+3,Qv.Status.NOTACCEPTABLE=Zv+5,sl.plugins.add("converse-register",{enabled:()=>!0,overrides:{ControlBoxView:{renderLoginPanel(){returnthis.__super__.renderLoginPanel.apply(this,arguments),this.renderRegistrationPanel(),this}}},initialize(){functione(e){Qc.waitUntil("controlBoxInitialized").then(()=>{Vc.chatboxes.get("controlbox").set({"active-form":e})}).catch(e=>Dn.fatal(e))}Vc.CONNECTION_STATUS[Qv.Status.REGIFAIL]="REGIFAIL",Vc.CONNECTION_STATUS[Qv.Status.REGISTERED]="REGISTERED",Vc.CONNECTION_STATUS[Qv.Status.CONFLICT]="CONFLICT",Vc.CONNECTION_STATUS[Qv.Status.NOTACCEPTABLE]="NOTACCEPTABLE",Qc.settings.extend({allow_registration:!0,domain_placeholder:wd(" e.g. conversejs.org"),providers_link:"https://compliance.conversations.im/",registration_domain:""}),Object.assign(Vc.ControlBoxView.prototype,{showLoginOrRegisterForm(){this.registerpanel&&("register"==this.model.get("active-form")?(this.loginpanel.el.classList.add("hidden"),this.registerpanel.el.classList.remove("hidden")):(this.loginpanel.el.classList.remove("hidden"),this.registerpanel.el.classList.add("hidden")))},renderRegistrationPanel(){if(Qc.settings.get("allow_registration")){this.registerpanel=newVc.RegisterPanel({model:this.model}),this.registerpanel.render(),this.registerpanel.el.classList.add("hidden");conste=this.el.querySelector("#converse-login-panel");e&&e.insertAdjacentElement("afterend",this.registerpanel.el),this.showLoginOrRegisterForm()}returnthis}}),Vc.router.route("converse/login",()=>e("login")),Vc.router.route("converse/register",()=>e("register")),Vc.RegisterPanel=Md.extend({tagName:"div",id:"converse-register-panel",className:"controlbox-pane fade-in",events:{"submit form#converse-register":"onFormSubmission","click .button-cancel":"renderProviderChoiceForm"},initialize(){this.reset(),Qc.listen.on("connectionInitialized",()=>this.registerHooks())},render(){returnthis.model.set("registration_form_rendered",!1),this.el.innerHTML=Hv()({__:wd,default_domain:Qc.settings.get("registration_domain"),label_register:wd("Fetch registration form"),help_providers:wd("Tip: A list of public XMPP providers is available"),help_providers_link:wd("here"),href_providers:Qc.settings.get("providers_link"),domain_placeholder:Qc.settings.get("domain_placeholder")}),Qc.settings.get("registration_domain")&&this.fetchRegistrationForm(Qc.settings.get("registration_domain")),this},registerHooks(){conste=Vc.connection,t=e._connect_cb.bind(e);e._connect_cb=(e,n,r)=>{this._registering?this.getRegistrationFields(e,n)&&(this._registering=!1):t(e,n,r)}},getRegistrationFields(e,t){constn=Vc.connection;n.connected=!0;constr=n._proto._reqToData(e);if(!r)return;if(n._proto._connect_cb(r)===Qv.Status.CONNFAIL)returnthis.showValidationError(wd("Sorry, we're unable to connect to your chosen provider.")),!1;consti=r.getElementsByTagName("register"),s=r.getElementsByTagName("mechanism");if(0===i.length&&0===s.length)returnn._proto._no_auth_received(t),!1;if(0===i.length)returnn._changeConnectStatus(Qv.Status.REGIFAIL),this.showValidationError(wd("Sorry, the given provider does not support in band account registration. Please try with a different provider.")),!0;n._addSysHandler(this.onRegistrationFields.bind(this),null,"iq",null,null);consto=Kv({type:"get"}).c("query",{xmlns:Qv.NS.REGISTER}).tree();returno.setAttribute("id",n.getUniqueId("sendIQ")),n.send(o),n.connected=!1,!0},onRegistrationFields(e){return"error"===e.getAttribute("type")?(Vc.connection._changeConnectStatus(Qv.Status.REGIFAIL,wd('Something went wrong while establishing a connection with "%1$s". Are you sure it exists?',this.domain)),!1):1!==e.getElementsByTagName("query").length?(Vc.connection._changeConnectStatus(Qv.Status.REGIFAIL,"unknown"),!1):(this.setFields(e),this.model.get("registration_form_rendered")||this.renderRegistrationForm(e),!1)},rese
const{Strophe:t_}=sl.env,n_=sl.env.utils;sl.plugins.add("converse-roomslist",{dependencies:["converse-singleton","converse-controlbox","converse-muc","converse-bookmarks"],initialize(){Qc.promises.add("roomsListInitialized"),Vc.RoomsList=Bs.extend({defaults:{"toggle-state":Vc.OPENED}}),Vc.RoomsListView=Md.extend({tagName:"span",initialize(){this.listenTo(this.model,"add",this.renderIfChatRoom),this.listenTo(this.model,"remove",this.renderIfChatRoom),this.listenTo(this.model,"destroy",this.renderIfChatRoom),this.listenTo(this.model,"change",this.renderIfRelevantChange);conste="converse.roomslist"+Vc.bare_jid;this.list_model=newVc.RoomsList({id:e}),this.list_model.browserStorage=Vc.createStore(e),this.list_model.fetch(),this.render(),this.insertIntoControlBox()},renderIfChatRoom(e){n_.isChatRoom(e)&&this.render()},renderIfRelevantChange(e){constt=["bookmarked","hidden","name","num_unread","num_unread_general"],n=e.changed||{};n_.isChatRoom(e)&&Object.keys(n).filter(e=>t.includes(e)).length&&this.render()},toHTML(){return(e=>{constt=wd("Click to toggle the list of open groupchats");returnwc`
const{Strophe:f_}=sl.env,p_=sl.env.utils;sl.plugins.add("converse-rosterview",{dependencies:["converse-roster","converse-modal","converse-chatboxviews"],initialize(){Qc.settings.extend({autocomplete_add_contact:!0,allow_chat_pending_contacts:!0,allow_contact_removal:!0,hide_offline_users:!1,roster_groups:!0,xhr_user_search_url:null}),Qc.promises.add("rosterViewInitialized");conste={dnd:wd("This contact is busy"),online:wd("This contact is online"),offline:wd("This contact is offline"),unavailable:wd("This contact is unavailable"),xa:wd("This contact is away for an extended period"),away:wd("This contact is away")};functiont(){Qc.settings.get("authentication")!==Vc.ANONYMOUS&&(Vc.rosterview=newVc.RosterView({model:Vc.rostergroups}),Vc.rosterview.render(),Qc.trigger("rosterViewInitialized"))}Vc.AddContactModal=Gd.extend({id:"add-contact-modal",events:{"submit form":"addContactFromForm"},initialize(){Gd.prototype.initialize.apply(this,arguments),this.listenTo(this.model,"change",this.render)},toHTML(){conste=Qc.settings.get("xhr_user_search_url")?wd("Contact name"):wd("Optional nickname");return(e=>{constt=wd("name@example.org"),n=wd("Add"),r=wd("Please enter a valid XMPP address"),i=wd("Add a Contact"),s=wd("XMPP Address"),o=wd("Nickname");returnwc`
`})(Object.assign(this.model.toJSON(),{_converse:Vc,label_nickname:e}))},afterRender(){"string"==typeof Qc.settings.get("xhr_user_search_url")?this.initXHRAutoComplete():this.initJIDAutoComplete();const e=this.el.querySelector('input[name="jid"]');this.el.addEventListener("shown.bs.modal",()=>e.focus(),!1)},initJIDAutoComplete(){if(!Qc.settings.get("autocomplete_add_contact"))return;const e=this.el.querySelector(".suggestion-box__jid").parentElement;this.jid_auto_complete=new Vc.AutoComplete(e,{data:(e,t)=>`${t.slice(0,t.indexOf("@"))}@${e}`,filter:Vc.FILTER_STARTSWITH,list:[...new Set(Vc.roster.map(e=>f_.getDomainFromJid(e.get("jid"))))]})},initXHRAutoComplete(){if(!Qc.settings.get("autocomplete_add_contact"))return this.initXHRFetch();const e=this.el.querySelector(".suggestion-box__name").parentElement;this.name_auto_complete=new Vc.AutoComplete(e,{auto_evaluate:!1,filter:Vc.FILTER_STARTSWITH,list:[]});const t=new window.XMLHttpRequest;t.onload=()=>{if(t.responseText){const e=t.responseText;this.name_auto_complete.list=JSON.parse(e).map(e=>({label:e.fullname||e.jid,value:e.jid})),this.name_auto_complete.auto_completing=!0,this.name_auto_complete.evaluate()}};const n=this.el.querySelector('input[name="name"]');n.addEventListener("input",Ma(()=>{t.open("GET",`${Qc.settings.get("xhr_user_search_url")}q=${encodeURIComponent(n.value)}`,!0),t.send()},300)),this.name_auto_complete.on("suggestion-box-selectcomplete",e=>{this.el.querySelector('input[name="name"]').value=e.text.label,this.el.querySelector('input[name="jid"]').value=e.text.value})},initXHRFetch(){this.xhr=new window.XMLHttpRequest,this.xhr.onload=()=>{if(this.xhr.responseText){const e=this.xhr.responseText,t=JSON.parse(e).map(e=>({label:e.fullname||e.jid,value:e.jid}));if(1!==t.length){const e=this.el.querySelector(".invalid-feedback");return e.textContent=wd("Sorry, could not find a contact with that name"),void p_.addClass("d-block",e)}const n=t[0].value;if(this.validateSubmission(n)){const e=this.el.querySelector("form"),r=t[0].label;this.afterSubmission(e,n,r)}}}},validateSubmission(e){const t=this.el.querySelector(".invalid-feedback");return!e||qs(e.split("@")).length<2?(p_.addClass("is-invalid",this.el.querySelector('input[name="jid"]')),p_.addClass("d-block",t),!1):Vc.roster.get(f_.getBareJidFromJid(e))?(t.textContent=wd("This contact has already been added"),p_.addClass("d-block",t),!1):(p_.removeClass("d-block",t),!0)},afterSubmission(e,t,n){Vc.roster.addAndSubscribe(t,n),this.model.clear(),this.modal.hide()},addContactFromForm(e){e.preventDefault();const t=new FormData(e.target),n=(t.get("jid")||"").trim();if(!n&&"string"==typeof Qc.settings.get("xhr_user_search_url")){const e=this.el.querySelector('input[name="name"]');return this.xhr.open("GET",`${Qc.settings.get("xhr_user_search_url")}q=${encodeURIComponent(e.value)}`,!0),void this.xhr.send()}this.validateSubmission(n)&&this.afterSubmission(e.target,n,t.get("name"))}}),Vc.RosterFilter=Bs.extend({initialize(){this.set({filter_text:"",filter_type:"contacts",chat_state:"online"})}}),Vc.RosterFilterView=Md.extend({tagName:"span",initialize(){this.listenTo(this.model,"change:filter_type",this.render),this.listenTo(this.model,"change:filter_text",this.render)},toHTML(){return e=Object.assign(this.model.toJSON(),{visible:this.shouldBeVisible(),placeholder:wd("Filter"),title_contact_filter:wd("Filter by contact name"),title_group_filter:wd("Filter by group name"),title_status_filter:wd("Filter by status"),label_any:wd("Any"),label_unread_messages:wd("Unread"),label_online:wd("Online"),label_chatty:wd("Chatty"),label_busy:wd("Busy"),label_away:wd("Away"),label_xa:wd("Extended Away"),label_offline:wd("Offline"),changeChatStateFilter:e=>this.changeChatStateFilter(e),changeTypeFilter:e=>this.changeTypeFilter(e),clearFilter:e=>this.clearFilter(e),liveFilter:e=>this.liveFilter(e),submitFilter:e=>this.submitFilter(e)}),wc`