@talkjs/web-components 0.3.8 → 0.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/base.css +1 -1
- package/classic.css +1 -1
- package/default.cjs +1 -1
- package/default.css +1 -1
- package/default.d.ts +39 -2
- package/default.js +1 -1
- package/package.json +1 -1
package/default.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
import{getTalkSession as t}from"@talkjs/core";var e=Object.create,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,o=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,a=(t,e,n)=>()=>{if(n)throw n[0];try{return t&&(e=t(t=0)),e}catch(t){throw n=[t],t}},l=(t,e)=>()=>(e||(t((e={exports:{}}).exports,e),t=null),e.exports),c=(t,e)=>{let r={};for(var i in t)n(r,i,{get:t[i],enumerable:!0});return e||n(r,Symbol.toStringTag,{value:"Module"}),r},d=(t,e,o,a)=>{if(e&&"object"==typeof e||"function"==typeof e)for(var l,c=i(e),d=0,h=c.length;d<h;d++)l=c[d],!s.call(t,l)&&l!==o&&n(t,l,{get:(t=>e[t]).bind(null,l),enumerable:!(a=r(e,l))||a.enumerable});return t},h=(t,r,i)=>(i=null!=t?e(o(t)):{},d(!r&&t&&t.__esModule?i:n(i,"default",{value:t,enumerable:!0}),t)),p=t=>s.call(t,"module.exports")?t["module.exports"]:d(n({},"__esModule",{value:!0}),t),f=function(t,e,n,r){var i;e[0]=0;for(var o=1;o<e.length;o++){var s=e[o++],a=e[o]?(e[0]|=s?1:2,n[e[o++]]):e[++o];3===s?r[0]=a:4===s?r[1]=Object.assign(r[1]||{},a):5===s?(r[1]=r[1]||{})[e[++o]]=a:6===s?r[1][e[++o]]+=a+"":s?(i=t.apply(a,f(t,a,n,["",null])),r.push(i),a[0]?e[0]|=2:(e[o-2]=0,e[o]=i)):r.push(a)}return r},m=new Map;function E(t){var e=m.get(this);return e||(e=new Map,m.set(this,e)),(e=f(this,e.get(t)||(e.set(t,e=function(t){for(var e,n,r=1,i="",o="",s=[0],a=function(t){1===r&&(t||(i=i.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?s.push(0,t,i):3===r&&(t||i)?(s.push(3,t,i),r=2):2===r&&"..."===i&&t?s.push(4,t,0):2===r&&i&&!t?s.push(5,0,!0,i):r>=5&&((i||!t&&5===r)&&(s.push(r,0,i,n),r=6),t&&(s.push(r,t,0,n),r=6)),i=""},l=0;l<t.length;l++){l&&(1===r&&a(),a(l));for(var c=0;c<t[l].length;c++)e=t[l][c],1===r?"<"===e?(a(),s=[s],r=3):i+=e:4===r?"--"===i&&">"===e?(r=1,i=""):i=e+i[0]:o?e===o?o="":i+=e:'"'===e||"'"===e?o=e:">"===e?(a(),r=1):r&&("="===e?(r=5,n=i,i=""):"/"===e&&(r<5||">"===t[l][c+1])?(a(),3===r&&(s=s[0]),r=s,(s=s[0]).push(2,0,r),r=0):" "===e||"\t"===e||"\n"===e||"\r"===e?(a(),r=2):i+=e),3===r&&"!--"===i&&(r=4,s=s[0])}return a(),s}(t)),e),arguments,[])).length>1?e:e[0]}function _(t,e){for(var n in e)t[n]=e[n];return t}function A(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function g(t,e,n){var r,i,o,s={};for(o in e)"key"==o?r=e[o]:"ref"==o?i=e[o]:s[o]=e[o];if(arguments.length>2&&(s.children=arguments.length>3?G.call(arguments,2):n),"function"==typeof t&&null!=t.defaultProps)for(o in t.defaultProps)void 0===s[o]&&(s[o]=t.defaultProps[o]);return S(t,s,r,i,null)}function S(t,e,n,r,i){var o={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==i?++X:i,__i:-1,__u:0};return null==i&&null!=W.vnode&&W.vnode(o),o}function v(){return{current:null}}function O(t){return t.children}function D(t,e){this.props=t,this.context=e}function T(t,e){if(null==e)return t.__?T(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e)return n.__e;return"function"==typeof t.type?T(t):null}function R(t){var e,n;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e){t.__e=t.__c.base=n.__e;break}return R(t)}}function y(t){(!t.__d&&(t.__d=!0)&&K.push(t)&&!I.__r++||q!=W.debounceRendering)&&((q=W.debounceRendering)||J)(I)}function I(){for(var t,e,n,r,i,o,s,a=1;K.length;)K.length>a&&K.sort(Z),t=K.shift(),a=K.length,t.__d&&(n=void 0,r=void 0,i=(r=(e=t).__v).__e,o=[],s=[],e.__P&&((n=_({},r)).__v=r.__v+1,W.vnode&&W.vnode(n),P(e.__P,n,r,e.__n,e.__P.namespaceURI,32&r.__u?[i]:null,o,null==i?T(r):i,!!(32&r.__u),s),n.__v=r.__v,n.__.__k[n.__i]=n,F(o,n,s),r.__e=r.__=null,n.__e!=i&&R(n)));I.__r=0}function C(t,e,n,r,i,o,s,a,l,c,d){var h,p,f,m,E,_,A,g=r&&r.__k||ot,v=e.length;for(l=function(t,e,n,r,i){var o,s,a,l,c,d=n.length,h=d,p=0;for(t.__k=new Array(i),o=0;o<i;o++)null!=(s=e[o])&&"boolean"!=typeof s&&"function"!=typeof s?("string"==typeof s||"number"==typeof s||"bigint"==typeof s||s.constructor==String?s=t.__k[o]=S(null,s,null,null,null):at(s)?s=t.__k[o]=S(O,{children:s},null,null,null):null==s.constructor&&s.__b>0?s=t.__k[o]=S(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):t.__k[o]=s,l=o+p,s.__=t,s.__b=t.__b+1,a=null,-1!=(c=s.__i=w(s,n,l,h))&&(h--,(a=n[c])&&(a.__u|=2)),null==a||null==a.__v?(-1==c&&(i>d?p--:i<d&&p++),"function"!=typeof s.type&&(s.__u|=4)):c!=l&&(c==l-1?p--:c==l+1?p++:(c>l?p--:p++,s.__u|=4))):t.__k[o]=null;if(h)for(o=0;o<d;o++)null!=(a=n[o])&&!(2&a.__u)&&(a.__e==r&&(r=T(a)),B(a,a));return r}(n,e,g,l,v),h=0;h<v;h++)null!=(f=n.__k[h])&&(p=-1==f.__i?it:g[f.__i]||it,f.__i=h,_=P(t,f,p,i,o,s,a,l,c,d),m=f.__e,f.ref&&p.ref!=f.ref&&(p.ref&&U(p.ref,null,f),d.push(f.ref,f.__c||m,f)),null==E&&null!=m&&(E=m),(A=!!(4&f.__u))||p.__k===f.__k?l=N(f,l,t,A):"function"==typeof f.type&&void 0!==_?l=_:m&&(l=m.nextSibling),f.__u&=-7);return n.__e=E,l}function N(t,e,n,r){var i,o;if("function"==typeof t.type){for(i=t.__k,o=0;i&&o<i.length;o++)i[o]&&(i[o].__=t,e=N(i[o],e,n,r));return e}t.__e!=e&&(r&&(e&&t.type&&!e.parentNode&&(e=T(t)),n.insertBefore(t.__e,e||null)),e=t.__e);do{e=e&&e.nextSibling}while(null!=e&&8==e.nodeType);return e}function b(t,e){return e=e||[],null==t||"boolean"==typeof t||(at(t)?t.some(function(t){b(t,e)}):e.push(t)),e}function w(t,e,n,r){var i,o,s,a=t.key,l=t.type,c=e[n],d=null!=c&&!(2&c.__u);if(null===c&&null==a||d&&a==c.key&&l==c.type)return n;if(r>(d?1:0))for(i=n-1,o=n+1;i>=0||o<e.length;)if(null!=(c=e[s=i>=0?i--:o++])&&!(2&c.__u)&&a==c.key&&l==c.type)return s;return-1}function k(t,e,n){"-"==e[0]?t.setProperty(e,null==n?"":n):t[e]=null==n?"":"number"!=typeof n||st.test(e)?n:n+"px"}function L(t,e,n,r,i){var o,s;t:if("style"==e)if("string"==typeof n)t.style.cssText=n;else{if("string"==typeof r&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||k(t.style,e,"");if(n)for(e in n)r&&n[e]==r[e]||k(t.style,e,n[e])}else if("o"==e[0]&&"n"==e[1])o=e!=(e=e.replace(Q,"$1")),s=e.toLowerCase(),e=s in t||"onFocusOut"==e||"onFocusIn"==e?s.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+o]=n,n?r?n.u=r.u:(n.u=tt,t.addEventListener(e,o?nt:et,o)):t.removeEventListener(e,o?nt:et,o);else{if("http://www.w3.org/2000/svg"==i)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=e&&"height"!=e&&"href"!=e&&"list"!=e&&"form"!=e&&"tabIndex"!=e&&"download"!=e&&"rowSpan"!=e&&"colSpan"!=e&&"role"!=e&&"popover"!=e&&e in t)try{t[e]=null==n?"":n;break t}catch(t){}"function"==typeof n||(null==n||!1===n&&"-"!=e[4]?t.removeAttribute(e):t.setAttribute(e,"popover"==e&&1==n?"":n))}}function M(t){return function(e){if(this.l){var n=this.l[e.type+t];if(null==e.t)e.t=tt++;else if(e.t<n.u)return;return n(W.event?W.event(e):e)}}}function P(t,e,n,r,i,o,s,a,l,c){var d,h,p,f,m,E,g,S,v,R,y,I,N,b,w,k,M,P=e.type;if(null!=e.constructor)return null;128&n.__u&&(l=!!(32&n.__u),o=[a=e.__e=n.__e]),(d=W.__b)&&d(e);t:if("function"==typeof P)try{if(S=e.props,v="prototype"in P&&P.prototype.render,R=(d=P.contextType)&&r[d.__c],y=d?R?R.props.value:d.__:r,n.__c?g=(h=e.__c=n.__c).__=h.__E:(v?e.__c=h=new P(S,y):(e.__c=h=new D(S,y),h.constructor=P,h.render=j),R&&R.sub(h),h.state||(h.state={}),h.__n=r,p=h.__d=!0,h.__h=[],h._sb=[]),v&&null==h.__s&&(h.__s=h.state),v&&null!=P.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=_({},h.__s)),_(h.__s,P.getDerivedStateFromProps(S,h.__s))),f=h.props,m=h.state,h.__v=e,p)v&&null==P.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),v&&null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(v&&null==P.getDerivedStateFromProps&&S!==f&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(S,y),e.__v==n.__v||!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(S,h.__s,y)){for(e.__v!=n.__v&&(h.props=S,h.state=h.__s,h.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(t){t&&(t.__=e)}),I=0;I<h._sb.length;I++)h.__h.push(h._sb[I]);h._sb=[],h.__h.length&&s.push(h);break t}null!=h.componentWillUpdate&&h.componentWillUpdate(S,h.__s,y),v&&null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(f,m,E)})}if(h.context=y,h.props=S,h.__P=t,h.__e=!1,N=W.__r,b=0,v){for(h.state=h.__s,h.__d=!1,N&&N(e),d=h.render(h.props,h.state,h.context),w=0;w<h._sb.length;w++)h.__h.push(h._sb[w]);h._sb=[]}else do{h.__d=!1,N&&N(e),d=h.render(h.props,h.state,h.context),h.state=h.__s}while(h.__d&&++b<25);h.state=h.__s,null!=h.getChildContext&&(r=_(_({},r),h.getChildContext())),v&&!p&&null!=h.getSnapshotBeforeUpdate&&(E=h.getSnapshotBeforeUpdate(f,m)),k=d,null!=d&&d.type===O&&null==d.key&&(k=H(d.props.children)),a=C(t,at(k)?k:[k],e,n,r,i,o,s,a,l,c),h.base=e.__e,e.__u&=-161,h.__h.length&&s.push(h),g&&(h.__E=h.__=null)}catch(t){if(e.__v=null,l||null!=o)if(t.then){for(e.__u|=l?160:128;a&&8==a.nodeType&&a.nextSibling;)a=a.nextSibling;o[o.indexOf(a)]=null,e.__e=a}else{for(M=o.length;M--;)A(o[M]);x(e)}else e.__e=n.__e,e.__k=n.__k,t.then||x(e);W.__e(t,e,n)}else null==o&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):a=e.__e=function(t,e,n,r,i,o,s,a,l){var c,d,h,p,f,m,E,_=n.props||it,g=e.props,S=e.type;if("svg"==S?i="http://www.w3.org/2000/svg":"math"==S?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),null!=o)for(c=0;c<o.length;c++)if((f=o[c])&&"setAttribute"in f==!!S&&(S?f.localName==S:3==f.nodeType)){t=f,o[c]=null;break}if(null==t){if(null==S)return document.createTextNode(g);t=document.createElementNS(i,S,g.is&&g),a&&(W.__m&&W.__m(e,o),a=!1),o=null}if(null==S)_===g||a&&t.data==g||(t.data=g);else{if(o=o&&G.call(t.childNodes),!a&&null!=o)for(_={},c=0;c<t.attributes.length;c++)_[(f=t.attributes[c]).name]=f.value;for(c in _)if(f=_[c],"children"!=c)if("dangerouslySetInnerHTML"==c)h=f;else if(!(c in g)){if("value"==c&&"defaultValue"in g||"checked"==c&&"defaultChecked"in g)continue;L(t,c,null,f,i)}for(c in g)f=g[c],"children"==c?p=f:"dangerouslySetInnerHTML"==c?d=f:"value"==c?m=f:"checked"==c?E=f:a&&"function"!=typeof f||_[c]===f||L(t,c,f,_[c],i);if(d)a||h&&(d.__html==h.__html||d.__html==t.innerHTML)||(t.innerHTML=d.__html),e.__k=[];else if(h&&(t.innerHTML=""),C("template"==e.type?t.content:t,at(p)?p:[p],e,n,r,"foreignObject"==S?"http://www.w3.org/1999/xhtml":i,o,s,o?o[0]:n.__k&&T(n,0),a,l),null!=o)for(c=o.length;c--;)A(o[c]);a||(c="value","progress"==S&&null==m?t.removeAttribute("value"):null!=m&&(m!==t[c]||"progress"==S&&!m||"option"==S&&m!=_[c])&&L(t,c,m,_[c],i),c="checked",null!=E&&E!=t[c]&&L(t,c,E,_[c],i))}return t}(n.__e,e,n,r,i,o,s,l,c);return(d=W.diffed)&&d(e),128&e.__u?void 0:a}function x(t){t&&t.__c&&(t.__c.__e=!0),t&&t.__k&&t.__k.forEach(x)}function F(t,e,n){for(var r=0;r<n.length;r++)U(n[r],n[++r],n[++r]);W.__c&&W.__c(e,t),t.some(function(e){try{t=e.__h,e.__h=[],t.some(function(t){t.call(e)})}catch(t){W.__e(t,e.__v)}})}function H(t){return"object"!=typeof t||null==t||t.__b&&t.__b>0?t:at(t)?t.map(H):_({},t)}function U(t,e,n){try{if("function"==typeof t){var r="function"==typeof t.__u;r&&t.__u(),r&&null==e||(t.__u=t(e))}else t.current=e}catch(t){W.__e(t,n)}}function B(t,e,n){var r,i;if(W.unmount&&W.unmount(t),(r=t.ref)&&(r.current&&r.current!=t.__e||U(r,null,e)),null!=(r=t.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(t){W.__e(t,e)}r.base=r.__P=null}if(r=t.__k)for(i=0;i<r.length;i++)r[i]&&B(r[i],e,n||"function"!=typeof t.type);n||A(t.__e),t.__c=t.__=t.__e=void 0}function j(t,e,n){return this.constructor(t,n)}function V(t,e,n){var r,i,o,s;e==document&&(e=document.documentElement),W.__&&W.__(t,e),i=(r="function"==typeof n)?null:n&&n.__k||e.__k,o=[],s=[],P(e,t=(!r&&n||e).__k=g(O,null,[t]),i||it,it,e.namespaceURI,!r&&n?[n]:i?null:e.firstChild?G.call(e.childNodes):null,o,!r&&n?n:i?i.__e:e.firstChild,r,s),F(o,t,s)}function z(t,e){V(t,e,z)}function $(t,e,n){var r,i,o,s,a=_({},t.props);for(o in t.type&&t.type.defaultProps&&(s=t.type.defaultProps),e)"key"==o?r=e[o]:"ref"==o?i=e[o]:a[o]=void 0===e[o]&&null!=s?s[o]:e[o];return arguments.length>2&&(a.children=arguments.length>3?G.call(arguments,2):n),S(t.type,a,r||t.key,i||t.ref,null)}function Y(t){function e(t){var n,r;return this.getChildContext||(n=new Set,(r={})[e.__c]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(t){this.props.value!=t.value&&n.forEach(function(t){t.__e=!0,y(t)})},this.sub=function(t){n.add(t);var e=t.componentWillUnmount;t.componentWillUnmount=function(){n&&n.delete(t),e&&e.call(t)}}),t.children}return e.__c="__cC"+rt++,e.__=t,e.Provider=e.__l=(e.Consumer=function(t,e){return t.children(e)}).contextType=e,e}var G,W,X,K,q,J,Z,Q,tt,et,nt,rt,it,ot,st,at,lt=a(()=>{it={},ot=[],st=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,at=Array.isArray,G=ot.slice,W={__e:function(t,e,n,r){for(var i,o,s;e=e.__;)if((i=e.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(t)),s=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(t,r||{}),s=i.__d),s)return i.__E=i}catch(e){t=e}throw t}},X=0,D.prototype.setState=function(t,e){var n=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=_({},this.state);"function"==typeof t&&(t=t(_({},n),this.props)),t&&_(n,t),null!=t&&this.__v&&(e&&this._sb.push(e),y(this))},D.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),y(this))},D.prototype.render=O,K=[],J="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Z=function(t,e){return t.__v.__b-e.__v.__b},I.__r=0,Q=/(PointerCapture)$|Capture$/i,tt=0,et=M(!1),nt=M(!0),rt=0});function ct(t,e){Mt.__h&&Mt.__h(Nt,t,kt||e),kt=0;var n=Nt.__H||(Nt.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function ut(t){return kt=1,dt(It,t)}function dt(t,e,n){var r=ct(Ct++,2);if(r.t=t,!r.__c&&(r.__=[n?n(e):It(void 0,e),function(t){var e=r.__N?r.__N[0]:r.__[0],n=r.t(e,t);e!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=Nt,!Nt.__f)){var i=function(t,e,n){if(!r.__c.__H)return!0;var i=r.__c.__H.__.filter(function(t){return!!t.__c});if(i.every(function(t){return!t.__N}))return!o||o.call(this,t,e,n);var s=r.__c.props!==t;return i.forEach(function(t){if(t.__N){var e=t.__[0];t.__=t.__N,t.__N=void 0,e!==t.__[0]&&(s=!0)}}),o&&o.call(this,t,e,n)||s};Nt.__f=!0;var o=Nt.shouldComponentUpdate,s=Nt.componentWillUpdate;Nt.componentWillUpdate=function(t,e,n){if(this.__e){var r=o;o=void 0,i(t,e,n),o=r}s&&s.call(this,t,e,n)},Nt.shouldComponentUpdate=i}return r.__N||r.__}function ht(t,e){var n=ct(Ct++,3);!Mt.__s&&yt(n.__H,e)&&(n.__=t,n.u=e,Nt.__H.__h.push(n))}function pt(t,e){var n=ct(Ct++,4);!Mt.__s&&yt(n.__H,e)&&(n.__=t,n.u=e,Nt.__h.push(n))}function ft(t){return kt=5,Et(function(){return{current:t}},[])}function mt(t,e,n){kt=6,pt(function(){if("function"==typeof t){var n=t(e());return function(){t(null),n&&"function"==typeof n&&n()}}if(t)return t.current=e(),function(){return t.current=null}},null==n?n:n.concat(t))}function Et(t,e){var n=ct(Ct++,7);return yt(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function _t(t,e){return kt=8,Et(function(){return t},e)}function At(t){var e=Nt.context[t.__c],n=ct(Ct++,9);return n.c=t,e?(null==n.__&&(n.__=!0,e.sub(Nt)),e.props.value):t.__}function gt(t,e){Mt.useDebugValue&&Mt.useDebugValue(e?e(t):t)}function St(t){var e=ct(Ct++,10),n=ut();return e.__=t,Nt.componentDidCatch||(Nt.componentDidCatch=function(t,r){e.__&&e.__(t,r),n[1](t)}),[n[0],function(){n[1](void 0)}]}function vt(){var t=ct(Ct++,11);if(!t.__){for(var e=Nt.__v;null!==e&&!e.__m&&null!==e.__;)e=e.__;var n=e.__m||(e.__m=[0,0]);t.__="P"+n[0]+"-"+n[1]++}return t.__}function Ot(){for(var t;t=Lt.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(Tt),t.__H.__h.forEach(Rt),t.__H.__h=[]}catch(e){t.__H.__h=[],Mt.__e(e,t.__v)}}function Dt(t){var e,n=function(){clearTimeout(r),jt&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,35);jt&&(e=requestAnimationFrame(n))}function Tt(t){var e=Nt,n=t.__c;"function"==typeof n&&(t.__c=void 0,n()),Nt=e}function Rt(t){var e=Nt;t.__c=t.__(),Nt=e}function yt(t,e){return!t||t.length!==e.length||e.some(function(e,n){return e!==t[n]})}function It(t,e){return"function"==typeof e?e(t):e}var Ct,Nt,bt,wt,kt,Lt,Mt,Pt,xt,Ft,Ht,Ut,Bt,jt,Vt=a(()=>{lt(),kt=0,Lt=[],Pt=(Mt=W).__b,xt=Mt.__r,Ft=Mt.diffed,Ht=Mt.__c,Ut=Mt.unmount,Bt=Mt.__,Mt.__b=function(t){Nt=null,Pt&&Pt(t)},Mt.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),Bt&&Bt(t,e)},Mt.__r=function(t){xt&&xt(t),Ct=0;var e=(Nt=t.__c).__H;e&&(bt===Nt?(e.__h=[],Nt.__h=[],e.__.forEach(function(t){t.__N&&(t.__=t.__N),t.u=t.__N=void 0})):(e.__h.forEach(Tt),e.__h.forEach(Rt),e.__h=[],Ct=0)),bt=Nt},Mt.diffed=function(t){Ft&&Ft(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(1!==Lt.push(e)&&wt===Mt.requestAnimationFrame||((wt=Mt.requestAnimationFrame)||Dt)(Ot)),e.__H.__.forEach(function(t){t.u&&(t.__H=t.u),t.u=void 0})),bt=Nt=null},Mt.__c=function(t,e){e.some(function(t){try{t.__h.forEach(Tt),t.__h=t.__h.filter(function(t){return!t.__||Rt(t)})}catch(n){e.some(function(t){t.__h&&(t.__h=[])}),e=[],Mt.__e(n,t.__v)}}),Ht&&Ht(t,e)},Mt.unmount=function(t){Ut&&Ut(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(t){try{Tt(t)}catch(t){e=t}}),n.__H=void 0,e&&Mt.__e(e,n.__v))},jt="function"==typeof requestAnimationFrame}),zt=c({Children:()=>Re,Component:()=>D,Fragment:()=>O,PureComponent:()=>Jt,StrictMode:()=>Ye,Suspense:()=>ne,SuspenseList:()=>oe,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:()=>je,cloneElement:()=>Ae,createContext:()=>Y,createElement:()=>g,createFactory:()=>fe,createPortal:()=>le,createRef:()=>v,default:()=>We,findDOMNode:()=>Se,flushSync:()=>$e,forwardRef:()=>Qt,hydrate:()=>ue,isElement:()=>Ge,isFragment:()=>Ee,isMemo:()=>_e,isValidElement:()=>me,lazy:()=>ie,memo:()=>Zt,render:()=>ce,startTransition:()=>Xt,unmountComponentAtNode:()=>ge,unstable_batchedUpdates:()=>ze,useCallback:()=>_t,useContext:()=>At,useDebugValue:()=>gt,useDeferredValue:()=>Kt,useEffect:()=>ht,useErrorBoundary:()=>St,useId:()=>vt,useImperativeHandle:()=>mt,useInsertionEffect:()=>ve,useLayoutEffect:()=>pt,useMemo:()=>Et,useReducer:()=>dt,useRef:()=>ft,useState:()=>ut,useSyncExternalStore:()=>Gt,useTransition:()=>qt,version:()=>Ve});function $t(t,e){for(var n in e)t[n]=e[n];return t}function Yt(t,e){for(var n in t)if("__source"!==n&&!(n in e))return!0;for(var r in e)if("__source"!==r&&t[r]!==e[r])return!0;return!1}function Gt(t,e){var n=e(),r=ut({t:{__:n,u:e}}),i=r[0].t,o=r[1];return pt(function(){i.__=n,i.u=e,Wt(i)&&o({t:i})},[t,n,e]),ht(function(){return Wt(i)&&o({t:i}),t(function(){Wt(i)&&o({t:i})})},[t]),n}function Wt(t){var e,n,r=t.u,i=t.__;try{var o=r();return!((e=i)===(n=o)&&(0!==e||1/e==1/n)||e!=e&&n!=n)}catch(t){return!0}}function Xt(t){t()}function Kt(t){return t}function qt(){return[!1,Xt]}function Jt(t,e){this.props=t,this.context=e}function Zt(t,e){function n(t){var n=this.props.ref,r=n==t.ref;return!r&&n&&(n.call?n(null):n.current=null),e?!e(this.props,t)||!r:Yt(this.props,t)}function r(e){return this.shouldComponentUpdate=n,g(t,e)}return r.displayName="Memo("+(t.displayName||t.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r.type=t,r}function Qt(t){function e(e){var n=$t({},e);return delete n.ref,t(n,e.ref||null)}return e.$$typeof=De,e.render=t,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}function te(t,e,n){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(t){"function"==typeof t.__c&&t.__c()}),t.__c.__H=null),null!=(t=$t({},t)).__c&&(t.__c.__P===n&&(t.__c.__P=e),t.__c.__e=!0,t.__c=null),t.__k=t.__k&&t.__k.map(function(t){return te(t,e,n)})),t}function ee(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(t){return ee(t,e,n)}),t.__c&&t.__c.__P===e&&(t.__e&&n.appendChild(t.__e),t.__c.__e=!0,t.__c.__P=n)),t}function ne(){this.__u=0,this.o=null,this.__b=null}function re(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function ie(t){var e,n,r,i=null;function o(o){if(e||(e=t()).then(function(t){t&&(i=t.default||t),r=!0},function(t){n=t,r=!0}),n)throw n;if(!r)throw e;return i?g(i,o):null}return o.displayName="Lazy",o.__f=!0,o}function oe(){this.i=null,this.l=null}function se(t){return this.getChildContext=function(){return t.context},t.children}function ae(t){var e=this,n=t.h;if(e.componentWillUnmount=function(){V(null,e.v),e.v=null,e.h=null},e.h&&e.h!==n&&e.componentWillUnmount(),!e.v){for(var r=e.__v;null!==r&&!r.__m&&null!==r.__;)r=r.__;e.h=n,e.v={nodeType:1,parentNode:n,childNodes:[],__k:{__m:r.__m},contains:function(){return!0},insertBefore:function(t,n){this.childNodes.push(t),e.h.insertBefore(t,n)},removeChild:function(t){this.childNodes.splice(this.childNodes.indexOf(t)>>>1,1),e.h.removeChild(t)}}}V(g(se,{context:e.context},t.__v),e.v)}function le(t,e){var n=g(ae,{__v:t,h:e});return n.containerInfo=e,n}function ce(t,e,n){return null==e.__k&&(e.textContent=""),V(t,e),"function"==typeof n&&n(),t?t.__c:null}function ue(t,e,n){return z(t,e),"function"==typeof n&&n(),t?t.__c:null}function de(){}function he(){return this.cancelBubble}function pe(){return this.defaultPrevented}function fe(t){return g.bind(null,t)}function me(t){return!!t&&t.$$typeof===Ne}function Ee(t){return me(t)&&t.type===O}function _e(t){return!!t&&!!t.displayName&&("string"==typeof t.displayName||t.displayName instanceof String)&&t.displayName.startsWith("Memo(")}function Ae(t){return me(t)?$.apply(null,arguments):t}function ge(t){return!!t.__k&&(V(null,t),!0)}function Se(t){return t&&(t.base||1===t.nodeType&&t)||null}var ve,Oe,De,Te,Re,ye,Ie,Ce,Ne,be,we,ke,Le,Me,Pe,xe,Fe,He,Ue,Be,je,Ve,ze,$e,Ye,Ge,We,Xe=a(()=>{lt(),Vt(),Vt(),ve=pt,(Jt.prototype=new D).isPureReactComponent=!0,Jt.prototype.shouldComponentUpdate=function(t,e){return Yt(this.props,t)||Yt(this.state,e)},Oe=W.__b,W.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),Oe&&Oe(t)},De="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911,Re={map:Te=function(t,e){return null==t?null:b(b(t).map(e))},forEach:Te,count:function(t){return t?b(t).length:0},only:function(t){var e=b(t);if(1!==e.length)throw"Children.only";return e[0]},toArray:b},ye=W.__e,W.__e=function(t,e,n,r){if(t.then)for(var i,o=e;o=o.__;)if((i=o.__c)&&i.__c)return null==e.__e&&(e.__e=n.__e,e.__k=n.__k),i.__c(t,e);ye(t,e,n,r)},Ie=W.unmount,W.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),Ie&&Ie(t)},(ne.prototype=new D).__c=function(t,e){var n=e.__c,r=this;null==r.o&&(r.o=[]),r.o.push(n);var i=re(r.__v),o=!1,s=function(){o||(o=!0,n.__R=null,i?i(a):a())};n.__R=s;var a=function(){if(! --r.__u){if(r.state.__a){var t=r.state.__a;r.__v.__k[0]=ee(t,t.__c.__P,t.__c.__O)}var e;for(r.setState({__a:r.__b=null});e=r.o.pop();)e.forceUpdate()}};r.__u++||32&e.__u||r.setState({__a:r.__b=r.__v.__k[0]}),t.then(s,s)},ne.prototype.componentWillUnmount=function(){this.o=[]},ne.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=te(this.__b,n,r.__O=r.__P)}this.__b=null}var i=e.__a&&g(O,null,t.fallback);return i&&(i.__u&=-33),[g(O,null,e.__a?null:t.children),i]},Ce=function(t,e,n){if(++n[1]===n[0]&&t.l.delete(e),t.props.revealOrder&&("t"!==t.props.revealOrder[0]||!t.l.size))for(n=t.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;t.i=n=n[2]}},(oe.prototype=new D).__a=function(t){var e=this,n=re(e.__v),r=e.l.get(t);return r[0]++,function(i){var o=function(){e.props.revealOrder?(r.push(i),Ce(e,t,r)):i()};n?n(o):o()}},oe.prototype.render=function(t){this.i=null,this.l=new Map;var e=b(t.children);t.revealOrder&&"b"===t.revealOrder[0]&&e.reverse();for(var n=e.length;n--;)this.l.set(e[n],this.i=[1,0,this.i]);return t.children},oe.prototype.componentDidUpdate=oe.prototype.componentDidMount=function(){var t=this;this.l.forEach(function(e,n){Ce(t,n,e)})},Ne="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,be=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,we=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,ke=/[A-Z0-9]/g,Le="undefined"!=typeof document,Me=function(t){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(t)},D.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(D.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}),Pe=W.event,W.event=function(t){return Pe&&(t=Pe(t)),t.persist=de,t.isPropagationStopped=he,t.isDefaultPrevented=pe,t.nativeEvent=t},Fe={enumerable:!1,configurable:!0,get:function(){return this.class}},He=W.vnode,W.vnode=function(t){"string"==typeof t.type&&function(t){var e=t.props,n=t.type,r={},i=-1===n.indexOf("-");for(var o in e){var s=e[o];if(!("value"===o&&"defaultValue"in e&&null==s||Le&&"children"===o&&"noscript"===n||"class"===o||"className"===o)){var a=o.toLowerCase();"defaultValue"===o&&"value"in e&&null==e.value?o="value":"download"===o&&!0===s?s="":"translate"===a&&"no"===s?s=!1:"o"===a[0]&&"n"===a[1]?"ondoubleclick"===a?o="ondblclick":"onchange"!==a||"input"!==n&&"textarea"!==n||Me(e.type)?"onfocus"===a?o="onfocusin":"onblur"===a?o="onfocusout":we.test(o)&&(o=a):a=o="oninput":i&&be.test(o)?o=o.replace(ke,"-$&").toLowerCase():null===s&&(s=void 0),"oninput"===a&&r[o=a]&&(o="oninputCapture"),r[o]=s}}"select"==n&&r.multiple&&Array.isArray(r.value)&&(r.value=b(e.children).forEach(function(t){t.props.selected=-1!=r.value.indexOf(t.props.value)})),"select"==n&&null!=r.defaultValue&&(r.value=b(e.children).forEach(function(t){t.props.selected=r.multiple?-1!=r.defaultValue.indexOf(t.props.value):r.defaultValue==t.props.value})),e.class&&!e.className?(r.class=e.class,Object.defineProperty(r,"className",Fe)):(e.className&&!e.class||e.class&&e.className)&&(r.class=r.className=e.className),t.props=r}(t),t.$$typeof=Ne,He&&He(t)},Ue=W.__r,W.__r=function(t){Ue&&Ue(t),xe=t.__c},Be=W.diffed,W.diffed=function(t){Be&&Be(t);var e=t.props,n=t.__e;null!=n&&"textarea"===t.type&&"value"in e&&e.value!==n.value&&(n.value=null==e.value?"":e.value),xe=null},Ve="18.3.1",We={useState:ut,useId:vt,useReducer:dt,useEffect:ht,useLayoutEffect:pt,useInsertionEffect:ve,useTransition:qt,useDeferredValue:Kt,useSyncExternalStore:Gt,startTransition:Xt,useRef:ft,useImperativeHandle:mt,useMemo:Et,useCallback:_t,useContext:At,useDebugValue:gt,version:"18.3.1",Children:Re,render:ce,hydrate:ue,unmountComponentAtNode:ge,createPortal:le,createElement:g,createContext:Y,createFactory:fe,cloneElement:Ae,createRef:v,Fragment:O,isValidElement:me,isElement:Ge=me,isFragment:Ee,isMemo:_e,findDOMNode:Se,Component:D,PureComponent:Jt,memo:Zt,forwardRef:Qt,flushSync:$e=function(t,e){return t(e)},unstable_batchedUpdates:ze=function(t,e){return t(e)},StrictMode:Ye=O,Suspense:ne,SuspenseList:oe,lazy:ie,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:je={ReactCurrentDispatcher:{current:{readContext:function(t){return xe.__n[t.__c].props.value},useCallback:_t,useContext:At,useDebugValue:gt,useDeferredValue:Kt,useEffect:ht,useId:vt,useImperativeHandle:mt,useInsertionEffect:ve,useLayoutEffect:pt,useMemo:Et,useReducer:dt,useRef:ft,useState:ut,useSyncExternalStore:Gt,useTransition:qt}}}}});Xe();const Ke=function(t){const e={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,TALK_GMK:"AIzaSyAsz0mHH8fOjpcBfWeCfDVOFPh-nWgsxbs"}[t];if(!e)throw new Error("Missing required environment key: "+t);return e}("TALK_GMK");var qe=l(t=>{function e(t){return String.fromCharCode(parseInt(t.slice(1),16))}Object.defineProperty(t,"__esModule",{value:!0}),t.encode=function(t){return btoa(encodeURIComponent(t).replace(/%[0-9A-F]{2}/g,e))}}),Ze=h(qe(),1);const Qe=/[^a-zA-Z\u00C0-\u024F\u1E00-\u1EFF\u0400-\u044f\u0300-\u036e]+/,tn=t=>t.split(Qe).filter(t=>t).map(t=>t[0]).join("")||function(t){return t[Symbol.iterator]().next().value||""}(t);function en(t,e){const n=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">\n <rect x="0" y="0" width="100" height="100" fill="${nn(t)}"/>\n <text x="50%" y="54%" dominant-baseline="middle" font-size="34" font-family="San Francisco, Segoe UI, Helvetica Neue, Arial, Helvetica, sans-serif" fill="#fff" text-anchor="middle">${e}</text> \n </svg>`.replace(/\s+/g," ");return"data:image/svg+xml;base64,"+Ze.encode(n)}function nn(t){const e=function(t){let e=0;for(let n=0;n<t.length;n++)e=(e<<5)-e+t.charCodeAt(n),e&=e;return Math.abs(e)}(t)%hn.length;return hn[e]}function rn(t,e){const n=e.lastIndex;let r;const i=[];for(;null!==(r=e.exec(t));)i.push(r),""===r[0]&&(e.lastIndex+=1);return e.lastIndex=n,i}function on(t,e,n){let r=0;const i=[];for(const o of e)o.offset<r||(o.offset>r&&i.push(t.substring(r,o.offset)),i.push(...n(o)),r=o.offset+o.matchedText.length);return r<t.length&&i.push(t.substring(r)),i}function sn(t){try{return new URL(t).hostname}catch(t){return}}function an(t){return t.replace(/^\s*\n/m,"").replace(/\n\s*$/m,"")}function ln(t){return 13===t.keyCode&&!t.shiftKey}function cn(t,e,n){return Math.max(t,Math.min(e,n))}function un(t,e){return 0===t.localeCompare(e,void 0,{usage:"search",sensitivity:"base"})}function dn(t){return[...t.matchAll(/^|\s+/g)].map(t=>t.index+t[0].length).map(e=>t.substring(e))}const hn=["#996666","#9A6E61","#8D7662","#8E775E","#948771","#8A8360","#888D65","#6F8E63","#749378","#678975","#779E86","#639A8F","#6D92A1","#65869F","#697E9A","#736C9F","#8C6495","#956387","#B05D54","#B16D52","#AF8751","#AC8A56","#B7A458","#B5B35C","#83AA5D","#4F9D5D","#5FA777","#66B58F","#5FB3AC","#589AAF","#4E7F9E","#456CAC","#6456B7","#714AB2","#9771B5","#C154C1","#B05E81","#B04C6A","#B94E48","#AF593E","#C5994B","#B8C25D","#87AB39","#4FA83D","#40A860","#41AA78","#3AB09E","#3FC1AA","#56B4BE","#3EABBF","#4682B4","#7A58C1","#9966CC","#C54B8C","#B44668","#AE4560","#A3807B","#AB917A","#ACA586","#A8AF8E","#9EA587","#8BA690","#7DA98D","#7CB0A1","#8BA9A5","#7CA1A6","#859FAF","#8D90A1","#A397B4","#AE809E","#C08081","#BB8983","#B19461","#B5A27F","#B8B56A","#9AB973","#7AC488","#7CB7BB","#80B3C4","#788BBA","#7A89B8","#9678B6","#CB8FA9","#B57281","#C6726B","#C88A65","#C2955D","#C8B568","#B9C46A","#74C365","#6FD0C5","#6093D1","#7666C6","#D06DA1"];var fn=class extends Error{};function mn(t,e){if(!t)throw new fn(null!=e?e:"Assertion failed")}const En=Object.assign(mn,{is:function(t,e,n){return mn(e,n)},unreachable:function(){throw new Error("Unreachable code")},never:function(t){throw new Error("Unreachable")},defined:function(t){if(null==t)throw new fn("Value is not defined")}}),[_n,An]=Bn(),[gn,Sn]=Bn(),[vn,On]=Bn(),[Dn,Tn]=Bn(),[Rn,yn]=Bn(),[In,Cn]=Bn(),[Nn,bn]=Bn(),[wn,kn]=Bn(),[Ln,Pn]=Bn(),[xn,Fn]=Bn(),[Hn,Un]=Bn();function Bn(){const t=Y(void 0);return[t,()=>{const e=At(t);return En(void 0!==e),e}]}function jn(t,e=10){const n=At(Dn),[r,i]=ut([]);return ht(()=>{if(!t)return;const r=n.conversation(t).subscribeParticipants(t=>i(null!=t?t:[]));return e>10&&r.connected.then(async()=>{for(;"active"===r.state.type&&!r.state.loadedAll&&null!==r.state.latestSnapshot&&r.state.latestSnapshot.length<e;){const t=Math.min(e-r.state.latestSnapshot.length,50);await r.loadMore(t)}}),()=>{r.unsubscribe()}},[t,n,e]),r}Xe();var Vn=Object.prototype.hasOwnProperty;function zn(t){return Array.isArray(t)}function $n(t){return!(!t||"object"!=typeof t||t instanceof Date||zn(t))}function Yn(t){return $n(t)&&t.constructor===Object}function Gn(t){return"function"==typeof t}function Wn(t){const e=typeof t;return void 0!==t&&(Xn(t)||"object"!==e&&"function"!==e)}function Xn(t){return t instanceof Date}function Kn(t){return"boolean"==typeof t}function qn(t){return t instanceof Promise}function Jn(t){return t instanceof Map||t instanceof WeakMap}function Zn(t){return t instanceof Set||t instanceof WeakSet}function Qn(t){if(!t)return!1;if(zn(t))return 0===t.length;if(Jn(t)||Zn(t))return 0===t.size;for(const e in t)if(Vn.call(t,e))return!1;return!0}var tr=new Set(["boolean","string","number"]);function er(t){return!!t.parent}var nr=Symbol.toPrimitive,rr=Symbol.iterator,ir=Symbol("getNode"),or=Symbol("delete"),sr=Symbol("opaque"),ar=Symbol("plain"),lr=Symbol("optimized"),cr=Symbol("linked"),ur={pendingNodes:new Map,dirtyNodes:new Set};function dr(t){return t&&(t[sr]||t.$$typeof)}function hr(t){return t&&t[ar]}function pr(t){return zn(t)?"array":Jn(t)?"map":t instanceof Set?"set":"object"}function fr(t,e){return Jn(e)?{__LSType:"Map",value:Array.from(e.entries())}:e instanceof Set?{__LSType:"Set",value:Array.from(e)}:(ur.replacer&&(e=ur.replacer(t,e)),e)}var mr=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z$/;function Er(t,e){if(e){if("string"==typeof e&&mr.test(e))return new Date(e);if("object"==typeof e){if("Map"===e.__LSType)return new Map(e.value);if("Set"===e.__LSType)return new Set(e.value)}ur.reviver&&(e=ur.reviver(t,e))}return e}function _r(t){return t&&JSON.stringify(t,fr)}function Ar(t){return t&&JSON.parse(t,Er)}function gr(t){return Ar(_r(t))}function Sr(t){return!!t&&!!t[ir]}function vr(t){return t&&t[ir]}function Dr(t,e,n,r,i){return r?t.add(n):i?t.set(e,n):t[e]=n,n}function Rr(t,e){var n;const r=null!=(n=t.parent)?n:t,i=t.parent?t.key:"_",o=e===or;o&&(e=void 0);const s=t.parent?wr(r):r.root,a=Zn(s),l=Jn(s),c=a?i:l?s.get(i):s[i],d=Gn(e);if((e=r.isAssigning||!d||Gn(c)?e:e(c))!==c)try{r.isSetting=(r.isSetting||0)+1,o?l||a?s.delete(i):delete s[i]:Dr(s,i,e,a,l)}finally{r.isSetting--}return{prevValue:c,newValue:e,parentValue:s}}var yr=[];function Nr(t){let e=0,n=t;for(;er(n);)yr[e++]=n.key,n=n.parent;let r=t.root._;for(let t=e-1;r&&t>=0;t--){const e=yr[t];r="size"!==e&&Jn(r)?r.get(e):r[e]}return r}function br(t,e,n){var r,i;let o=null==(r=t.children)?void 0:r.get(e);return o||(o={root:t.root,parent:t,key:e,lazy:!0,numListenersRecursive:0},1===(null==(i=t.lazyFn)?void 0:i.length)&&(n=t.lazyFn.bind(t,e)),Gn(n)&&(o=Object.assign(()=>{},o),o.lazyFn=n),t.children||(t.children=new Map),t.children.set(e,o)),o}function wr(t){let e=Nr(t);if(!e||Gn(e))if(er(t)){const n=wr(t.parent),r=Zn(n),i=Jn(n);e=Dr(n,t.key,{},r,i)}else e=t.root._={};return e}function kr(t,e){var n,r;let i=Sr(t)?void 0:$n(t)?"id"in t?"id":"key"in t?"key":"_id"in t?"_id":"__id"in t?"__id":void 0:void 0;if(!i&&e.parent){const t=e.key+"_keyExtractor",o=null!=(r=null==(n=e.functions)?void 0:n.get(t))?r:Nr(e.parent)[e.key+"_keyExtractor"];o&&Gn(o)&&(i=o)}return i}function Lr(t,e,n){t.functions||(t.functions=new Map),t.functions.set(e,n)}function Mr(t,e){return t===e||Xn(t)&&Xn(e)&&+t==+e}function Pr(t,e,n,r){return e?void 0:t?r?Array.from(t):n?Array.from(t.keys()):Object.keys(t):[]}function xr(t,e){return t&&Object.defineProperty(t,e,{value:!0,enumerable:!1,writable:!0,configurable:!0}),t}var Fr=function(t){return xr(t,sr)};function Hr(t,e){var n;!t.isPlain&&(null!=(n=t.parent)&&n.isPlain||hr(e))&&(t.isPlain=!0)}function Ur(t,e,n,r){let i=t;return!Sr(i)&&Gn(i)&&(i=n?i(n):i()),Sr(i)&&!r?i.get(e):i}var Br=(t,e)=>t&&t[e];function jr(t,e,n,r,i,o,s){let a,l=t;if(e.length>0){let i=o;for(let o=0;o<e.length;o++){a=e[o];const c=Jn(l);let d=l?c?l.get(a):l[a]:void 0;const h=i?c?i.get(a):i[a]:void 0;if(d===or)return i&&(c?l.set(a,h):l[a]=h,null==s||s(e.slice(0,o+1),h)),t;if(void 0===d&&void 0===r&&o===e.length-1)return t;o<e.length-1&&null==d&&(d=$r(n[o]),Jn(l)?l.set(a,d):l[a]=d),o<e.length-1&&(l=d,i&&(i=h))}}return void 0===a?t="merge"===i?Gr(t,r):r:"merge"===i?l[a]=Gr(l[a],r):Jn(l)?l.set(a,r):l[a]=r,t}function Vr(t,e,n){let r=n;for(let n=0;n<t.length;n++){const i=t[n];r=r?r[i]:$r(e[n])}return r}function zr(t){return!(!t||($n(t)||zn(t))&&Qn(t))}function $r(t){switch(t){case"array":return[];case"map":return new Map;case"set":return new Set;default:return{}}}function Yr(t,e,n){const{path:r,valueAtPath:i,prevAtPath:o,pathTypes:s}=e;return jr(t,r,s,n?o:i)}function Gr(t,...e){if(Wn(t))return e[e.length-1];let n=zn(t)?[...t]:{...t};for(let t=0;t<e.length;t++){const r=e[t];if(Yn(r)||zn(r)){const t=r;for(const e in t)Vn.call(t,e)&&(t[e]instanceof Object&&!Sr(t[e])&&Object.keys(t[e]).length>0?n[e]=Gr(n[e]||(zn(t[e])?[]:{}),t[e]):n[e]=t[e])}else n=r}return n}var Wr,Xr=0,Kr=!1,qr=!1,Jr=new Map;function Zr(){Jr.size>0&&li(!0)}function Qr(t,e){for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function ti(t,e){try{return function(t,e,n){for(let r=0;r<e.length;r++)t=Yr(t,e[r],n);return t}(t?gr(t):{},e,!0)}catch(t){return}}function ei(t,e){return function(){return ti(t,e)}}function ni(t,e,n,r,i){const o=new Map;ri(o,t,!!ur.isLoadingLocal,!!ur.isLoadingRemote,e,[],[],e,n,!0,r,i);const s=Jr.get(t);s?s.prev===e?Jr.delete(t):s.value=e:Jr.set(t,{value:e,prev:n,level:r,whenOptimizedOnlyIf:i,isFromSync:!!ur.isLoadingRemote,isFromPersist:!!ur.isLoadingLocal}),o.size&&ii(o,!0),Xr<=0&&oi()}function ri(t,e,n,r,i,o,s,a,l,c,d,h){if(e.numListenersRecursive>0&&(function(t,e,n,r,i,o,s,a,l,c,d,h){if(c?e.listenersImmediate:e.listeners){const c={path:o,pathTypes:s,valueAtPath:a,prevAtPath:l},p=t.get(e);if(p&&o.length>0){const{changes:t}=p;Qr(t[0].path,c.path)||(t.push(c),p.level=Math.min(p.level,d),p.whenOptimizedOnlyIf||(p.whenOptimizedOnlyIf=h))}else t.set(e,{level:d,value:i,isFromSync:r,isFromPersist:n,whenOptimizedOnlyIf:h,changes:[c]})}}(t,e,n,r,i,o,s,a,l,c,d,h),e.linkedFromNodes))for(const i of e.linkedFromNodes)ri(t,ci(i,o),n,r,a,[],[],a,l,c,0,h);if(e.parent){const p=e.parent;p&&ri(t,p,n,r,Nr(p),[e.key].concat(o),[pr(i)].concat(s),a,l,c,d+1,h)}}function ii(t,e){const n=new Set;t.forEach(({changes:t,level:r,value:i,isFromPersist:o,isFromSync:s,whenOptimizedOnlyIf:a},l)=>{const c=e?l.listenersImmediate:l.listeners;if(c){let e;const l=Array.from(c);for(let c=0;c<l.length;c++){const{track:d,noArgs:h,listener:p}=l[c];n.has(p)||(!0===d?r<=0:d!==lr||a&&r<=0)&&(!h&&!e&&(e={value:i,isFromPersist:o,isFromSync:s,getPrevious:ei(i,t),changes:t}),d||n.add(p),p(e))}}})}function oi(){const t=Array.from(ur.dirtyNodes);ur.dirtyNodes.clear(),t.forEach(t=>{const e=t.dirtyFn;e&&(t.dirtyFn=void 0,e())});const e=Jr;Jr=new Map;const n=new Map;e.forEach(({value:t,prev:e,level:r,isFromPersist:i,isFromSync:o,whenOptimizedOnlyIf:s},a)=>{ri(n,a,i,o,t,[],[],t,e,!1,r,s)}),n.size&&ii(n,!1)}function si(t){ai();try{t()}finally{li()}}function ai(){Xr++,Wr||(Wr=setTimeout(Zr,0))}function li(t){(--Xr<=0||t)&&(Kr?qr=!0:(Wr&&(clearTimeout(Wr),Wr=void 0),Xr=0,Kr=!0,oi(),Kr=!1,qr&&(qr=!1,li(!0))))}function ci(t,e){let n=t;for(let t=0;t<e.length;t++){n=br(n,e[t])}return n}function ui(t,e,n,r,i){if(Sr(t))return t;const o=qn(t);let s={root:{_:t},lazy:!0,numListenersRecursive:0};Gn(t)&&(s=Object.assign(()=>{},s),s.lazyFn=t);const a=e||function(t){return tr.has(typeof t)}(t)?new i(s):r(s);return o&&(Rr(s,void 0),n(s,t)),a}var di=new WeakMap,hi=[],pi=[],fi=[],mi=0,Ei=!1;function vi(t,e,n){const r=di.get(t);if(!r||!r.has(n))return;const i=r.get(n);!i||0===i.size||(hi[mi]=t,pi[mi]=e,fi[mi]=n,mi++,Ei||(Ei=!0,queueMicrotask(Ri)))}var Oi={type:"listener-added",node:null,listener:void 0,timestamp:0};function Ri(){Ei=!1,Oi.timestamp="undefined"!=typeof performance?performance.now():Date.now();for(let t=0;t<mi;t++){const e=hi[t],n=pi[t],r=fi[t],i=di.get(e);if(!i)continue;const o=i.get(r);if(!o||0===o.size)continue;const s=e.listeners,a=e.listenersImmediate;if(!s&&!a&&e.numListenersRecursive&&("listener-added"!==r||n))continue;let l=!1;if("listener-added"===r)l=n?!(null==s||!s.has(n))||!(null==a||!a.has(n)):!(null!=s&&s.size||null!=a&&a.size||"number"!=typeof e.numListenersRecursive)&&e.numListenersRecursive>0;else if("listener-removed"===r)l=!(null!=s&&s.has(n)||null!=a&&a.has(n));else{const t=s&&s.size>0||a&&a.size>0;l="number"==typeof e.numListenersRecursive?!t&&0===e.numListenersRecursive:!t}if(l){Oi.type=r,Oi.node=e,Oi.listener=n;const t=Array.from(o);for(let e=0;e<t.length;e++)try{t[e](Oi)}catch(t){console.error(`Error in middleware handler for ${r}:`,t)}}}mi=0}function yi(t){var e,n;return!(null!=(e=t.listeners)&&e.size)&&!(null!=(n=t.listenersImmediate)&&n.size)&&function(t){var e;return(null==(e=t.activationState)?void 0:e.synced)||!1}(t)}function bi(t,e,n={},r){var i;const{initial:o,immediate:s,noArgs:a}=n,{trackingType:l}=n;let c=s?t.listenersImmediate:t.listeners;c||(c=new Set,s?t.listenersImmediate=c:t.listeners=c);const d={listener:e,track:l,noArgs:a};if(c.add(d),o){const n=Nr(t);e({value:n,isFromPersist:!0,isFromSync:!1,changes:[{path:[],pathTypes:[],prevAtPath:n,valueAtPath:n}],getPrevious:()=>{}})}let h;function p(i,o=e,s){if(null==r||!r.has(i)){r||(r=new Set),r.add(s||t),o||(o=e);const a={trackingType:!0,...n};h=[...h||[],bi(i,o,a,r)]}}t.linkedToNode&&p(t.linkedToNode),null==(i=t.linkedFromNodes)||i.forEach(t=>p(t)),t.numListenersRecursive++;let f=t.parent,m=[t.key];for(;f;){if(f.linkedFromNodes)for(const t of f.linkedFromNodes)null!=r&&r.has(t)||p(t,wi(t,m,e),f);f.numListenersRecursive++,yi(f)&&vi(f,void 0,"listener-added"),m=[f.key,...m],f=f.parent}return vi(t,d,"listener-added"),()=>{c.delete(d),null==h||h.forEach(t=>t());const e=[];let n=t;for(;n;)n.numListenersRecursive--,0===n.numListenersRecursive&&e.push(n),n=n.parent;vi(t,d,"listener-removed"),0===c.size&&vi(t,void 0,"listeners-cleared");for(const n of e)n!==t&&yi(n)&&vi(n,void 0,"listeners-cleared")}}function wi(t,e,n){let r=Vr(e,[],Nr(t));return function({value:t,isFromPersist:i,isFromSync:o}){const s=Vr(e,[],t);s!==r&&n({value:s,isFromPersist:i,isFromSync:o,changes:[{path:[],pathTypes:[],prevAtPath:r,valueAtPath:s}],getPrevious:()=>r}),r=s}}function ki(t,e,n,r){let i=[];return null==t||t.forEach(t=>{const{node:o,track:s}=t;i.push(bi(o,e,{trackingType:s,immediate:r,noArgs:n}))}),()=>{if(i){for(let t=0;t<i.length;t++)i[t]();i=void 0}}}var Li=0,Mi=[],Pi={current:void 0};function xi(t,e){if(Li){const n=Pi.current;if(n){n.nodes||(n.nodes=new Map);const r=n.nodes.get(t);r?(r.track=r.track||e,r.num++):n.nodes.set(t,{node:t,track:e,num:1})}}}function Fi(t,e,n,r,i,o){let s,a,l=e;Mi.push(Pi.current),Li++,Pi.current={};const c=t&&Ur(t,n,r,null==i?void 0:i.fromComputed),d=Pi.current.nodes;return--Li<0&&(Li=0),Pi.current=Mi.pop(),null!=r&&r.cancel||(s=ki(d,l,!1,null==i?void 0:i.immediate),a=o?()=>(null==s||s(),s=ki(d,l),s):void 0),{nodes:d,value:c,dispose:s,resubscribe:a}}function Hi(t,e,n){let r;Gn(e)?r=e:n=e;let i,o=!1;const s={num:0},a=function(){if(o)return;s.onCleanup&&(s.onCleanup(),s.onCleanup=void 0),o=!0,ai(),delete s.value,null==i||i();const{dispose:e,value:l,nodes:c}=Fi(t,a,void 0,s,n);i=e,s.value=l,s.nodes=c,s.refresh=a,s.onCleanupReaction&&(s.onCleanupReaction(),s.onCleanupReaction=void 0),li(),o=!1,r&&(null!=n&&n.fromComputed||(s.num>0||!function(t){var e;return t&&(null==(e=t[ir])?void 0:e.isEvent)}(t))&&(s.previous!==s.value||"object"==typeof s.value))&&r(s),s.previous=s.value,s.num++};return a(),()=>{var t,e;null==(t=s.onCleanup)||t.call(s),s.onCleanup=void 0,null==(e=s.onCleanupReaction)||e.call(s),s.onCleanupReaction=void 0,null==i||i()}}function Ui(t,e){const n=so(t);if(null==n||Wn(n))return n;const r="string"===e?Gn(n.toString)?n.toString:n.valueOf:Gn(n.valueOf)?n.valueOf:n.toString;return Gn(r)?r.call(n):n}function Bi(t,e,n){if(qn(t))return e?t.then(e):t;const r=zn(t);let i,o;return Hi(function(e){const o=r?t.map(t=>Ur(t)):Ur(t);if(!qn(o)){{let t=!0;if(zn(o))for(let e=0;e<o.length;e++){let r=o[e];Sr(r)?r=Ur(r):Gn(r)&&(r=r()),t=t&&!!(n?zr(r):r)}else t=n?zr(o):o;t&&(i=o,e.cancel=!0)}return i}i=o},function(){o=null==e?void 0:e(i)}),qn(i)?e?i.then(e):i:void 0!==i?e?o:Promise.resolve(i):new Promise(t=>{if(e){const n=e;e=e=>{const r=n(e);t(qn(r)?r.then(t=>t):r)}}else e=t})}function ji(t,e){return Bi(t,e,!1)}var Vi=new Set(["copyWithin","fill","from","pop","push","reverse","shift","sort","splice","unshift"]),zi=new Set(["every","filter","find","findIndex","flatMap","forEach","join","map","reduce","some"]),$i=new Set(["filter","find"]),Yi=new Map,Gi=new Map([["get",oo],["set",Qi],["peek",so],["onChange",bi],["assign",function(t,e){const n=qi(t);if(ai(),Wn(t.root._)&&(t.root._={}),Jn(e)){const n=Nr(t);Jn(n)?e.forEach((t,e)=>n.set(e,t)):Qi(t,e)}else{t.isAssigning=(t.isAssigning||0)+1;try{Object.assign(n,e)}finally{t.isAssigning--}}return li(),n}],["delete",eo],["toggle",function(t){const e=Nr(t);(null==e||Kn(e))&&Qi(t,!e)}]]);function Wi(t,e,n,...r){var i;if("push"!==n||1!==r.length){const o=e.slice(),s=e[n].apply(e,r);if(t){const n=er(t),r=n?t.key:"_";(n?Nr(t.parent):t.root)[r]=o,to(null!=(i=t.parent)?i:t,r,e)}return s}to(t,e.length+"",r[0])}function Xi(t,e,n){var r,i,o;if($n(e)&&dr(e)||$n(n)&&dr(n)){const r=e!==n;return r&&(t.listeners||t.listenersImmediate)&&ni(t,e,n,0),r}const s=zn(e);let a,l;const c=Jn(e),d=Zn(e),h=Jn(n),p=Zn(n),f=Pr(e,s,c,d),m=Pr(n,s,h,p),E=(null==(r=f||e)?void 0:r.length)||0,_=(null==(i=m||n)?void 0:i.length)||0;let A,g,S,v=!1;if(s&&zn(n)){if(n.length>0){const r=n[0];if(void 0!==r&&(A=kr(r,t),A&&(g=Gn(A),a=new Map,l=[]),t.children))for(let r=0;r<n.length;r++){const i=n[r];if(i){const n=t.children.get(r+"");if(n&&(e[r]||Ki(n,i),A)){const t=g?A(i):i[A];a.set(t,n)}}}}}else if(n&&(!e||$n(e))){const e=m.length;for(let r=0;r<e;r++){const e=m[r];if(!f.includes(e)){v=!0;const r=br(t,e),i=h?n.get(e):n[e];void 0!==i&&Ki(r,i)}}}if(e&&!Wn(e)){v=v||E!==_;const r=v;let i=!1;for(let d=0;d<E;d++){const p=s?d+"":f[d];let m=c?e.get(p):e[p];const E=h?null==n?void 0:n.get(p):null==n?void 0:n[p];let _=!Mr(m,E);if(_){const d=A&&m?g?A(m):m[A]:void 0,h=null==(o=t.children)?void 0:o.get(p);if(Sr(m)){const t=vr(m);if((null==h?void 0:h.linkedToNode)===t){const n=Nr(t);c?e.set(p,n):e[p]=n;continue}const n=m;m=()=>n}let f=br(t,p,m);if(!f.lazy&&(Gn(m)||Sr(m))&&(uo(f,m),lo(f)),s&&void 0!==d){const e=void 0!==d?null==a?void 0:a.get(d):void 0;if(e){if(void 0!==e&&e.key!==p){const o=n[e.key];r&&(f=e,t.children.delete(f.key),f.key=p,l.push([p,f])),i=!0,_=o!==m}}else v=!0}if(_)if(Gn(m)||Sr(m))io(t,p,m);else if(Wn(m))v=!0;else{const t=Xi(f,m,E);v=v||t,_=t}(_||s&&!r)&&(f.listeners||f.listenersImmediate)&&ni(f,m,E,0,!r)}}if(l)for(let e=0;e<l.length;e++){const[n,r]=l[e];t.children.set(n,r)}S=v||i}else void 0!==n&&(S=!0);return null!=S&&S}function Ki(t,e){var n,r;null==(n=t.linkedToNodeDispose)||n.call(t),null==(r=t.activatedObserveDispose)||r.call(t),Wn(e)||Xi(t,void 0,e),(t.listeners||t.listenersImmediate)&&ni(t,void 0,e,0)}function qi(t,e,n){return void 0!==e&&(t=br(t,e,n)),t.proxy||(t.proxy=new Proxy(t,Zi))}function Ji(){if(ur.pendingNodes.size>0){const t=Array.from(ur.pendingNodes.values());ur.pendingNodes.clear(),t.forEach(t=>t())}}var Zi={get(t,e,n){var r,i,o;if(e===nr)return e=>Ui(t,e);if(e===ir)return t;if("apply"===e||"call"===e){const n=Nr(t);if(Gn(n))return n[e]}if("constructor"===e){const e=null==(r=lo(t))?void 0:r.constructor;return"function"==typeof e?e:Object}let s=lo(t,"get"===e||"peek"===e);if(e===rr)return!s||Wn(s)?void 0:s[e];const a=t.linkedToNode||(null==s?void 0:s[ir]);if(a&&"onChange"!==e)return Zi.get(a,e,n);if(Jn(s)||Zn(s)){const n=function(t,e,n){const r=null==n?void 0:n[e];if("size"===e)return xi(t,!0),n[e];if(Gn(r))return function(r,i,o){const s=arguments.length,a=n;if("get"===e){if(s>0&&"boolean"!=typeof r&&r!==lr)return qi(t,r)}else{if("set"===e)return 2===s?Qi(br(t,r),i):1===s&&Jn(n)&&Qi(t,r),qi(t);if("delete"===e){if(s>0){const e=n.get?a.get(r):r;return eo(t,r),void 0!==e}}else{if("clear"===e){const e=Zn(a)?new Set(a):new Map(a),r=a.size;return a.clear(),void(r&&no(t,n,e))}if("add"===e){const i=new Set(n),o=n.add(r);return n.has(e)||ni(t,o,i,0),qi(t)}}}const l=Gi.get(e);if(!l)return n[e](r,i);switch(s){case 0:return l(t);case 1:return l(t,r);case 2:return l(t,r,i);default:return l(t,r,i,o)}}}(t,e,s);if(void 0!==n)return n}const l=Gi.get(e);if(l)return("get"===e||"peek"===e)&&Ji(),function(e,n,r){switch(arguments.length){case 0:return l(t);case 1:return l(t,e);case 2:return l(t,e,n);default:return l(t,e,n,r)}};const c=Yi.get(e);if(c)return c.get(t);let d=null==s?void 0:s[e];if($n(s)&&dr(s))return d;const h=null==(i=t.functions)?void 0:i.get(e);if(h)return Sr(h)?h:qi(t,e,h);if(d=function(t,e){if(t){const n=Object.getOwnPropertyDescriptor(t,e);return null!=n&&n.get&&(delete t[e],t[e]=n.set?function(t,e){Gn(t)&&(t={get:t}),e&&(t={...t,...e});const n=function(){return{[cr]:t}};return n.prototype[cr]=t,n}({get:n.get,set:({value:t})=>n.set(t)}):n.get),t[e]}}(s,e),function(t){return null==t}(s)&&void 0===d&&(Vi.has(e)||zi.has(e))&&(s=[],Vi.has(e)&&Rr(t,s),d=s[e]),Gn(d)){if(zn(s)){if(Vi.has(e))return(...n)=>Wi(t,s,e,...n);if(zi.has(e))return xi(t,!0),function(n,r){const i="reduce"===e,o=i?(e,r,i,o)=>n(e,qi(t,i+"",r),i,o):(e,r,i)=>n(qi(t,r+"",e),r,i);if(i||!$i.has(e))return s[e](o,r);const a="find"===e,l=[];for(let e=0;e<s.length;e++)if(o(s[e],e,s)){const n=qi(t,e+"");if(a)return n;l.push(n)}return a?void 0:l}}io(t,e,d);const n=null==(o=t.functions)?void 0:o.get(e);return n?qi(t,e,n):d.bind(s)}return Wn(d)&&"length"===e&&zn(s)?(xi(t,!0),d):qi(t,e)},getPrototypeOf(t){const e=Nr(t);return null!==e&&"object"==typeof e?Reflect.getPrototypeOf(e):null},ownKeys(t){lo(t);const e=oo(t,!0);if(Wn(e))return[];const n=e?Reflect.ownKeys(e):[];if(zn(e)&&"length"===n[n.length-1]&&n.splice(n.length-1,1),Gn(t)){const e=Reflect.ownKeys(t);["caller","arguments","prototype"].forEach(t=>e.includes(t)&&n.push(t))}return n},getOwnPropertyDescriptor(t,e){if("caller"===e||"arguments"===e||"prototype"===e)return{configurable:!1,enumerable:!1};const n=Nr(t);if(Wn(n))return;const r=Reflect.getOwnPropertyDescriptor(n,e);return r?{...r,configurable:!0}:void 0},set(t,e,n){if(t.isSetting)return Reflect.set(t,e,n);if(t.isAssigning)return to(t,e,n),!0;const r=Yi.get(e);return!!r&&(r.set(t,n),!0)},deleteProperty:(t,e)=>!!t.isSetting&&Reflect.deleteProperty(t,e),has(t,e){const n=Nr(t);return null!=n&&(("object"==typeof n||"function"==typeof n)&&Reflect.has(n,e))},apply(t,e,n){Sr(e)&&(e=e.peek());const r=Nr(t),i=Gn(r)?r:t.lazyFn||t;return Reflect.apply(i,e,n)}};function Qi(t,e){t.parent?to(t.parent,t.key,e):to(t,"_",e)}function to(t,e,n,r){const i=!t.parent&&"_"===e;t.parent&&!Nr(t)&&!Gn(n)&&Qi(t,{[e]:n});const o=i?t:br(t,e,n);if(Hr(o,n),Sr(n))po(o,n);else{const{newValue:s,prevValue:a,parentValue:l}=Rr(o,n),c=Wn(a)||a instanceof Date||Wn(s)||s instanceof Date;if(!c){let t=o;do{t.needsExtract=!0,t.recursivelyAutoActivated=!1}while(t=t.parent)}const d=!Mr(s,a),h=!d&&o.isComputing&&!c&&!o.isPlain;(d||h)&&!(o.isComputing&&o.isPlain&&0===t.numListenersRecursive)&&no(t,s,a,o,l,c,i,r,h),io(t,e,s)}}function eo(t,e){void 0===e&&er(t)&&(e=t.key,t=t.parent);const n=Nr(t);zn(n)?Wi(t,n,"splice",e,1):to(t,null!=e?e:"_",or,-1)}function no(t,e,n,r,i,o,s,a,l){r||(r=t),ai(),void 0===o&&(o=Wn(e));let c,d,h=l||o,p=!1;(!o||n&&!Wn(n))&&(h=h||Xi(r,e,n),zn(e)?c=e:(Jn(e)||Zn(e))&&(d=e)),zn(i)?c=i:(Jn(i)||Zn(i))&&(d=i),c?p=(null==c?void 0:c.length)!==(null==n?void 0:n.length):d&&(p=(null==d?void 0:d.size)!==(null==n?void 0:n.size)),(o||!e||Qn(e)&&!Qn(n)?e!==n:h)&&ni(o&&s?t:r,e,n,(null!=a?a:void 0===n)?-1:h?0:1,p),li()}function ro(t,e,n){const r=t.numGets=(t.numGets||0)+1;t.state||(t.state=ui({isLoaded:!1},!1,ro,qi)),e.then(e=>{r>=(t.getNumResolved||0)&&(t.getNumResolved=t.numGets,n?n({value:e}):Qi(t,e),t.state.assign({isLoaded:!0,error:void 0}))}).catch(e=>{t.state.error.set(e)})}function io(t,e,n){if(qn(n)){const r=br(t,e);return ro(r,n),void Rr(r,void 0)}if(Sr(n)){const r=()=>n;Lr(t,e,r);const i=br(t,e,r),o=so(vr(n));return po(i,n),Rr(i,o),Nr(i)}if("function"==typeof n)return Lr(t,e,n),e}function oo(t,e){return xi(t,e?$n(e)?e.shallow:e:void 0),so(t)}function so(t){return lo(t,!0)}var ao=!1;function lo(t,e){var n;if(ao=!0,e&&null!=(n=t.dirtyChildren)&&n.size){const e=Array.from(t.dirtyChildren);t.dirtyChildren.clear(),e.forEach(t=>t.dirtyFn&&lo(t))}if(t.dirtyFn){const e=t.dirtyFn;t.dirtyFn=void 0,ur.dirtyNodes.delete(t),e()}ao=!1;let r=Nr(t);return!t.root.isLoadingLocal&&!t.isPlain&&(r=function(t,e,n){const r=e,i=t.lazy;if(i){const n=t.lazyFn;if(delete t.lazy,Gn(n))if(1===n.length)e={};else{if(t.parent){const n=Nr(t.parent);Gn(e)&&(n?delete n[t.key]:t.root._=void 0)}e=function(t,e){let n,r,i,o=!0;const s=e;let a,l,c=[];function d(){t.dirtyFn=l,ur.dirtyNodes.add(t)}const h=Hi(()=>{var e,c,d,h;if(o)o=!1,Gn(Nr(t))&&Rr(t,void 0);else if(!ao&&l&&function(t,e){if(!ao&&!function(t){var e,n;let r=t,i=t.numListenersRecursive>0;for(;r&&!i;)(null!=(e=r.listeners)&&e.size||null!=(n=r.listenersImmediate)&&n.size)&&(i=!0),r=r.parent;return i}(t)){e&&(t.dirtyFn=e);let n=t;for(;n;)n.dirtyChildren||(n.dirtyChildren=new Set),n.dirtyChildren.add(t),n=n.parent;return!0}}(t,l))return void(i=!0);let p=s(),f=!1;const m=Sr(p);(m||t.linkedToNode)&&(f=m,p=po(t,p)),Gn(p)&&0===p.length&&(p=p());const E=m||null==p?void 0:p[cr];if(E&&(t.activationState=E,p=void 0),i=!1,r=qn(p),t.activated){if(t.activationState){const n=t.activationState;null!=(c=null==(e=t.state)?void 0:e.peek())&&c.sync?(t.state.sync(),i=!0):p=null!=(h=null==(d=n.get)?void 0:d.call(n))?h:n.initial}}else{t.activated=!0;let e=ho;null!=E&&E.synced&&(e=ur.activateSyncedNode,i=!0);const r=e(t,p);n=r.update;let o=r.value;!f&&Sr(o)&&(o=po(t,o)),p=null!=o?o:null==E?void 0:E.initial}return i&&(a=p),r=r||qn(p),p},e=>{const{value:o,nodes:s,refresh:h}=e;if(l=h,!i){if(!r||!ur.isLoadingRemote)if(r)if(t.activationState){const{initial:e}=t.activationState;o&&qn(o)&&ro(t,o,n),Gn(Nr(t))&&Rr(t,null!=e?e:void 0)}else t.activated&&(ro(t,o,n),Gn(Nr(t))&&Rr(t,void 0));else{a=o;const e=t.state.isLoaded.peek();(e||!Gn(o))&&(t.isComputing=!0,Qi(t,o),t.isComputing=!1),e||t.state.assign({isLoaded:!0,error:void 0})}c.forEach(t=>t()),c=[],null==s||s.forEach(({node:t,track:e})=>{c.push(bi(t,d,{immediate:!0,trackingType:e}))})}e.cancel=!0},{fromComputed:!0});return t.activatedObserveDispose=()=>{null==h||h(),c.forEach(t=>t())},a}(t,n)}else Sr(e)&&(e=io(t.parent,t.key,e))}return Hr(t,e),(i||t.needsExtract)&&!t.isPlain&&!Sr(e)&&!Wn(e)&&(n&&function(t,e){if(!e.recursivelyAutoActivated&&($n(t)||zn(t))&&!dr(t)){e.recursivelyAutoActivated=!0;const n=[];fo(t,n,()=>{var t;let r=e;for(let e=0;e<n.length;e++){const i=n[e],o=null==(t=Nr(r))?void 0:t[i];r=br(r,i,Gn(o)?o:void 0),lo(r)}return r})}}(e,t),t.parent&&io(t.parent,t.key,r)),e}(t,r,!!e)),r}function co(t){var e,n;null==(e=t.activatedObserveDispose)||e.call(t),null==(n=t.linkedToNodeDispose)||n.call(t),t.activatedObserveDispose=t.linkedToNodeDispose=t.linkedToNode=void 0}function uo(t,e){co(t),t.lazyFn=e,t.lazy=!0}function ho(t,e){if(t.state||(t.state=ui({isLoaded:!1},!1,ro,qi)),t.activationState){const{set:n,get:r,initial:i}=t.activationState;if((null==(e=null==r?void 0:r())||null===e)&&(e=i),n){let e,r=[],i=0;const o=o=>{if(r.length>0){let s,a,l,c=!1,d=!1;o?(s=o.changes,a=o.value,c=o.isFromPersist,d=o.isFromSync,l=o.getPrevious):(s=r,a=e,l=ei(a,s)),r=[],e=void 0,ur.pendingNodes.delete(t),i++;const h=i,p=()=>{h===i&&(t.isComputing=!0,n({value:a,changes:s,isFromPersist:c,isFromSync:d,getPrevious:l}),t.isComputing=!1)};!function(t,e){Bi(t,e,!0)}(t.state.isLoaded,p)}};bi(t,({value:n,changes:i})=>{t.isComputing||(i.length>1||!Gn(i[0].prevAtPath))&&(e=n,r.length>0&&(i=i.filter(t=>!Qr(r[0].path,t.path))),r.push(...i),ur.pendingNodes.set(t,o))},{immediate:!0}),bi(t,o)}}return{update:({value:e})=>{t.isComputing||(t.isComputing=!0,Qi(t,e),t.isComputing=!1)},value:e}}function po(t,e){var n;const r=e?vr(e):void 0;return r!==t&&(null==r?void 0:r.linkedToNode)!==t&&(t.linkedToNode=r,null==(n=t.linkedToNodeDispose)||n.call(t),r&&(r.linkedFromNodes||(r.linkedFromNodes=new Set),r.linkedFromNodes.add(t),t.linkedToNodeDispose=bi(r,()=>{Gn(e=lo(r))||Qi(t,e)},{initial:!0},new Set([t])))),e}function fo(t,e,n){var r;if(($n(t)||zn(t))&&!dr(t)&&!hr(t))for(const i in t)if(Vn.call(t,i)){const o=t[i];if(Sr(o)){const t=n();io(t,i,o),delete t.lazy}else{const t=Gn(o)&&(null==(r=o.prototype)?void 0:r[cr]);if(t){const e=t.activate;(!e||"auto"===e)&&so(br(n(),i,o))}}"object"==typeof o&&(e.push(i),fo(o,e,n),e.pop())}}var mo=["get","set","peek","onChange","toggle"];function Eo(t){this._node=t;for(let t=0;t<mo.length;t++){const e=mo[t];this[e]=this[e].bind(this)}}function _o(t,e){Eo.prototype[t]=function(...t){return e.call(this,this._node,...t)}}function Ao(t){return ui(t,!1,ro,qi,Eo)}_o("peek",t=>(Ji(),so(t))),_o("get",(t,e)=>(Ji(),oo(t,e))),_o("set",Qi),_o("onChange",bi),Object.defineProperty(Eo.prototype,ir,{configurable:!0,get(){return this._node}}),Object.defineProperty(Eo.prototype,nr,{configurable:!0,value(t){return Ui(this._node,t)}}),Eo.prototype.toggle=function(){const t=this.peek();(null==t||Kn(t))&&this.set(!t)},Eo.prototype.delete=function(){return this.set(void 0),this};var go={createPreviousHandler:ei,clone:gr,deactivateNode:co,deepMerge:Gr,ensureNodeValue:wr,findIDKey:kr,get:oo,getChildNode:br,getKeys:Pr,getNode:vr,getNodeValue:Nr,getPathType:pr,getProxy:qi,getValueAtPath:function(t,e){return e.reduce(Br,t)},globalState:ur,initializePathType:$r,ObservablePrimitiveClass:Eo,observableProperties:Yi,observableFns:Gi,optimized:lr,peek:so,reactivateNode:uo,registerMiddleware:function(t,e,n){let r=di.get(t);r||(r=new Map,di.set(t,r));let i=r.get(e);return i||(i=new Set,r.set(e,i)),i.add(n),()=>{const r=di.get(t);if(!r)return;const i=r.get(e);i&&(i.delete(n),0===i.size&&(r.delete(e),0===r.size&&di.delete(t)))}},safeParse:Ar,safeStringify:_r,set:Qi,setAtPath:jr,setNodeValue:Rr,symbolLinked:cr,symbolDelete:or,tracking:Pi},So=l(t=>{var e=(Xe(),p(zt));var n="function"==typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t==1/e)||t!=t&&e!=e},r=e.useState,i=e.useEffect,o=e.useLayoutEffect,s=e.useDebugValue;function a(t){var e=t.getSnapshot;t=t.value;try{var r=e();return!n(t,r)}catch(t){return!0}}var l="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(t,e){return e()}:function(t,e){var n=e(),l=r({inst:{value:n,getSnapshot:e}}),c=l[0].inst,d=l[1];return o(function(){c.value=n,c.getSnapshot=e,a(c)&&d({inst:c})},[t,n,e]),i(function(){return a(c)&&d({inst:c}),t(function(){a(c)&&d({inst:c})})},[t]),s(n),n};t.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:l}),vo=l((t,e)=>{e.exports=So()})(),Oo=!1;Xe();var Do={inObserver:!1},To=void 0;function Ro(t){const e=ji(t);if(!We.use)throw e;We.use(e)}function yo(t,e){let n;if(Do.inObserver&&Sr(t)&&(null==e||!e.suspense))return n=Ur(t,e),null!=e&&e.suspense&&void 0===n&&Ro(t),n;try{const r=At(To||(To=Y(null))),{subscribe:i,getVersion:o,run:s}=Et(()=>function(t,e){let n,r,i,o,s,a,l=0;const c=()=>{null==r||r();const{value:e,dispose:n,resubscribe:s}=Fi(o,d,t,void 0,void 0,!0);return r=n,i=s,e},d=({value:r})=>{if(null!=e&&e.peek()){const t=a;a=r,void 0===t&&ji(()=>!e.get(),()=>{const t=a;a=void 0,d({value:t})})}else{let e=null==t?void 0:t.skipCheck;if(!e){const t=c();(t!==s||!Wn(t)&&t===r)&&(e=!0)}e&&(l++,null==n||n())}};return{subscribe:t=>(n=t,!r&&i&&(r=i()),()=>{null==r||r(),r=void 0}),getVersion:()=>l,run:t=>(o=t,s=c())}}(e,r),[]);n=s(t),(0,vo.useSyncExternalStore)(i,o,o)}catch(t){throw t}return null!=e&&e.suspense&&void 0===n&&Ro(t),n}var Io="function"==typeof Symbol&&Symbol.for;function Co(t,e,n,r,i){const o=Io?Symbol.for("react.forward_ref"):Qt(t=>null).$$typeof,s=Io?Symbol.for("react.memo"):Zt(t=>null).$$typeof;if(t.__legend_proxied)return t;let a=!1,l=!1,c=t;s&&c.$$typeof===s&&c.type&&(l=!0,c=c.type),o&&c.$$typeof===o&&(a=!0,c=c.render);const d=r?new Set(r):void 0,h=new Proxy(c,{apply(t,r,o){if(n){const t=o[0],e={},n=Object.keys(t);for(let r=0;r<n.length;r++){const o=n[r],s=t[o],a=d&&d.has(o);if("children"===o&&(Gn(s)||Sr(s)))e[o]=yo(s,{skipCheck:!0});else if(a||o.startsWith("$")||o.endsWith("$")){const n=a?o:o.endsWith("$")?o.slice(0,-1):o.slice(1),r=null==i?void 0:i[n],l=r&&Sr(s);if(e[n]=l&&null!=r&&r.selector?r.selector(e,s):yo(s),l&&(void 0!==r.defaultValue&&void 0===e[n]&&(e[n]=r.defaultValue),r.handler&&r.getValue)){const n=e=>{var n;s.set(r.getValue(e)),null==(n=t[r.handler])||n.call(t,e)};e[r.handler]=_t(n,[t[r.handler],i])}a||delete e[o]}else void 0===e[o]&&(e[o]=s)}o[0]=e}return e?yo(()=>{Do.inObserver=!0;try{return Reflect.apply(t,r,o)}finally{Do.inObserver=!1}},{skipCheck:!0}):Reflect.apply(t,r,o)}});let p;return a?(p=Qt(h),p.__legend_proxied=!0):p=h,e||l?Zt(p):p}var{findIDKey:No,getNode:bo,optimized:wo}=go,ko=new Map;function Lo({each:t,optimized:e,item:n,itemProps:r,sortValues:i,children:o}){var s;if(!t)return null;const a=yo(()=>t.get(!e||wo));if(!n&&o){const t=ft(void 0);t.current=o,n=Et(()=>function(t){return Co(t,!0)}(({item$:e,id:n})=>t.current(e,n)),[])}else if(n.$$typeof!==Symbol.for("react.memo")){let t=ko.get(n);t||(t=Zt(n),ko.set(n,t)),n=t}if(!a)return null;const l=[];if(zn(a)){const e=a[0],i=bo(t),o=a.length,c=o>0?i&&No(e,i)||(void 0!==e.id?"id":void 0!==e.key?"key":void 0):void 0,d=Gn(c);for(let e=0;e<o;e++)if(a[e]){const i=a[e],o=null!=(s=d?c(i):i[c])?s:e,h=t[e],p={key:o,id:o,item$:h,item:h};l.push(g(n,r?Object.assign(p,r):p))}}else{const e=Jn(a),o=e?Array.from(a.keys()):Object.keys(a);i&&o.sort((t,n)=>i(e?a.get(t):a[t],e?a.get(n):a[n],t,n));for(let i=0;i<o.length;i++){const s=o[i];if(e?a.get(s):a[s]){const i=e?t.get(s):t[s],o={key:s,id:s,item$:i,item:i};l.push(g(n,r?Object.assign(o,r):o))}}}return l}Zt(function({children:t}){return yo(()=>Ur(Ur(t)),{skipCheck:!0})},(t,e)=>!e.scoped||t.children===e.children);var Mo=new Map,Po=new Map;new Proxy({},{get(t,e){if(!t[e]){const n=Mo.get(e)||e;t[e]=function(t,e,n){return Co(t,!1,!0,e,n)}(Qt((t,e)=>{const r={...t};return e&&(Gn(e)||!Qn(e))&&(r.ref=e),g(n,r)}),[],Po.get(e))}return t[e]}});function xo({if:t,ifReady:e,else:n,$value:r,wrap:i,children:o}){const s=yo(null!=t?t:e),a=yo((void 0!==e?zr(s):s)?Gn(o)?()=>o(r?r.get():s):o:null!=n?n:null,{skipCheck:!0});return i?g(i,void 0,a):a}(function(t){if(Oo)return;Oo=!0;const e={value:{handler:"onChange",getValue:t=>t.target.value,defaultValue:""}};t({binders:{input:Object.assign({checked:{handler:"onChange",getValue:t=>t.target.checked}},e),textarea:e,select:e}})})(function({components:t,binders:e}){if(t)for(const e in t)Mo.set(e,t[e]);if(e)for(const t in e)Po.set(t,e[t])});function Fo(t){return((t,e)=>{{const n=ft({num:0});ht(()=>{var e;const{current:r}=n;r.num++;const i=()=>{r.dispose&&r.num<2&&(r.dispose(),r.dispose=void 0),r.num--};if(void 0!==r.dispose)return i;{const n=null!=(e=t())?e:null;if(n&&Gn(n))return r.dispose=n,()=>queueMicrotask(i)}},e)}})(()=>{const e=t();if(!qn(e))return e},[])}var Ho=Fo;function Uo(t){return Fo(()=>t)}var Bo=Uo,{deactivateNode:jo}=go;function Vo(t,e){var n;const r=ft({});r.current.value=t;const i=e?Vo(e):void 0;if(null==(n=r.current)||!n.obs$){const e=i?Gn(t)&&1===t.length?t=>(i.get(),r.current.value(t)):()=>(i.get(),Ur(r.current.value)):t;r.current.obs$=Ao(e)}return i&&i.set(e),Uo(()=>{const t=r.current.obs$;t&&jo(vr(t))}),r.current.obs$}function zo(t,e,n,r){let i;Gn(e)?i=e:Array.isArray(e)?(r=e,n=void 0):n=e,i&&Array.isArray(n)&&(r=n,n=void 0);const o=(r=r||(null==n?void 0:n.deps))?Vo(r):void 0,s=ft({});return s.current.selector=t,s.current.reaction=i,o&&o.set(r),s.current.dispose||(s.current.dispose=Hi(t=>{var e;return null==o||o.get(),Ur(null==(e=s.current)?void 0:e.selector,void 0,t)},t=>{var e,n;return null==(n=(e=s.current).reaction)?void 0:n.call(e,t)},n)),Bo(()=>{var t,e;null==(e=null==(t=s.current)?void 0:t.dispose)||e.call(t)}),s.current.dispose}function $o(t,e,n,r){let i;Gn(e)?i=e:Array.isArray(e)?(r=e,n=void 0):n=e,i&&Array.isArray(n)&&(r=n,n=void 0),r=r||(null==n?void 0:n.deps);const o=ft({}),s=r?Vo(r):void 0;o.current.selector=t,o.current.reaction=i,s&&s.set(r),Ho(()=>Hi(t=>{var e;return null==s||s.get(),Ur(null==(e=o.current)?void 0:e.selector,void 0,t)},t=>{var e,n;return null==(n=(e=o.current).reaction)?void 0:n.call(e,t)},n))}function Yo(t,e,n,r){return new(n||(n=Promise))(function(i,o){function s(t){try{l(r.next(t))}catch(t){o(t)}}function a(t){try{l(r.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(s,a)}l((r=r.apply(t,e||[])).next())})}var Go=class{constructor(){this.listeners={}}on(t,e,n){if(this.listeners[t]||(this.listeners[t]=new Set),null==n?void 0:n.once){const n=(...r)=>{this.un(t,n),e(...r)};return this.listeners[t].add(n),()=>this.un(t,n)}return this.listeners[t].add(e),()=>this.un(t,e)}un(t,e){var n;null===(n=this.listeners[t])||void 0===n||n.delete(e)}once(t,e){return this.on(t,e,{once:!0})}unAll(){this.listeners={}}emit(t,...e){this.listeners[t]&&this.listeners[t].forEach(t=>t(...e))}};const Wo={decode:function(t,e){return Yo(this,void 0,void 0,function*(){const n=new AudioContext({sampleRate:e});try{return yield n.decodeAudioData(t)}finally{n.close()}})},createBuffer:function(t,e){if(!t||0===t.length)throw new Error("channelData must be a non-empty array");if(e<=0)throw new Error("duration must be greater than 0");if("number"==typeof t[0]&&(t=[t]),!t[0]||0===t[0].length)throw new Error("channelData must contain non-empty channel arrays");!function(t){const e=t[0];if(e.some(t=>t>1||t<-1)){const n=e.length;let r=0;for(let t=0;t<n;t++){const n=Math.abs(e[t]);n>r&&(r=n)}for(const e of t)for(let t=0;t<n;t++)e[t]/=r}}(t);const n=t.map(t=>t instanceof Float32Array?t:Float32Array.from(t));return{duration:e,length:n[0].length,sampleRate:n[0].length/e,numberOfChannels:n.length,getChannelData:t=>{const e=n[t];if(!e)throw new Error(`Channel ${t} not found`);return e},copyFromChannel:AudioBuffer.prototype.copyFromChannel,copyToChannel:AudioBuffer.prototype.copyToChannel}}};function Xo(t,e){const n=e.xmlns?document.createElementNS(e.xmlns,t):document.createElement(t);for(const[t,r]of Object.entries(e))if("children"===t&&r)for(const[t,e]of Object.entries(r))e instanceof Node?n.appendChild(e):"string"==typeof e?n.appendChild(document.createTextNode(e)):n.appendChild(Xo(t,e));else"style"===t?Object.assign(n.style,r):"textContent"===t?n.textContent=r:n.setAttribute(t,r.toString());return n}function Ko(t,e,n){const r=Xo(t,e||{});return null==n||n.appendChild(r),r}var qo=Object.freeze({__proto__:null,createElement:Ko,default:Ko});const Jo={fetchBlob:function(t,e,n){return Yo(this,void 0,void 0,function*(){const r=yield fetch(t,n);if(r.status>=400)throw new Error(`Failed to fetch ${t}: ${r.status} (${r.statusText})`);return function(t,e){Yo(this,void 0,void 0,function*(){if(!t.body||!t.headers)return;const n=t.body.getReader(),r=Number(t.headers.get("Content-Length"))||0;let i=0;const o=t=>{i+=(null==t?void 0:t.length)||0,e(Math.round(i/r*100))};try{for(;;){const t=yield n.read();if(t.done)break;o(t.value)}}catch(t){console.warn("Progress tracking error:",t)}})}(r.clone(),e),r.blob()})}};function Zo(t){let e=t;const n=new Set;return{get value(){return e},set(t){Object.is(e,t)||(e=t,n.forEach(t=>t(e)))},update(t){this.set(t(e))},subscribe:t=>(n.add(t),()=>n.delete(t))}}function Qo(t,e){const n=Zo(t());return e.forEach(e=>e.subscribe(()=>{const e=t();Object.is(n.value,e)||n.set(e)})),{get value(){return n.value},subscribe:t=>n.subscribe(t)}}function ts(t,e){let n;const r=()=>{n&&(n(),n=void 0),n=t()},i=e.map(t=>t.subscribe(r));return r(),()=>{n&&(n(),n=void 0),i.forEach(t=>t())}}var es=class extends Go{get isPlayingSignal(){return this._isPlaying}get currentTimeSignal(){return this._currentTime}get durationSignal(){return this._duration}get volumeSignal(){return this._volume}get mutedSignal(){return this._muted}get playbackRateSignal(){return this._playbackRate}get seekingSignal(){return this._seeking}constructor(t){super(),this.isExternalMedia=!1,this.reactiveMediaEventCleanups=[],t.media?(this.media=t.media,this.isExternalMedia=!0):this.media=document.createElement("audio"),this._isPlaying=Zo(!1),this._currentTime=Zo(0),this._duration=Zo(0),this._volume=Zo(this.media.volume),this._muted=Zo(this.media.muted),this._playbackRate=Zo(this.media.playbackRate||1),this._seeking=Zo(!1),this.setupReactiveMediaEvents(),t.mediaControls&&(this.media.controls=!0),t.autoplay&&(this.media.autoplay=!0),null!=t.playbackRate&&this.onMediaEvent("canplay",()=>{null!=t.playbackRate&&(this.media.playbackRate=t.playbackRate)},{once:!0})}setupReactiveMediaEvents(){this.reactiveMediaEventCleanups.push(this.onMediaEvent("play",()=>{this._isPlaying.set(!0)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("pause",()=>{this._isPlaying.set(!1)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("ended",()=>{this._isPlaying.set(!1)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("timeupdate",()=>{this._currentTime.set(this.media.currentTime)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("durationchange",()=>{this._duration.set(this.media.duration||0)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("loadedmetadata",()=>{this._duration.set(this.media.duration||0)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("seeking",()=>{this._seeking.set(!0)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("seeked",()=>{this._seeking.set(!1)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("volumechange",()=>{this._volume.set(this.media.volume),this._muted.set(this.media.muted)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("ratechange",()=>{this._playbackRate.set(this.media.playbackRate)}))}onMediaEvent(t,e,n){return this.media.addEventListener(t,e,n),()=>this.media.removeEventListener(t,e,n)}getSrc(){return this.media.currentSrc||this.media.src||""}revokeSrc(){const t=this.getSrc();t.startsWith("blob:")&&URL.revokeObjectURL(t)}canPlayType(t){return""!==this.media.canPlayType(t)}setSrc(t,e){const n=this.getSrc();if(t&&n===t)return;this.revokeSrc();const r=e instanceof Blob&&(this.canPlayType(e.type)||!t)?URL.createObjectURL(e):t;if(n&&this.media.removeAttribute("src"),r||t)try{this.media.src=r}catch(e){this.media.src=t}}destroy(){this.reactiveMediaEventCleanups.forEach(t=>t()),this.reactiveMediaEventCleanups=[],this.isExternalMedia||(this.media.pause(),this.revokeSrc(),this.media.removeAttribute("src"),this.media.load(),this.media.remove())}setMediaElement(t){this.reactiveMediaEventCleanups.forEach(t=>t()),this.reactiveMediaEventCleanups=[],this.media=t,this.setupReactiveMediaEvents()}play(){return Yo(this,void 0,void 0,function*(){try{return yield this.media.play()}catch(t){if(t instanceof DOMException&&"AbortError"===t.name)return;throw t}})}pause(){this.media.pause()}isPlaying(){return!this.media.paused&&!this.media.ended}setTime(t){this.media.currentTime=Math.max(0,Math.min(t,this.getDuration()))}getDuration(){return this.media.duration}getCurrentTime(){return this.media.currentTime}getVolume(){return this.media.volume}setVolume(t){this.media.volume=t}getMuted(){return this.media.muted}setMuted(t){this.media.muted=t}getPlaybackRate(){return this.media.playbackRate}isSeeking(){return this.media.seeking}setPlaybackRate(t,e){null!=e&&(this.media.preservesPitch=e),this.media.playbackRate=t}getMediaElement(){return this.media}setSinkId(t){return this.media.setSinkId(t)}};function ns({maxTop:t,maxBottom:e,halfHeight:n,vScale:r,barMinHeight:i=0,barAlign:o}){let s=Math.round(t*n*r),a=s+Math.round(e*n*r)||1;return a<i&&(a=i,o||(s=a/2)),{topHeight:s,totalHeight:a}}function rs({barAlign:t,halfHeight:e,topHeight:n,totalHeight:r,canvasHeight:i}){return"top"===t?0:"bottom"===t?i-r:e-n}function is(t,e,n){const r=e-t.left,i=n-t.top;return[r/t.width,i/t.height]}function ss(t){return!!(t.barWidth||t.barGap||t.barAlign)}function as(t,e){if(!ss(e))return t;const n=e.barWidth||.5,r=n+(e.barGap||n/2);return 0===r?t:Math.floor(t/r)*r}function ls({scrollLeft:t,totalWidth:e,numCanvases:n}){if(0===e)return[0];const r=t/e,i=Math.floor(r*n);return[i-1,i,i+1]}function cs(t){const e=t._cleanup;"function"==typeof e&&e()}var us=class extends Go{constructor(t,e){super(),this.timeouts=[],this.isScrollable=!1,this.audioData=null,this.resizeObserver=null,this.lastContainerWidth=0,this.isDragging=!1,this.subscriptions=[],this.unsubscribeOnScroll=[],this.dragStream=null,this.scrollStream=null,this.subscriptions=[],this.options=t;const n=this.parentFromOptionsContainer(t.container);this.parent=n;const[r,i]=this.initHtml();n.appendChild(r),this.container=r,this.scrollContainer=i.querySelector(".scroll"),this.wrapper=i.querySelector(".wrapper"),this.canvasWrapper=i.querySelector(".canvases"),this.progressWrapper=i.querySelector(".progress"),this.cursor=i.querySelector(".cursor"),e&&i.appendChild(e),this.initEvents()}parentFromOptionsContainer(t){let e;if("string"==typeof t?e=document.querySelector(t):t instanceof HTMLElement&&(e=t),!e)throw new Error("Container not found");return e}initEvents(){this.wrapper.addEventListener("click",t=>{const[e,n]=is(this.wrapper.getBoundingClientRect(),t.clientX,t.clientY);this.emit("click",e,n)}),this.wrapper.addEventListener("dblclick",t=>{const[e,n]=is(this.wrapper.getBoundingClientRect(),t.clientX,t.clientY);this.emit("dblclick",e,n)}),!0!==this.options.dragToSeek&&"object"!=typeof this.options.dragToSeek||this.initDrag(),this.scrollStream=function(t){const e=Zo({scrollLeft:t.scrollLeft,scrollWidth:t.scrollWidth,clientWidth:t.clientWidth}),n=Qo(()=>function(t){const{scrollLeft:e,scrollWidth:n,clientWidth:r}=t;if(0===n)return{startX:0,endX:1};const i=e/n,o=(e+r)/n;return{startX:Math.max(0,Math.min(1,i)),endX:Math.max(0,Math.min(1,o))}}(e.value),[e]),r=Qo(()=>{return{left:(t=e.value).scrollLeft,right:t.scrollLeft+t.clientWidth};var t},[e]),i=()=>{e.set({scrollLeft:t.scrollLeft,scrollWidth:t.scrollWidth,clientWidth:t.clientWidth})};return t.addEventListener("scroll",i,{passive:!0}),{scrollData:e,percentages:n,bounds:r,cleanup:()=>{t.removeEventListener("scroll",i),cs(e)}}}(this.scrollContainer);const t=ts(()=>{const{startX:t,endX:e}=this.scrollStream.percentages.value,{left:n,right:r}=this.scrollStream.bounds.value;this.emit("scroll",t,e,n,r)},[this.scrollStream.percentages,this.scrollStream.bounds]);if(this.subscriptions.push(t),"function"==typeof ResizeObserver){const t=this.createDelay(100);this.resizeObserver=new ResizeObserver(()=>{t().then(()=>this.onContainerResize()).catch(()=>{})}),this.resizeObserver.observe(this.scrollContainer)}}onContainerResize(){const t=this.parent.clientWidth;t===this.lastContainerWidth&&"auto"!==this.options.height||(this.lastContainerWidth=t,this.reRender(),this.emit("resize"))}initDrag(){if(this.dragStream)return;this.dragStream=function(t,e={}){const{threshold:n=3,mouseButton:r=0,touchDelay:i=100}=e,o=Zo(null),s=new Map,a=matchMedia("(pointer: coarse)").matches;let l=()=>{};const c=e=>{if(e.button!==r||(s.set(e.pointerId,e),s.size>1))return;let c=e.clientX,d=e.clientY,h=!1;const p=Date.now(),{left:f,top:m}=t.getBoundingClientRect(),E=t=>{if(t.defaultPrevented||s.size>1||a&&Date.now()-p<i)return;const e=t.clientX,r=t.clientY,l=e-c,E=r-d;(h||Math.abs(l)>n||Math.abs(E)>n)&&(t.preventDefault(),t.stopPropagation(),h||(o.set({type:"start",x:c-f,y:d-m}),h=!0),o.set({type:"move",x:e-f,y:r-m,deltaX:l,deltaY:E}),c=e,d=r)},_=t=>{if(s.delete(t.pointerId),h){const e=t.clientX,n=t.clientY;o.set({type:"end",x:e-f,y:n-m})}l()},A=t=>{s.delete(t.pointerId),t.relatedTarget&&t.relatedTarget!==document.documentElement||_(t)},g=t=>{h&&(t.stopPropagation(),t.preventDefault())},S=t=>{t.defaultPrevented||s.size>1||h&&t.preventDefault()};document.addEventListener("pointermove",E),document.addEventListener("pointerup",_),document.addEventListener("pointerout",A),document.addEventListener("pointercancel",A),document.addEventListener("touchmove",S,{passive:!1}),document.addEventListener("click",g,{capture:!0}),l=()=>{document.removeEventListener("pointermove",E),document.removeEventListener("pointerup",_),document.removeEventListener("pointerout",A),document.removeEventListener("pointercancel",A),document.removeEventListener("touchmove",S),setTimeout(()=>{document.removeEventListener("click",g,{capture:!0})},10)}};return t.addEventListener("pointerdown",c),{signal:o,cleanup:()=>{l(),t.removeEventListener("pointerdown",c),s.clear(),cs(o)}}}(this.wrapper);const t=ts(()=>{const t=this.dragStream.signal.value;if(!t)return;const e=this.wrapper.getBoundingClientRect().width,n=(r=t.x/e)<0?0:r>1?1:r;var r;"start"===t.type?(this.isDragging=!0,this.emit("dragstart",n)):"move"===t.type?this.emit("drag",n):"end"===t.type&&(this.isDragging=!1,this.emit("dragend",n))},[this.dragStream.signal]);this.subscriptions.push(t)}initHtml(){const t=document.createElement("div"),e=t.attachShadow({mode:"open"}),n=this.options.cspNonce&&"string"==typeof this.options.cspNonce?this.options.cspNonce.replace(/"/g,""):"";return e.innerHTML=`\n <style${n?` nonce="${n}"`:""}>\n :host {\n user-select: none;\n min-width: 1px;\n }\n :host audio {\n display: block;\n width: 100%;\n }\n :host .scroll {\n overflow-x: auto;\n overflow-y: hidden;\n width: 100%;\n position: relative;\n }\n :host .noScrollbar {\n scrollbar-color: transparent;\n scrollbar-width: none;\n }\n :host .noScrollbar::-webkit-scrollbar {\n display: none;\n -webkit-appearance: none;\n }\n :host .wrapper {\n position: relative;\n overflow: visible;\n z-index: 2;\n }\n :host .canvases {\n min-height: ${this.getHeight(this.options.height,this.options.splitChannels)}px;\n pointer-events: none;\n }\n :host .canvases > div {\n position: relative;\n }\n :host canvas {\n display: block;\n position: absolute;\n top: 0;\n image-rendering: pixelated;\n }\n :host .progress {\n pointer-events: none;\n position: absolute;\n z-index: 2;\n top: 0;\n left: 0;\n width: 0;\n height: 100%;\n overflow: hidden;\n }\n :host .progress > div {\n position: relative;\n }\n :host .cursor {\n pointer-events: none;\n position: absolute;\n z-index: 5;\n top: 0;\n left: 0;\n height: 100%;\n border-radius: 2px;\n }\n </style>\n\n <div class="scroll" part="scroll">\n <div class="wrapper" part="wrapper">\n <div class="canvases" part="canvases"></div>\n <div class="progress" part="progress"></div>\n <div class="cursor" part="cursor"></div>\n </div>\n </div>\n `,[t,e]}setOptions(t){if(this.options.container!==t.container){const e=this.parentFromOptionsContainer(t.container);e.appendChild(this.container),this.parent=e}!0!==t.dragToSeek&&"object"!=typeof this.options.dragToSeek||this.initDrag(),this.options=t,this.reRender()}getWrapper(){return this.wrapper}getWidth(){return this.scrollContainer.clientWidth}getScroll(){return this.scrollContainer.scrollLeft}setScroll(t){this.scrollContainer.scrollLeft=t}setScrollPercentage(t){const{scrollWidth:e}=this.scrollContainer,n=e*t;this.setScroll(n)}destroy(){var t;this.subscriptions.forEach(t=>t()),this.container.remove(),this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),null===(t=this.unsubscribeOnScroll)||void 0===t||t.forEach(t=>t()),this.unsubscribeOnScroll=[],this.dragStream&&(this.dragStream.cleanup(),this.dragStream=null),this.scrollStream&&(this.scrollStream.cleanup(),this.scrollStream=null)}createDelay(t=10){let e,n;const r=()=>{e&&(clearTimeout(e),e=void 0),n&&(n(),n=void 0)};return this.timeouts.push(r),()=>new Promise((i,o)=>{r(),n=o,e=setTimeout(()=>{e=void 0,n=void 0,i()},t)})}getHeight(t,e){var n;const r=(null===(n=this.audioData)||void 0===n?void 0:n.numberOfChannels)||1;return function({optionsHeight:t,optionsSplitChannels:e,parentHeight:n,numberOfChannels:r,defaultHeight:i=128}){if(null==t)return i;const o=Number(t);if(!isNaN(o))return o;if("auto"===t){const t=n||i;return null!=e&&e.every(t=>!t.overlay)?t/r:t}return i}({optionsHeight:t,optionsSplitChannels:e,parentHeight:this.parent.clientHeight,numberOfChannels:r,defaultHeight:128})}convertColorValues(t,e){return function(t,e,n){if(!Array.isArray(t))return t||"";if(0===t.length)return"#999";if(t.length<2)return t[0]||"";const r=document.createElement("canvas"),i=r.getContext("2d"),o=null!=n?n:r.height*e,s=i.createLinearGradient(0,0,0,o||e),a=1/(t.length-1);return t.forEach((t,e)=>{s.addColorStop(e*a,t)}),s}(t,this.getPixelRatio(),null==e?void 0:e.canvas.height)}getPixelRatio(){return t=window.devicePixelRatio,Math.max(1,t||1);var t}renderBarWaveform(t,e,n,r){const{width:i,height:o}=n.canvas,{halfHeight:s,barWidth:a,barRadius:l,barIndexScale:c,barSpacing:d,barMinHeight:h}=function({width:t,height:e,length:n,options:r,pixelRatio:i}){const o=e/2,s=r.barWidth?r.barWidth*i:1,a=r.barGap?r.barGap*i:r.barWidth?s/2:0,l=s+a||1;return{halfHeight:o,barWidth:s,barGap:a,barRadius:r.barRadius||0,barMinHeight:r.barMinHeight?r.barMinHeight*i:0,barIndexScale:n>0?t/l/n:0,barSpacing:l}}({width:i,height:o,length:(t[0]||[]).length,options:e,pixelRatio:this.getPixelRatio()}),p=function({channelData:t,barIndexScale:e,barSpacing:n,barWidth:r,halfHeight:i,vScale:o,canvasHeight:s,barAlign:a,barMinHeight:l}){const c=t[0]||[],d=t[1]||c,h=c.length,p=[];let f=0,m=0,E=0;for(let t=0;t<=h;t++){const h=Math.round(t*e);if(h>f){const{topHeight:t,totalHeight:e}=ns({maxTop:m,maxBottom:E,halfHeight:i,vScale:o,barMinHeight:l,barAlign:a}),c=rs({barAlign:a,halfHeight:i,topHeight:t,totalHeight:e,canvasHeight:s});p.push({x:f*n,y:c,width:r,height:e}),f=h,m=0,E=0}const _=Math.abs(c[t]||0),A=Math.abs(d[t]||0);_>m&&(m=_),A>E&&(E=A)}return p}({channelData:t,barIndexScale:c,barSpacing:d,barWidth:a,halfHeight:s,vScale:r,canvasHeight:o,barAlign:e.barAlign,barMinHeight:h});n.beginPath();for(const t of p)l&&"roundRect"in n?n.roundRect(t.x,t.y,t.width,t.height,l):n.rect(t.x,t.y,t.width,t.height);n.fill(),n.closePath()}renderLineWaveform(t,e,n,r){const{width:i,height:o}=n.canvas,s=function({channelData:t,width:e,height:n,vScale:r}){const i=n/2,o=t[0]||[];return[o,t[1]||o].map((t,n)=>{const o=t.length,s=o?e/o:0,a=i,l=0===n?-1:1,c=[{x:0,y:a}];let d=0,h=0;for(let e=0;e<=o;e++){const n=Math.round(e*s);if(n>d){const t=a+(Math.round(h*i*r)||1)*l;c.push({x:d,y:t}),d=n,h=0}const o=Math.abs(t[e]||0);o>h&&(h=o)}return c.push({x:d,y:a}),c})}({channelData:t,width:i,height:o,vScale:r});n.beginPath();for(const t of s)if(t.length){n.moveTo(t[0].x,t[0].y);for(let e=1;e<t.length;e++){const r=t[e];n.lineTo(r.x,r.y)}}n.fill(),n.closePath()}renderWaveform(t,e,n){if(n.fillStyle=this.convertColorValues(e.waveColor,n),e.renderFunction)return void e.renderFunction(t,n);const r=function({channelData:t,barHeight:e,normalize:n,maxPeak:r}){var i;const o=e||1;if(!n)return o;const s=t[0];if(!s||0===s.length)return o;let a=null!=r?r:0;if(!r)for(let t=0;t<s.length;t++){const e=null!==(i=s[t])&&void 0!==i?i:0,n=Math.abs(e);n>a&&(a=n)}return a?o/a:o}({channelData:t,barHeight:e.barHeight,normalize:e.normalize,maxPeak:e.maxPeak});ss(e)?this.renderBarWaveform(t,e,n,r):this.renderLineWaveform(t,e,n,r)}renderSingleCanvas(t,e,n,r,i,o,s){const a=this.getPixelRatio(),l=document.createElement("canvas");l.width=Math.round(n*a),l.height=Math.round(r*a),l.style.width=`${n}px`,l.style.height=`${r}px`,l.style.left=`${Math.round(i)}px`,o.appendChild(l);const c=l.getContext("2d");if(e.renderFunction?(c.fillStyle=this.convertColorValues(e.waveColor,c),e.renderFunction(t,c)):this.renderWaveform(t,e,c),l.width>0&&l.height>0){const t=l.cloneNode(),n=t.getContext("2d");n.drawImage(l,0,0),n.globalCompositeOperation="source-in",n.fillStyle=this.convertColorValues(e.progressColor,n),n.fillRect(0,0,l.width,l.height),s.appendChild(t)}}renderMultiCanvas(t,e,n,r,i,o){const s=this.getPixelRatio(),{clientWidth:a}=this.scrollContainer,l=n/s,c=function({clientWidth:t,totalWidth:e,options:n}){return as(Math.min(8e3,t,e),n)}({clientWidth:a,totalWidth:l,options:e});let d={};if(0===c)return;const h=n=>{if(n<0||n>=p||d[n])return;d[n]=!0;const s=n*c;let a=Math.min(l-s,c);if(a=as(a,e),a<=0)return;const h=function({channelData:t,offset:e,clampedWidth:n,totalWidth:r}){return t.map(t=>{const i=Math.floor(e/r*t.length),o=Math.floor((e+n)/r*t.length);return t.slice(i,o)})}({channelData:t,offset:s,clampedWidth:a,totalWidth:l});this.renderSingleCanvas(h,e,a,r,s,i,o)},p=Math.ceil(l/c);if(this.isScrollable){if(ls({scrollLeft:this.scrollContainer.scrollLeft,totalWidth:l,numCanvases:p}).forEach(t=>h(t)),p>1){const t=this.on("scroll",()=>{const{scrollLeft:t}=this.scrollContainer;Object.keys(d).length>10&&(i.innerHTML="",o.innerHTML="",d={}),ls({scrollLeft:t,totalWidth:l,numCanvases:p}).forEach(t=>h(t))});this.unsubscribeOnScroll.push(t)}}else for(let t=0;t<p;t++)h(t)}renderChannel(t,e,n,r){var{overlay:i}=e,o=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n}(e,["overlay"]);const s=document.createElement("div"),a=this.getHeight(o.height,o.splitChannels);s.style.height=`${a}px`,i&&r>0&&(s.style.marginTop=`-${a}px`),this.canvasWrapper.style.minHeight=`${a}px`,this.canvasWrapper.appendChild(s);const l=s.cloneNode();this.progressWrapper.appendChild(l),this.renderMultiCanvas(t,o,n,a,s,l)}render(t){return Yo(this,void 0,void 0,function*(){var e;this.timeouts.forEach(t=>t()),this.timeouts=[],this.canvasWrapper.innerHTML="",this.progressWrapper.innerHTML="",null!=this.options.width&&(this.scrollContainer.style.width="number"==typeof this.options.width?`${this.options.width}px`:this.options.width);const n=this.getPixelRatio(),r=this.scrollContainer.clientWidth,{scrollWidth:i,isScrollable:o,useParentWidth:s,width:a}=function({duration:t,minPxPerSec:e=0,parentWidth:n,fillParent:r,pixelRatio:i}){const o=Math.ceil(t*e),s=o>n,a=!(!r||s);return{scrollWidth:o,isScrollable:s,useParentWidth:a,width:(a?n:o)*i}}({duration:t.duration,minPxPerSec:this.options.minPxPerSec||0,parentWidth:r,fillParent:this.options.fillParent,pixelRatio:n});if(this.isScrollable=o,this.wrapper.style.width=s?"100%":`${i}px`,this.scrollContainer.style.overflowX=this.isScrollable?"auto":"hidden",this.scrollContainer.classList.toggle("noScrollbar",!!this.options.hideScrollbar),this.cursor.style.backgroundColor=`${this.options.cursorColor||this.options.progressColor}`,this.cursor.style.width=`${this.options.cursorWidth}px`,this.audioData=t,this.emit("render"),this.options.splitChannels)for(let n=0;n<t.numberOfChannels;n++){const r=Object.assign(Object.assign({},this.options),null===(e=this.options.splitChannels)||void 0===e?void 0:e[n]);this.renderChannel([t.getChannelData(n)],r,a,n)}else{const e=[t.getChannelData(0)];t.numberOfChannels>1&&e.push(t.getChannelData(1)),this.renderChannel(e,this.options,a,0)}Promise.resolve().then(()=>this.emit("rendered"))})}reRender(){if(this.unsubscribeOnScroll.forEach(t=>t()),this.unsubscribeOnScroll=[],!this.audioData)return;const{scrollWidth:t}=this.scrollContainer,{right:e}=this.progressWrapper.getBoundingClientRect();if(this.render(this.audioData),this.isScrollable&&t!==this.scrollContainer.scrollWidth){const{right:t}=this.progressWrapper.getBoundingClientRect(),n=function(t){const e=2*t;return(e<0?Math.floor(e):Math.ceil(e))/2}(t-e);this.scrollContainer.scrollLeft+=n}}zoom(t){this.options.minPxPerSec=t,this.reRender()}scrollIntoView(t,e=!1){const{scrollLeft:n,scrollWidth:r,clientWidth:i}=this.scrollContainer,o=t*r,s=n,a=n+i,l=i/2;if(this.isDragging)o+30>a?this.scrollContainer.scrollLeft+=30:o-30<s&&(this.scrollContainer.scrollLeft-=30);else{(o<s||o>a)&&(this.scrollContainer.scrollLeft=o-(this.options.autoCenter?l:0));const t=o-n-l;e&&this.options.autoCenter&&t>0&&(this.scrollContainer.scrollLeft+=t)}}renderProgress(t,e){if(isNaN(t))return;const n=100*t;this.canvasWrapper.style.clipPath=`polygon(${n}% 0%, 100% 0%, 100% 100%, ${n}% 100%)`,this.progressWrapper.style.width=`${n}%`,this.cursor.style.left=`${n}%`,this.cursor.style.transform=this.options.cursorWidth?`translateX(-${t*this.options.cursorWidth}px)`:"",this.isScrollable&&this.options.autoScroll&&this.audioData&&this.audioData.duration>0&&this.scrollIntoView(t,e)}exportImage(t,e,n){return Yo(this,void 0,void 0,function*(){const r=this.canvasWrapper.querySelectorAll("canvas");if(!r.length)throw new Error("No waveform data");if("dataURL"===n){const n=Array.from(r).map(n=>n.toDataURL(t,e));return Promise.resolve(n)}return Promise.all(Array.from(r).map(n=>new Promise((r,i)=>{n.toBlob(t=>{t?r(t):i(new Error("Could not export image"))},t,e)})))})}},ds=class extends Go{constructor(){super(...arguments),this.animationFrameId=null,this.isRunning=!1}start(){if(this.isRunning)return;this.isRunning=!0;const t=()=>{this.isRunning&&(this.emit("tick"),this.animationFrameId=requestAnimationFrame(t))};t()}stop(){this.isRunning=!1,null!==this.animationFrameId&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=null)}destroy(){this.stop()}},hs=class extends Go{constructor(t=new AudioContext){super(),this.bufferNode=null,this.playStartTime=0,this.playedDuration=0,this._muted=!1,this._playbackRate=1,this._duration=void 0,this.buffer=null,this.currentSrc="",this.paused=!0,this.crossOrigin=null,this.seeking=!1,this.autoplay=!1,this.addEventListener=this.on,this.removeEventListener=this.un,this.audioContext=t,this.gainNode=this.audioContext.createGain(),this.gainNode.connect(this.audioContext.destination)}load(){return Yo(this,void 0,void 0,function*(){})}get src(){return this.currentSrc}set src(t){if(this.currentSrc=t,this._duration=void 0,!t)return this.buffer=null,void this.emit("emptied");fetch(t).then(e=>{if(e.status>=400)throw new Error(`Failed to fetch ${t}: ${e.status} (${e.statusText})`);return e.arrayBuffer()}).then(e=>this.currentSrc!==t?null:this.audioContext.decodeAudioData(e)).then(e=>{this.currentSrc===t&&(this.buffer=e,this.emit("loadedmetadata"),this.emit("canplay"),this.autoplay&&this.play())}).catch(t=>{console.error("WebAudioPlayer load error:",t)})}_play(){if(!this.paused)return;this.paused=!1,this.bufferNode&&(this.bufferNode.onended=null,this.bufferNode.disconnect()),this.bufferNode=this.audioContext.createBufferSource(),this.buffer&&(this.bufferNode.buffer=this.buffer),this.bufferNode.playbackRate.value=this._playbackRate,this.bufferNode.connect(this.gainNode);let t=this.playedDuration*this._playbackRate;(t>=this.duration||t<0)&&(t=0,this.playedDuration=0),this.bufferNode.start(this.audioContext.currentTime,t),this.playStartTime=this.audioContext.currentTime,this.bufferNode.onended=()=>{this.currentTime>=this.duration&&(this.pause(),this.emit("ended"))}}_pause(){var t;this.paused=!0,null===(t=this.bufferNode)||void 0===t||t.stop(),this.playedDuration+=this.audioContext.currentTime-this.playStartTime}play(){return Yo(this,void 0,void 0,function*(){this.paused&&(this._play(),this.emit("play"))})}pause(){this.paused||(this._pause(),this.emit("pause"))}stopAt(t){const e=t-this.currentTime,n=this.bufferNode;null==n||n.stop(this.audioContext.currentTime+e),null==n||n.addEventListener("ended",()=>{n===this.bufferNode&&(this.bufferNode=null,this.pause())},{once:!0})}setSinkId(t){return Yo(this,void 0,void 0,function*(){return this.audioContext.setSinkId(t)})}get playbackRate(){return this._playbackRate}set playbackRate(t){this._playbackRate=t,this.bufferNode&&(this.bufferNode.playbackRate.value=t)}get currentTime(){return(this.paused?this.playedDuration:this.playedDuration+(this.audioContext.currentTime-this.playStartTime))*this._playbackRate}set currentTime(t){const e=!this.paused;e&&this._pause(),this.playedDuration=t/this._playbackRate,e&&this._play(),this.emit("seeking"),this.emit("timeupdate")}get duration(){var t,e;return null!==(t=this._duration)&&void 0!==t?t:(null===(e=this.buffer)||void 0===e?void 0:e.duration)||0}set duration(t){this._duration=t}get volume(){return this.gainNode.gain.value}set volume(t){this.gainNode.gain.value=t,this.emit("volumechange")}get muted(){return this._muted}set muted(t){this._muted!==t&&(this._muted=t,this._muted?this.gainNode.disconnect():this.gainNode.connect(this.audioContext.destination))}canPlayType(t){return/^(audio|video)\//.test(t)}getGainNode(){return this.gainNode}getChannelData(){const t=[];if(!this.buffer)return t;const e=this.buffer.numberOfChannels;for(let n=0;n<e;n++)t.push(this.buffer.getChannelData(n));return t}removeAttribute(t){switch(t){case"src":this.src="";break;case"playbackRate":this.playbackRate=0;break;case"currentTime":this.currentTime=0;break;case"duration":this.duration=0;break;case"volume":this.volume=0;break;case"muted":this.muted=!1}}};const ps={waveColor:"#999",progressColor:"#555",cursorWidth:1,minPxPerSec:0,fillParent:!0,interact:!0,dragToSeek:!1,autoScroll:!0,autoCenter:!0,sampleRate:8e3};var fs=class IE extends es{static create(t){return new IE(t)}getState(){return this.wavesurferState}getRenderer(){return this.renderer}constructor(t){const e=t.media||("WebAudio"===t.backend?new hs:void 0);super({media:e,mediaControls:t.mediaControls,autoplay:t.autoplay,playbackRate:t.audioRate}),this.plugins=[],this.decodedData=null,this.stopAtPosition=null,this.subscriptions=[],this.mediaSubscriptions=[],this.abortController=null,this.reactiveCleanups=[],this.options=Object.assign({},ps,t);const{state:n,actions:r}=function(t){var e,n,r,i,o,s;const a=null!==(e=null==t?void 0:t.currentTime)&&void 0!==e?e:Zo(0),l=null!==(n=null==t?void 0:t.duration)&&void 0!==n?n:Zo(0),c=null!==(r=null==t?void 0:t.isPlaying)&&void 0!==r?r:Zo(!1),d=null!==(i=null==t?void 0:t.isSeeking)&&void 0!==i?i:Zo(!1),h=null!==(o=null==t?void 0:t.volume)&&void 0!==o?o:Zo(1),p=null!==(s=null==t?void 0:t.playbackRate)&&void 0!==s?s:Zo(1),f=Zo(null),m=Zo(null),E=Zo(""),_=Zo(0),A=Zo(0),g=Qo(()=>!c.value,[c]),S=Qo(()=>null!==f.value,[f]);return{state:{currentTime:a,duration:l,isPlaying:c,isPaused:g,isSeeking:d,volume:h,playbackRate:p,audioBuffer:f,peaks:m,url:E,zoom:_,scrollPosition:A,canPlay:S,isReady:Qo(()=>S.value&&l.value>0,[S,l]),progress:Qo(()=>a.value,[a]),progressPercent:Qo(()=>l.value>0?a.value/l.value:0,[a,l])},actions:{setCurrentTime:t=>{const e=Math.max(0,Math.min(l.value||1/0,t));a.set(e)},setDuration:t=>{l.set(Math.max(0,t))},setPlaying:t=>{c.set(t)},setSeeking:t=>{d.set(t)},setVolume:t=>{const e=Math.max(0,Math.min(1,t));h.set(e)},setPlaybackRate:t=>{const e=Math.max(.1,Math.min(16,t));p.set(e)},setAudioBuffer:t=>{f.set(t),t&&l.set(t.duration)},setPeaks:t=>{m.set(t)},setUrl:t=>{E.set(t)},setZoom:t=>{_.set(Math.max(0,t))},setScrollPosition:t=>{A.set(Math.max(0,t))}}}}({isPlaying:this.isPlayingSignal,currentTime:this.currentTimeSignal,duration:this.durationSignal,volume:this.volumeSignal,playbackRate:this.playbackRateSignal,isSeeking:this.seekingSignal});this.wavesurferState=n,this.wavesurferActions=r,this.timer=new ds;const i=e?void 0:this.getMediaElement();this.renderer=new us(this.options,i),this.initPlayerEvents(),this.initRendererEvents(),this.initTimerEvents(),this.initReactiveState(),this.initPlugins();const o=this.options.url||this.getSrc()||"";Promise.resolve().then(()=>{this.emit("init");const{peaks:t,duration:e}=this.options;(o||t&&e)&&this.load(o,t,e).catch(t=>{this.emit("error",t instanceof Error?t:new Error(String(t)))})})}updateProgress(t=this.getCurrentTime()){return this.renderer.renderProgress(t/this.getDuration(),this.isPlaying()),t}initTimerEvents(){this.subscriptions.push(this.timer.on("tick",()=>{if(!this.isSeeking()){const t=this.updateProgress();this.emit("timeupdate",t),this.emit("audioprocess",t),null!=this.stopAtPosition&&this.isPlaying()&&t>=this.stopAtPosition&&this.pause()}}))}initReactiveState(){this.reactiveCleanups.push(function(t,e){const n=[];n.push(ts(()=>{const n=t.isPlaying.value;e.emit(n?"play":"pause")},[t.isPlaying])),n.push(ts(()=>{const n=t.currentTime.value;e.emit("timeupdate",n),t.isPlaying.value&&e.emit("audioprocess",n)},[t.currentTime,t.isPlaying])),n.push(ts(()=>{t.isSeeking.value&&e.emit("seeking",t.currentTime.value)},[t.isSeeking,t.currentTime]));let r=!1;n.push(ts(()=>{t.isReady.value&&!r&&(r=!0,e.emit("ready",t.duration.value))},[t.isReady,t.duration]));let i=!1;return n.push(ts(()=>{const n=t.isPlaying.value,r=t.currentTime.value,o=t.duration.value,s=o>0&&r>=o;i&&!n&&s&&e.emit("finish"),i=n&&s},[t.isPlaying,t.currentTime,t.duration])),n.push(ts(()=>{const n=t.zoom.value;n>0&&e.emit("zoom",n)},[t.zoom])),()=>{n.forEach(t=>t())}}(this.wavesurferState,{emit:this.emit.bind(this)}))}initPlayerEvents(){this.isPlaying()&&(this.emit("play"),this.timer.start()),this.mediaSubscriptions.push(this.onMediaEvent("timeupdate",()=>{const t=this.updateProgress();this.emit("timeupdate",t)}),this.onMediaEvent("play",()=>{this.emit("play"),this.timer.start()}),this.onMediaEvent("pause",()=>{this.emit("pause"),this.timer.stop(),this.stopAtPosition=null}),this.onMediaEvent("emptied",()=>{this.timer.stop(),this.stopAtPosition=null}),this.onMediaEvent("ended",()=>{this.emit("timeupdate",this.getDuration()),this.emit("finish"),this.stopAtPosition=null}),this.onMediaEvent("seeking",()=>{this.emit("seeking",this.getCurrentTime())}),this.onMediaEvent("error",()=>{var t;this.emit("error",null!==(t=this.getMediaElement().error)&&void 0!==t?t:new Error("Media error")),this.stopAtPosition=null}))}initRendererEvents(){this.subscriptions.push(this.renderer.on("click",(t,e)=>{this.options.interact&&(this.seekTo(t),this.emit("interaction",t*this.getDuration()),this.emit("click",t,e))}),this.renderer.on("dblclick",(t,e)=>{this.emit("dblclick",t,e)}),this.renderer.on("scroll",(t,e,n,r)=>{const i=this.getDuration();this.emit("scroll",t*i,e*i,n,r)}),this.renderer.on("render",()=>{this.emit("redraw")}),this.renderer.on("rendered",()=>{this.emit("redrawcomplete")}),this.renderer.on("dragstart",t=>{this.emit("dragstart",t)}),this.renderer.on("dragend",t=>{this.emit("dragend",t)}),this.renderer.on("resize",()=>{this.emit("resize")}));{let t;const e=this.renderer.on("drag",e=>{var n;if(!this.options.interact)return;this.renderer.renderProgress(e),clearTimeout(t);let r=0;const i=this.options.dragToSeek;this.isPlaying()?r=0:!0===i?r=200:i&&"object"==typeof i&&(r=null!==(n=i.debounceTime)&&void 0!==n?n:200),t=setTimeout(()=>{this.seekTo(e)},r),this.emit("interaction",e*this.getDuration()),this.emit("drag",e)});this.subscriptions.push(()=>{clearTimeout(t),e()})}}initPlugins(){var t;null!==(t=this.options.plugins)&&void 0!==t&&t.length&&this.options.plugins.forEach(t=>{this.registerPlugin(t)})}unsubscribePlayerEvents(){this.mediaSubscriptions.forEach(t=>t()),this.mediaSubscriptions=[]}setOptions(t){this.options=Object.assign({},this.options,t),t.duration&&!t.peaks&&(this.decodedData=Wo.createBuffer(this.exportPeaks(),t.duration)),t.peaks&&t.duration&&(this.decodedData=Wo.createBuffer(t.peaks,t.duration)),this.renderer.setOptions(this.options),t.audioRate&&this.setPlaybackRate(t.audioRate),null!=t.mediaControls&&(this.getMediaElement().controls=t.mediaControls)}registerPlugin(t){if(this.plugins.includes(t))return t;t._init(this),this.plugins.push(t);const e=t.once("destroy",()=>{this.plugins=this.plugins.filter(e=>e!==t),this.subscriptions=this.subscriptions.filter(t=>t!==e)});return this.subscriptions.push(e),t}unregisterPlugin(t){this.plugins=this.plugins.filter(e=>e!==t),t.destroy()}getWrapper(){return this.renderer.getWrapper()}getWidth(){return this.renderer.getWidth()}getScroll(){return this.renderer.getScroll()}setScroll(t){return this.renderer.setScroll(t)}setScrollTime(t){const e=t/this.getDuration();this.renderer.setScrollPercentage(e)}getActivePlugins(){return this.plugins}loadAudio(t,e,n,r){return Yo(this,void 0,void 0,function*(){var i;if(this.emit("load",t),!this.options.media&&this.isPlaying()&&this.pause(),this.decodedData=null,this.stopAtPosition=null,null===(i=this.abortController)||void 0===i||i.abort(),this.abortController=null,!e&&!n){const n=this.options.fetchParams||{};window.AbortController&&!n.signal&&(this.abortController=new AbortController,n.signal=this.abortController.signal);const r=t=>this.emit("loading",t);e=yield Jo.fetchBlob(t,r,n);const i=this.options.blobMimeType;i&&(e=new Blob([e],{type:i}))}this.setSrc(t,e);const o=yield new Promise(t=>{const e=r||this.getDuration();e?t(e):this.mediaSubscriptions.push(this.onMediaEvent("loadedmetadata",()=>t(this.getDuration()),{once:!0}))});if(!t&&!e){const t=this.getMediaElement();t instanceof hs&&(t.duration=o)}if(n)this.decodedData=Wo.createBuffer(n,o||0);else if(e){const t=yield e.arrayBuffer();this.decodedData=yield Wo.decode(t,this.options.sampleRate)}this.decodedData&&(this.emit("decode",this.getDuration()),this.renderer.render(this.decodedData)),this.emit("ready",this.getDuration())})}load(t,e,n){return Yo(this,void 0,void 0,function*(){try{return yield this.loadAudio(t,void 0,e,n)}catch(t){throw this.emit("error",t),t}})}loadBlob(t,e,n){return Yo(this,void 0,void 0,function*(){try{return yield this.loadAudio("",t,e,n)}catch(t){throw this.emit("error",t),t}})}zoom(t){if(!this.decodedData)throw new Error("No audio loaded");this.renderer.zoom(t),this.emit("zoom",t)}getDecodedData(){return this.decodedData}exportPeaks({channels:t=2,maxLength:e=8e3,precision:n=1e4}={}){if(!this.decodedData)throw new Error("The audio has not been decoded yet");const r=Math.min(t,this.decodedData.numberOfChannels),i=[];for(let t=0;t<r;t++){const r=this.decodedData.getChannelData(t),o=[],s=r.length/e;for(let t=0;t<e;t++){const e=r.slice(Math.floor(t*s),Math.ceil((t+1)*s));let i=0;for(let t=0;t<e.length;t++){const n=e[t];Math.abs(n)>Math.abs(i)&&(i=n)}o.push(Math.round(i*n)/n)}i.push(o)}return i}getDuration(){let t=super.getDuration()||0;return 0!==t&&t!==1/0||!this.decodedData||(t=this.decodedData.duration),t}toggleInteraction(t){this.options.interact=t}setTime(t){this.stopAtPosition=null,super.setTime(t),this.updateProgress(t),this.emit("timeupdate",t)}seekTo(t){const e=this.getDuration()*t;this.setTime(e)}play(t,e){const n=Object.create(null,{play:{get:()=>super.play}});return Yo(this,void 0,void 0,function*(){null!=t&&this.setTime(t);const r=yield n.play.call(this);return null!=e&&(this.media instanceof hs?this.media.stopAt(e):this.stopAtPosition=e),r})}playPause(){return Yo(this,void 0,void 0,function*(){return this.isPlaying()?this.pause():this.play()})}stop(){this.pause(),this.setTime(0)}skip(t){this.setTime(this.getCurrentTime()+t)}empty(){this.load("",[[0]],.001)}setMediaElement(t){this.unsubscribePlayerEvents(),super.setMediaElement(t),this.initPlayerEvents()}exportImage(){return Yo(this,arguments,void 0,function*(t="image/png",e=1,n="dataURL"){return this.renderer.exportImage(t,e,n)})}destroy(){var t;this.emit("destroy"),null===(t=this.abortController)||void 0===t||t.abort(),this.plugins.forEach(t=>t.destroy()),this.subscriptions.forEach(t=>t()),this.unsubscribePlayerEvents(),this.reactiveCleanups.forEach(t=>t()),this.reactiveCleanups=[],this.timer.destroy(),this.renderer.destroy(),super.destroy()}};fs.BasePlugin=class extends Go{constructor(t){super(),this.subscriptions=[],this.isDestroyed=!1,this.options=t}onInit(){}_init(t){this.isDestroyed&&(this.subscriptions=[],this.isDestroyed=!1),this.wavesurfer=t,this.onInit()}destroy(){this.emit("destroy"),this.subscriptions.forEach(t=>t()),this.subscriptions=[],this.isDestroyed=!0,this.wavesurfer=void 0}},fs.dom=qo;const ms={focusable:"false",preserveAspectRatio:"xMidYMid meet"};var Es=l((t,e)=>{e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}),_s=l((t,e)=>{var n=Es();function r(){}function i(){}i.resetWarningCache=r,e.exports=function(){function t(t,e,r,i,o,s){if(s!==n){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function e(){return t}t.isRequired=t;var o={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:i,resetWarningCache:r};return o.PropTypes=o,o}}),As=h(l((t,e)=>{e.exports=_s()()})());Xe();const gs=Qt(function({className:t,children:e,tabIndex:n,xmlns:r="http://www.w3.org/2000/svg",preserveAspectRatio:i="xMidYMid meet",...o},s){const{tabindex:a,...l}=function({width:t,height:e,viewBox:n=`0 0 ${t} ${e}`,...r}={}){const{tabindex:i,...o}=r,s={...ms,...o,width:t,height:e,viewBox:n};return s["aria-label"]||s["aria-labelledby"]?(s.role="img",null!=i&&(s.focusable="true",s.tabindex=i)):s["aria-hidden"]=!0,s}({...o,tabindex:n}),c=l;return t&&(c.className=t),null!=a&&(c.tabIndex="number"==typeof a?a:Number(n)),s&&(c.ref=s),r&&(c.xmlns=r),i&&(c.preserveAspectRatio=i),We.createElement("svg",c,e)});function Ss(t,e){for(var n in t)if("__source"!==n&&!(n in e))return!0;for(var r in e)if("__source"!==r&&t[r]!==e[r])return!0;return!1}function vs(t,e){this.props=t,this.context=e}gs.displayName="Icon",gs.propTypes={"aria-hidden":As.default.oneOfType([As.default.bool,As.default.oneOf(["true","false"])]),"aria-label":As.default.string,"aria-labelledby":As.default.string,children:As.default.node,className:As.default.string,height:As.default.oneOfType([As.default.number,As.default.string]),preserveAspectRatio:As.default.string,tabIndex:As.default.oneOfType([As.default.number,As.default.string]),viewBox:As.default.string,width:As.default.oneOfType([As.default.number,As.default.string]),xmlns:As.default.string},lt(),Vt(),Vt(),(vs.prototype=new D).isPureReactComponent=!0,vs.prototype.shouldComponentUpdate=function(t,e){return Ss(this.props,t)||Ss(this.state,e)};var Os=W.__b;W.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),Os&&Os(t)};"undefined"!=typeof Symbol&&Symbol.for;var Ds=W.__e;W.__e=function(t,e,n,r){if(t.then)for(var i,o=e;o=o.__;)if((i=o.__c)&&i.__c)return null==e.__e&&(e.__e=n.__e,e.__k=n.__k),i.__c(t,e);Ds(t,e,n,r)};var Ts=W.unmount;function Rs(t,e,n){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(t){"function"==typeof t.__c&&t.__c()}),t.__c.__H=null),null!=(t=function(t,e){for(var n in e)t[n]=e[n];return t}({},t)).__c&&(t.__c.__P===n&&(t.__c.__P=e),t.__c.__e=!0,t.__c=null),t.__k=t.__k&&t.__k.map(function(t){return Rs(t,e,n)})),t}function ys(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(t){return ys(t,e,n)}),t.__c&&t.__c.__P===e&&(t.__e&&n.appendChild(t.__e),t.__c.__e=!0,t.__c.__P=n)),t}function Is(){this.__u=0,this.o=null,this.__b=null}function Cs(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function Ns(){this.i=null,this.l=null}W.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),Ts&&Ts(t)},(Is.prototype=new D).__c=function(t,e){var n=e.__c,r=this;null==r.o&&(r.o=[]),r.o.push(n);var i=Cs(r.__v),o=!1,s=function(){o||(o=!0,n.__R=null,i?i(a):a())};n.__R=s;var a=function(){if(! --r.__u){if(r.state.__a){var t=r.state.__a;r.__v.__k[0]=ys(t,t.__c.__P,t.__c.__O)}var e;for(r.setState({__a:r.__b=null});e=r.o.pop();)e.forceUpdate()}};r.__u++||32&e.__u||r.setState({__a:r.__b=r.__v.__k[0]}),t.then(s,s)},Is.prototype.componentWillUnmount=function(){this.o=[]},Is.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Rs(this.__b,n,r.__O=r.__P)}this.__b=null}var i=e.__a&&g(O,null,t.fallback);return i&&(i.__u&=-33),[g(O,null,e.__a?null:t.children),i]};var bs=function(t,e,n){if(++n[1]===n[0]&&t.l.delete(e),t.props.revealOrder&&("t"!==t.props.revealOrder[0]||!t.l.size))for(n=t.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;t.i=n=n[2]}};(Ns.prototype=new D).__a=function(t){var e=this,n=Cs(e.__v),r=e.l.get(t);return r[0]++,function(i){var o=function(){e.props.revealOrder?(r.push(i),bs(e,t,r)):i()};n?n(o):o()}},Ns.prototype.render=function(t){this.i=null,this.l=new Map;var e=b(t.children);t.revealOrder&&"b"===t.revealOrder[0]&&e.reverse();for(var n=e.length;n--;)this.l.set(e[n],this.i=[1,0,this.i]);return t.children},Ns.prototype.componentDidUpdate=Ns.prototype.componentDidMount=function(){var t=this;this.l.forEach(function(e,n){bs(t,n,e)})};var ws="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,ks=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Ls=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Ms=/[A-Z0-9]/g,Ps="undefined"!=typeof document,xs=function(t){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(t)};D.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(D.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})});var Fs=W.event;function Hs(){}function Us(){return this.cancelBubble}function Bs(){return this.defaultPrevented}W.event=function(t){return Fs&&(t=Fs(t)),t.persist=Hs,t.isPropagationStopped=Us,t.isDefaultPrevented=Bs,t.nativeEvent=t};var js={enumerable:!1,configurable:!0,get:function(){return this.class}},Vs=W.vnode;W.vnode=function(t){"string"==typeof t.type&&function(t){var e=t.props,n=t.type,r={},i=-1===n.indexOf("-");for(var o in e){var s=e[o];if(!("value"===o&&"defaultValue"in e&&null==s||Ps&&"children"===o&&"noscript"===n||"class"===o||"className"===o)){var a=o.toLowerCase();"defaultValue"===o&&"value"in e&&null==e.value?o="value":"download"===o&&!0===s?s="":"translate"===a&&"no"===s?s=!1:"o"===a[0]&&"n"===a[1]?"ondoubleclick"===a?o="ondblclick":"onchange"!==a||"input"!==n&&"textarea"!==n||xs(e.type)?"onfocus"===a?o="onfocusin":"onblur"===a?o="onfocusout":Ls.test(o)&&(o=a):a=o="oninput":i&&ks.test(o)?o=o.replace(Ms,"-$&").toLowerCase():null===s&&(s=void 0),"oninput"===a&&r[o=a]&&(o="oninputCapture"),r[o]=s}}"select"==n&&r.multiple&&Array.isArray(r.value)&&(r.value=b(e.children).forEach(function(t){t.props.selected=-1!=r.value.indexOf(t.props.value)})),"select"==n&&null!=r.defaultValue&&(r.value=b(e.children).forEach(function(t){t.props.selected=r.multiple?-1!=r.defaultValue.indexOf(t.props.value):r.defaultValue==t.props.value})),e.class&&!e.className?(r.class=e.class,Object.defineProperty(r,"className",js)):(e.className&&!e.class||e.class&&e.className)&&(r.class=r.className=e.className),t.props=r}(t),t.$$typeof=ws,Vs&&Vs(t)};var zs=W.__r;W.__r=function(t){zs&&zs(t),t.__c};var $s=W.diffed;W.diffed=function(t){$s&&$s(t);var e=t.props,n=t.__e;null!=n&&"textarea"===t.type&&"value"in e&&e.value!==n.value&&(n.value=null==e.value?"":e.value)},lt();var Ys=0;function Gs(t,e,n,r,i,o){e||(e={});var s,a,l=e;if("ref"in l)for(a in l={},e)"ref"==a?s=e[a]:l[a]=e[a];var c={type:t,props:l,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Ys,__i:-1,__u:0,__source:i,__self:o};if("function"==typeof t&&(s=t.defaultProps))for(a in s)void 0===l[a]&&(l[a]=s[a]);return W.vnode&&W.vnode(c),c}Xe();const Ws=We.forwardRef(function({children:t,size:e=16,...n},r){return 20===e||"20"===e||"20px"===e?We.createElement(gs,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",...n},Gs("path",{d:"M8 13.2 3.6 8.8 2.7 9.7 7.1 14.1 8 15 16.5 6.5 15.6 5.6z"}),Gs("path",{d:"M15.6 5.6 8 13.2 3.6 8.8 2.7 9.7 7.1 14.1 8 15 16.5 6.5 15.6 5.6z"}),t):24===e||"24"===e||"24px"===e?We.createElement(gs,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...n},Gs("path",{d:"M10 15.9 4.7 10.6 3.6 11.6 8.9 16.9 10 18 20.6 7.4 19.5 6.3z"}),t):We.createElement(gs,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},Gs("path",{d:"M13 24 4 15 5.414 13.586 13 21.171 26.586 7.586 28 9 13 24z"}),t)});Xe();const Ks=We.forwardRef(function({children:t,size:e=16,...n},r){return We.createElement(gs,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},Gs("path",{d:"M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2Zm0,26A12,12,0,1,1,28,16,12,12,0,0,1,16,28Z"}),Gs("path",{d:"M11.5,11A2.5,2.5,0,1,0,14,13.5,2.48,2.48,0,0,0,11.5,11Z"}),Gs("path",{d:"M20.5,11A2.5,2.5,0,1,0,23,13.5,2.48,2.48,0,0,0,20.5,11Z"}),Gs("path",{d:"M16,24a8,8,0,0,0,6.85-3.89l-1.71-1a6,6,0,0,1-10.28,0l-1.71,1A8,8,0,0,0,16,24Z"}),t)});Xe();const qs=We.forwardRef(function({children:t,size:e=16,...n},r){return We.createElement(gs,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},Gs("path",{d:"M16,22a6,6,0,0,1-5.14-2.92l-1.71,1a8,8,0,0,0,13.7,0l-1.71-1A6,6,0,0,1,16,22Z"}),Gs("path",{d:"M30 4 26 4 26 0 24 0 24 4 20 4 20 6 24 6 24 10 26 10 26 6 30 6 30 4z"}),Gs("path",{d:"M11.5,11A2.5,2.5,0,1,0,14,13.5,2.48,2.48,0,0,0,11.5,11Z"}),Gs("path",{d:"M20.5,11A2.5,2.5,0,1,0,23,13.5,2.48,2.48,0,0,0,20.5,11Z"}),Gs("path",{d:"M27.61,13A12.33,12.33,0,0,1,28,16,12,12,0,1,1,16,4V2A14,14,0,1,0,29.67,13Z"}),t)});Xe();const Qs=We.forwardRef(function({children:t,size:e=16,...n},r){return We.createElement(gs,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},Gs("circle",{cx:"8",cy:"16",r:"2"}),Gs("circle",{cx:"16",cy:"16",r:"2"}),Gs("circle",{cx:"24",cy:"16",r:"2"}),t)});Xe();const ta=We.forwardRef(function({children:t,size:e=16,...n},r){return We.createElement(gs,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},Gs("circle",{cx:"16",cy:"8",r:"2"}),Gs("circle",{cx:"16",cy:"16",r:"2"}),Gs("circle",{cx:"16",cy:"24",r:"2"}),t)});Xe();const ea=We.forwardRef(function({children:t,size:e=16,...n},r){return"glyph"===e||"glyph"===e||"glyphpx"===e?We.createElement(gs,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 6 10",fill:"currentColor",...n},Gs("path",{d:"M0 5 5 0 5.7.7 1.4 5 5.7 9.3 5 10z"}),t):16===e||"16"===e||"16px"===e?We.createElement(gs,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},Gs("path",{d:"M5 8 10 3 10.7 3.7 6.4 8 10.7 12.3 10 13z"}),t):We.createElement(gs,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},Gs("path",{d:"M10 16 20 6 21.4 7.4 12.8 16 21.4 24.6 20 26z"}),t)});Xe();const na=We.forwardRef(function({children:t,size:e=16,...n},r){return"glyph"===e||"glyph"===e||"glyphpx"===e?We.createElement(gs,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 6 10",fill:"currentColor",...n},Gs("path",{d:"M6 5 1 10 .3 9.3 4.6 5 .3.7 1 0z"}),t):16===e||"16"===e||"16px"===e?We.createElement(gs,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},Gs("path",{d:"M11 8 6 13 5.3 12.3 9.6 8 5.3 3.7 6 3z"}),t):We.createElement(gs,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},Gs("path",{d:"M22 16 12 26 10.6 24.6 19.2 16 10.6 7.4 12 6z"}),t)});Xe();const ra=We.forwardRef(function({children:t,size:e=16,...n},r){return"glyph"===e||"glyph"===e||"glyphpx"===e?We.createElement(gs,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10 6",fill:"currentColor",...n},Gs("path",{d:"M5 0 10 5 9.3 5.7 5 1.4.7 5.7 0 5z"}),t):16===e||"16"===e||"16px"===e?We.createElement(gs,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},Gs("path",{d:"M8 5 13 10 12.3 10.7 8 6.4 3.7 10.7 3 10z"}),t):We.createElement(gs,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},Gs("path",{d:"M16 10 26 20 24.6 21.4 16 12.8 7.4 21.4 6 20z"}),t)});Xe();const ia=We.forwardRef(function({children:t,size:e=16,...n},r){return"glyph"===e||"glyph"===e||"glyphpx"===e?We.createElement(gs,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10 6",fill:"currentColor",...n},Gs("path",{d:"M5 6 0 1 .7.3 5 4.6 9.3.3 10 1z"}),t):16===e||"16"===e||"16px"===e?We.createElement(gs,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},Gs("path",{d:"M8 11 3 6 3.7 5.3 8 9.6 12.3 5.3 13 6z"}),t):We.createElement(gs,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},Gs("path",{d:"M16 22 6 12 7.4 10.6 16 19.2 24.6 10.6 26 12z"}),t)});Xe();const oa=We.forwardRef(function({children:t,size:e=16,...n},r){return We.createElement(gs,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},Gs("path",{d:"M17.4141 16 24 9.4141 22.5859 8 16 14.5859 9.4143 8 8 9.4141 14.5859 16 8 22.5859 9.4143 24 16 17.4141 22.5859 24 24 22.5859 17.4141 16z"}),t)});Xe();const sa=We.forwardRef(function({children:t,size:e=16,...n},r){return We.createElement(gs,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},Gs("path",{d:"M16,2A14,14,0,1,0,30,16,14.0158,14.0158,0,0,0,16,2Zm0,26A12,12,0,0,1,16,4V16l8.4812,8.4814A11.9625,11.9625,0,0,1,16,28Z"}),t)});Xe();const aa=We.forwardRef(function({children:t,size:e=16,...n},r){return 16===e||"16"===e||"16px"===e?We.createElement(gs,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},Gs("path",{d:"M13 7 12.3 6.3 8.5 10.1 8.5 1 7.5 1 7.5 10.1 3.7 6.3 3 7 8 12z"}),Gs("path",{d:"M13,12v2H3v-2H2v2l0,0c0,0.6,0.4,1,1,1h10c0.6,0,1-0.4,1-1l0,0v-2H13z"}),t):We.createElement(gs,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},Gs("path",{d:"M26,24v4H6V24H4v4H4a2,2,0,0,0,2,2H26a2,2,0,0,0,2-2h0V24Z"}),Gs("path",{d:"M26 14 24.59 12.59 17 20.17 17 2 15 2 15 20.17 7.41 12.59 6 14 16 24 26 14z"}),t)});Xe();const la=We.forwardRef(function({children:t,size:e=16,...n},r){return We.createElement(gs,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},Gs("path",{d:"M28.1,18.9L13.1,3.9c-2.5-2.6-6.6-2.6-9.2-0.1S1.3,10.5,3.9,13c0,0,0.1,0.1,0.1,0.1L6.8,16l1.4-1.4l-2.9-2.9 C3.6,10,3.6,7.1,5.3,5.4s4.6-1.8,6.3-0.1c0,0,0,0,0.1,0.1l14.9,14.9c1.8,1.7,1.8,4.6,0.1,6.3c-1.7,1.8-4.6,1.8-6.3,0.1 c0,0,0,0-0.1-0.1l-7.4-7.4c-1-1-0.9-2.6,0-3.5c1-0.9,2.5-0.9,3.5,0l4.1,4.1l1.4-1.4c0,0-4.2-4.2-4.2-4.2c-1.8-1.7-4.6-1.6-6.3,0.2 c-1.6,1.7-1.6,4.4,0,6.2l7.5,7.5c2.5,2.6,6.6,2.6,9.2,0.1S30.7,21.5,28.1,18.9C28.1,19,28.1,18.9,28.1,18.9L28.1,18.9z"}),t)});Xe();const ca=We.forwardRef(function({children:t,size:e=16,...n},r){return We.createElement(gs,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},Gs("path",{d:"M27.6 20.6 24 24.2 24 4 22 4 22 24.2 18.4 20.6 17 22 23 28 29 22z"}),Gs("path",{d:"M9 4 3 10 4.4 11.4 8 7.8 8 28 10 28 10 7.8 13.6 11.4 15 10z"}),t)});Xe();const ua=We.forwardRef(function({children:t,size:e=16,...n},r){return We.createElement(gs,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},Gs("path",{d:"M28.88,30a1,1,0,0,1-.88-.5A15.19,15.19,0,0,0,15,22v6a1,1,0,0,1-.62.92,1,1,0,0,1-1.09-.21l-12-12a1,1,0,0,1,0-1.42l12-12a1,1,0,0,1,1.09-.21A1,1,0,0,1,15,4v6.11a17.19,17.19,0,0,1,15,17,16.34,16.34,0,0,1-.13,2,1,1,0,0,1-.79.86ZM14.5,20A17.62,17.62,0,0,1,28,26,15.31,15.31,0,0,0,13.91,12,1,1,0,0,1,13,11V6.41L3.41,16,13,25.59V21a1,1,0,0,1,1-1h.54Z"}),t)});Xe();const da=We.forwardRef(function({children:t,size:e=16,...n},r){return We.createElement(gs,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},Gs("path",{d:"M2 26H30V28H2z"}),Gs("path",{d:"M25.4,9c0.8-0.8,0.8-2,0-2.8c0,0,0,0,0,0l-3.6-3.6c-0.8-0.8-2-0.8-2.8,0c0,0,0,0,0,0l-15,15V24h6.4L25.4,9z M20.4,4L24,7.6 l-3,3L17.4,7L20.4,4z M6,22v-3.6l10-10l3.6,3.6l-10,10H6z"}),t)});Xe();const ha=We.forwardRef(function({children:t,size:e=16,...n},r){return We.createElement(gs,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},Gs("path",{d:"M12 12H14V24H12z"}),Gs("path",{d:"M18 12H20V24H18z"}),Gs("path",{d:"M4,6V8H6V28a2,2,0,0,0,2,2H24a2,2,0,0,0,2-2V8h2V6ZM8,28V8H24V28Z"}),Gs("path",{d:"M12 2H20V4H12z"}),t)});Xe();const pa=We.forwardRef(function({children:t,size:e=16,...n},r){return We.createElement(gs,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},Gs("path",{d:"M28.59,13.31,30,11.9,20,2,18.69,3.42,19.87,4.6,8.38,14.32,6.66,12.61,5.25,14l5.66,5.68L2,28.58,3.41,30l8.91-8.91L18,26.75l1.39-1.42-1.71-1.71L27.4,12.13ZM16.26,22.2,9.8,15.74,21.29,6,26,10.71Z"}),t)});Xe();const fa=We.forwardRef(function({children:t,size:e=16,...n},r){return We.createElement(gs,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},Gs("path",{d:"M7,28a1,1,0,0,1-1-1V5a1,1,0,0,1,1.4819-.8763l20,11a1,1,0,0,1,0,1.7525l-20,11A1.0005,1.0005,0,0,1,7,28Z"}),t)});Xe();const ma=We.forwardRef(function({children:t,size:e=16,...n},r){return We.createElement(gs,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},Gs("path",{d:"M12,6H10A2,2,0,0,0,8,8V24a2,2,0,0,0,2,2h2a2,2,0,0,0,2-2V8a2,2,0,0,0-2-2Z"}),Gs("path",{d:"M22,6H20a2,2,0,0,0-2,2V24a2,2,0,0,0,2,2h2a2,2,0,0,0,2-2V8a2,2,0,0,0-2-2Z"}),t)});Xe();const Ea=We.forwardRef(function({children:t,size:e=16,...n},r){return 16===e||"16"===e||"16px"===e?We.createElement(gs,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},Gs("path",{d:"M8.5 11 8.5 6.5 6.5 6.5 6.5 7.5 7.5 7.5 7.5 11 6 11 6 12 10 12 10 11z"}),Gs("path",{d:"M8,3.5c-0.4,0-0.8,0.3-0.8,0.8S7.6,5,8,5c0.4,0,0.8-0.3,0.8-0.8S8.4,3.5,8,3.5z"}),Gs("path",{d:"M8,15c-3.9,0-7-3.1-7-7s3.1-7,7-7s7,3.1,7,7S11.9,15,8,15z M8,2C4.7,2,2,4.7,2,8s2.7,6,6,6s6-2.7,6-6S11.3,2,8,2z"}),t):We.createElement(gs,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},Gs("path",{d:"M17 22 17 14 13 14 13 16 15 16 15 22 12 22 12 24 20 24 20 22 17 22z"}),Gs("path",{d:"M16,8a1.5,1.5,0,1,0,1.5,1.5A1.5,1.5,0,0,0,16,8Z"}),Gs("path",{d:"M16,30A14,14,0,1,1,30,16,14,14,0,0,1,16,30ZM16,4A12,12,0,1,0,28,16,12,12,0,0,0,16,4Z"}),t)});Xe();const _a=We.forwardRef(function({children:t,size:e=16,...n},r){return 16===e||"16"===e||"16px"===e?We.createElement(gs,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},Gs("path",{d:"M3.7 6.7 7.5 2.9 7.5 15 8.5 15 8.5 2.9 12.3 6.7 13 6 8 1 3 6z"}),t):We.createElement(gs,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},Gs("path",{d:"M16 4 6 14 7.41 15.41 15 7.83 15 28 17 28 17 7.83 24.59 15.41 26 14 16 4z"}),t)});Xe();const Aa=We.forwardRef(function({children:t,size:e=16,...n},r){return 16===e||"16"===e||"16px"===e?We.createElement(gs,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},Gs("path",{d:"M6.7 12.3 2.9 8.5 15 8.5 15 7.5 2.9 7.5 6.7 3.7 6 3 1 8 6 13z"}),t):We.createElement(gs,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},Gs("path",{d:"M14 26 15.41 24.59 7.83 17 28 17 28 15 7.83 15 15.41 7.41 14 6 4 16 14 26z"}),t)});Xe();const ga=We.forwardRef(function({children:t,size:e=16,...n},r){return 16===e||"16"===e||"16px"===e?We.createElement(gs,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},Gs("path",{d:"M9.3 3.7 13.1 7.5 1 7.5 1 8.5 13.1 8.5 9.3 12.3 10 13 15 8 10 3z"}),t):20===e||"20"===e||"20px"===e?We.createElement(gs,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",...n},Gs("path",{d:"M11.8 2.8 10.8 3.8 16.2 9.3 1 9.3 1 10.7 16.2 10.7 10.8 16.2 11.8 17.2 19 10z"}),t):24===e||"24"===e||"24px"===e?We.createElement(gs,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...n},Gs("path",{d:"M14 4 12.9 5.1 18.9 11.2 2 11.2 2 12.8 18.9 12.8 12.9 18.9 14 20 22 12z"}),t):We.createElement(gs,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},Gs("path",{d:"M18 6 16.57 7.393 24.15 15 4 15 4 17 24.15 17 16.57 24.573 18 26 28 16 18 6z"}),t)});Xe();const Sa=We.forwardRef(function({children:t,size:e=16,...n},r){return 16===e||"16"===e||"16px"===e?We.createElement(gs,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},Gs("path",{d:"M12.3 9.3 8.5 13.1 8.5 1 7.5 1 7.5 13.1 3.7 9.3 3 10 8 15 13 10z"}),t):We.createElement(gs,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},Gs("path",{d:"M24.59 16.59 17 24.17 17 4 15 4 15 24.17 7.41 16.59 6 18 16 28 26 18 24.59 16.59z"}),t)});Xe();const va=We.forwardRef(function({children:t,size:e=16,...n},r){return We.createElement(gs,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},Gs("path",{d:"M16,18a5,5,0,1,1,5-5A5.0057,5.0057,0,0,1,16,18Zm0-8a3,3,0,1,0,3,3A3.0033,3.0033,0,0,0,16,10Z"}),Gs("path",{d:"M16,30,7.5645,20.0513c-.0479-.0571-.3482-.4515-.3482-.4515A10.8888,10.8888,0,0,1,5,13a11,11,0,0,1,22,0,10.8844,10.8844,0,0,1-2.2148,6.5973l-.0015.0025s-.3.3944-.3447.4474ZM8.8125,18.395c.001.0007.2334.3082.2866.3744L16,26.9079l6.91-8.15c.0439-.0552.2783-.3649.2788-.3657A8.901,8.901,0,0,0,25,13,9,9,0,1,0,7,13a8.9054,8.9054,0,0,0,1.8125,5.395Z"}),t)});Xe();const Oa=We.forwardRef(function({children:t,size:e=16,...n},r){return We.createElement(gs,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},Gs("path",{d:"M23,14v3A7,7,0,0,1,9,17V14H7v3a9,9,0,0,0,8,8.94V28H11v2H21V28H17V25.94A9,9,0,0,0,25,17V14Z"}),Gs("path",{d:"M16,22a5,5,0,0,0,5-5V7A5,5,0,0,0,11,7V17A5,5,0,0,0,16,22ZM13,7a3,3,0,0,1,6,0V17a3,3,0,0,1-6,0Z"}),t)});Xe();const Da=We.forwardRef(function({children:t,size:e=16,...n},r){return We.createElement(gs,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},Gs("path",{d:"M24,6H8A2,2,0,0,0,6,8V24a2,2,0,0,0,2,2H24a2,2,0,0,0,2-2V8a2,2,0,0,0-2-2Z"}),t)});Xe();const Ta=We.forwardRef(function({children:t,size:e=16,...n},r){return We.createElement(gs,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},Gs("path",{d:"M19,14a3,3,0,1,0-3-3A3,3,0,0,0,19,14Zm0-4a1,1,0,1,1-1,1A1,1,0,0,1,19,10Z"}),Gs("path",{d:"M26,4H6A2,2,0,0,0,4,6V26a2,2,0,0,0,2,2H26a2,2,0,0,0,2-2V6A2,2,0,0,0,26,4Zm0,22H6V20l5-5,5.59,5.59a2,2,0,0,0,2.82,0L21,19l5,5Zm0-4.83-3.59-3.59a2,2,0,0,0-2.82,0L18,19.17l-5.59-5.59a2,2,0,0,0-2.82,0L6,17.17V6H26Z"}),t)});Xe();const Ra=We.forwardRef(function({children:t,size:e=16,...n},r){return We.createElement(gs,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},Gs("path",{d:"M21,26H4a2,2,0,0,1-2-2V8A2,2,0,0,1,4,6H21a2,2,0,0,1,2,2v4.06l5.42-3.87A1,1,0,0,1,30,9V23a1,1,0,0,1-1.58.81L23,19.94V24A2,2,0,0,1,21,26ZM4,8V24H21V18a1,1,0,0,1,1.58-.81L28,21.06V10.94l-5.42,3.87A1,1,0,0,1,21,14V8Z"}),t)});Xe();const ya=We.forwardRef(function({children:t,size:e=16,...n},r){return 16===e||"16"===e||"16px"===e?We.createElement(gs,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},Gs("path",{d:"M15,14.3L10.7,10c1.9-2.3,1.6-5.8-0.7-7.7S4.2,0.7,2.3,3S0.7,8.8,3,10.7c2,1.7,5,1.7,7,0l4.3,4.3L15,14.3z M2,6.5 C2,4,4,2,6.5,2S11,4,11,6.5S9,11,6.5,11S2,9,2,6.5z"}),t):We.createElement(gs,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},Gs("path",{d:"M29,27.5859l-7.5521-7.5521a11.0177,11.0177,0,1,0-1.4141,1.4141L27.5859,29ZM4,13a9,9,0,1,1,9,9A9.01,9.01,0,0,1,4,13Z"}),t)});Xe();const Ia=We.forwardRef(function({children:t,size:e=16,...n},r){return We.createElement(gs,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},Gs("path",{d:"M17 15 17 8 15 8 15 15 8 15 8 17 15 17 15 24 17 24 17 17 24 17 24 15z"}),t)});Xe();const Ca=We.forwardRef(function({children:t,size:e=16,...n},r){return We.createElement(gs,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},Gs("path",{d:"M28,6H4A2,2,0,0,0,2,8V24a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V8A2,2,0,0,0,28,6ZM25.8,8,16,14.78,6.2,8ZM4,24V8.91l11.43,7.91a1,1,0,0,0,1.14,0L28,8.91V24Z"}),t)});Xe();function Na(t){const{type:e,className:n,...r}=t;return Gs(ba[e],{className:`t-icon ${n||""}`,...r})}const ba={checkmark:Ws,emoji:Ks,addEmoji:qs,search:ya,plus:Ia,email:Ca,horizontalDots:Qs,verticalDots:ta,chevronLeft:ea,chevronRight:na,chevronUp:ra,chevronDown:ia,arrowsVertical:ca,arrowUp:_a,arrowLeft:Aa,arrowRight:ga,arrowDown:Sa,close:oa,inProgress:sa,download:aa,attachment:la,reply:ua,edit:da,trash:ha,pin:pa,play:t=>Gs(fa,{viewBox:"-1 0 31 32",...t}),pause:ma,info:Ea,send:We.forwardRef(function({children:t,size:e=16,...n},r){return We.createElement(gs,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},Gs("path",{d:"M27.45,15.11l-22-11a1,1,0,0,0-1.08.12,1,1,0,0,0-.33,1L7,16,4,26.74A1,1,0,0,0,5,28a1,1,0,0,0,.45-.11l22-11a1,1,0,0,0,0-1.78Zm-20.9,10L8.76,17H18V15H8.76L6.55,6.89,24.76,16Z"}),t)}),location:va,microphone:Oa,stop:Da,spinner:function(t){const e=`t-spin ${t.className||""}`;return Gs("svg",{xmlns:"http://www.w3.org/2000/svg",id:"icon",width:t.size,height:t.size,viewBox:"0 0 32 32",preserveAspectRatio:"xMidYMid meet",fill:"currentColor",focusable:"false",...t,className:e,children:Gs("path",{d:"M16,28c-6.6167,0-12-5.3832-12-12S9.3833,4,16,4c2.335,0,4.5986,.6714,6.5461,1.9414l-1.0923,1.6753c-1.6221-1.0576-3.5078-1.6167-5.4539-1.6167-5.5139,0-10,4.486-10,10s4.4861,10,10,10c1.946,0,3.8318-.5591,5.4539-1.6167l1.0923,1.6753c-1.9475,1.27-4.2112,1.9414-6.5461,1.9414Z"})})},image:Ta,movie:Ra};function wa(t){var e,n,r,i,o,s,a,l;if(!t.container)return;const c=getComputedStyle(t.container),d=null!==(e=Fa.parse(c.color))&&void 0!==e?e:new Fa(255,255,255,1),h=d.withAlpha(d.alpha/2);return fs.create({...t,barGap:null!==(n=t.barGap)&&void 0!==n?n:2,barRadius:null!==(r=t.barRadius)&&void 0!==r?r:0,barWidth:null!==(i=t.barWidth)&&void 0!==i?i:2,barHeight:t.barHeight,hideScrollbar:!0,cursorWidth:null!==(o=t.cursorWidth)&&void 0!==o?o:0,cursorColor:t.cursorColor,height:null!==(s=t.height)&&void 0!==s?s:24,progressColor:null!==(a=t.progressColor)&&void 0!==a?a:h.toRgbaString(),waveColor:null!==(l=t.waveColor)&&void 0!==l?l:h.toRgbaString()})}function ka({src:t,onError:e,filename:n,className:r=""}){const i=ft(null),o=ft(),s=ft(),[a,l]=ut(!1),[c,d]=ut(0),[h,p]=ut(1),f=ft(),[m,E]=ut(!1),_=yo(Cn().t$),{audioUrl:A,audioName:g,height:S,isRecordingPreviewBlob:v}=Et(()=>{const e=new URL(t),r="blob:"===e.protocol&&e.searchParams.has("name");let i=null!=n?n:"";return r&&(i=e.searchParams.get("name"),e.searchParams.delete("name")),{audioUrl:e,audioName:i,height:r?24:50,isRecordingPreviewBlob:r}},[t,n]),[O,D]=ut(v);ht(()=>{let t;const e=i.current.closest("t-message-list"),n=new IntersectionObserver(function([e]){e.isIntersecting?t=setTimeout(()=>D(!0),500):clearTimeout(t)},{root:e});return n.observe(i.current),()=>{n.disconnect()}},[]),ht(()=>{if(!O)return;o.current=new Audio;const t={normalize:!0,height:S,container:i.current};function n(){const t=o.current;if(!t)return;const n=t.error;"Media failed to load"===n.message&&!t.paused||("PIPELINE_ERROR_READ: FFmpegDemuxer: demuxer seek failed"===n.message?(t.load(),l(!1)):(E(!0),l(!1),null==e||e()))}const r=g.slice(g.lastIndexOf(".")+1);if(function(t){return/(?:^|\/)talkjs_audio_message_[0-9]+_([0-9]+)[.](?:mp3|webm)$/.test(t)}(g)&&"webm"===r&&!o.current.canPlayType("audio/webm;codecs=opus"))t.backend="WebAudio",s.current=new Audio("data:audio/mp3;base64,//MkxAAHiAICWABElBeKPL/RANb2w+yiT1g/gTok//lP/W/l3h8QO/OCdCqCW2Cw//MkxAQHkAIWUAhEmAQXWUOFW2dxPu//9mr60ElY5sseQ+xxesmHKtZr7bsqqX2L//MkxAgFwAYiQAhEAC2hq22d3///9FTV6tA36JdgBJoOGgc+7qvqej5Zu7/7uI9l//MkxBQHAAYi8AhEAO193vt9KGOq+6qcT7hhfN5FTInmwk8RkqKImTM55pRQHQSq//MkxBsGkgoIAABHhTACIJLf99nVI///yuW1uBqWfEu7CgNPWGpUadBmZ////4sL//MkxCMHMAH9iABEmAsKioqKigsLCwtVTEFNRTMuOTkuNVVVVVVVVVVVVVVVVVVV//MkxCkECAUYCAAAAFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV"),s.current.controls=!1;else{const e=o.current;e.addEventListener("error",n),e.preservesPitch=!0,t.url=A.toString(),t.media=e}f.current=wa(t);const a=f.current;return a.on("finish",()=>{o.current.loop=!0,l(!1)}),a.on("ready",t=>d(Math.trunc(t))),a.on("timeupdate",t=>d(Math.trunc(t))),"WebAudio"===t.backend&&a.load(A.toString()).catch(()=>{E(!0),l(!1),null==e||e()}),()=>{var t,e;null===(t=o.current)||void 0===t||t.pause(),null===(e=o.current)||void 0===e||e.removeEventListener("error",n),o.current=void 0,a.destroy(),f.current=void 0}},[A,g,e,O,S]);const T=_t(()=>{if("WebAudio"===f.current.options.backend){var t;f.current.isPlaying()||s.current.play(),f.current.playPause(),l(null!==(t=f.current.isPlaying())&&void 0!==t&&t)}else{const t=o.current;t.paused?t.play():t.pause(),t.loop=!1,!t.paused&&t.ended&&(t.load(),t.play()),l(!t.paused)}},[]),R=_t(t=>{f.current.setPlaybackRate(t),p(t)},[]);return Gs("div",m?{}:{className:`t-audio-player ${r}`,children:[Gs("button",{onClick:T,children:Gs("div",{className:"t-play-pause-wrapper",children:Gs(Na,{className:"t-play-pause-icon",size:"30px",type:a?"pause":"play","aria-label":a?_.ARIA_PAUSE_AUDIO:_.ARIA_PLAY_AUDIO})})}),Gs("div",{className:"t-waveform",ref:i,style:{height:S}}),Gs("div",{className:"t-duration",children:AD(c)}),Gs(KO,{type:"menu",portal:!0,popoverComponent:Ma,popoverProps:{playbackSpeed:h,selectPlaybackSpeed:R},className:"t-playback-speed","aria-label":_.ARIA_SET_PLAYBACK_SPEED,children:[h,"x",Gs(Na,{type:"chevronDown",size:"1em",className:"t-up-down-icon","aria-hidden":!0})]})]})}Xe();const La=[.25,.5,.75,1,1.25,1.5,2];function Ma({playbackSpeed:t,selectPlaybackSpeed:e}){return Gs("div",{className:"t-playback-speed-menu",children:[Gs("div",{className:"t-heading",children:"Playback Speed"}),La.map(n=>Gs(JO,{className:"t-menu-item",onSelect:()=>e(n),children:[Gs("span",{className:"t-playback-checkmark",children:t===n?"✓ ":""}),n,"x"]},n))]})}const Pa=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/,xa=/^rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)$/;var Fa=class pu{constructor(t,e,n,r){this.red=t,this.green=e,this.blue=n,this.alpha=r}static parse(t){var e;const n=null!==(e=t.match(Pa))&&void 0!==e?e:t.match(xa);if(n){const[t,e,r,i,o="1"]=n;return new pu(Number(e),Number(r),Number(i),Number(o))}return null}withAlpha(t){return new pu(this.red,this.green,this.blue,t)}toRgbaString(){const{red:t,green:e,blue:n,alpha:r}=this;return 1!==r?`rgba(${t}, ${e}, ${n}, ${r})`:`rgb(${t}, ${e}, ${n})`}};function Ha(t){this.content=t}function Ua(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let i=t.child(r),o=e.child(r);if(i!=o){if(!i.sameMarkup(o))return n;if(i.isText&&i.text!=o.text){for(let t=0;i.text[t]==o.text[t];t++)n++;return n}if(i.content.size||o.content.size){let t=Ua(i.content,o.content,n+1);if(null!=t)return t}n+=i.nodeSize}else n+=i.nodeSize}}function Ba(t,e,n,r){for(let i=t.childCount,o=e.childCount;;){if(0==i||0==o)return i==o?null:{a:n,b:r};let s=t.child(--i),a=e.child(--o),l=s.nodeSize;if(s!=a){if(!s.sameMarkup(a))return{a:n,b:r};if(s.isText&&s.text!=a.text){let t=0,e=Math.min(s.text.length,a.text.length);for(;t<e&&s.text[s.text.length-t-1]==a.text[a.text.length-t-1];)t++,n--,r--;return{a:n,b:r}}if(s.content.size||a.content.size){let t=Ba(s.content,a.content,n-1,r-1);if(t)return t}n-=l,r-=l}else n-=l,r-=l}}Ha.prototype={constructor:Ha,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return-1==e?void 0:this.content[e+1]},update:function(t,e,n){var r=n&&n!=t?this.remove(n):this,i=r.find(t),o=r.content.slice();return-1==i?o.push(n||t,e):(o[i+1]=e,n&&(o[i]=n)),new Ha(o)},remove:function(t){var e=this.find(t);if(-1==e)return this;var n=this.content.slice();return n.splice(e,2),new Ha(n)},addToStart:function(t,e){return new Ha([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new Ha(n)},addBefore:function(t,e,n){var r=this.remove(e),i=r.content.slice(),o=r.find(t);return i.splice(-1==o?i.length:o,0,e,n),new Ha(i)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return(t=Ha.from(t)).size?new Ha(t.content.concat(this.subtract(t).content)):this},append:function(t){return(t=Ha.from(t)).size?new Ha(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=Ha.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},get size(){return this.content.length>>1}},Ha.from=function(t){if(t instanceof Ha)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new Ha(e)};var ja=class Je{constructor(t,e){if(this.content=t,this.size=e||0,null==e)for(let e=0;e<t.length;e++)this.size+=t[e].nodeSize}nodesBetween(t,e,n,r=0,i){for(let o=0,s=0;s<e;o++){let a=this.content[o],l=s+a.nodeSize;if(l>t&&!1!==n(a,r+s,i||null,o)&&a.content.size){let i=s+1;a.nodesBetween(Math.max(0,t-i),Math.min(a.content.size,e-i),n,r+i)}s=l}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,e,n,r){let i="",o=!0;return this.nodesBetween(t,e,(s,a)=>{let l=s.isText?s.text.slice(Math.max(t,a)-a,e-a):s.isLeaf?r?"function"==typeof r?r(s):r:s.type.spec.leafText?s.type.spec.leafText(s):"":"";s.isBlock&&(s.isLeaf&&l||s.isTextblock)&&n&&(o?o=!1:i+=n),i+=l},0),i}append(t){if(!t.size)return this;if(!this.size)return t;let e=this.lastChild,n=t.firstChild,r=this.content.slice(),i=0;for(e.isText&&e.sameMarkup(n)&&(r[r.length-1]=e.withText(e.text+n.text),i=1);i<t.content.length;i++)r.push(t.content[i]);return new Je(r,this.size+t.size)}cut(t,e=this.size){if(0==t&&e==this.size)return this;let n=[],r=0;if(e>t)for(let i=0,o=0;o<e;i++){let s=this.content[i],a=o+s.nodeSize;a>t&&((o<t||a>e)&&(s=s.isText?s.cut(Math.max(0,t-o),Math.min(s.text.length,e-o)):s.cut(Math.max(0,t-o-1),Math.min(s.content.size,e-o-1))),n.push(s),r+=s.nodeSize),o=a}return new Je(n,r)}cutByIndex(t,e){return t==e?Je.empty:0==t&&e==this.content.length?this:new Je(this.content.slice(t,e))}replaceChild(t,e){let n=this.content[t];if(n==e)return this;let r=this.content.slice(),i=this.size+e.nodeSize-n.nodeSize;return r[t]=e,new Je(r,i)}addToStart(t){return new Je([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new Je(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let e=0;e<this.content.length;e++)if(!this.content[e].eq(t.content[e]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(t){let e=this.content[t];if(!e)throw new RangeError("Index "+t+" out of range for "+this);return e}maybeChild(t){return this.content[t]||null}forEach(t){for(let e=0,n=0;e<this.content.length;e++){let r=this.content[e];t(r,n,e),n+=r.nodeSize}}findDiffStart(t,e=0){return Ua(this,t,e)}findDiffEnd(t,e=this.size,n=t.size){return Ba(this,t,e,n)}findIndex(t){if(0==t)return za(0,t);if(t==this.size)return za(this.content.length,t);if(t>this.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let e=0,n=0;;e++){let r=n+this.child(e).nodeSize;if(r>=t)return r==t?za(e+1,r):za(e,n);n=r}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,e){if(!e)return Je.empty;if(!Array.isArray(e))throw new RangeError("Invalid input for Fragment.fromJSON");return new Je(e.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return Je.empty;let e,n=0;for(let r=0;r<t.length;r++){let i=t[r];n+=i.nodeSize,r&&i.isText&&t[r-1].sameMarkup(i)?(e||(e=t.slice(0,r)),e[e.length-1]=i.withText(e[e.length-1].text+i.text)):e&&e.push(i)}return new Je(e||t,n)}static from(t){if(!t)return Je.empty;if(t instanceof Je)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new Je([t],t.nodeSize);throw new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}};ja.empty=new ja([],0);const Va={index:0,offset:0};function za(t,e){return Va.index=t,Va.offset=e,Va}function $a(t,e){if(t===e)return!0;if(!t||"object"!=typeof t||!e||"object"!=typeof e)return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!$a(t[n],e[n]))return!1}else{for(let n in t)if(!(n in e)||!$a(t[n],e[n]))return!1;for(let n in e)if(!(n in t))return!1}return!0}var Ya=class mu{constructor(t,e){this.type=t,this.attrs=e}addToSet(t){let e,n=!1;for(let r=0;r<t.length;r++){let i=t[r];if(this.eq(i))return t;if(this.type.excludes(i.type))e||(e=t.slice(0,r));else{if(i.type.excludes(this.type))return t;!n&&i.type.rank>this.type.rank&&(e||(e=t.slice(0,r)),e.push(this),n=!0),e&&e.push(i)}}return e||(e=t.slice()),n||e.push(this),e}removeFromSet(t){for(let e=0;e<t.length;e++)if(this.eq(t[e]))return t.slice(0,e).concat(t.slice(e+1));return t}isInSet(t){for(let e=0;e<t.length;e++)if(this.eq(t[e]))return!0;return!1}eq(t){return this==t||this.type==t.type&&$a(this.attrs,t.attrs)}toJSON(){let t={type:this.type.name};for(let e in this.attrs){t.attrs=this.attrs;break}return t}static fromJSON(t,e){if(!e)throw new RangeError("Invalid input for Mark.fromJSON");let n=t.marks[e.type];if(!n)throw new RangeError(`There is no mark type ${e.type} in this schema`);let r=n.create(e.attrs);return n.checkAttrs(r.attrs),r}static sameSet(t,e){if(t==e)return!0;if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].eq(e[n]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&0==t.length)return mu.none;if(t instanceof mu)return[t];let e=t.slice();return e.sort((t,e)=>t.type.rank-e.type.rank),e}};Ya.none=[];var Ga=class extends Error{},Wa=class Or{constructor(t,e,n){this.content=t,this.openStart=e,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,e){let n=Ka(this.content,t+this.openStart,e);return n&&new Or(n,this.openStart,this.openEnd)}removeBetween(t,e){return new Or(Xa(this.content,t+this.openStart,e+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,e){if(!e)return Or.empty;let n=e.openStart||0,r=e.openEnd||0;if("number"!=typeof n||"number"!=typeof r)throw new RangeError("Invalid input for Slice.fromJSON");return new Or(ja.fromJSON(t,e.content),n,r)}static maxOpen(t,e=!0){let n=0,r=0;for(let r=t.firstChild;r&&!r.isLeaf&&(e||!r.type.spec.isolating);r=r.firstChild)n++;for(let n=t.lastChild;n&&!n.isLeaf&&(e||!n.type.spec.isolating);n=n.lastChild)r++;return new Or(t,n,r)}};function Xa(t,e,n){let{index:r,offset:i}=t.findIndex(e),o=t.maybeChild(r),{index:s,offset:a}=t.findIndex(n);if(i==e||o.isText){if(a!=n&&!t.child(s).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return t.replaceChild(r,o.copy(Xa(o.content,e-i-1,n-i-1)))}function Ka(t,e,n,r){let{index:i,offset:o}=t.findIndex(e),s=t.maybeChild(i);if(o==e||s.isText)return r&&!r.canReplace(i,i,n)?null:t.cut(0,e).append(n).append(t.cut(e));let a=Ka(s.content,e-o-1,n,s);return a&&t.replaceChild(i,s.copy(a))}function qa(t,e,n){if(n.openStart>t.depth)throw new Ga("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new Ga("Inconsistent open depths");return Ja(t,e,n,0)}function Ja(t,e,n,r){let i=t.index(r),o=t.node(r);if(i==e.index(r)&&r<t.depth-n.openStart){let s=Ja(t,e,n,r+1);return o.copy(o.content.replaceChild(i,s))}if(n.content.size){if(n.openStart||n.openEnd||t.depth!=r||e.depth!=r){let{start:i,end:s}=function(t,e){let n=e.depth-t.openStart,r=e.node(n).copy(t.content);for(let t=n-1;t>=0;t--)r=e.node(t).copy(ja.from(r));return{start:r.resolveNoCache(t.openStart+n),end:r.resolveNoCache(r.content.size-t.openEnd-n)}}(n,t);return nl(o,rl(t,i,s,e,r))}{let r=t.parent,i=r.content;return nl(r,i.cut(0,t.parentOffset).append(n.content).append(i.cut(e.parentOffset)))}}return nl(o,il(t,e,r))}function Za(t,e){if(!e.type.compatibleContent(t.type))throw new Ga("Cannot join "+e.type.name+" onto "+t.type.name)}function Qa(t,e,n){let r=t.node(n);return Za(r,e.node(n)),r}function tl(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function el(t,e,n,r){let i=(e||t).node(n),o=0,s=e?e.index(n):i.childCount;t&&(o=t.index(n),t.depth>n?o++:t.textOffset&&(tl(t.nodeAfter,r),o++));for(let t=o;t<s;t++)tl(i.child(t),r);e&&e.depth==n&&e.textOffset&&tl(e.nodeBefore,r)}function nl(t,e){return t.type.checkContent(e),t.copy(e)}function rl(t,e,n,r,i){let o=t.depth>i&&Qa(t,e,i+1),s=r.depth>i&&Qa(n,r,i+1),a=[];return el(null,t,i,a),o&&s&&e.index(i)==n.index(i)?(Za(o,s),tl(nl(o,rl(t,e,n,r,i+1)),a)):(o&&tl(nl(o,il(t,e,i+1)),a),el(e,n,i,a),s&&tl(nl(s,il(n,r,i+1)),a)),el(r,null,i,a),new ja(a)}function il(t,e,n){let r=[];return el(null,t,n,r),t.depth>n&&tl(nl(Qa(t,e,n+1),il(t,e,n+1)),r),el(e,null,n,r),new ja(r)}Wa.empty=new Wa(ja.empty,0,0);var ol=class _u{constructor(t,e,n){this.pos=t,this.path=e,this.parentOffset=n,this.depth=e.length/3-1}resolveDepth(t){return null==t?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[3*this.resolveDepth(t)]}index(t){return this.path[3*this.resolveDepth(t)+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t!=this.depth||this.textOffset?1:0)}start(t){return 0==(t=this.resolveDepth(t))?0:this.path[3*t-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(!(t=this.resolveDepth(t)))throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]}after(t){if(!(t=this.resolveDepth(t)))throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]+this.path[3*t].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,e=this.index(this.depth);if(e==t.childCount)return null;let n=this.pos-this.path[this.path.length-1],r=t.child(e);return n?t.child(e).cut(n):r}get nodeBefore(){let t=this.index(this.depth),e=this.pos-this.path[this.path.length-1];return e?this.parent.child(t).cut(0,e):0==t?null:this.parent.child(t-1)}posAtIndex(t,e){e=this.resolveDepth(e);let n=this.path[3*e],r=0==e?0:this.path[3*e-1]+1;for(let e=0;e<t;e++)r+=n.child(e).nodeSize;return r}marks(){let t=this.parent,e=this.index();if(0==t.content.size)return Ya.none;if(this.textOffset)return t.child(e).marks;let n=t.maybeChild(e-1),r=t.maybeChild(e);if(!n){let t=n;n=r,r=t}let i=n.marks;for(var o=0;o<i.length;o++)!1===i[o].type.spec.inclusive&&(!r||!i[o].isInSet(r.marks))&&(i=i[o--].removeFromSet(i));return i}marksAcross(t){let e=this.parent.maybeChild(this.index());if(!e||!e.isInline)return null;let n=e.marks,r=t.parent.maybeChild(t.index());for(var i=0;i<n.length;i++)!1===n[i].type.spec.inclusive&&(!r||!n[i].isInSet(r.marks))&&(n=n[i--].removeFromSet(n));return n}sharedDepth(t){for(let e=this.depth;e>0;e--)if(this.start(e)<=t&&this.end(e)>=t)return e;return 0}blockRange(t=this,e){if(t.pos<this.pos)return t.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==t.pos?1:0);n>=0;n--)if(t.pos<=this.end(n)&&(!e||e(this.node(n))))return new cl(this,t,n);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos<this.pos?t:this}toString(){let t="";for(let e=1;e<=this.depth;e++)t+=(t?"/":"")+this.node(e).type.name+"_"+this.index(e-1);return t+":"+this.parentOffset}static resolve(t,e){if(!(e>=0&&e<=t.content.size))throw new RangeError("Position "+e+" out of range");let n=[],r=0,i=e;for(let e=t;;){let{index:t,offset:o}=e.content.findIndex(i),s=i-o;if(n.push(e,t,r+o),!s||(e=e.child(t),e.isText))break;i=s-1,r+=o+1}return new _u(e,n,i)}static resolveCached(t,e){let n=ll.get(t);if(n)for(let t=0;t<n.elts.length;t++){let r=n.elts[t];if(r.pos==e)return r}else ll.set(t,n=new sl);let r=n.elts[n.i]=_u.resolve(t,e);return n.i=(n.i+1)%al,r}},sl=class{constructor(){this.elts=[],this.i=0}};const al=12,ll=new WeakMap;var cl=class{constructor(t,e,n){this.$from=t,this.$to=e,this.depth=n}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}};const ul=Object.create(null);var dl=class gu{constructor(t,e,n,r=Ya.none){this.type=t,this.attrs=e,this.marks=r,this.content=n||ja.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(t){return this.content.child(t)}maybeChild(t){return this.content.maybeChild(t)}forEach(t){this.content.forEach(t)}nodesBetween(t,e,n,r=0){this.content.nodesBetween(t,e,n,r,this)}descendants(t){this.nodesBetween(0,this.content.size,t)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(t,e,n,r){return this.content.textBetween(t,e,n,r)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(t){return this==t||this.sameMarkup(t)&&this.content.eq(t.content)}sameMarkup(t){return this.hasMarkup(t.type,t.attrs,t.marks)}hasMarkup(t,e,n){return this.type==t&&$a(this.attrs,e||t.defaultAttrs||ul)&&Ya.sameSet(this.marks,n||Ya.none)}copy(t=null){return t==this.content?this:new gu(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new gu(this.type,this.attrs,this.content,t)}cut(t,e=this.content.size){return 0==t&&e==this.content.size?this:this.copy(this.content.cut(t,e))}slice(t,e=this.content.size,n=!1){if(t==e)return Wa.empty;let r=this.resolve(t),i=this.resolve(e),o=n?0:r.sharedDepth(e),s=r.start(o),a=r.node(o).content.cut(r.pos-s,i.pos-s);return new Wa(a,r.depth-o,i.depth-o)}replace(t,e,n){return qa(this.resolve(t),this.resolve(e),n)}nodeAt(t){for(let e=this;;){let{index:n,offset:r}=e.content.findIndex(t);if(e=e.maybeChild(n),!e)return null;if(r==t||e.isText)return e;t-=r+1}}childAfter(t){let{index:e,offset:n}=this.content.findIndex(t);return{node:this.content.maybeChild(e),index:e,offset:n}}childBefore(t){if(0==t)return{node:null,index:0,offset:0};let{index:e,offset:n}=this.content.findIndex(t);if(n<t)return{node:this.content.child(e),index:e,offset:n};let r=this.content.child(e-1);return{node:r,index:e-1,offset:n-r.nodeSize}}resolve(t){return ol.resolveCached(this,t)}resolveNoCache(t){return ol.resolve(this,t)}rangeHasMark(t,e,n){let r=!1;return e>t&&this.nodesBetween(t,e,t=>(n.isInSet(t.marks)&&(r=!0),!r)),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),pl(this.marks,t)}contentMatchAt(t){let e=this.type.contentMatch.matchFragment(this.content,0,t);if(!e)throw new Error("Called contentMatchAt on a node with invalid content");return e}canReplace(t,e,n=ja.empty,r=0,i=n.childCount){let o=this.contentMatchAt(t).matchFragment(n,r,i),s=o&&o.matchFragment(this.content,e);if(!s||!s.validEnd)return!1;for(let t=r;t<i;t++)if(!this.type.allowsMarks(n.child(t).marks))return!1;return!0}canReplaceWith(t,e,n,r){if(r&&!this.type.allowsMarks(r))return!1;let i=this.contentMatchAt(t).matchType(n),o=i&&i.matchFragment(this.content,e);return!!o&&o.validEnd}canAppend(t){return t.content.size?this.canReplace(this.childCount,this.childCount,t.content):this.type.compatibleContent(t.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let t=Ya.none;for(let e=0;e<this.marks.length;e++){let n=this.marks[e];n.type.checkAttrs(n.attrs),t=n.addToSet(t)}if(!Ya.sameSet(t,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let t={type:this.type.name};for(let e in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(t=>t.toJSON())),t}static fromJSON(t,e){if(!e)throw new RangeError("Invalid input for Node.fromJSON");let n;if(e.marks){if(!Array.isArray(e.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=e.marks.map(t.markFromJSON)}if("text"==e.type){if("string"!=typeof e.text)throw new RangeError("Invalid text node in JSON");return t.text(e.text,n)}let r=ja.fromJSON(t,e.content),i=t.nodeType(e.type).create(e.attrs,r,n);return i.type.checkAttrs(i.attrs),i}};dl.prototype.text=void 0;var hl=class Au extends dl{constructor(t,e,n,r){if(super(t,e,null,r),!n)throw new RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):pl(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,e){return this.text.slice(t,e)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new Au(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new Au(this.type,this.attrs,t,this.marks)}cut(t=0,e=this.text.length){return 0==t&&e==this.text.length?this:this.withText(this.text.slice(t,e))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}};function pl(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}var fl=class jE{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,e){let n=new ml(t,e);if(null==n.next)return jE.empty;let r=El(n);n.next&&n.err("Unexpected trailing text");let i=function(t){let e=Object.create(null);return n(Ol(t,0));function n(r){let i=[];r.forEach(e=>{t[e].forEach(({term:e,to:n})=>{if(!e)return;let r;for(let t=0;t<i.length;t++)i[t][0]==e&&(r=i[t][1]);Ol(t,n).forEach(t=>{r||i.push([e,r=[]]),-1==r.indexOf(t)&&r.push(t)})})});let o=e[r.join(",")]=new fl(r.indexOf(t.length-1)>-1);for(let t=0;t<i.length;t++){let r=i[t][1].sort(vl);o.next.push({type:i[t][0],next:e[r.join(",")]||n(r)})}return o}}(function(t){let e=[[]];return i(o(t,0),n()),e;function n(){return e.push([])-1}function r(t,n,r){let i={term:r,to:n};return e[t].push(i),i}function i(t,e){t.forEach(t=>t.to=e)}function o(t,e){if("choice"==t.type)return t.exprs.reduce((t,n)=>t.concat(o(n,e)),[]);if("seq"!=t.type){if("star"==t.type){let s=n();return r(e,s),i(o(t.expr,s),s),[r(s)]}if("plus"==t.type){let s=n();return i(o(t.expr,e),s),i(o(t.expr,s),s),[r(s)]}if("opt"==t.type)return[r(e)].concat(o(t.expr,e));if("range"==t.type){let s=e;for(let e=0;e<t.min;e++){let e=n();i(o(t.expr,s),e),s=e}if(-1==t.max)i(o(t.expr,s),s);else for(let e=t.min;e<t.max;e++){let e=n();r(s,e),i(o(t.expr,s),e),s=e}return[r(s)]}if("name"==t.type)return[r(e,void 0,t.value)];throw new Error("Unknown expr type")}for(let r=0;;r++){let s=o(t.exprs[r],e);if(r==t.exprs.length-1)return s;i(s,e=n())}}}(r));return function(t,e){for(let n=0,r=[t];n<r.length;n++){let t=r[n],i=!t.validEnd,o=[];for(let e=0;e<t.next.length;e++){let{type:n,next:s}=t.next[e];o.push(n.name),i&&!(n.isText||n.hasRequiredAttrs())&&(i=!1),-1==r.indexOf(s)&&r.push(s)}i&&e.err("Only non-generatable nodes ("+o.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(i,n),i}matchType(t){for(let e=0;e<this.next.length;e++)if(this.next[e].type==t)return this.next[e].next;return null}matchFragment(t,e=0,n=t.childCount){let r=this;for(let i=e;r&&i<n;i++)r=r.matchType(t.child(i).type);return r}get inlineContent(){return 0!=this.next.length&&this.next[0].type.isInline}get defaultType(){for(let t=0;t<this.next.length;t++){let{type:e}=this.next[t];if(!e.isText&&!e.hasRequiredAttrs())return e}return null}compatible(t){for(let e=0;e<this.next.length;e++)for(let n=0;n<t.next.length;n++)if(this.next[e].type==t.next[n].type)return!0;return!1}fillBefore(t,e=!1,n=0){let r=[this];return function i(o,s){let a=o.matchFragment(t,n);if(a&&(!e||a.validEnd))return ja.from(s.map(t=>t.createAndFill()));for(let t=0;t<o.next.length;t++){let{type:e,next:n}=o.next[t];if(!e.isText&&!e.hasRequiredAttrs()&&-1==r.indexOf(n)){r.push(n);let t=i(n,s.concat(e));if(t)return t}}return null}(this,[])}findWrapping(t){for(let e=0;e<this.wrapCache.length;e+=2)if(this.wrapCache[e]==t)return this.wrapCache[e+1];let e=this.computeWrapping(t);return this.wrapCache.push(t,e),e}computeWrapping(t){let e=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let r=n.shift(),i=r.match;if(i.matchType(t)){let t=[];for(let e=r;e.type;e=e.via)t.push(e.type);return t.reverse()}for(let t=0;t<i.next.length;t++){let{type:o,next:s}=i.next[t];!o.isLeaf&&!o.hasRequiredAttrs()&&!(o.name in e)&&(!r.type||s.validEnd)&&(n.push({match:o.contentMatch,type:o,via:r}),e[o.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(t){if(t>=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];return function e(n){t.push(n);for(let r=0;r<n.next.length;r++)-1==t.indexOf(n.next[r].next)&&e(n.next[r].next)}(this),t.map((e,n)=>{let r=n+(e.validEnd?"*":" ")+" ";for(let n=0;n<e.next.length;n++)r+=(n?", ":"")+e.next[n].type.name+"->"+t.indexOf(e.next[n].next);return r}).join("\n")}};fl.empty=new fl(!0);var ml=class{constructor(t,e){this.string=t,this.nodeTypes=e,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}};function El(t){let e=[];do{e.push(_l(t))}while(t.eat("|"));return 1==e.length?e[0]:{type:"choice",exprs:e}}function _l(t){let e=[];do{e.push(Al(t))}while(t.next&&")"!=t.next&&"|"!=t.next);return 1==e.length?e[0]:{type:"seq",exprs:e}}function Al(t){let e=function(t){if(t.eat("(")){let e=El(t);return t.eat(")")||t.err("Missing closing paren"),e}if(!/\W/.test(t.next)){let e=function(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let i=[];for(let t in n){let r=n[t];r.isInGroup(e)&&i.push(r)}return 0==i.length&&t.err("No node type or group '"+e+"' found"),i}(t,t.next).map(e=>(null==t.inline?t.inline=e.isInline:t.inline!=e.isInline&&t.err("Mixing inline and block content"),{type:"name",value:e}));return t.pos++,1==e.length?e[0]:{type:"choice",exprs:e}}t.err("Unexpected token '"+t.next+"'")}(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else{if(!t.eat("{"))break;e=Sl(t,e)}return e}function gl(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function Sl(t,e){let n=gl(t),r=n;return t.eat(",")&&(r="}"!=t.next?gl(t):-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function vl(t,e){return e-t}function Ol(t,e){let n=[];return function e(r){let i=t[r];if(1==i.length&&!i[0].term)return e(i[0].to);n.push(r);for(let t=0;t<i.length;t++){let{term:r,to:o}=i[t];!r&&-1==n.indexOf(o)&&e(o)}}(e),n.sort(vl)}function Dl(t){let e=Object.create(null);for(let n in t){let r=t[n];if(!r.hasDefault)return null;e[n]=r.default}return e}function Tl(t,e){let n=Object.create(null);for(let r in t){let i=e&&e[r];if(void 0===i){let e=t[r];if(!e.hasDefault)throw new RangeError("No value supplied for attribute "+r);i=e.default}n[r]=i}return n}function Rl(t,e,n,r){for(let r in e)if(!(r in t))throw new RangeError(`Unsupported attribute ${r} for ${n} of type ${r}`);for(let n in t){let r=t[n];r.validate&&r.validate(e[n])}}function yl(t,e){let n=Object.create(null);if(e)for(let r in e)n[r]=new Cl(t,r,e[r]);return n}var Il=class KE{constructor(t,e,n){this.name=t,this.schema=e,this.spec=n,this.markSet=null,this.groups=n.group?n.group.split(" "):[],this.attrs=yl(t,n.attrs),this.defaultAttrs=Dl(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(n.inline||"text"==t),this.isText="text"==t}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==fl.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(t){return this.groups.indexOf(t)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1}compatibleContent(t){return this==t||this.contentMatch.compatible(t.contentMatch)}computeAttrs(t){return!t&&this.defaultAttrs?this.defaultAttrs:Tl(this.attrs,t)}create(t=null,e,n){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new dl(this,this.computeAttrs(t),ja.from(e),Ya.setFrom(n))}createChecked(t=null,e,n){return e=ja.from(e),this.checkContent(e),new dl(this,this.computeAttrs(t),e,Ya.setFrom(n))}createAndFill(t=null,e,n){if(t=this.computeAttrs(t),(e=ja.from(e)).size){let t=this.contentMatch.fillBefore(e);if(!t)return null;e=t.append(e)}let r=this.contentMatch.matchFragment(e),i=r&&r.fillBefore(ja.empty,!0);return i?new dl(this,t,e.append(i),Ya.setFrom(n)):null}validContent(t){let e=this.contentMatch.matchFragment(t);if(!e||!e.validEnd)return!1;for(let e=0;e<t.childCount;e++)if(!this.allowsMarks(t.child(e).marks))return!1;return!0}checkContent(t){if(!this.validContent(t))throw new RangeError(`Invalid content for node ${this.name}: ${t.toString().slice(0,50)}`)}checkAttrs(t){Rl(this.attrs,t,"node",this.name)}allowsMarkType(t){return null==this.markSet||this.markSet.indexOf(t)>-1}allowsMarks(t){if(null==this.markSet)return!0;for(let e=0;e<t.length;e++)if(!this.allowsMarkType(t[e].type))return!1;return!0}allowedMarks(t){if(null==this.markSet)return t;let e;for(let n=0;n<t.length;n++)this.allowsMarkType(t[n].type)?e&&e.push(t[n]):e||(e=t.slice(0,n));return e?e.length?e:Ya.none:t}static compile(t,e){let n=Object.create(null);t.forEach((t,r)=>n[t]=new KE(t,e,r));let r=e.spec.topNode||"doc";if(!n[r])throw new RangeError("Schema is missing its top node type ('"+r+"')");if(!n.text)throw new RangeError("Every schema needs a 'text' type");for(let t in n.text.attrs)throw new RangeError("The text node type should not have attributes");return n}};var Cl=class{constructor(t,e,n){this.hasDefault=Object.prototype.hasOwnProperty.call(n,"default"),this.default=n.default,this.validate="string"==typeof n.validate?function(t,e,n){let r=n.split("|");return n=>{let i=null===n?"null":typeof n;if(r.indexOf(i)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${t}, got ${i}`)}}(t,e,n.validate):n.validate}get isRequired(){return!this.hasDefault}},Nl=class qE{constructor(t,e,n,r){this.name=t,this.rank=e,this.schema=n,this.spec=r,this.attrs=yl(t,r.attrs),this.excluded=null;let i=Dl(this.attrs);this.instance=i?new Ya(this,i):null}create(t=null){return!t&&this.instance?this.instance:new Ya(this,Tl(this.attrs,t))}static compile(t,e){let n=Object.create(null),r=0;return t.forEach((t,i)=>n[t]=new qE(t,r++,e,i)),n}removeFromSet(t){for(var e=0;e<t.length;e++)t[e].type==this&&(t=t.slice(0,e).concat(t.slice(e+1)),e--);return t}isInSet(t){for(let e=0;e<t.length;e++)if(t[e].type==this)return t[e]}checkAttrs(t){Rl(this.attrs,t,"mark",this.name)}excludes(t){return this.excluded.indexOf(t)>-1}};function bl(t,e){let n=[];for(let r=0;r<e.length;r++){let i=e[r],o=t.marks[i],s=o;if(o)n.push(o);else for(let e in t.marks){let r=t.marks[e];("_"==i||r.spec.group&&r.spec.group.split(" ").indexOf(i)>-1)&&n.push(s=r)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}var wl=class Su{constructor(t,e){this.schema=t,this.rules=e,this.tags=[],this.styles=[];let n=this.matchedStyles=[];e.forEach(t=>{if(function(t){return null!=t.tag}(t))this.tags.push(t);else if(function(t){return null!=t.style}(t)){let e=/[^=]*/.exec(t.style)[0];n.indexOf(e)<0&&n.push(e),this.styles.push(t)}}),this.normalizeLists=!this.tags.some(e=>{if(!/^(ul|ol)\b/.test(e.tag)||!e.node)return!1;let n=t.nodes[e.node];return n.contentMatch.matchType(n)})}parse(t,e={}){let n=new Fl(this,e,!1);return n.addAll(t,Ya.none,e.from,e.to),n.finish()}parseSlice(t,e={}){let n=new Fl(this,e,!0);return n.addAll(t,Ya.none,e.from,e.to),Wa.maxOpen(n.finish())}matchTag(t,e,n){for(let r=n?this.tags.indexOf(n)+1:0;r<this.tags.length;r++){let n=this.tags[r];if(Hl(t,n.tag)&&(void 0===n.namespace||t.namespaceURI==n.namespace)&&(!n.context||e.matchesContext(n.context))){if(n.getAttrs){let e=n.getAttrs(t);if(!1===e)continue;n.attrs=e||void 0}return n}}}matchStyle(t,e,n,r){for(let i=r?this.styles.indexOf(r)+1:0;i<this.styles.length;i++){let r=this.styles[i],o=r.style;if(!(0!=o.indexOf(t)||r.context&&!n.matchesContext(r.context)||o.length>t.length&&(61!=o.charCodeAt(t.length)||o.slice(t.length+1)!=e))){if(r.getAttrs){let t=r.getAttrs(e);if(!1===t)continue;r.attrs=t||void 0}return r}}}static schemaRules(t){let e=[];function n(t){let n=null==t.priority?50:t.priority,r=0;for(;r<e.length;r++){let t=e[r];if((null==t.priority?50:t.priority)<n)break}e.splice(r,0,t)}for(let e in t.marks){let r=t.marks[e].spec.parseDOM;r&&r.forEach(t=>{n(t=Ul(t)),t.mark||t.ignore||t.clearMark||(t.mark=e)})}for(let e in t.nodes){let r=t.nodes[e].spec.parseDOM;r&&r.forEach(t=>{n(t=Ul(t)),t.node||t.ignore||t.mark||(t.node=e)})}return e}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new Su(t,Su.schemaRules(t)))}};const kl={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},Ll={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Ml={ol:!0,ul:!0};function Pl(t,e,n){return null!=e?(e?1:0)|("full"===e?2:0):t&&"pre"==t.whitespace?3:-5&n}var xl=class{constructor(t,e,n,r,i,o){this.type=t,this.attrs=e,this.marks=n,this.solid=r,this.options=o,this.content=[],this.activeMarks=Ya.none,this.match=i||(4&o?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let e=this.type.contentMatch.fillBefore(ja.from(t));if(!e){let e,n=this.type.contentMatch;return(e=n.findWrapping(t.type))?(this.match=n,e):null}this.match=this.type.contentMatch.matchFragment(e)}return this.match.findWrapping(t.type)}finish(t){if(!(1&this.options)){let t,e=this.content[this.content.length-1];if(e&&e.isText&&(t=/[ \t\r\n\u000c]+$/.exec(e.text))){let n=e;e.text.length==t[0].length?this.content.pop():this.content[this.content.length-1]=n.withText(n.text.slice(0,n.text.length-t[0].length))}}let e=ja.from(this.content);return!t&&this.match&&(e=e.append(this.match.fillBefore(ja.empty,!0))),this.type?this.type.create(this.attrs,e,this.marks):e}inlineContext(t){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:t.parentNode&&!kl.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}},Fl=class{constructor(t,e,n){this.parser=t,this.options=e,this.isOpen=n,this.open=0,this.localPreserveWS=!1;let r,i=e.topNode,o=Pl(null,e.preserveWhitespace,0)|(n?4:0);r=i?new xl(i.type,i.attrs,Ya.none,!0,e.topMatch||i.type.contentMatch,o):new xl(n?null:t.schema.topNodeType,null,Ya.none,!0,null,o),this.nodes=[r],this.find=e.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(t,e){3==t.nodeType?this.addTextNode(t,e):1==t.nodeType&&this.addElement(t,e)}addTextNode(t,e){let n=t.nodeValue,r=this.top,i=2&r.options?"full":this.localPreserveWS||(1&r.options)>0,{schema:o}=this.parser;if("full"===i||r.inlineContext(t)||/[^ \t\r\n\u000c]/.test(n)){if(i)if("full"===i)n=n.replace(/\r\n?/g,"\n");else if(o.linebreakReplacement&&/[\r\n]/.test(n)&&this.top.findWrapping(o.linebreakReplacement.create())){let t=n.split(/\r?\n|\r/);for(let n=0;n<t.length;n++)n&&this.insertNode(o.linebreakReplacement.create(),e,!0),t[n]&&this.insertNode(o.text(t[n]),e,!/\S/.test(t[n]));n=""}else n=n.replace(/\r?\n|\r/g," ");else if(n=n.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(n)&&this.open==this.nodes.length-1){let e=r.content[r.content.length-1],i=t.previousSibling;(!e||i&&"BR"==i.nodeName||e.isText&&/[ \t\r\n\u000c]$/.test(e.text))&&(n=n.slice(1))}n&&this.insertNode(o.text(n),e,!/\S/.test(n)),this.findInText(t)}else this.findInside(t)}addElement(t,e,n){let r=this.localPreserveWS,i=this.top;("PRE"==t.tagName||/pre/.test(t.style&&t.style.whiteSpace))&&(this.localPreserveWS=!0);let o,s=t.nodeName.toLowerCase();Ml.hasOwnProperty(s)&&this.parser.normalizeLists&&function(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let t=1==e.nodeType?e.nodeName.toLowerCase():null;t&&Ml.hasOwnProperty(t)&&n?(n.appendChild(e),e=n):"li"==t?n=e:t&&(n=null)}}(t);let a=this.options.ruleFromNode&&this.options.ruleFromNode(t)||(o=this.parser.matchTag(t,this,n));t:if(a?a.ignore:Ll.hasOwnProperty(s))this.findInside(t),this.ignoreFallback(t,e);else if(!a||a.skip||a.closeParent){a&&a.closeParent?this.open=Math.max(0,this.open-1):a&&a.skip.nodeType&&(t=a.skip);let n,r=this.needsBlock;if(kl.hasOwnProperty(s))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),n=!0,i.type||(this.needsBlock=!0);else if(!t.firstChild){this.leafFallback(t,e);break t}let o=a&&a.skip?e:this.readStyles(t,e);o&&this.addAll(t,o),n&&this.sync(i),this.needsBlock=r}else{let n=this.readStyles(t,e);n&&this.addElementByRule(t,a,n,!1===a.consuming?o:void 0)}this.localPreserveWS=r}leafFallback(t,e){"BR"==t.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode("\n"),e)}ignoreFallback(t,e){"BR"==t.nodeName&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),e,!0)}readStyles(t,e){let n=t.style;if(n&&n.length)for(let t=0;t<this.parser.matchedStyles.length;t++){let r=this.parser.matchedStyles[t],i=n.getPropertyValue(r);if(i)for(let t;;){let n=this.parser.matchStyle(r,i,this,t);if(!n)break;if(n.ignore)return null;if(e=n.clearMark?e.filter(t=>!n.clearMark(t)):e.concat(this.parser.schema.marks[n.mark].create(n.attrs)),!1!==n.consuming)break;t=n}}return e}addElementByRule(t,e,n,r){let i,o;if(e.node)if(o=this.parser.schema.nodes[e.node],o.isLeaf)this.insertNode(o.create(e.attrs),n,"BR"==t.nodeName)||this.leafFallback(t,n);else{let t=this.enter(o,e.attrs||null,n,e.preserveWhitespace);t&&(i=!0,n=t)}else{let t=this.parser.schema.marks[e.mark];n=n.concat(t.create(e.attrs))}let s=this.top;if(o&&o.isLeaf)this.findInside(t);else if(r)this.addElement(t,n,r);else if(e.getContent)this.findInside(t),e.getContent(t,this.parser.schema).forEach(t=>this.insertNode(t,n,!1));else{let r=t;"string"==typeof e.contentElement?r=t.querySelector(e.contentElement):"function"==typeof e.contentElement?r=e.contentElement(t):e.contentElement&&(r=e.contentElement),this.findAround(t,r,!0),this.addAll(r,n),this.findAround(t,r,!1)}i&&this.sync(s)&&this.open--}addAll(t,e,n,r){let i=n||0;for(let o=n?t.childNodes[n]:t.firstChild,s=null==r?null:t.childNodes[r];o!=s;o=o.nextSibling,++i)this.findAtPoint(t,i),this.addDOM(o,e);this.findAtPoint(t,i)}findPlace(t,e,n){let r,i;for(let e=this.open,o=0;e>=0;e--){let s=this.nodes[e],a=s.findWrapping(t);if(a&&(!r||r.length>a.length+o)&&(r=a,i=s,!a.length))break;if(s.solid){if(n)break;o+=2}}if(!r)return null;this.sync(i);for(let t=0;t<r.length;t++)e=this.enterInner(r[t],null,e,!1);return e}insertNode(t,e,n){if(t.isInline&&this.needsBlock&&!this.top.type){let t=this.textblockFromContext();t&&(e=this.enterInner(t,null,e))}let r=this.findPlace(t,e,n);if(r){this.closeExtra();let e=this.top;e.match&&(e.match=e.match.matchType(t.type));let n=Ya.none;for(let i of r.concat(t.marks))(e.type?e.type.allowsMarkType(i.type):Bl(i.type,t.type))&&(n=i.addToSet(n));return e.content.push(t.mark(n)),!0}return!1}enter(t,e,n,r){let i=this.findPlace(t.create(e),n,!1);return i&&(i=this.enterInner(t,e,n,!0,r)),i}enterInner(t,e,n,r=!1,i){this.closeExtra();let o=this.top;o.match=o.match&&o.match.matchType(t);let s=Pl(t,i,o.options);4&o.options&&0==o.content.length&&(s|=4);let a=Ya.none;return n=n.filter(e=>!(o.type?o.type.allowsMarkType(e.type):Bl(e.type,t))||(a=e.addToSet(a),!1)),this.nodes.push(new xl(t,e,a,r,null,s)),this.open++,n}closeExtra(t=!1){let e=this.nodes.length-1;if(e>this.open){for(;e>this.open;e--)this.nodes[e-1].content.push(this.nodes[e].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!(!this.isOpen&&!this.options.topOpen))}sync(t){for(let e=this.open;e>=0;e--){if(this.nodes[e]==t)return this.open=e,!0;this.localPreserveWS&&(this.nodes[e].options|=1)}return!1}get currentPos(){this.closeExtra();let t=0;for(let e=this.open;e>=0;e--){let n=this.nodes[e].content;for(let e=n.length-1;e>=0;e--)t+=n[e].nodeSize;e&&t++}return t}findAtPoint(t,e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==t&&this.find[n].offset==e&&(this.find[n].pos=this.currentPos)}findInside(t){if(this.find)for(let e=0;e<this.find.length;e++)null==this.find[e].pos&&1==t.nodeType&&t.contains(this.find[e].node)&&(this.find[e].pos=this.currentPos)}findAround(t,e,n){if(t!=e&&this.find)for(let r=0;r<this.find.length;r++)null==this.find[r].pos&&1==t.nodeType&&t.contains(this.find[r].node)&&e.compareDocumentPosition(this.find[r].node)&(n?2:4)&&(this.find[r].pos=this.currentPos)}findInText(t){if(this.find)for(let e=0;e<this.find.length;e++)this.find[e].node==t&&(this.find[e].pos=this.currentPos-(t.nodeValue.length-this.find[e].offset))}matchesContext(t){if(t.indexOf("|")>-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let e=t.split("/"),n=this.options.context,r=!(this.isOpen||n&&n.parent.type!=this.nodes[0].type),i=-(n?n.depth+1:0)+(r?0:1),o=(t,s)=>{for(;t>=0;t--){let a=e[t];if(""==a){if(t==e.length-1||0==t)continue;for(;s>=i;s--)if(o(t-1,s))return!0;return!1}{let t=s>0||0==s&&r?this.nodes[s].type:n&&s>=i?n.node(s-i).type:null;if(!t||t.name!=a&&!t.isInGroup(a))return!1;s--}}return!0};return o(e.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let e=t.depth;e>=0;e--){let n=t.node(e).contentMatchAt(t.indexAfter(e)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let t in this.parser.schema.nodes){let e=this.parser.schema.nodes[t];if(e.isTextblock&&e.defaultAttrs)return e}}};function Hl(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function Ul(t){let e={};for(let n in t)e[n]=t[n];return e}function Bl(t,e){let n=e.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(t))continue;let o=[],s=t=>{o.push(t);for(let n=0;n<t.edgeCount;n++){let{type:r,next:i}=t.edge(n);if(r==e||o.indexOf(i)<0&&s(i))return!0}};if(s(i.contentMatch))return!0}}var jl=class t_{constructor(t,e){this.nodes=t,this.marks=e}serializeFragment(t,e={},n){n||(n=zl(e).createDocumentFragment());let r=n,i=[];return t.forEach(t=>{if(i.length||t.marks.length){let n=0,o=0;for(;n<i.length&&o<t.marks.length;){let e=t.marks[o];if(this.marks[e.type.name]){if(!e.eq(i[n][0])||!1===e.type.spec.spanning)break;n++,o++}else o++}for(;n<i.length;)r=i.pop()[1];for(;o<t.marks.length;){let n=t.marks[o++],s=this.serializeMark(n,t.isInline,e);s&&(i.push([n,r]),r.appendChild(s.dom),r=s.contentDOM||s.dom)}}r.appendChild(this.serializeNodeInner(t,e))}),n}serializeNodeInner(t,e){let{dom:n,contentDOM:r}=Gl(zl(e),this.nodes[t.type.name](t),null,t.attrs);if(r){if(t.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(t.content,e,r)}return n}serializeNode(t,e={}){let n=this.serializeNodeInner(t,e);for(let r=t.marks.length-1;r>=0;r--){let i=this.serializeMark(t.marks[r],t.isInline,e);i&&((i.contentDOM||i.dom).appendChild(n),n=i.dom)}return n}serializeMark(t,e,n={}){let r=this.marks[t.type.name];return r&&Gl(zl(n),r(t,e),null,t.attrs)}static renderSpec(t,e,n=null,r){return Gl(t,e,n,r)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new t_(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let e=Vl(t.nodes);return e.text||(e.text=t=>t.text),e}static marksFromSchema(t){return Vl(t.marks)}};function Vl(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function zl(t){return t.document||window.document}const $l=new WeakMap;function Yl(t){let e=$l.get(t);return void 0===e&&$l.set(t,e=function(t){let e=null;function n(t){if(t&&"object"==typeof t)if(Array.isArray(t))if("string"==typeof t[0])e||(e=[]),e.push(t);else for(let e=0;e<t.length;e++)n(t[e]);else for(let e in t)n(t[e])}return n(t),e}(t)),e}function Gl(t,e,n,r){if("string"==typeof e)return{dom:t.createTextNode(e)};if(null!=e.nodeType)return{dom:e};if(e.dom&&null!=e.dom.nodeType)return e;let i,o=e[0];if("string"!=typeof o)throw new RangeError("Invalid array passed to renderSpec");if(r&&(i=Yl(r))&&i.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let s=o.indexOf(" ");s>0&&(n=o.slice(0,s),o=o.slice(s+1));let a,l=n?t.createElementNS(n,o):t.createElement(o),c=e[1],d=1;if(c&&"object"==typeof c&&null==c.nodeType&&!Array.isArray(c)){d=2;for(let t in c)if(null!=c[t]){let e=t.indexOf(" ");e>0?l.setAttributeNS(t.slice(0,e),t.slice(e+1),c[t]):"style"==t&&l.style?l.style.cssText=c[t]:l.setAttribute(t,c[t])}}for(let i=d;i<e.length;i++){let o=e[i];if(0===o){if(i<e.length-1||i>d)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}{let{dom:e,contentDOM:i}=Gl(t,o,n,r);if(l.appendChild(e),i){if(a)throw new RangeError("Multiple content holes");a=i}}}return{dom:l,contentDOM:a}}const Wl=Math.pow(2,16);function Xl(t,e){return t+e*Wl}function Kl(t){return 65535&t}var ql=class{constructor(t,e,n){this.pos=t,this.delInfo=e,this.recover=n}get deleted(){return(8&this.delInfo)>0}get deletedBefore(){return(5&this.delInfo)>0}get deletedAfter(){return(6&this.delInfo)>0}get deletedAcross(){return(4&this.delInfo)>0}},Jl=class Tr{constructor(t,e=!1){if(this.ranges=t,this.inverted=e,!t.length&&Tr.empty)return Tr.empty}recover(t){let e=0,n=Kl(t);if(!this.inverted)for(let t=0;t<n;t++)e+=this.ranges[3*t+2]-this.ranges[3*t+1];return this.ranges[3*n]+e+function(t){return(t-(65535&t))/Wl}(t)}mapResult(t,e=1){return this._map(t,e,!1)}map(t,e=1){return this._map(t,e,!0)}_map(t,e,n){let r=0,i=this.inverted?2:1,o=this.inverted?1:2;for(let s=0;s<this.ranges.length;s+=3){let a=this.ranges[s]-(this.inverted?r:0);if(a>t)break;let l=this.ranges[s+i],c=this.ranges[s+o],d=a+l;if(t<=d){let i=a+r+((l?t==a?-1:t==d?1:e:e)<0?0:c);if(n)return i;let o=t==(e<0?a:d)?null:Xl(s/3,t-a),h=t==a?2:t==d?1:4;return(e<0?t!=a:t!=d)&&(h|=8),new ql(i,h,o)}r+=c-l}return n?t+r:new ql(t+r,0,null)}touches(t,e){let n=0,r=Kl(e),i=this.inverted?2:1,o=this.inverted?1:2;for(let e=0;e<this.ranges.length;e+=3){let s=this.ranges[e]-(this.inverted?n:0);if(s>t)break;let a=this.ranges[e+i];if(t<=s+a&&e==3*r)return!0;n+=this.ranges[e+o]-a}return!1}forEach(t){let e=this.inverted?2:1,n=this.inverted?1:2;for(let r=0,i=0;r<this.ranges.length;r+=3){let o=this.ranges[r],s=o-(this.inverted?i:0),a=o+(this.inverted?0:i),l=this.ranges[r+e],c=this.ranges[r+n];t(s,s+l,a,a+c),i+=c-l}}invert(){return new Tr(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(t){return 0==t?Tr.empty:new Tr(t<0?[0,-t,0]:[0,0,t])}};Jl.empty=new Jl([]);var Zl=class Ou{constructor(t,e,n=0,r=(t?t.length:0)){this.mirror=e,this.from=n,this.to=r,this._maps=t||[],this.ownData=!(t||e)}get maps(){return this._maps}slice(t=0,e=this.maps.length){return new Ou(this._maps,this.mirror,t,e)}appendMap(t,e){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(t),null!=e&&this.setMirror(this._maps.length-1,e)}appendMapping(t){for(let e=0,n=this._maps.length;e<t._maps.length;e++){let r=t.getMirror(e);this.appendMap(t._maps[e],null!=r&&r<e?n+r:void 0)}}getMirror(t){if(this.mirror)for(let e=0;e<this.mirror.length;e++)if(this.mirror[e]==t)return this.mirror[e+(e%2?-1:1)]}setMirror(t,e){this.mirror||(this.mirror=[]),this.mirror.push(t,e)}appendMappingInverted(t){for(let e=t.maps.length-1,n=this._maps.length+t._maps.length;e>=0;e--){let r=t.getMirror(e);this.appendMap(t._maps[e].invert(),null!=r&&r>e?n-r-1:void 0)}}invert(){let t=new Ou;return t.appendMappingInverted(this),t}map(t,e=1){if(this.mirror)return this._map(t,e,!0);for(let n=this.from;n<this.to;n++)t=this._maps[n].map(t,e);return t}mapResult(t,e=1){return this._map(t,e,!1)}_map(t,e,n){let r=0;for(let n=this.from;n<this.to;n++){let i=this._maps[n].mapResult(t,e);if(null!=i.recover){let e=this.getMirror(n);if(null!=e&&e>n&&e<this.to){n=e,t=this._maps[e].recover(i.recover);continue}}r|=i.delInfo,t=i.pos}return n?t:new ql(t,r,null)}};const Ql=Object.create(null);var tc=class{getMap(){return Jl.empty}merge(t){return null}static fromJSON(t,e){if(!e||!e.stepType)throw new RangeError("Invalid input for Step.fromJSON");let n=Ql[e.stepType];if(!n)throw new RangeError(`No step type ${e.stepType} defined`);return n.fromJSON(t,e)}static jsonID(t,e){if(t in Ql)throw new RangeError("Duplicate use of step JSON ID "+t);return Ql[t]=e,e.prototype.jsonID=t,e}},ec=class _i{constructor(t,e){this.doc=t,this.failed=e}static ok(t){return new _i(t,null)}static fail(t){return new _i(null,t)}static fromReplace(t,e,n,r){try{return _i.ok(t.replace(e,n,r))}catch(t){if(t instanceof Ga)return _i.fail(t.message);throw t}}};function nc(t,e,n){let r=[];for(let i=0;i<t.childCount;i++){let o=t.child(i);o.content.size&&(o=o.copy(nc(o.content,e,o))),o.isInline&&(o=e(o,n,i)),r.push(o)}return ja.fromArray(r)}var rc=class gi extends tc{constructor(t,e,n){super(),this.from=t,this.to=e,this.mark=n}apply(t){let e=t.slice(this.from,this.to),n=t.resolve(this.from),r=n.node(n.sharedDepth(this.to)),i=new Wa(nc(e.content,(t,e)=>t.isAtom&&e.type.allowsMarkType(this.mark.type)?t.mark(this.mark.addToSet(t.marks)):t,r),e.openStart,e.openEnd);return ec.fromReplace(t,this.from,this.to,i)}invert(){return new ic(this.from,this.to,this.mark)}map(t){let e=t.mapResult(this.from,1),n=t.mapResult(this.to,-1);return e.deleted&&n.deleted||e.pos>=n.pos?null:new gi(e.pos,n.pos,this.mark)}merge(t){return t instanceof gi&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new gi(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new gi(e.from,e.to,t.markFromJSON(e.mark))}};tc.jsonID("addMark",rc);var ic=class Ai extends tc{constructor(t,e,n){super(),this.from=t,this.to=e,this.mark=n}apply(t){let e=t.slice(this.from,this.to),n=new Wa(nc(e.content,t=>t.mark(this.mark.removeFromSet(t.marks)),t),e.openStart,e.openEnd);return ec.fromReplace(t,this.from,this.to,n)}invert(){return new rc(this.from,this.to,this.mark)}map(t){let e=t.mapResult(this.from,1),n=t.mapResult(this.to,-1);return e.deleted&&n.deleted||e.pos>=n.pos?null:new Ai(e.pos,n.pos,this.mark)}merge(t){return t instanceof Ai&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new Ai(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Ai(e.from,e.to,t.markFromJSON(e.mark))}};tc.jsonID("removeMark",ic);var oc=class Si extends tc{constructor(t,e){super(),this.pos=t,this.mark=e}apply(t){let e=t.nodeAt(this.pos);if(!e)return ec.fail("No node at mark step's position");let n=e.type.create(e.attrs,null,this.mark.addToSet(e.marks));return ec.fromReplace(t,this.pos,this.pos+1,new Wa(ja.from(n),0,e.isLeaf?0:1))}invert(t){let e=t.nodeAt(this.pos);if(e){let t=this.mark.addToSet(e.marks);if(t.length==e.marks.length){for(let n=0;n<e.marks.length;n++)if(!e.marks[n].isInSet(t))return new Si(this.pos,e.marks[n]);return new Si(this.pos,this.mark)}}return new sc(this.pos,this.mark)}map(t){let e=t.mapResult(this.pos,1);return e.deletedAfter?null:new Si(e.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,e){if("number"!=typeof e.pos)throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new Si(e.pos,t.markFromJSON(e.mark))}};tc.jsonID("addNodeMark",oc);var sc=class Tu extends tc{constructor(t,e){super(),this.pos=t,this.mark=e}apply(t){let e=t.nodeAt(this.pos);if(!e)return ec.fail("No node at mark step's position");let n=e.type.create(e.attrs,null,this.mark.removeFromSet(e.marks));return ec.fromReplace(t,this.pos,this.pos+1,new Wa(ja.from(n),0,e.isLeaf?0:1))}invert(t){let e=t.nodeAt(this.pos);return e&&this.mark.isInSet(e.marks)?new oc(this.pos,this.mark):this}map(t){let e=t.mapResult(this.pos,1);return e.deletedAfter?null:new Tu(e.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,e){if("number"!=typeof e.pos)throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Tu(e.pos,t.markFromJSON(e.mark))}};tc.jsonID("removeNodeMark",sc);var ac=class Mn extends tc{constructor(t,e,n,r=!1){super(),this.from=t,this.to=e,this.slice=n,this.structure=r}apply(t){return this.structure&&cc(t,this.from,this.to)?ec.fail("Structure replace would overwrite content"):ec.fromReplace(t,this.from,this.to,this.slice)}getMap(){return new Jl([this.from,this.to-this.from,this.slice.size])}invert(t){return new Mn(this.from,this.from+this.slice.size,t.slice(this.from,this.to))}map(t){let e=t.mapResult(this.from,1),n=t.mapResult(this.to,-1);return e.deletedAcross&&n.deletedAcross?null:new Mn(e.pos,Math.max(e.pos,n.pos),this.slice,this.structure)}merge(t){if(!(t instanceof Mn)||t.structure||this.structure)return null;if(this.from+this.slice.size!=t.from||this.slice.openEnd||t.slice.openStart){if(t.to!=this.from||this.slice.openStart||t.slice.openEnd)return null;{let e=this.slice.size+t.slice.size==0?Wa.empty:new Wa(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new Mn(t.from,this.to,e,this.structure)}}{let e=this.slice.size+t.slice.size==0?Wa.empty:new Wa(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new Mn(this.from,this.to+(t.to-t.from),e,this.structure)}}toJSON(){let t={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to)throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new Mn(e.from,e.to,Wa.fromJSON(t,e.slice),!!e.structure)}};tc.jsonID("replace",ac);var lc=class Xs extends tc{constructor(t,e,n,r,i,o,s=!1){super(),this.from=t,this.to=e,this.gapFrom=n,this.gapTo=r,this.slice=i,this.insert=o,this.structure=s}apply(t){if(this.structure&&(cc(t,this.from,this.gapFrom)||cc(t,this.gapTo,this.to)))return ec.fail("Structure gap-replace would overwrite content");let e=t.slice(this.gapFrom,this.gapTo);if(e.openStart||e.openEnd)return ec.fail("Gap is not a flat range");let n=this.slice.insertAt(this.insert,e.content);return n?ec.fromReplace(t,this.from,this.to,n):ec.fail("Content does not fit in gap")}getMap(){return new Jl([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(t){let e=this.gapTo-this.gapFrom;return new Xs(this.from,this.from+this.slice.size+e,this.from+this.insert,this.from+this.insert+e,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(t){let e=t.mapResult(this.from,1),n=t.mapResult(this.to,-1),r=this.from==this.gapFrom?e.pos:t.map(this.gapFrom,-1),i=this.to==this.gapTo?n.pos:t.map(this.gapTo,1);return e.deletedAcross&&n.deletedAcross||r<e.pos||i>n.pos?null:new Xs(e.pos,n.pos,r,i,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to||"number"!=typeof e.gapFrom||"number"!=typeof e.gapTo||"number"!=typeof e.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Xs(e.from,e.to,e.gapFrom,e.gapTo,Wa.fromJSON(t,e.slice),e.insert,!!e.structure)}};function cc(t,e,n){let r=t.resolve(e),i=n-e,o=r.depth;for(;i>0&&o>0&&r.indexAfter(o)==r.node(o).childCount;)o--,i--;if(i>0){let t=r.node(o).maybeChild(r.indexAfter(o));for(;i>0;){if(!t||t.isLeaf)return!0;t=t.firstChild,i--}}return!1}function uc(t,e,n,r=n.contentMatch,i=!0){let o=t.doc.nodeAt(e),s=[],a=e+1;for(let e=0;e<o.childCount;e++){let l=o.child(e),c=a+l.nodeSize,d=r.matchType(l.type);if(d){r=d;for(let e=0;e<l.marks.length;e++)n.allowsMarkType(l.marks[e].type)||t.step(new ic(a,c,l.marks[e]));if(i&&l.isText&&"pre"!=n.whitespace){let t,e,r=/\r?\n|\r/g;for(;t=r.exec(l.text);)e||(e=new Wa(ja.from(n.schema.text(" ",n.allowedMarks(l.marks))),0,0)),s.push(new ac(a+t.index,a+t.index+t[0].length,e))}}else s.push(new ac(a,c,Wa.empty));a=c}if(!r.validEnd){let e=r.fillBefore(ja.empty,!0);t.replace(a,a,new Wa(e,0,0))}for(let e=s.length-1;e>=0;e--)t.step(s[e])}function dc(t,e,n){return(0==e||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function hc(t){let e=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let n=t.depth,r=0,i=0;;--n){let o=t.$from.node(n),s=t.$from.index(n)+r,a=t.$to.indexAfter(n)-i;if(n<t.depth&&o.canReplace(s,a,e))return n;if(0==n||o.type.spec.isolating||!dc(o,s,a))break;s&&(r=1),a<o.childCount&&(i=1)}return null}function pc(t,e,n,r){e.forEach((i,o)=>{if(i.isText){let s,a=/\r?\n|\r/g;for(;s=a.exec(i.text);){let i=t.mapping.slice(r).map(n+1+o+s.index);t.replaceWith(i,i+1,e.type.schema.linebreakReplacement.create())}}})}function fc(t,e,n,r){e.forEach((i,o)=>{if(i.type==i.type.schema.linebreakReplacement){let i=t.mapping.slice(r).map(n+1+o);t.replaceWith(i,i+1,e.type.schema.text("\n"))}})}function mc(t,e,n=1,r){let i=t.resolve(e),o=i.depth-n,s=r&&r[r.length-1]||i.parent;if(o<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!s.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let t=i.depth-1,e=n-2;t>o;t--,e--){let n=i.node(t),o=i.index(t);if(n.type.spec.isolating)return!1;let s=n.content.cutByIndex(o,n.childCount),a=r&&r[e+1];a&&(s=s.replaceChild(0,a.type.create(a.attrs)));let l=r&&r[e]||n;if(!n.canReplace(o+1,n.childCount)||!l.type.validContent(s))return!1}let a=i.indexAfter(o),l=r&&r[0];return i.node(o).canReplaceWith(a,a,l?l.type:i.node(o+1).type)}function Ec(t,e){let n=t.resolve(e),r=n.index();return function(t,e){return!(!t||!e||t.isLeaf||!function(t,e){e.content.size||t.type.compatibleContent(e.type);let n=t.contentMatchAt(t.childCount),{linebreakReplacement:r}=t.type.schema;for(let i=0;i<e.childCount;i++){let o=e.child(i),s=o.type==r?t.type.schema.nodes.text:o.type;if(n=n.matchType(s),!n||!t.type.allowsMarks(o.marks))return!1}return n.validEnd}(t,e))}(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function _c(t,e,n=e,r=Wa.empty){if(e==n&&!r.size)return null;let i=t.resolve(e),o=t.resolve(n);return Ac(i,o,r)?new ac(e,n,r):new gc(i,o,r).fit()}function Ac(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}tc.jsonID("replaceAround",lc);var gc=class{constructor(t,e,n){this.$from=t,this.$to=e,this.unplaced=n,this.frontier=[],this.placed=ja.empty;for(let e=0;e<=t.depth;e++){let n=t.node(e);this.frontier.push({type:n.type,match:n.contentMatchAt(t.indexAfter(e))})}for(let e=t.depth;e>0;e--)this.placed=ja.from(t.node(e).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let t=this.findFittable();t?this.placeNodes(t):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),e=this.placed.size-this.depth-this.$from.depth,n=this.$from,r=this.close(t<0?this.$to:n.doc.resolve(t));if(!r)return null;let i=this.placed,o=n.depth,s=r.depth;for(;o&&s&&1==i.childCount;)i=i.firstChild.content,o--,s--;let a=new Wa(i,o,s);return t>-1?new lc(n.pos,t,this.$to.pos,this.$to.end(),a,e):a.size||n.pos!=this.$to.pos?new ac(n.pos,r.pos,a):null}findFittable(){let t=this.unplaced.openStart;for(let e=this.unplaced.content,n=0,r=this.unplaced.openEnd;n<t;n++){let i=e.firstChild;if(e.childCount>1&&(r=0),i.type.spec.isolating&&r<=n){t=n;break}e=i.content}for(let e=1;e<=2;e++)for(let n=1==e?t:this.unplaced.openStart;n>=0;n--){let t,r=null;n?(r=Oc(this.unplaced.content,n-1).firstChild,t=r.content):t=this.unplaced.content;let i=t.firstChild;for(let t=this.depth;t>=0;t--){let o,{type:s,match:a}=this.frontier[t],l=null;if(1==e&&(i?a.matchType(i.type)||(l=a.fillBefore(ja.from(i),!1)):r&&s.compatibleContent(r.type)))return{sliceDepth:n,frontierDepth:t,parent:r,inject:l};if(2==e&&i&&(o=a.findWrapping(i.type)))return{sliceDepth:n,frontierDepth:t,parent:r,wrap:o};if(r&&a.matchType(r.type))break}}}openMore(){let{content:t,openStart:e,openEnd:n}=this.unplaced,r=Oc(t,e);return!(!r.childCount||r.firstChild.isLeaf)&&(this.unplaced=new Wa(t,e+1,Math.max(n,r.size+e>=t.size-n?e+1:0)),!0)}dropNode(){let{content:t,openStart:e,openEnd:n}=this.unplaced,r=Oc(t,e);if(r.childCount<=1&&e>0){let i=t.size-e<=e+r.size;this.unplaced=new Wa(Sc(t,e-1,1),e-1,i?e-1:n)}else this.unplaced=new Wa(Sc(t,e,1),e,n)}placeNodes({sliceDepth:t,frontierDepth:e,parent:n,inject:r,wrap:i}){for(;this.depth>e;)this.closeFrontierNode();if(i)for(let t=0;t<i.length;t++)this.openFrontierNode(i[t]);let o=this.unplaced,s=n?n.content:o.content,a=o.openStart-t,l=0,c=[],{match:d,type:h}=this.frontier[e];if(r){for(let t=0;t<r.childCount;t++)c.push(r.child(t));d=d.matchFragment(r)}let p=s.size+t-(o.content.size-o.openEnd);for(;l<s.childCount;){let t=s.child(l),e=d.matchType(t.type);if(!e)break;l++,(l>1||0==a||t.content.size)&&(d=e,c.push(Dc(t.mark(h.allowedMarks(t.marks)),1==l?a:0,l==s.childCount?p:-1)))}let f=l==s.childCount;f||(p=-1),this.placed=vc(this.placed,e,ja.from(c)),this.frontier[e].match=d,f&&p<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let t=0,e=s;t<p;t++){let t=e.lastChild;this.frontier.push({type:t.type,match:t.contentMatchAt(t.childCount)}),e=t.content}this.unplaced=f?0==t?Wa.empty:new Wa(Sc(o.content,t-1,1),t-1,p<0?o.openEnd:t-1):new Wa(Sc(o.content,t,l),o.openStart,o.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let t,e=this.frontier[this.depth];if(!e.type.isTextblock||!Tc(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(t=this.findCloseLevel(this.$to))&&t.depth==this.depth)return-1;let{depth:n}=this.$to,r=this.$to.after(n);for(;n>1&&r==this.$to.end(--n);)++r;return r}findCloseLevel(t){t:for(let e=Math.min(this.depth,t.depth);e>=0;e--){let{match:n,type:r}=this.frontier[e],i=e<t.depth&&t.end(e+1)==t.pos+(t.depth-(e+1)),o=Tc(t,e,r,n,i);if(o){for(let n=e-1;n>=0;n--){let{match:e,type:r}=this.frontier[n],i=Tc(t,n,r,e,!0);if(!i||i.childCount)continue t}return{depth:e,fit:o,move:i?t.doc.resolve(t.after(e+1)):t}}}}close(t){let e=this.findCloseLevel(t);if(!e)return null;for(;this.depth>e.depth;)this.closeFrontierNode();e.fit.childCount&&(this.placed=vc(this.placed,e.depth,e.fit)),t=e.move;for(let n=e.depth+1;n<=t.depth;n++){let e=t.node(n),r=e.type.contentMatch.fillBefore(e.content,!0,t.index(n));this.openFrontierNode(e.type,e.attrs,r)}return t}openFrontierNode(t,e=null,n){let r=this.frontier[this.depth];r.match=r.match.matchType(t),this.placed=vc(this.placed,this.depth,ja.from(t.create(e,n))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let t=this.frontier.pop().match.fillBefore(ja.empty,!0);t.childCount&&(this.placed=vc(this.placed,this.frontier.length,t))}};function Sc(t,e,n){return 0==e?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(Sc(t.firstChild.content,e-1,n)))}function vc(t,e,n){return 0==e?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(vc(t.lastChild.content,e-1,n)))}function Oc(t,e){for(let n=0;n<e;n++)t=t.firstChild.content;return t}function Dc(t,e,n){if(e<=0)return t;let r=t.content;return e>1&&(r=r.replaceChild(0,Dc(r.firstChild,e-1,1==r.childCount?n-1:0))),e>0&&(r=t.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(t.type.contentMatch.matchFragment(r).fillBefore(ja.empty,!0)))),t.copy(r)}function Tc(t,e,n,r,i){let o=t.node(e),s=i?t.indexAfter(e):t.index(e);if(s==o.childCount&&!n.compatibleContent(o.type))return null;let a=r.fillBefore(o.content,!0,s);return a&&!function(t,e,n){for(let r=n;r<e.childCount;r++)if(!t.allowsMarks(e.child(r).marks))return!0;return!1}(n,o.content,s)?a:null}function Rc(t){return t.spec.defining||t.spec.definingForContent}function yc(t,e,n,r,i){if(e<n){let i=t.firstChild;t=t.replaceChild(0,i.copy(yc(i.content,e+1,n,r,i)))}if(e>r){let e=i.contentMatchAt(0),n=e.fillBefore(t).append(t);t=n.append(e.matchFragment(n).fillBefore(ja.empty,!0))}return t}function Ic(t,e){let n=[];for(let r=Math.min(t.depth,e.depth);r>=0;r--){let i=t.start(r);if(i<t.pos-(t.depth-r)||e.end(r)>e.pos+(e.depth-r)||t.node(r).type.spec.isolating||e.node(r).type.spec.isolating)break;(i==e.start(r)||r==t.depth&&r==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&r&&e.start(r-1)==i-1)&&n.push(r)}return n}var Cc=class Js extends tc{constructor(t,e,n){super(),this.pos=t,this.attr=e,this.value=n}apply(t){let e=t.nodeAt(this.pos);if(!e)return ec.fail("No node at attribute step's position");let n=Object.create(null);for(let t in e.attrs)n[t]=e.attrs[t];n[this.attr]=this.value;let r=e.type.create(n,null,e.marks);return ec.fromReplace(t,this.pos,this.pos+1,new Wa(ja.from(r),0,e.isLeaf?0:1))}getMap(){return Jl.empty}invert(t){return new Js(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let e=t.mapResult(this.pos,1);return e.deletedAfter?null:new Js(e.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,e){if("number"!=typeof e.pos||"string"!=typeof e.attr)throw new RangeError("Invalid input for AttrStep.fromJSON");return new Js(e.pos,e.attr,e.value)}};tc.jsonID("attr",Cc);var Nc=class Ru extends tc{constructor(t,e){super(),this.attr=t,this.value=e}apply(t){let e=Object.create(null);for(let n in t.attrs)e[n]=t.attrs[n];e[this.attr]=this.value;let n=t.type.create(e,t.content,t.marks);return ec.ok(n)}getMap(){return Jl.empty}invert(t){return new Ru(this.attr,t.attrs[this.attr])}map(t){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(t,e){if("string"!=typeof e.attr)throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new Ru(e.attr,e.value)}};tc.jsonID("docAttr",Nc);let bc=class extends Error{};bc=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n},(bc.prototype=Object.create(Error.prototype)).constructor=bc,bc.prototype.name="TransformError";var wc=class{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new Zl}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let e=this.maybeStep(t);if(e.failed)throw new bc(e.failed);return this}maybeStep(t){let e=t.apply(this.doc);return e.failed||this.addStep(t,e.doc),e}get docChanged(){return this.steps.length>0}addStep(t,e){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=e}replace(t,e=t,n=Wa.empty){let r=_c(this.doc,t,e,n);return r&&this.step(r),this}replaceWith(t,e,n){return this.replace(t,e,new Wa(ja.from(n),0,0))}delete(t,e){return this.replace(t,e,Wa.empty)}insert(t,e){return this.replaceWith(t,t,e)}replaceRange(t,e,n){return function(t,e,n,r){if(!r.size)return t.deleteRange(e,n);let i=t.doc.resolve(e),o=t.doc.resolve(n);if(Ac(i,o,r))return t.step(new ac(e,n,r));let s=Ic(i,o);0==s[s.length-1]&&s.pop();let a=-(i.depth+1);s.unshift(a);for(let t=i.depth,e=i.pos-1;t>0;t--,e--){let n=i.node(t).type.spec;if(n.defining||n.definingAsContext||n.isolating)break;s.indexOf(t)>-1?a=t:i.before(t)==e&&s.splice(1,0,-t)}let l=s.indexOf(a),c=[],d=r.openStart;for(let t=r.content,e=0;;e++){let n=t.firstChild;if(c.push(n),e==r.openStart)break;t=n.content}for(let t=d-1;t>=0;t--){let e=c[t],n=Rc(e.type);if(n&&!e.sameMarkup(i.node(Math.abs(a)-1)))d=t;else if(n||!e.type.isTextblock)break}for(let e=r.openStart;e>=0;e--){let a=(e+d+1)%(r.openStart+1),h=c[a];if(h)for(let e=0;e<s.length;e++){let c=s[(e+l)%s.length],d=!0;c<0&&(d=!1,c=-c);let p=i.node(c-1),f=i.index(c-1);if(p.canReplaceWith(f,f,h.type,h.marks))return t.replace(i.before(c),d?o.after(c):n,new Wa(yc(r.content,0,r.openStart,a),a,r.openEnd))}}let h=t.steps.length;for(let a=s.length-1;a>=0&&(t.replace(e,n,r),!(t.steps.length>h));a--){let t=s[a];t<0||(e=i.before(t),n=o.after(t))}}(this,t,e,n),this}replaceRangeWith(t,e,n){return function(t,e,n,r){if(!r.isInline&&e==n&&t.doc.resolve(e).parent.content.size){let i=function(t,e,n){let r=t.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),n))return e;if(0==r.parentOffset)for(let t=r.depth-1;t>=0;t--){let e=r.index(t);if(r.node(t).canReplaceWith(e,e,n))return r.before(t+1);if(e>0)return null}if(r.parentOffset==r.parent.content.size)for(let t=r.depth-1;t>=0;t--){let e=r.indexAfter(t);if(r.node(t).canReplaceWith(e,e,n))return r.after(t+1);if(e<r.node(t).childCount)return null}return null}(t.doc,e,r.type);null!=i&&(e=n=i)}t.replaceRange(e,n,new Wa(ja.from(r),0,0))}(this,t,e,n),this}deleteRange(t,e){return function(t,e,n){let r=t.doc.resolve(e),i=t.doc.resolve(n),o=Ic(r,i);for(let e=0;e<o.length;e++){let n=o[e],s=e==o.length-1;if(s&&0==n||r.node(n).type.contentMatch.validEnd)return t.delete(r.start(n),i.end(n));if(n>0&&(s||r.node(n-1).canReplace(r.index(n-1),i.indexAfter(n-1))))return t.delete(r.before(n),i.after(n))}for(let o=1;o<=r.depth&&o<=i.depth;o++)if(e-r.start(o)==r.depth-o&&n>r.end(o)&&i.end(o)-n!=i.depth-o&&r.start(o-1)==i.start(o-1)&&r.node(o-1).canReplace(r.index(o-1),i.index(o-1)))return t.delete(r.before(o),n);t.delete(e,n)}(this,t,e),this}lift(t,e){return function(t,e,n){let{$from:r,$to:i,depth:o}=e,s=r.before(o+1),a=i.after(o+1),l=s,c=a,d=ja.empty,h=0;for(let t=o,e=!1;t>n;t--)e||r.index(t)>0?(e=!0,d=ja.from(r.node(t).copy(d)),h++):l--;let p=ja.empty,f=0;for(let t=o,e=!1;t>n;t--)e||i.after(t+1)<i.end(t)?(e=!0,p=ja.from(i.node(t).copy(p)),f++):c++;t.step(new lc(l,c,s,a,new Wa(d.append(p),h,f),d.size-h,!0))}(this,t,e),this}join(t,e=1){return function(t,e,n){let r=null,{linebreakReplacement:i}=t.doc.type.schema,o=t.doc.resolve(e-n),s=o.node().type;if(i&&s.inlineContent){let t="pre"==s.whitespace,e=!!s.contentMatch.matchType(i);t&&!e?r=!1:!t&&e&&(r=!0)}let a=t.steps.length;if(!1===r){let r=t.doc.resolve(e+n);fc(t,r.node(),r.before(),a)}s.inlineContent&&uc(t,e+n-1,s,o.node().contentMatchAt(o.index()),null==r);let l=t.mapping.slice(a),c=l.map(e-n);if(t.step(new ac(c,l.map(e+n,-1),Wa.empty,!0)),!0===r){let e=t.doc.resolve(c);pc(t,e.node(),e.before(),t.steps.length)}}(this,t,e),this}wrap(t,e){return function(t,e,n){let r=ja.empty;for(let t=n.length-1;t>=0;t--){if(r.size){let e=n[t].type.contentMatch.matchFragment(r);if(!e||!e.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=ja.from(n[t].type.create(n[t].attrs,r))}let i=e.start,o=e.end;t.step(new lc(i,o,i,o,new Wa(r,0,0),n.length,!0))}(this,t,e),this}setBlockType(t,e=t,n,r=null){return function(t,e,n,r,i){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let o=t.steps.length;t.doc.nodesBetween(e,n,(e,n)=>{let s="function"==typeof i?i(e):i;if(e.isTextblock&&!e.hasMarkup(r,s)&&function(t,e,n){let r=t.resolve(e),i=r.index();return r.parent.canReplaceWith(i,i+1,n)}(t.doc,t.mapping.slice(o).map(n),r)){let i=null;if(r.schema.linebreakReplacement){let t="pre"==r.whitespace,e=!!r.contentMatch.matchType(r.schema.linebreakReplacement);t&&!e?i=!1:!t&&e&&(i=!0)}!1===i&&fc(t,e,n,o),uc(t,t.mapping.slice(o).map(n,1),r,void 0,null===i);let a=t.mapping.slice(o),l=a.map(n,1),c=a.map(n+e.nodeSize,1);return t.step(new lc(l,c,l+1,c-1,new Wa(ja.from(r.create(s,null,e.marks)),0,0),1,!0)),!0===i&&pc(t,e,n,o),!1}})}(this,t,e,n,r),this}setNodeMarkup(t,e,n=null,r){return function(t,e,n,r,i){let o=t.doc.nodeAt(e);if(!o)throw new RangeError("No node at given position");n||(n=o.type);let s=n.create(r,null,i||o.marks);if(o.isLeaf)return t.replaceWith(e,e+o.nodeSize,s);if(!n.validContent(o.content))throw new RangeError("Invalid content for node type "+n.name);t.step(new lc(e,e+o.nodeSize,e+1,e+o.nodeSize-1,new Wa(ja.from(s),0,0),1,!0))}(this,t,e,n,r),this}setNodeAttribute(t,e,n){return this.step(new Cc(t,e,n)),this}setDocAttribute(t,e){return this.step(new Nc(t,e)),this}addNodeMark(t,e){return this.step(new oc(t,e)),this}removeNodeMark(t,e){let n=this.doc.nodeAt(t);if(!n)throw new RangeError("No node at position "+t);if(e instanceof Ya)e.isInSet(n.marks)&&this.step(new sc(t,e));else{let r,i=n.marks,o=[];for(;r=e.isInSet(i);)o.push(new sc(t,r)),i=r.removeFromSet(i);for(let t=o.length-1;t>=0;t--)this.step(o[t])}return this}split(t,e=1,n){return function(t,e,n=1,r){let i=t.doc.resolve(e),o=ja.empty,s=ja.empty;for(let t=i.depth,e=i.depth-n,a=n-1;t>e;t--,a--){o=ja.from(i.node(t).copy(o));let e=r&&r[a];s=ja.from(e?e.type.create(e.attrs,s):i.node(t).copy(s))}t.step(new ac(e,e,new Wa(o.append(s),n,n),!0))}(this,t,e,n),this}addMark(t,e,n){return function(t,e,n,r){let i,o,s=[],a=[];t.doc.nodesBetween(e,n,(t,l,c)=>{if(!t.isInline)return;let d=t.marks;if(!r.isInSet(d)&&c.type.allowsMarkType(r.type)){let c=Math.max(l,e),h=Math.min(l+t.nodeSize,n),p=r.addToSet(d);for(let t=0;t<d.length;t++)d[t].isInSet(p)||(i&&i.to==c&&i.mark.eq(d[t])?i.to=h:s.push(i=new ic(c,h,d[t])));o&&o.to==c?o.to=h:a.push(o=new rc(c,h,r))}}),s.forEach(e=>t.step(e)),a.forEach(e=>t.step(e))}(this,t,e,n),this}removeMark(t,e,n){return function(t,e,n,r){let i=[],o=0;t.doc.nodesBetween(e,n,(t,s)=>{if(!t.isInline)return;o++;let a=null;if(r instanceof Nl){let e,n=t.marks;for(;e=r.isInSet(n);)(a||(a=[])).push(e),n=e.removeFromSet(n)}else r?r.isInSet(t.marks)&&(a=[r]):a=t.marks;if(a&&a.length){let r=Math.min(s+t.nodeSize,n);for(let t=0;t<a.length;t++){let n,l=a[t];for(let t=0;t<i.length;t++){let e=i[t];e.step==o-1&&l.eq(i[t].style)&&(n=e)}n?(n.to=r,n.step=o):i.push({style:l,from:Math.max(s,e),to:r,step:o})}}}),i.forEach(e=>t.step(new ic(e.from,e.to,e.style)))}(this,t,e,n),this}clearIncompatible(t,e,n){return uc(this,t,e,n),this}};const kc=Object.create(null);var Lc=class{constructor(t,e,n){this.$anchor=t,this.$head=e,this.ranges=n||[new Mc(t.min(e),t.max(e))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let t=this.ranges;for(let e=0;e<t.length;e++)if(t[e].$from.pos!=t[e].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(t,e=Wa.empty){let n=e.content.lastChild,r=null;for(let t=0;t<e.openEnd;t++)r=n,n=n.lastChild;let i=t.steps.length,o=this.ranges;for(let s=0;s<o.length;s++){let{$from:a,$to:l}=o[s],c=t.mapping.slice(i);t.replaceRange(c.map(a.pos),c.map(l.pos),s?Wa.empty:e),0==s&&$c(t,i,(n?n.isInline:r&&r.isTextblock)?-1:1)}}replaceWith(t,e){let n=t.steps.length,r=this.ranges;for(let i=0;i<r.length;i++){let{$from:o,$to:s}=r[i],a=t.mapping.slice(n),l=a.map(o.pos),c=a.map(s.pos);i?t.deleteRange(l,c):(t.replaceRangeWith(l,c,e),$c(t,n,e.isInline?-1:1))}}static findFrom(t,e,n=!1){let r=t.parent.inlineContent?new Fc(t):zc(t.node(0),t.parent,t.pos,t.index(),e,n);if(r)return r;for(let r=t.depth-1;r>=0;r--){let i=e<0?zc(t.node(0),t.node(r),t.before(r+1),t.index(r),e,n):zc(t.node(0),t.node(r),t.after(r+1),t.index(r)+1,e,n);if(i)return i}return null}static near(t,e=1){return this.findFrom(t,e)||this.findFrom(t,-e)||new jc(t.node(0))}static atStart(t){return zc(t,t,0,0,1)||new jc(t)}static atEnd(t){return zc(t,t,t.content.size,t.childCount,-1)||new jc(t)}static fromJSON(t,e){if(!e||!e.type)throw new RangeError("Invalid input for Selection.fromJSON");let n=kc[e.type];if(!n)throw new RangeError(`No selection type ${e.type} defined`);return n.fromJSON(t,e)}static jsonID(t,e){if(t in kc)throw new RangeError("Duplicate use of selection JSON ID "+t);return kc[t]=e,e.prototype.jsonID=t,e}getBookmark(){return Fc.between(this.$anchor,this.$head).getBookmark()}};Lc.prototype.visible=!0;var Mc=class{constructor(t,e){this.$from=t,this.$to=e}};let Pc=!1;function xc(t){!Pc&&!t.parent.inlineContent&&(Pc=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}var Fc=class Ti extends Lc{constructor(t,e=t){xc(t),xc(e),super(t,e)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,e){let n=t.resolve(e.map(this.head));if(!n.parent.inlineContent)return Lc.near(n);let r=t.resolve(e.map(this.anchor));return new Ti(r.parent.inlineContent?r:n,n)}replace(t,e=Wa.empty){if(super.replace(t,e),e==Wa.empty){let e=this.$from.marksAcross(this.$to);e&&t.ensureMarks(e)}}eq(t){return t instanceof Ti&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new Hc(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,e){if("number"!=typeof e.anchor||"number"!=typeof e.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new Ti(t.resolve(e.anchor),t.resolve(e.head))}static create(t,e,n=e){let r=t.resolve(e);return new this(r,n==e?r:t.resolve(n))}static between(t,e,n){let r=t.pos-e.pos;if((!n||r)&&(n=r>=0?1:-1),!e.parent.inlineContent){let t=Lc.findFrom(e,n,!0)||Lc.findFrom(e,-n,!0);if(!t)return Lc.near(e,n);e=t.$head}return t.parent.inlineContent||(0==r?t=e:(t=(Lc.findFrom(t,-n,!0)||Lc.findFrom(t,n,!0)).$anchor).pos<e.pos!=r<0&&(t=e)),new Ti(t,e)}};Lc.jsonID("text",Fc);var Hc=class __{constructor(t,e){this.anchor=t,this.head=e}map(t){return new __(t.map(this.anchor),t.map(this.head))}resolve(t){return Fc.between(t.resolve(this.anchor),t.resolve(this.head))}},Uc=class Di extends Lc{constructor(t){let e=t.nodeAfter,n=t.node(0).resolve(t.pos+e.nodeSize);super(t,n),this.node=e}map(t,e){let{deleted:n,pos:r}=e.mapResult(this.anchor),i=t.resolve(r);return n?Lc.near(i):new Di(i)}content(){return new Wa(ja.from(this.node),0,0)}eq(t){return t instanceof Di&&t.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new Bc(this.anchor)}static fromJSON(t,e){if("number"!=typeof e.anchor)throw new RangeError("Invalid input for NodeSelection.fromJSON");return new Di(t.resolve(e.anchor))}static create(t,e){return new Di(t.resolve(e))}static isSelectable(t){return!t.isText&&!1!==t.type.spec.selectable}};Uc.prototype.visible=!1,Lc.jsonID("node",Uc);var Bc=class g_{constructor(t){this.anchor=t}map(t){let{deleted:e,pos:n}=t.mapResult(this.anchor);return e?new Hc(n,n):new g_(n)}resolve(t){let e=t.resolve(this.anchor),n=e.nodeAfter;return n&&Uc.isSelectable(n)?new Uc(e):Lc.near(e)}},jc=class Zs extends Lc{constructor(t){super(t.resolve(0),t.resolve(t.content.size))}replace(t,e=Wa.empty){if(e==Wa.empty){t.delete(0,t.doc.content.size);let e=Lc.atStart(t.doc);e.eq(t.selection)||t.setSelection(e)}else super.replace(t,e)}toJSON(){return{type:"all"}}static fromJSON(t){return new Zs(t)}map(t){return new Zs(t)}eq(t){return t instanceof Zs}getBookmark(){return Vc}};Lc.jsonID("all",jc);const Vc={map(){return this},resolve:t=>new jc(t)};function zc(t,e,n,r,i,o=!1){if(e.inlineContent)return Fc.create(t,n);for(let s=r-(i>0?0:1);i>0?s<e.childCount:s>=0;s+=i){let r=e.child(s);if(r.isAtom){if(!o&&Uc.isSelectable(r))return Uc.create(t,n-(i<0?r.nodeSize:0))}else{let e=zc(t,r,n+i,i<0?r.childCount:0,i,o);if(e)return e}n+=r.nodeSize*i}return null}function $c(t,e,n){let r=t.steps.length-1;if(r<e)return;let i,o=t.steps[r];(o instanceof ac||o instanceof lc)&&(t.mapping.maps[r].forEach((t,e,n,r)=>{null==i&&(i=r)}),t.setSelection(Lc.near(t.doc.resolve(i),n)))}var Yc=class extends wc{constructor(t){super(t.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=t.selection,this.storedMarks=t.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(t){if(t.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=t,this.curSelectionFor=this.steps.length,this.updated=-3&this.updated|1,this.storedMarks=null,this}get selectionSet(){return(1&this.updated)>0}setStoredMarks(t){return this.storedMarks=t,this.updated|=2,this}ensureMarks(t){return Ya.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this}addStoredMark(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(2&this.updated)>0}addStep(t,e){super.addStep(t,e),this.updated=-3&this.updated,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,e=!0){let n=this.selection;return e&&(t=t.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||Ya.none))),n.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,e,n){let r=this.doc.type.schema;if(null==e)return t?this.replaceSelectionWith(r.text(t),!0):this.deleteSelection();{if(null==n&&(n=e),n=null==n?e:n,!t)return this.deleteRange(e,n);let i=this.storedMarks;if(!i){let t=this.doc.resolve(e);i=n==e?t.marks():t.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(e,n,r.text(t,i)),this.selection.empty||this.setSelection(Lc.near(this.selection.$to)),this}}setMeta(t,e){return this.meta["string"==typeof t?t:t.key]=e,this}getMeta(t){return this.meta["string"==typeof t?t:t.key]}get isGeneric(){for(let t in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=4,this}get scrolledIntoView(){return(4&this.updated)>0}};function Gc(t,e){return e&&t?t.bind(e):t}var Wc=class{constructor(t,e,n){this.name=t,this.init=Gc(e.init,n),this.apply=Gc(e.apply,n)}};const Xc=[new Wc("doc",{init:t=>t.doc||t.schema.topNodeType.createAndFill(),apply:t=>t.doc}),new Wc("selection",{init:(t,e)=>t.selection||Lc.atStart(e.doc),apply:t=>t.selection}),new Wc("storedMarks",{init:t=>t.storedMarks||null,apply:(t,e,n,r)=>r.selection.$cursor?t.storedMarks:null}),new Wc("scrollToSelection",{init:()=>0,apply:(t,e)=>t.scrolledIntoView?e+1:e})];var Kc=class{constructor(t,e){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=Xc.slice(),e&&e.forEach(t=>{if(this.pluginsByKey[t.key])throw new RangeError("Adding different instances of a keyed plugin ("+t.key+")");this.plugins.push(t),this.pluginsByKey[t.key]=t,t.spec.state&&this.fields.push(new Wc(t.key,t.spec.state,t))})}},qc=class Ci{constructor(t){this.config=t}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(t){return this.applyTransaction(t).state}filterTransaction(t,e=-1){for(let n=0;n<this.config.plugins.length;n++)if(n!=e){let e=this.config.plugins[n];if(e.spec.filterTransaction&&!e.spec.filterTransaction.call(e,t,this))return!1}return!0}applyTransaction(t){if(!this.filterTransaction(t))return{state:this,transactions:[]};let e=[t],n=this.applyInner(t),r=null;for(;;){let i=!1;for(let o=0;o<this.config.plugins.length;o++){let s=this.config.plugins[o];if(s.spec.appendTransaction){let a=r?r[o].n:0,l=r?r[o].state:this,c=a<e.length&&s.spec.appendTransaction.call(s,a?e.slice(a):e,l,n);if(c&&n.filterTransaction(c,o)){if(c.setMeta("appendedTransaction",t),!r){r=[];for(let t=0;t<this.config.plugins.length;t++)r.push(t<o?{state:n,n:e.length}:{state:this,n:0})}e.push(c),n=n.applyInner(c),i=!0}r&&(r[o]={state:n,n:e.length})}}if(!i)return{state:n,transactions:e}}}applyInner(t){if(!t.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let e=new Ci(this.config),n=this.config.fields;for(let r=0;r<n.length;r++){let i=n[r];e[i.name]=i.apply(t,this[i.name],this,e)}return e}get tr(){return new Yc(this)}static create(t){let e=new Kc(t.doc?t.doc.type.schema:t.schema,t.plugins),n=new Ci(e);for(let r=0;r<e.fields.length;r++)n[e.fields[r].name]=e.fields[r].init(t,n);return n}reconfigure(t){let e=new Kc(this.schema,t.plugins),n=e.fields,r=new Ci(e);for(let e=0;e<n.length;e++){let i=n[e].name;r[i]=this.hasOwnProperty(i)?this[i]:n[e].init(t,r)}return r}toJSON(t){let e={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(e.storedMarks=this.storedMarks.map(t=>t.toJSON())),t&&"object"==typeof t)for(let n in t){if("doc"==n||"selection"==n)throw new RangeError("The JSON fields `doc` and `selection` are reserved");let r=t[n],i=r.spec.state;i&&i.toJSON&&(e[n]=i.toJSON.call(r,this[r.key]))}return e}static fromJSON(t,e,n){if(!e)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");let r=new Kc(t.schema,t.plugins),i=new Ci(r);return r.fields.forEach(r=>{if("doc"==r.name)i.doc=dl.fromJSON(t.schema,e.doc);else if("selection"==r.name)i.selection=Lc.fromJSON(i.doc,e.selection);else if("storedMarks"==r.name)e.storedMarks&&(i.storedMarks=e.storedMarks.map(t.schema.markFromJSON));else{if(n)for(let o in n){let s=n[o],a=s.spec.state;if(s.key==r.name&&a&&a.fromJSON&&Object.prototype.hasOwnProperty.call(e,o))return void(i[r.name]=a.fromJSON.call(s,t,e[o],i))}i[r.name]=r.init(t,i)}}),i}};function Jc(t,e,n){for(let r in t){let i=t[r];i instanceof Function?i=i.bind(e):"handleDOMEvents"==r&&(i=Jc(i,e,{})),n[r]=i}return n}var Zc=class{constructor(t){this.spec=t,this.props={},t.props&&Jc(t.props,this,this.props),this.key=t.key?t.key.key:tu("plugin")}getState(t){return t[this.key]}};const Qc=Object.create(null);function tu(t){return t in Qc?t+"$"+ ++Qc[t]:(Qc[t]=0,t+"$")}var eu=class{constructor(t="key"){this.key=tu(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}};const nu=function(t){for(var e=0;;e++)if(!(t=t.previousSibling))return e},ru=function(t){let e=t.assignedSlot||t.parentNode;return e&&11==e.nodeType?e.host:e};let iu=null;const ou=function(t,e,n){let r=iu||(iu=document.createRange());return r.setEnd(t,null==n?t.nodeValue.length:n),r.setStart(t,e||0),r},su=function(t,e,n,r){return n&&(lu(t,e,n,r,-1)||lu(t,e,n,r,1))},au=/^(img|br|input|textarea|hr)$/i;function lu(t,e,n,r,i){for(var o;;){if(t==n&&e==r)return!0;if(e==(i<0?0:cu(t))){let n=t.parentNode;if(!n||1!=n.nodeType||uu(t)||au.test(t.nodeName)||"false"==t.contentEditable)return!1;e=nu(t)+(i<0?0:1),t=n}else{if(1!=t.nodeType)return!1;{let n=t.childNodes[e+(i<0?-1:0)];if(1==n.nodeType&&"false"==n.contentEditable){if(null===(o=n.pmViewDesc)||void 0===o||!o.ignoreForSelection)return!1;e+=i}else t=n,e=i<0?cu(t):0}}}}function cu(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}function uu(t){let e;for(let n=t;n&&!(e=n.pmViewDesc);n=n.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==t||e.contentDOM==t)}const du=function(t){return t.focusNode&&su(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function hu(t,e){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}const fu="undefined"!=typeof navigator?navigator:null,Eu="undefined"!=typeof document?document:null,vu=fu&&fu.userAgent||"",Du=/Edge\/(\d+)/.exec(vu),yu=/MSIE \d/.exec(vu),Iu=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(vu),Cu=!!(yu||Iu||Du),Nu=yu?document.documentMode:Iu?+Iu[1]:Du?+Du[1]:0,wu=!Cu&&/gecko\/(\d+)/i.test(vu);wu&&(/Firefox\/(\d+)/.exec(vu)||[0,0])[1];const ku=!Cu&&/Chrome\/(\d+)/.exec(vu),Lu=!!ku,Mu=ku?+ku[1]:0,Pu=!Cu&&!!fu&&/Apple Computer/.test(fu.vendor),xu=Pu&&(/Mobile\/\w+/.test(vu)||!!fu&&fu.maxTouchPoints>2),Hu=xu||!!fu&&/Mac/.test(fu.platform),Uu=!!fu&&/Win/.test(fu.platform),Bu=/Android \d/.test(vu),ju=!!Eu&&"webkitFontSmoothing"in Eu.documentElement.style,Vu=ju?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function zu(t){let e=t.defaultView&&t.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.documentElement.clientWidth,top:0,bottom:t.documentElement.clientHeight}}function $u(t,e){return"number"==typeof t?t:t[e]}function Yu(t){let e=t.getBoundingClientRect(),n=e.width/t.offsetWidth||1,r=e.height/t.offsetHeight||1;return{left:e.left,right:e.left+t.clientWidth*n,top:e.top,bottom:e.top+t.clientHeight*r}}function Gu(t,e,n){let r=t.someProp("scrollThreshold")||0,i=t.someProp("scrollMargin")||5,o=t.dom.ownerDocument;for(let s=n||t.dom;s;){if(1!=s.nodeType){s=ru(s);continue}let t=s,n=t==o.body,a=n?zu(o):Yu(t),l=0,c=0;if(e.top<a.top+$u(r,"top")?c=-(a.top-e.top+$u(i,"top")):e.bottom>a.bottom-$u(r,"bottom")&&(c=e.bottom-e.top>a.bottom-a.top?e.top+$u(i,"top")-a.top:e.bottom-a.bottom+$u(i,"bottom")),e.left<a.left+$u(r,"left")?l=-(a.left-e.left+$u(i,"left")):e.right>a.right-$u(r,"right")&&(l=e.right-a.right+$u(i,"right")),l||c)if(n)o.defaultView.scrollBy(l,c);else{let n=t.scrollLeft,r=t.scrollTop;c&&(t.scrollTop+=c),l&&(t.scrollLeft+=l);let i=t.scrollLeft-n,o=t.scrollTop-r;e={left:e.left-i,top:e.top-o,right:e.right-i,bottom:e.bottom-o}}let d=n?"fixed":getComputedStyle(s).position;if(/^(fixed|sticky)$/.test(d))break;s="absolute"==d?s.offsetParent:ru(s)}}function Wu(t){let e=[],n=t.ownerDocument;for(let r=t;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),t!=n);r=ru(r));return e}function Xu(t,e){for(let n=0;n<t.length;n++){let{dom:r,top:i,left:o}=t[n];r.scrollTop!=i+e&&(r.scrollTop=i+e),r.scrollLeft!=o&&(r.scrollLeft=o)}}let Ku=null;function qu(t,e){let n,r,i,o,s=2e8,a=0,l=e.top,c=e.top;for(let d=t.firstChild,h=0;d;d=d.nextSibling,h++){let t;if(1==d.nodeType)t=d.getClientRects();else{if(3!=d.nodeType)continue;t=ou(d).getClientRects()}for(let p=0;p<t.length;p++){let f=t[p];if(f.top<=l&&f.bottom>=c){l=Math.max(f.bottom,l),c=Math.min(f.top,c);let t=f.left>e.left?f.left-e.left:f.right<e.left?e.left-f.right:0;if(t<s){n=d,s=t,r=t&&3==n.nodeType?{left:f.right<e.left?f.right:f.left,top:e.top}:e,1==d.nodeType&&t&&(a=h+(e.left>=(f.left+f.right)/2?1:0));continue}}else f.top>e.top&&!i&&f.left<=e.left&&f.right>=e.left&&(i=d,o={left:Math.max(f.left,Math.min(f.right,e.left)),top:f.top});!n&&(e.left>=f.right&&e.top>=f.top||e.left>=f.left&&e.top>=f.bottom)&&(a=h+1)}}return!n&&i&&(n=i,r=o,s=0),n&&3==n.nodeType?function(t,e){let n,r=t.nodeValue.length,i=document.createRange();for(let o=0;o<r;o++){i.setEnd(t,o+1),i.setStart(t,o);let r=ed(i,1);if(r.top!=r.bottom&&Ju(e,r)){n={node:t,offset:o+(e.left>=(r.left+r.right)/2?1:0)};break}}return i.detach(),n||{node:t,offset:0}}(n,r):!n||s&&1==n.nodeType?{node:t,offset:a}:qu(n,r)}function Ju(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function Zu(t,e,n){let r=t.childNodes.length;if(r&&n.top<n.bottom)for(let i=Math.max(0,Math.min(r-1,Math.floor(r*(e.top-n.top)/(n.bottom-n.top))-2)),o=i;;){let n=t.childNodes[o];if(1==n.nodeType){let t=n.getClientRects();for(let r=0;r<t.length;r++){let i=t[r];if(Ju(e,i))return Zu(n,e,i)}}if((o=(o+1)%r)==i)break}return t}function Qu(t,e){let n,r=t.dom.ownerDocument,i=0,o=function(t,e,n){if(t.caretPositionFromPoint)try{let r=t.caretPositionFromPoint(e,n);if(r)return{node:r.offsetNode,offset:Math.min(cu(r.offsetNode),r.offset)}}catch(t){}if(t.caretRangeFromPoint){let r=t.caretRangeFromPoint(e,n);if(r)return{node:r.startContainer,offset:Math.min(cu(r.startContainer),r.startOffset)}}}(r,e.left,e.top);o&&({node:n,offset:i}=o);let s,a=(t.root.elementFromPoint?t.root:r).elementFromPoint(e.left,e.top);if(!a||!t.dom.contains(1!=a.nodeType?a.parentNode:a)){let n=t.dom.getBoundingClientRect();if(!Ju(e,n)||(a=Zu(t.dom,e,n),!a))return null}if(Pu)for(let t=a;n&&t;t=ru(t))t.draggable&&(n=void 0);if(a=function(t,e){let n=t.parentNode;return n&&/^li$/i.test(n.nodeName)&&e.left<t.getBoundingClientRect().left?n:t}(a,e),n){if(wu&&1==n.nodeType&&(i=Math.min(i,n.childNodes.length),i<n.childNodes.length)){let t,r=n.childNodes[i];"IMG"==r.nodeName&&(t=r.getBoundingClientRect()).right<=e.left&&t.bottom>e.top&&i++}let r;ju&&i&&1==n.nodeType&&1==(r=n.childNodes[i-1]).nodeType&&"false"==r.contentEditable&&r.getBoundingClientRect().top>=e.top&&i--,n==t.dom&&i==n.childNodes.length-1&&1==n.lastChild.nodeType&&e.top>n.lastChild.getBoundingClientRect().bottom?s=t.state.doc.content.size:(0==i||1!=n.nodeType||"BR"!=n.childNodes[i-1].nodeName)&&(s=function(t,e,n,r){let i=-1;for(let n=e,o=!1;n!=t.dom;){let e,s=t.docView.nearestDesc(n,!0);if(!s)return null;if(1==s.dom.nodeType&&(s.node.isBlock&&s.parent||!s.contentDOM)&&((e=s.dom.getBoundingClientRect()).width||e.height)&&(s.node.isBlock&&s.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(s.dom.nodeName)&&(!o&&e.left>r.left||e.top>r.top?i=s.posBefore:(!o&&e.right<r.left||e.bottom<r.top)&&(i=s.posAfter),o=!0),!s.contentDOM&&i<0&&!s.node.isText))return(s.node.isBlock?r.top<(e.top+e.bottom)/2:r.left<(e.left+e.right)/2)?s.posBefore:s.posAfter;n=s.dom.parentNode}return i>-1?i:t.docView.posFromDOM(e,n,-1)}(t,n,i,e))}null==s&&(s=function(t,e,n){let{node:r,offset:i}=qu(e,n),o=-1;if(1==r.nodeType&&!r.firstChild){let t=r.getBoundingClientRect();o=t.left!=t.right&&n.left>(t.left+t.right)/2?1:-1}return t.docView.posFromDOM(r,i,o)}(t,a,e));let l=t.docView.nearestDesc(a,!0);return{pos:s,inside:l?l.posAtStart-l.border:-1}}function td(t){return t.top<t.bottom||t.left<t.right}function ed(t,e){let n=t.getClientRects();if(n.length){let t=n[e<0?0:n.length-1];if(td(t))return t}return Array.prototype.find.call(n,td)||t.getBoundingClientRect()}const nd=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function rd(t,e,n){let{node:r,offset:i,atom:o}=t.docView.domFromPos(e,n<0?-1:1),s=ju||wu;if(3==r.nodeType){if(!s||!nd.test(r.nodeValue)&&(n<0?i:i!=r.nodeValue.length)){let t=i,e=i,o=n<0?1:-1;return n<0&&!i?(e++,o=-1):n>=0&&i==r.nodeValue.length?(t--,o=1):n<0?t--:e++,id(ed(ou(r,t,e),o),o<0)}{let t=ed(ou(r,i,i),n);if(wu&&i&&/\s/.test(r.nodeValue[i-1])&&i<r.nodeValue.length){let e=ed(ou(r,i-1,i-1),-1);if(e.top==t.top){let n=ed(ou(r,i,i+1),-1);if(n.top!=t.top)return id(n,n.left<e.left)}}return t}}if(!t.state.doc.resolve(e-(o||0)).parent.inlineContent){if(null==o&&i&&(n<0||i==cu(r))){let t=r.childNodes[i-1];if(1==t.nodeType)return od(t.getBoundingClientRect(),!1)}if(null==o&&i<cu(r)){let t=r.childNodes[i];if(1==t.nodeType)return od(t.getBoundingClientRect(),!0)}return od(r.getBoundingClientRect(),n>=0)}if(null==o&&i&&(n<0||i==cu(r))){let t=r.childNodes[i-1],e=3==t.nodeType?ou(t,cu(t)-(s?0:1)):1!=t.nodeType||"BR"==t.nodeName&&t.nextSibling?null:t;if(e)return id(ed(e,1),!1)}if(null==o&&i<cu(r)){let t=r.childNodes[i];for(;t.pmViewDesc&&t.pmViewDesc.ignoreForCoords;)t=t.nextSibling;let e=t?3==t.nodeType?ou(t,0,s?0:1):1==t.nodeType?t:null:null;if(e)return id(ed(e,-1),!0)}return id(ed(3==r.nodeType?ou(r):r,-n),n>=0)}function id(t,e){if(0==t.width)return t;let n=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:n,right:n}}function od(t,e){if(0==t.height)return t;let n=e?t.top:t.bottom;return{top:n,bottom:n,left:t.left,right:t.right}}function sd(t,e,n){let r=t.state,i=t.root.activeElement;r!=e&&t.updateState(e),i!=t.dom&&t.focus();try{return n()}finally{r!=e&&t.updateState(r),i!=t.dom&&i&&i.focus()}}const ad=/[\u0590-\u08ac]/;let ld=null,cd=null,ud=!1;function dd(t,e,n){return ld==e&&cd==n?ud:(ld=e,cd=n,ud="up"==n||"down"==n?function(t,e,n){let r=e.selection,i="up"==n?r.$from:r.$to;return sd(t,e,()=>{let{node:e}=t.docView.domFromPos(i.pos,"up"==n?-1:1);for(;;){let n=t.docView.nearestDesc(e,!0);if(!n)break;if(n.node.isBlock){e=n.contentDOM||n.dom;break}e=n.dom.parentNode}let r=rd(t,i.pos,1);for(let t=e.firstChild;t;t=t.nextSibling){let e;if(1==t.nodeType)e=t.getClientRects();else{if(3!=t.nodeType)continue;e=ou(t,0,t.nodeValue.length).getClientRects()}for(let t=0;t<e.length;t++){let i=e[t];if(i.bottom>i.top+1&&("up"==n?r.top-i.top>2*(i.bottom-r.top):i.bottom-r.bottom>2*(r.bottom-i.top)))return!1}}return!0})}(t,e,n):function(t,e,n){let{$head:r}=e.selection;if(!r.parent.isTextblock)return!1;let i=r.parentOffset,o=!i,s=i==r.parent.content.size,a=t.domSelection();return a?ad.test(r.parent.textContent)&&a.modify?sd(t,e,()=>{let{focusNode:e,focusOffset:i,anchorNode:o,anchorOffset:s}=t.domSelectionRange(),l=a.caretBidiLevel;a.modify("move",n,"character");let c=r.depth?t.docView.domAfterPos(r.before()):t.dom,{focusNode:d,focusOffset:h}=t.domSelectionRange(),p=d&&!c.contains(1==d.nodeType?d:d.parentNode)||e==d&&i==h;try{a.collapse(o,s),e&&(e!=o||i!=s)&&a.extend&&a.extend(e,i)}catch(t){}return null!=l&&(a.caretBidiLevel=l),p}):"left"==n||"backward"==n?o:s:r.pos==r.start()||r.pos==r.end()}(t,e,n))}var hd=class{constructor(t,e,n,r){this.parent=t,this.children=e,this.dom=n,this.contentDOM=r,this.dirty=0,n.pmViewDesc=this}matchesWidget(t){return!1}matchesMark(t){return!1}matchesNode(t,e,n){return!1}matchesHack(t){return!1}parseRule(){return null}stopEvent(t){return!1}get size(){let t=0;for(let e=0;e<this.children.length;e++)t+=this.children[e].size;return t}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let t=0;t<this.children.length;t++)this.children[t].destroy()}posBeforeChild(t){for(let e=0,n=this.posAtStart;;e++){let r=this.children[e];if(r==t)return n;n+=r.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(t,e,n){if(this.contentDOM&&this.contentDOM.contains(1==t.nodeType?t:t.parentNode)){if(n<0){let n,r;if(t==this.contentDOM)n=t.childNodes[e-1];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;n=t.previousSibling}for(;n&&(!(r=n.pmViewDesc)||r.parent!=this);)n=n.previousSibling;return n?this.posBeforeChild(r)+r.size:this.posAtStart}{let n,r;if(t==this.contentDOM)n=t.childNodes[e];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;n=t.nextSibling}for(;n&&(!(r=n.pmViewDesc)||r.parent!=this);)n=n.nextSibling;return n?this.posBeforeChild(r):this.posAtEnd}}let r;if(t==this.dom&&this.contentDOM)r=e>nu(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))r=2&t.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==e)for(let e=t;;e=e.parentNode){if(e==this.dom){r=!1;break}if(e.previousSibling)break}if(null==r&&e==t.childNodes.length)for(let e=t;;e=e.parentNode){if(e==this.dom){r=!0;break}if(e.nextSibling)break}}return(null==r?n>0:r)?this.posAtEnd:this.posAtStart}nearestDesc(t,e=!1){for(let n=!0,r=t;r;r=r.parentNode){let i,o=this.getDesc(r);if(o&&(!e||o.node)){if(!n||!(i=o.nodeDOM)||(1==i.nodeType?i.contains(1==t.nodeType?t:t.parentNode):i==t))return o;n=!1}}}getDesc(t){let e=t.pmViewDesc;for(let t=e;t;t=t.parent)if(t==this)return e}posFromDOM(t,e,n){for(let r=t;r;r=r.parentNode){let i=this.getDesc(r);if(i)return i.localPosFromDOM(t,e,n)}return-1}descAt(t){for(let e=0,n=0;e<this.children.length;e++){let r=this.children[e],i=n+r.size;if(n==t&&i!=n){for(;!r.border&&r.children.length;)for(let t=0;t<r.children.length;t++){let e=r.children[t];if(e.size){r=e;break}}return r}if(t<i)return r.descAt(t-n-r.border);n=i}}domFromPos(t,e){if(!this.contentDOM)return{node:this.dom,offset:0,atom:t+1};let n=0,r=0;for(let e=0;n<this.children.length;n++){let i=this.children[n],o=e+i.size;if(o>t||i instanceof gd){r=t-e;break}e=o}if(r)return this.children[n].domFromPos(r-this.children[n].border,e);for(let t;n&&!(t=this.children[n-1]).size&&t instanceof pd&&t.side>=0;n--);if(e<=0){let t,r=!0;for(;t=n?this.children[n-1]:null,t&&t.dom.parentNode!=this.contentDOM;n--,r=!1);return t&&e&&r&&!t.border&&!t.domAtom?t.domFromPos(t.size,e):{node:this.contentDOM,offset:t?nu(t.dom)+1:0}}{let t,r=!0;for(;t=n<this.children.length?this.children[n]:null,t&&t.dom.parentNode!=this.contentDOM;n++,r=!1);return t&&r&&!t.border&&!t.domAtom?t.domFromPos(0,e):{node:this.contentDOM,offset:t?nu(t.dom):this.contentDOM.childNodes.length}}}parseRange(t,e,n=0){if(0==this.children.length)return{node:this.contentDOM,from:t,to:e,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let r=-1,i=-1;for(let o=n,s=0;;s++){let n=this.children[s],a=o+n.size;if(-1==r&&t<=a){let i=o+n.border;if(t>=i&&e<=a-n.border&&n.node&&n.contentDOM&&this.contentDOM.contains(n.contentDOM))return n.parseRange(t,e,i);t=o;for(let e=s;e>0;e--){let n=this.children[e-1];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(1)){r=nu(n.dom)+1;break}t-=n.size}-1==r&&(r=0)}if(r>-1&&(a>e||s==this.children.length-1)){e=a;for(let t=s+1;t<this.children.length;t++){let n=this.children[t];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(-1)){i=nu(n.dom);break}e+=n.size}-1==i&&(i=this.contentDOM.childNodes.length);break}o=a}return{node:this.contentDOM,from:t,to:e,fromOffset:r,toOffset:i}}emptyChildAt(t){if(this.border||!this.contentDOM||!this.children.length)return!1;let e=this.children[t<0?0:this.children.length-1];return 0==e.size||e.emptyChildAt(t)}domAfterPos(t){let{node:e,offset:n}=this.domFromPos(t,0);if(1!=e.nodeType||n==e.childNodes.length)throw new RangeError("No node after pos "+t);return e.childNodes[n]}setSelection(t,e,n,r=!1){let i=Math.min(t,e),o=Math.max(t,e);for(let s=0,a=0;s<this.children.length;s++){let l=this.children[s],c=a+l.size;if(i>a&&o<c)return l.setSelection(t-a-l.border,e-a-l.border,n,r);a=c}let s=this.domFromPos(t,t?-1:1),a=e==t?s:this.domFromPos(e,e?-1:1),l=n.root.getSelection(),c=n.domSelectionRange(),d=!1;if((wu||Pu)&&t==e){let{node:t,offset:e}=s;if(3==t.nodeType){if(d=!(!e||"\n"!=t.nodeValue[e-1]),d&&e==t.nodeValue.length)for(let e,n=t;n;n=n.parentNode){if(e=n.nextSibling){"BR"==e.nodeName&&(s=a={node:e.parentNode,offset:nu(e)+1});break}let t=n.pmViewDesc;if(t&&t.node&&t.node.isBlock)break}}else{let n=t.childNodes[e-1];d=n&&("BR"==n.nodeName||"false"==n.contentEditable)}}if(wu&&c.focusNode&&c.focusNode!=a.node&&1==c.focusNode.nodeType){let t=c.focusNode.childNodes[c.focusOffset];t&&"false"==t.contentEditable&&(r=!0)}if(!(r||d&&Pu)&&su(s.node,s.offset,c.anchorNode,c.anchorOffset)&&su(a.node,a.offset,c.focusNode,c.focusOffset))return;let h=!1;if((l.extend||t==e)&&(!d||!wu)){l.collapse(s.node,s.offset);try{t!=e&&l.extend(a.node,a.offset),h=!0}catch(t){}}if(!h){if(t>e){let t=s;s=a,a=t}let n=document.createRange();n.setEnd(a.node,a.offset),n.setStart(s.node,s.offset),l.removeAllRanges(),l.addRange(n)}}ignoreMutation(t){return!this.contentDOM&&"selection"!=t.type}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(t,e){for(let n=0,r=0;r<this.children.length;r++){let i=this.children[r],o=n+i.size;if(n==o?t<=o&&e>=n:t<o&&e>n){let r=n+i.border,s=o-i.border;if(t>=r&&e<=s)return this.dirty=t==n||e==o?2:1,void(t!=r||e!=s||!i.contentLost&&i.dom.parentNode==this.contentDOM?i.markDirty(t-r,e-r):i.dirty=3);i.dirty=i.dom!=i.contentDOM||i.dom.parentNode!=this.contentDOM||i.children.length?3:2}n=o}this.dirty=2}markParentsDirty(){let t=1;for(let e=this.parent;e;e=e.parent,t++){let n=1==t?2:1;e.dirty<n&&(e.dirty=n)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(t){return!1}},pd=class extends hd{constructor(t,e,n,r){let i,o=e.type.toDOM;if("function"==typeof o&&(o=o(n,()=>i?i.parent?i.parent.posBeforeChild(i):void 0:r)),!e.type.spec.raw){if(1!=o.nodeType){let t=document.createElement("span");t.appendChild(o),o=t}o.contentEditable="false",o.classList.add("ProseMirror-widget")}super(t,[],o,null),this.widget=e,this.widget=e,i=this}matchesWidget(t){return 0==this.dirty&&t.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(t){let e=this.widget.spec.stopEvent;return!!e&&e(t)}ignoreMutation(t){return"selection"!=t.type||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}},fd=class extends hd{constructor(t,e,n,r){super(t,[],e,null),this.textDOM=n,this.text=r}get size(){return this.text.length}localPosFromDOM(t,e){return t!=this.textDOM?this.posAtStart+(e?this.size:0):this.posAtStart+e}domFromPos(t){return{node:this.textDOM,offset:t}}ignoreMutation(t){return"characterData"===t.type&&t.target.nodeValue==t.oldValue}},md=class bu extends hd{constructor(t,e,n,r,i){super(t,[],n,r),this.mark=e,this.spec=i}static create(t,e,n,r){let i=r.nodeViews[e.type.name],o=i&&i(e,r,n);return(!o||!o.dom)&&(o=jl.renderSpec(document,e.type.spec.toDOM(e,n),null,e.attrs)),new bu(t,e,o.dom,o.contentDOM||o.dom,o)}parseRule(){return 3&this.dirty||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(t){return 3!=this.dirty&&this.mark.eq(t)}markDirty(t,e){if(super.markDirty(t,e),0!=this.dirty){let t=this.parent;for(;!t.node;)t=t.parent;t.dirty<this.dirty&&(t.dirty=this.dirty),this.dirty=0}}slice(t,e,n){let r=bu.create(this.parent,this.mark,!0,n),i=this.children,o=this.size;e<o&&(i=kd(i,e,o,n)),t>0&&(i=kd(i,0,t,n));for(let t=0;t<i.length;t++)i[t].parent=r;return r.children=i,r}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}},Ed=class L_ extends hd{constructor(t,e,n,r,i,o,s,a,l){super(t,[],i,o),this.node=e,this.outerDeco=n,this.innerDeco=r,this.nodeDOM=s}static create(t,e,n,r,i,o){let s,a=i.nodeViews[e.type.name],l=a&&a(e,i,()=>s?s.parent?s.parent.posBeforeChild(s):void 0:o,n,r),c=l&&l.dom,d=l&&l.contentDOM;if(e.isText)if(c){if(3!=c.nodeType)throw new RangeError("Text must be rendered as a DOM text node")}else c=document.createTextNode(e.text);else c||({dom:c,contentDOM:d}=jl.renderSpec(document,e.type.spec.toDOM(e),null,e.attrs));!d&&!e.isText&&"BR"!=c.nodeName&&(c.hasAttribute("contenteditable")||(c.contentEditable="false"),e.type.spec.draggable&&(c.draggable=!0));let h=c;return c=Id(c,n,e),l?s=new Sd(t,e,n,r,c,d||null,h,l,i,o+1):e.isText?new Ad(t,e,n,r,c,h,i):new L_(t,e,n,r,c,d||null,h,i,o+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if("pre"==this.node.type.whitespace&&(t.preserveWhitespace="full"),this.contentDOM)if(this.contentLost){for(let e=this.children.length-1;e>=0;e--){let n=this.children[e];if(this.dom.contains(n.dom.parentNode)){t.contentElement=n.dom.parentNode;break}}t.contentElement||(t.getContent=()=>ja.empty)}else t.contentElement=this.contentDOM;else t.getContent=()=>this.node.content;return t}matchesNode(t,e,n){return 0==this.dirty&&t.eq(this.node)&&Cd(e,this.outerDeco)&&n.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(t,e){let n=this.node.inlineContent,r=e,i=t.composing?this.localCompositionInfo(t,e):null,o=i&&i.pos>-1?i:null,s=i&&i.pos<0,a=new bd(this,o&&o.node,t);(function(t,e,n,r){let i=e.locals(t),o=0;if(0==i.length){for(let n=0;n<t.childCount;n++){let s=t.child(n);r(s,i,e.forChild(o,s),n),o+=s.nodeSize}return}let s=0,a=[],l=null;for(let c=0;;){let d,h,p,f;for(;s<i.length&&i[s].to==o;){let t=i[s++];t.widget&&(d?(h||(h=[d])).push(t):d=t)}if(d)if(h){h.sort(wd);for(let t=0;t<h.length;t++)n(h[t],c,!!l)}else n(d,c,!!l);if(l)f=-1,p=l,l=null;else{if(!(c<t.childCount))break;f=c,p=t.child(c++)}for(let t=0;t<a.length;t++)a[t].to<=o&&a.splice(t--,1);for(;s<i.length&&i[s].from<=o&&i[s].to>o;)a.push(i[s++]);let m=o+p.nodeSize;if(p.isText){let t=m;s<i.length&&i[s].from<t&&(t=i[s].from);for(let e=0;e<a.length;e++)a[e].to<t&&(t=a[e].to);t<m&&(l=p.cut(t-o),p=p.cut(0,t-o),m=t,f=-1)}else for(;s<i.length&&i[s].to<m;)s++;r(p,p.isInline&&!p.isLeaf?a.filter(t=>!t.inline):a.slice(),e.forChild(o,p),f),o=m}})(this.node,this.innerDeco,(e,i,o)=>{e.spec.marks?a.syncToMarks(e.spec.marks,n,t,i):e.type.side>=0&&!o&&a.syncToMarks(i==this.node.childCount?Ya.none:this.node.child(i).marks,n,t,i),a.placeWidget(e,t,r)},(e,o,l,c)=>{let d;a.syncToMarks(e.marks,n,t,c),a.findNodeMatch(e,o,l,c)||s&&t.state.selection.from>r&&t.state.selection.to<r+e.nodeSize&&(d=a.findIndexWithChild(i.node))>-1&&a.updateNodeAt(e,o,l,d,t)||a.updateNextNode(e,o,l,t,c,r)||a.addNode(e,o,l,t,r),r+=e.nodeSize}),a.syncToMarks([],n,t,0),this.node.isTextblock&&a.addTextblockHacks(),a.destroyRest(),(a.changed||2==this.dirty)&&(o&&this.protectLocalComposition(t,o),vd(this.contentDOM,this.children,t),xu&&function(t){if("UL"==t.nodeName||"OL"==t.nodeName){let e=t.style.cssText;t.style.cssText=e+"; list-style: square !important",window.getComputedStyle(t).listStyle,t.style.cssText=e}}(this.dom))}localCompositionInfo(t,e){let{from:n,to:r}=t.state.selection;if(!(t.state.selection instanceof Fc)||n<e||r>e+this.node.content.size)return null;let i=t.input.compositionNode;if(!i||!this.dom.contains(i.parentNode))return null;if(this.node.inlineContent){let t=i.nodeValue,o=function(t,e,n,r){for(let i=0,o=0;i<t.childCount&&o<=r;){let s=t.child(i++),a=o;if(o+=s.nodeSize,!s.isText)continue;let l=s.text;for(;i<t.childCount;){let e=t.child(i++);if(o+=e.nodeSize,!e.isText)break;l+=e.text}if(o>=n){if(o>=r&&l.slice(r-e.length-a,r-a)==e)return r-e.length;let t=a<r?l.lastIndexOf(e,r-a-1):-1;if(t>=0&&t+e.length+a>=n)return a+t;if(n==r&&l.length>=r+e.length-a&&l.slice(r-a,r-a+e.length)==e)return r}}return-1}(this.node.content,t,n-e,r-e);return o<0?null:{node:i,pos:o,text:t}}return{node:i,pos:-1,text:""}}protectLocalComposition(t,{node:e,pos:n,text:r}){if(this.getDesc(e))return;let i=e;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=void 0)}let o=new fd(this,i,e,r);t.input.compositionNodes.push(o),this.children=kd(this.children,n,n+r.length,t,o)}update(t,e,n,r){return!(3==this.dirty||!t.sameMarkup(this.node))&&(this.updateInner(t,e,n,r),!0)}updateInner(t,e,n,r){this.updateOuterDeco(e),this.node=t,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=0}updateOuterDeco(t){if(Cd(t,this.outerDeco))return;let e=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=Rd(this.dom,this.nodeDOM,Td(this.outerDeco,this.node,e),Td(t,this.node,e)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=t}selectNode(){1==this.nodeDOM.nodeType&&(this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.nodeDOM.draggable=!0))}deselectNode(){1==this.nodeDOM.nodeType&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}};function _d(t,e,n,r,i){Id(r,e,t);let o=new Ed(void 0,t,e,n,r,r,r,i,0);return o.contentDOM&&o.updateChildren(i,0),o}var Ad=class w_ extends Ed{constructor(t,e,n,r,i,o,s){super(t,e,n,r,i,null,o,s,0)}parseRule(){let t=this.nodeDOM.parentNode;for(;t&&t!=this.dom&&!t.pmIsDeco;)t=t.parentNode;return{skip:t||!0}}update(t,e,n,r){return!(3==this.dirty||0!=this.dirty&&!this.inParent()||!t.sameMarkup(this.node))&&(this.updateOuterDeco(e),(0!=this.dirty||t.text!=this.node.text)&&t.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=t.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=t,this.dirty=0,!0)}inParent(){let t=this.parent.contentDOM;for(let e=this.nodeDOM;e;e=e.parentNode)if(e==t)return!0;return!1}domFromPos(t){return{node:this.nodeDOM,offset:t}}localPosFromDOM(t,e,n){return t==this.nodeDOM?this.posAtStart+Math.min(e,this.node.text.length):super.localPosFromDOM(t,e,n)}ignoreMutation(t){return"characterData"!=t.type&&"selection"!=t.type}slice(t,e,n){let r=this.node.cut(t,e),i=document.createTextNode(r.text);return new w_(this.parent,r,this.outerDeco,this.innerDeco,i,i,n)}markDirty(t,e){super.markDirty(t,e),this.dom!=this.nodeDOM&&(0==t||e==this.nodeDOM.nodeValue.length)&&(this.dirty=3)}get domAtom(){return!1}isText(t){return this.node.text==t}},gd=class extends hd{parseRule(){return{ignore:!0}}matchesHack(t){return 0==this.dirty&&this.dom.nodeName==t}get domAtom(){return!0}get ignoreForCoords(){return"IMG"==this.dom.nodeName}},Sd=class extends Ed{constructor(t,e,n,r,i,o,s,a,l,c){super(t,e,n,r,i,o,s,l,c),this.spec=a}update(t,e,n,r){if(3==this.dirty)return!1;if(this.spec.update&&(this.node.type==t.type||this.spec.multiType)){let i=this.spec.update(t,e,n);return i&&this.updateInner(t,e,n,r),i}return!(!this.contentDOM&&!t.isLeaf)&&super.update(t,e,n,r)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(t,e,n,r){this.spec.setSelection?this.spec.setSelection(t,e,n.root):super.setSelection(t,e,n,r)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(t){return!!this.spec.stopEvent&&this.spec.stopEvent(t)}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}};function vd(t,e,n){let r=t.firstChild,i=!1;for(let o=0;o<e.length;o++){let s=e[o],a=s.dom;if(a.parentNode==t){for(;a!=r;)r=Nd(r),i=!0;r=r.nextSibling}else i=!0,t.insertBefore(a,r);if(s instanceof md){let e=r?r.previousSibling:t.lastChild;vd(s.contentDOM,s.children,n),r=e?e.nextSibling:t.firstChild}}for(;r;)r=Nd(r),i=!0;i&&n.trackWrites==t&&(n.trackWrites=null)}const Od=function(t){t&&(this.nodeName=t)};Od.prototype=Object.create(null);const Dd=[new Od];function Td(t,e,n){if(0==t.length)return Dd;let r=n?Dd[0]:new Od,i=[r];for(let o=0;o<t.length;o++){let s=t[o].type.attrs;if(s){s.nodeName&&i.push(r=new Od(s.nodeName));for(let t in s){let o=s[t];null!=o&&(n&&1==i.length&&i.push(r=new Od(e.isInline?"span":"div")),"class"==t?r.class=(r.class?r.class+" ":"")+o:"style"==t?r.style=(r.style?r.style+";":"")+o:"nodeName"!=t&&(r[t]=o))}}}return i}function Rd(t,e,n,r){if(n==Dd&&r==Dd)return e;let i=e;for(let e=0;e<r.length;e++){let o=r[e],s=n[e];if(e){let e;s&&s.nodeName==o.nodeName&&i!=t&&(e=i.parentNode)&&e.nodeName.toLowerCase()==o.nodeName||(e=document.createElement(o.nodeName),e.pmIsDeco=!0,e.appendChild(i),s=Dd[0]),i=e}yd(i,s||Dd[0],o)}return i}function yd(t,e,n){for(let r in e)"class"!=r&&"style"!=r&&"nodeName"!=r&&!(r in n)&&t.removeAttribute(r);for(let r in n)"class"!=r&&"style"!=r&&"nodeName"!=r&&n[r]!=e[r]&&t.setAttribute(r,n[r]);if(e.class!=n.class){let r=e.class?e.class.split(" ").filter(Boolean):[],i=n.class?n.class.split(" ").filter(Boolean):[];for(let e=0;e<r.length;e++)-1==i.indexOf(r[e])&&t.classList.remove(r[e]);for(let e=0;e<i.length;e++)-1==r.indexOf(i[e])&&t.classList.add(i[e]);0==t.classList.length&&t.removeAttribute("class")}if(e.style!=n.style){if(e.style){let n,r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g;for(;n=r.exec(e.style);)t.style.removeProperty(n[1])}n.style&&(t.style.cssText+=n.style)}}function Id(t,e,n){return Rd(t,t,Dd,Td(e,n,1!=t.nodeType))}function Cd(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].type.eq(e[n].type))return!1;return!0}function Nd(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}var bd=class{constructor(t,e,n){this.lock=e,this.view=n,this.index=0,this.stack=[],this.changed=!1,this.top=t,this.preMatch=function(t,e){let n=e,r=n.children.length,i=t.childCount,o=new Map,s=[];t:for(;i>0;){let a;for(;;)if(r){let t=n.children[r-1];if(!(t instanceof md)){a=t,r--;break}n=t,r=t.children.length}else{if(n==e)break t;r=n.parent.children.indexOf(n),n=n.parent}let l=a.node;if(l){if(l!=t.child(i-1))break;--i,o.set(a,i),s.push(a)}}return{index:i,matched:o,matches:s.reverse()}}(t.node.content,t)}destroyBetween(t,e){if(t!=e){for(let n=t;n<e;n++)this.top.children[n].destroy();this.top.children.splice(t,e-t),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(t,e,n,r){let i=0,o=this.stack.length>>1,s=Math.min(o,t.length);for(;i<s&&(i==o-1?this.top:this.stack[i+1<<1]).matchesMark(t[i])&&!1!==t[i].type.spec.spanning;)i++;for(;i<o;)this.destroyRest(),this.top.dirty=0,this.index=this.stack.pop(),this.top=this.stack.pop(),o--;for(;o<t.length;){this.stack.push(this.top,this.index+1);let i=-1,s=this.top.children.length;r<this.preMatch.index&&(s=Math.min(this.index+3,s));for(let e=this.index;e<s;e++){let n=this.top.children[e];if(n.matchesMark(t[o])&&!this.isLocked(n.dom)){i=e;break}}if(i>-1)i>this.index&&(this.changed=!0,this.destroyBetween(this.index,i)),this.top=this.top.children[this.index];else{let r=md.create(this.top,t[o],e,n);this.top.children.splice(this.index,0,r),this.top=r,this.changed=!0}this.index=0,o++}}findNodeMatch(t,e,n,r){let i,o=-1;if(r>=this.preMatch.index&&(i=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&i.matchesNode(t,e,n))o=this.top.children.indexOf(i,this.index);else for(let r=this.index,i=Math.min(this.top.children.length,r+5);r<i;r++){let i=this.top.children[r];if(i.matchesNode(t,e,n)&&!this.preMatch.matched.has(i)){o=r;break}}return!(o<0)&&(this.destroyBetween(this.index,o),this.index++,!0)}updateNodeAt(t,e,n,r,i){let o=this.top.children[r];return 3==o.dirty&&o.dom==o.contentDOM&&(o.dirty=2),!!o.update(t,e,n,i)&&(this.destroyBetween(this.index,r),this.index++,!0)}findIndexWithChild(t){for(;;){let e=t.parentNode;if(!e)return-1;if(e==this.top.contentDOM){let e=t.pmViewDesc;if(e)for(let t=this.index;t<this.top.children.length;t++)if(this.top.children[t]==e)return t;return-1}t=e}}updateNextNode(t,e,n,r,i,o){for(let s=this.index;s<this.top.children.length;s++){let a=this.top.children[s];if(a instanceof Ed){let l=this.preMatch.matched.get(a);if(null!=l&&l!=i)return!1;let c,d=a.dom,h=this.isLocked(d)&&!(t.isText&&a.node&&a.node.isText&&a.nodeDOM.nodeValue==t.text&&3!=a.dirty&&Cd(e,a.outerDeco));if(!h&&a.update(t,e,n,r))return this.destroyBetween(this.index,s),a.dom!=d&&(this.changed=!0),this.index++,!0;if(!h&&(c=this.recreateWrapper(a,t,e,n,r,o)))return this.destroyBetween(this.index,s),this.top.children[this.index]=c,c.contentDOM&&(c.dirty=2,c.updateChildren(r,o+1),c.dirty=0),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(t,e,n,r,i,o){if(t.dirty||e.isAtom||!t.children.length||!t.node.content.eq(e.content)||!Cd(n,t.outerDeco)||!r.eq(t.innerDeco))return null;let s=Ed.create(this.top,e,n,r,i,o);if(s.contentDOM){s.children=t.children,t.children=[];for(let t of s.children)t.parent=s}return t.destroy(),s}addNode(t,e,n,r,i){let o=Ed.create(this.top,t,e,n,r,i);o.contentDOM&&o.updateChildren(r,i+1),this.top.children.splice(this.index++,0,o),this.changed=!0}placeWidget(t,e,n){let r=this.index<this.top.children.length?this.top.children[this.index]:null;if(!r||!r.matchesWidget(t)||t!=r.widget&&r.widget.type.toDOM.parentNode){let r=new pd(this.top,t,e,n);this.top.children.splice(this.index++,0,r),this.changed=!0}else this.index++}addTextblockHacks(){let t=this.top.children[this.index-1],e=this.top;for(;t instanceof md;)e=t,t=e.children[e.children.length-1];(!t||!(t instanceof Ad)||/\n$/.test(t.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(t.node.text))&&((Pu||Lu)&&t&&"false"==t.dom.contentEditable&&this.addHackNode("IMG",e),this.addHackNode("BR",this.top))}addHackNode(t,e){if(e==this.top&&this.index<e.children.length&&e.children[this.index].matchesHack(t))this.index++;else{let n=document.createElement(t);"IMG"==t&&(n.className="ProseMirror-separator",n.alt=""),"BR"==t&&(n.className="ProseMirror-trailingBreak");let r=new gd(this.top,[],n,null);e!=this.top?e.children.push(r):e.children.splice(this.index++,0,r),this.changed=!0}}isLocked(t){return this.lock&&(t==this.lock||1==t.nodeType&&t.contains(this.lock.parentNode))}};function wd(t,e){return t.type.side-e.type.side}function kd(t,e,n,r,i){let o=[];for(let s=0,a=0;s<t.length;s++){let l=t[s],c=a,d=a+=l.size;c>=n||d<=e?o.push(l):(c<e&&o.push(l.slice(0,e-c,r)),i&&(o.push(i),i=void 0),d>n&&o.push(l.slice(n-c,l.size,r)))}return o}function Ld(t,e=null){let n=t.domSelectionRange(),r=t.state.doc;if(!n.focusNode)return null;let i=t.docView.nearestDesc(n.focusNode),o=i&&0==i.size,s=t.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let a,l,c=r.resolve(s);if(du(n)){for(a=s;i&&!i.node;)i=i.parent;let t=i.node;if(i&&t.isAtom&&Uc.isSelectable(t)&&i.parent&&(!t.isInline||!function(t,e,n){for(let r=0==e,i=e==cu(t);r||i;){if(t==n)return!0;let e=nu(t);if(!(t=t.parentNode))return!1;r=r&&0==e,i=i&&e==cu(t)}}(n.focusNode,n.focusOffset,i.dom))){let t=i.posBefore;l=new Uc(s==t?c:r.resolve(t))}}else{if(n instanceof t.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let e=s,i=s;for(let r=0;r<n.rangeCount;r++){let o=n.getRangeAt(r);e=Math.min(e,t.docView.posFromDOM(o.startContainer,o.startOffset,1)),i=Math.max(i,t.docView.posFromDOM(o.endContainer,o.endOffset,-1))}if(e<0)return null;[a,s]=i==t.state.selection.anchor?[i,e]:[e,i],c=r.resolve(s)}else a=t.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(a<0)return null}let d=r.resolve(a);if(!l){l=Vd(t,d,c,"pointer"==e||t.state.selection.head<c.pos&&!o?1:-1)}return l}function Md(t){return t.editable?t.hasFocus():$d(t)&&document.activeElement&&document.activeElement.contains(t.dom)}function Pd(t,e=!1){let n=t.state.selection;if(Bd(t,n),Md(t)){if(!e&&t.input.mouseDown&&t.input.mouseDown.allowDefault&&Lu){let e=t.domSelectionRange(),n=t.domObserver.currentSelection;if(e.anchorNode&&n.anchorNode&&su(e.anchorNode,e.anchorOffset,n.anchorNode,n.anchorOffset))return t.input.mouseDown.delayedSelectionSync=!0,void t.domObserver.setCurSelection()}if(t.domObserver.disconnectSelection(),t.cursorWrapper)!function(t){let e=t.domSelection();if(!e)return;let n=t.cursorWrapper.dom,r="IMG"==n.nodeName;r?e.collapse(n.parentNode,nu(n)+1):e.collapse(n,0),!r&&!t.state.selection.visible&&Cu&&Nu<=11&&(n.disabled=!0,n.disabled=!1)}(t);else{let r,i,{anchor:o,head:s}=n;xd&&!(n instanceof Fc)&&(n.$from.parent.inlineContent||(r=Fd(t,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(i=Fd(t,n.to))),t.docView.setSelection(o,s,t,e),xd&&(r&&Ud(r),i&&Ud(i)),n.visible?t.dom.classList.remove("ProseMirror-hideselection"):(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&function(t){let e=t.dom.ownerDocument;e.removeEventListener("selectionchange",t.input.hideSelectionGuard);let n=t.domSelectionRange(),r=n.anchorNode,i=n.anchorOffset;e.addEventListener("selectionchange",t.input.hideSelectionGuard=()=>{(n.anchorNode!=r||n.anchorOffset!=i)&&(e.removeEventListener("selectionchange",t.input.hideSelectionGuard),setTimeout(()=>{(!Md(t)||t.state.selection.visible)&&t.dom.classList.remove("ProseMirror-hideselection")},20))})}(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}const xd=Pu||Lu&&Mu<63;function Fd(t,e){let{node:n,offset:r}=t.docView.domFromPos(e,0),i=r<n.childNodes.length?n.childNodes[r]:null,o=r?n.childNodes[r-1]:null;if(Pu&&i&&"false"==i.contentEditable)return Hd(i);if(!(i&&"false"!=i.contentEditable||o&&"false"!=o.contentEditable)){if(i)return Hd(i);if(o)return Hd(o)}}function Hd(t){return t.contentEditable="true",Pu&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function Ud(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function Bd(t,e){if(e instanceof Uc){let n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(jd(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else jd(t)}function jd(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function Vd(t,e,n,r){return t.someProp("createSelectionBetween",r=>r(t,e,n))||Fc.between(e,n,r)}function zd(t){return!(t.editable&&!t.hasFocus())&&$d(t)}function $d(t){let e=t.domSelectionRange();if(!e.anchorNode)return!1;try{return t.dom.contains(3==e.anchorNode.nodeType?e.anchorNode.parentNode:e.anchorNode)&&(t.editable||t.dom.contains(3==e.focusNode.nodeType?e.focusNode.parentNode:e.focusNode))}catch(t){return!1}}function Yd(t,e){let{$anchor:n,$head:r}=t.selection,i=e>0?n.max(r):n.min(r),o=i.parent.inlineContent?i.depth?t.doc.resolve(e>0?i.after():i.before()):null:i;return o&&Lc.findFrom(o,e)}function Gd(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function Wd(t,e,n){let r=t.state.selection;if(!(r instanceof Fc)){if(r instanceof Uc&&r.node.isInline)return Gd(t,new Fc(e>0?r.$to:r.$from));{let n=Yd(t.state,e);return!!n&&Gd(t,n)}}if(n.indexOf("s")>-1){let{$head:n}=r,i=n.textOffset?null:e<0?n.nodeBefore:n.nodeAfter;if(!i||i.isText||!i.isLeaf)return!1;let o=t.state.doc.resolve(n.pos+i.nodeSize*(e<0?-1:1));return Gd(t,new Fc(r.$anchor,o))}if(!r.empty)return!1;if(t.endOfTextblock(e>0?"forward":"backward")){let n=Yd(t.state,e);return!!(n&&n instanceof Uc)&&Gd(t,n)}if(!(Hu&&n.indexOf("m")>-1)){let n,i=r.$head,o=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter;if(!o||o.isText)return!1;let s=e<0?i.pos-o.nodeSize:i.pos;return!!(o.isAtom||(n=t.docView.descAt(s))&&!n.contentDOM)&&(Uc.isSelectable(o)?Gd(t,new Uc(e<0?t.state.doc.resolve(i.pos-o.nodeSize):i)):!!ju&&Gd(t,new Fc(t.state.doc.resolve(e<0?s:s+o.nodeSize))))}}function Xd(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}function Kd(t,e){let n=t.pmViewDesc;return n&&0==n.size&&(e<0||t.nextSibling||"BR"!=t.nodeName)}function qd(t,e){return e<0?function(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let i,o,s=!1;for(wu&&1==n.nodeType&&r<Xd(n)&&Kd(n.childNodes[r],-1)&&(s=!0);;)if(r>0){if(1!=n.nodeType)break;{let t=n.childNodes[r-1];if(Kd(t,-1))i=n,o=--r;else{if(3!=t.nodeType)break;n=t,r=n.nodeValue.length}}}else{if(Jd(n))break;{let e=n.previousSibling;for(;e&&Kd(e,-1);)i=n.parentNode,o=nu(e),e=e.previousSibling;if(e)n=e,r=Xd(n);else{if(n=n.parentNode,n==t.dom)break;r=0}}}s?Zd(t,n,r):i&&Zd(t,i,o)}(t):function(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let i,o,s=Xd(n);for(;;)if(r<s){if(1!=n.nodeType)break;if(!Kd(n.childNodes[r],1))break;i=n,o=++r}else{if(Jd(n))break;{let e=n.nextSibling;for(;e&&Kd(e,1);)i=e.parentNode,o=nu(e)+1,e=e.nextSibling;if(e)n=e,r=0,s=Xd(n);else{if(n=n.parentNode,n==t.dom)break;r=s=0}}}i&&Zd(t,i,o)}(t)}function Jd(t){let e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function Zd(t,e,n){if(3!=e.nodeType){let t,r;(r=function(t,e){for(;t&&e==t.childNodes.length&&!uu(t);)e=nu(t)+1,t=t.parentNode;for(;t&&e<t.childNodes.length;){let n=t.childNodes[e];if(3==n.nodeType)return n;if(1==n.nodeType&&"false"==n.contentEditable)break;t=n,e=0}}(e,n))?(e=r,n=0):(t=function(t,e){for(;t&&!e&&!uu(t);)e=nu(t),t=t.parentNode;for(;t&&e;){let n=t.childNodes[e-1];if(3==n.nodeType)return n;if(1==n.nodeType&&"false"==n.contentEditable)break;e=(t=n).childNodes.length}}(e,n))&&(e=t,n=t.nodeValue.length)}let r=t.domSelection();if(!r)return;if(du(r)){let t=document.createRange();t.setEnd(e,n),t.setStart(e,n),r.removeAllRanges(),r.addRange(t)}else r.extend&&r.extend(e,n);t.domObserver.setCurSelection();let{state:i}=t;setTimeout(()=>{t.state==i&&Pd(t)},50)}function Qd(t,e){let n=t.state.doc.resolve(e);if(!Lu&&!Uu&&n.parent.inlineContent){let r=t.coordsAtPos(e);if(e>n.start()){let n=t.coordsAtPos(e-1),i=(n.top+n.bottom)/2;if(i>r.top&&i<r.bottom&&Math.abs(n.left-r.left)>1)return n.left<r.left?"ltr":"rtl"}if(e<n.end()){let n=t.coordsAtPos(e+1),i=(n.top+n.bottom)/2;if(i>r.top&&i<r.bottom&&Math.abs(n.left-r.left)>1)return n.left>r.left?"ltr":"rtl"}}return"rtl"==getComputedStyle(t.dom).direction?"rtl":"ltr"}function th(t,e,n){let r=t.state.selection;if(r instanceof Fc&&!r.empty||n.indexOf("s")>-1||Hu&&n.indexOf("m")>-1)return!1;let{$from:i,$to:o}=r;if(!i.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let n=Yd(t.state,e);if(n&&n instanceof Uc)return Gd(t,n)}if(!i.parent.inlineContent){let n=e<0?i:o,s=r instanceof jc?Lc.near(n,e):Lc.findFrom(n,e);return!!s&&Gd(t,s)}return!1}function eh(t,e){if(!(t.state.selection instanceof Fc))return!0;let{$head:n,$anchor:r,empty:i}=t.state.selection;if(!n.sameParent(r))return!0;if(!i)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;let o=!n.textOffset&&(e<0?n.nodeBefore:n.nodeAfter);if(o&&!o.isText){let r=t.state.tr;return e<0?r.delete(n.pos-o.nodeSize,n.pos):r.delete(n.pos,n.pos+o.nodeSize),t.dispatch(r),!0}return!1}function nh(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function rh(t,e){let n=e.keyCode,r=function(t){let e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}(e);if(8==n||Hu&&72==n&&"c"==r)return eh(t,-1)||qd(t,-1);if(46==n&&!e.shiftKey||Hu&&68==n&&"c"==r)return eh(t,1)||qd(t,1);if(13==n||27==n)return!0;if(37==n||Hu&&66==n&&"c"==r){let e=37==n?"ltr"==Qd(t,t.state.selection.from)?-1:1:-1;return Wd(t,e,r)||qd(t,e)}if(39==n||Hu&&70==n&&"c"==r){let e=39==n?"ltr"==Qd(t,t.state.selection.from)?1:-1:1;return Wd(t,e,r)||qd(t,e)}return 38==n||Hu&&80==n&&"c"==r?th(t,-1,r)||qd(t,-1):40==n||Hu&&78==n&&"c"==r?function(t){if(!Pu||t.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(e&&1==e.nodeType&&0==n&&e.firstChild&&"false"==e.firstChild.contentEditable){let n=e.firstChild;nh(t,n,"true"),setTimeout(()=>nh(t,n,"false"),20)}return!1}(t)||th(t,1,r)||qd(t,1):r==(Hu?"m":"c")&&(66==n||73==n||89==n||90==n)}function ih(t,e){t.someProp("transformCopied",n=>{e=n(e,t)});let n=[],{content:r,openStart:i,openEnd:o}=e;for(;i>1&&o>1&&1==r.childCount&&1==r.firstChild.childCount;){i--,o--;let t=r.firstChild;n.push(t.type.name,t.attrs!=t.type.defaultAttrs?t.attrs:null),r=t.content}let s=t.someProp("clipboardSerializer")||jl.fromSchema(t.state.schema),a=fh(),l=a.createElement("div");l.appendChild(s.serializeFragment(r,{document:a}));let c,d=l.firstChild,h=0;for(;d&&1==d.nodeType&&(c=hh[d.nodeName.toLowerCase()]);){for(let t=c.length-1;t>=0;t--){let e=a.createElement(c[t]);for(;l.firstChild;)e.appendChild(l.firstChild);l.appendChild(e),h++}d=l.firstChild}return d&&1==d.nodeType&&d.setAttribute("data-pm-slice",`${i} ${o}${h?` -${h}`:""} ${JSON.stringify(n)}`),{dom:l,text:t.someProp("clipboardTextSerializer",n=>n(e,t))||e.content.textBetween(0,e.content.size,"\n\n"),slice:e}}function oh(t,e,n,r,i){let o,s,a=i.parent.type.spec.code;if(!n&&!e)return null;let l=!!e&&(r||a||!n);if(l){if(t.someProp("transformPastedText",n=>{e=n(e,a||r,t)}),a)return s=new Wa(ja.from(t.state.schema.text(e.replace(/\r\n?/g,"\n"))),0,0),t.someProp("transformPasted",e=>{s=e(s,t,!0)}),s;let n=t.someProp("clipboardTextParser",n=>n(e,i,r,t));if(n)s=n;else{let n=i.marks(),{schema:r}=t.state,s=jl.fromSchema(r);o=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(t=>{let e=o.appendChild(document.createElement("p"));t&&e.appendChild(s.serializeNode(r.text(t,n)))})}}else t.someProp("transformPastedHTML",e=>{n=e(n,t)}),o=function(t){let e=/^(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n,r=fh().createElement("div"),i=/<([a-z][^>\s]+)/i.exec(t);if((n=i&&hh[i[1].toLowerCase()])&&(t=n.map(t=>"<"+t+">").join("")+t+n.map(t=>"</"+t+">").reverse().join("")),r.innerHTML=function(t){let e=window.trustedTypes;return e?(mh||(mh=e.defaultPolicy||e.createPolicy("ProseMirrorClipboard",{createHTML:t=>t})),mh.createHTML(t)):t}(t),n)for(let t=0;t<n.length;t++)r=r.querySelector(n[t])||r;return r}(n),ju&&function(t){let e=t.querySelectorAll(Lu?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<e.length;n++){let r=e[n];1==r.childNodes.length&&" "==r.textContent&&r.parentNode&&r.parentNode.replaceChild(t.ownerDocument.createTextNode(" "),r)}}(o);let c=o&&o.querySelector("[data-pm-slice]"),d=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(d&&d[3])for(let t=+d[3];t>0;t--){let t=o.firstChild;for(;t&&1!=t.nodeType;)t=t.nextSibling;if(!t)break;o=t}if(s||(s=(t.someProp("clipboardParser")||t.someProp("domParser")||wl.fromSchema(t.state.schema)).parseSlice(o,{preserveWhitespace:!(!l&&!d),context:i,ruleFromNode:t=>"BR"!=t.nodeName||t.nextSibling||!t.parentNode||sh.test(t.parentNode.nodeName)?null:{ignore:!0}})),d)s=function(t,e){if(!t.size)return t;let n,r=t.content.firstChild.type.schema;try{n=JSON.parse(e)}catch(e){return t}let{content:i,openStart:o,openEnd:s}=t;for(let t=n.length-2;t>=0;t-=2){let e=r.nodes[n[t]];if(!e||e.hasRequiredAttrs())break;i=ja.from(e.create(n[t+1],i)),o++,s++}return new Wa(i,o,s)}(dh(s,+d[1],+d[2]),d[4]);else if(s=Wa.maxOpen(function(t,e){if(t.childCount<2)return t;for(let n=e.depth;n>=0;n--){let r,i=e.node(n).contentMatchAt(e.index(n)),o=[];if(t.forEach(t=>{if(!o)return;let e,n=i.findWrapping(t.type);if(!n)return o=null;if(e=o.length&&r.length&&lh(n,r,t,o[o.length-1],0))o[o.length-1]=e;else{o.length&&(o[o.length-1]=ch(o[o.length-1],r.length));let e=ah(t,n);o.push(e),i=i.matchType(e.type),r=n}}),o)return ja.from(o)}return t}(s.content,i),!0),s.openStart||s.openEnd){let t=0,e=0;for(let e=s.content.firstChild;t<s.openStart&&!e.type.spec.isolating;t++,e=e.firstChild);for(let t=s.content.lastChild;e<s.openEnd&&!t.type.spec.isolating;e++,t=t.lastChild);s=dh(s,t,e)}return t.someProp("transformPasted",e=>{s=e(s,t,l)}),s}const sh=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function ah(t,e,n=0){for(let r=e.length-1;r>=n;r--)t=e[r].create(null,ja.from(t));return t}function lh(t,e,n,r,i){if(i<t.length&&i<e.length&&t[i]==e[i]){let o=lh(t,e,n,r.lastChild,i+1);if(o)return r.copy(r.content.replaceChild(r.childCount-1,o));if(r.contentMatchAt(r.childCount).matchType(i==t.length-1?n.type:t[i+1]))return r.copy(r.content.append(ja.from(ah(n,t,i+1))))}}function ch(t,e){if(0==e)return t;let n=t.content.replaceChild(t.childCount-1,ch(t.lastChild,e-1)),r=t.contentMatchAt(t.childCount).fillBefore(ja.empty,!0);return t.copy(n.append(r))}function uh(t,e,n,r,i,o){let s=e<0?t.firstChild:t.lastChild,a=s.content;return t.childCount>1&&(o=0),i<r-1&&(a=uh(a,e,n,r,i+1,o)),i>=n&&(a=e<0?s.contentMatchAt(0).fillBefore(a,o<=i).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(ja.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,s.copy(a))}function dh(t,e,n){return e<t.openStart&&(t=new Wa(uh(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new Wa(uh(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}const hh={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let ph=null;function fh(){return ph||(ph=document.implementation.createHTMLDocument("title"))}let mh=null;const Eh={},_h={},Ah={touchstart:!0,touchmove:!0};var gh=class{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.badSafariComposition=!1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}};function Sh(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function vh(t){t.someProp("handleDOMEvents",e=>{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=e=>Oh(t,e))})}function Oh(t,e){return t.someProp("handleDOMEvents",n=>{let r=n[e.type];return!!r&&(r(t,e)||e.defaultPrevented)})}function Dh(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target;n!=t.dom;n=n.parentNode)if(!n||11==n.nodeType||n.pmViewDesc&&n.pmViewDesc.stopEvent(e))return!1;return!0}function Th(t){return{left:t.clientX,top:t.clientY}}function Rh(t,e,n,r,i){if(-1==r)return!1;let o=t.state.doc.resolve(r);for(let r=o.depth+1;r>0;r--)if(t.someProp(e,e=>r>o.depth?e(t,n,o.nodeAfter,o.before(r),i,!0):e(t,n,o.node(r),o.before(r),i,!1)))return!0;return!1}function yh(t,e,n){if(t.focused||t.focus(),t.state.selection.eq(e))return;let r=t.state.tr.setSelection(e);"pointer"==n&&r.setMeta("pointer",!0),t.dispatch(r)}function Ih(t,e,n,r,i){return Rh(t,"handleClickOn",e,n,r)||t.someProp("handleClick",n=>n(t,e,r))||(i?function(t,e){if(-1==e)return!1;let n,r,i=t.state.selection;i instanceof Uc&&(n=i.node);let o=t.state.doc.resolve(e);for(let t=o.depth+1;t>0;t--){let e=t>o.depth?o.nodeAfter:o.node(t);if(Uc.isSelectable(e)){r=n&&i.$from.depth>0&&t>=i.$from.depth&&o.before(i.$from.depth+1)==i.$from.pos?o.before(i.$from.depth):o.before(t);break}}return null!=r&&(yh(t,Uc.create(t.state.doc,r),"pointer"),!0)}(t,n):function(t,e){if(-1==e)return!1;let n=t.state.doc.resolve(e),r=n.nodeAfter;return!!(r&&r.isAtom&&Uc.isSelectable(r))&&(yh(t,new Uc(n),"pointer"),!0)}(t,n))}function Ch(t,e,n,r){return Rh(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",n=>n(t,e,r))}function Nh(t,e,n,r){return Rh(t,"handleTripleClickOn",e,n,r)||t.someProp("handleTripleClick",n=>n(t,e,r))||function(t,e,n){if(0!=n.button)return!1;let r=t.state.doc;if(-1==e)return!!r.inlineContent&&(yh(t,Fc.create(r,0,r.content.size),"pointer"),!0);let i=r.resolve(e);for(let e=i.depth+1;e>0;e--){let n=e>i.depth?i.nodeAfter:i.node(e),o=i.before(e);if(n.inlineContent)yh(t,Fc.create(r,o+1,o+1+n.content.size),"pointer");else{if(!Uc.isSelectable(n))continue;yh(t,Uc.create(r,o),"pointer")}return!0}}(t,n,r)}function bh(t){return Hh(t)}_h.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=16==n.keyCode||n.shiftKey,!Lh(t,n)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!Bu||!Lu||13!=n.keyCode))if(229!=n.keyCode&&t.domObserver.forceFlush(),!xu||13!=n.keyCode||n.ctrlKey||n.altKey||n.metaKey)t.someProp("handleKeyDown",e=>e(t,n))||rh(t,n)?n.preventDefault():Sh(t,"key");else{let e=Date.now();t.input.lastIOSEnter=e,t.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{t.input.lastIOSEnter==e&&(t.someProp("handleKeyDown",e=>e(t,hu(13,"Enter"))),t.input.lastIOSEnter=0)},200)}},_h.keyup=(t,e)=>{16==e.keyCode&&(t.input.shiftKey=!1)},_h.keypress=(t,e)=>{let n=e;if(Lh(t,n)||!n.charCode||n.ctrlKey&&!n.altKey||Hu&&n.metaKey)return;if(t.someProp("handleKeyPress",e=>e(t,n)))return void n.preventDefault();let r=t.state.selection;if(!(r instanceof Fc&&r.$from.sameParent(r.$to))){let e=String.fromCharCode(n.charCode),i=()=>t.state.tr.insertText(e).scrollIntoView();!/[\r\n]/.test(e)&&!t.someProp("handleTextInput",n=>n(t,r.$from.pos,r.$to.pos,e,i))&&t.dispatch(i()),n.preventDefault()}};const wh=Hu?"metaKey":"ctrlKey";Eh.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let r=bh(t),i=Date.now(),o="singleClick";i-t.input.lastClick.time<500&&function(t,e){let n=e.x-t.clientX,r=e.y-t.clientY;return n*n+r*r<100}(n,t.input.lastClick)&&!n[wh]&&t.input.lastClick.button==n.button&&("singleClick"==t.input.lastClick.type?o="doubleClick":"doubleClick"==t.input.lastClick.type&&(o="tripleClick")),t.input.lastClick={time:i,x:n.clientX,y:n.clientY,type:o,button:n.button};let s=t.posAtCoords(Th(n));s&&("singleClick"==o?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new kh(t,s,n,!!r)):("doubleClick"==o?Ch:Nh)(t,s.pos,s.inside,n)?n.preventDefault():Sh(t,"pointer"))};var kh=class{constructor(t,e,n,r){let i,o;if(this.view=t,this.pos=e,this.event=n,this.flushed=r,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!n[wh],this.allowDefault=n.shiftKey,e.inside>-1)i=t.state.doc.nodeAt(e.inside),o=e.inside;else{let n=t.state.doc.resolve(e.pos);i=n.parent,o=n.depth?n.before():0}const s=r?null:n.target,a=s?t.docView.nearestDesc(s,!0):null;this.target=a&&1==a.nodeDOM.nodeType?a.nodeDOM:null;let{selection:l}=t.state;(0==n.button&&i.type.spec.draggable&&!1!==i.type.spec.selectable||l instanceof Uc&&l.from<=o&&l.to>o)&&(this.mightDrag={node:i,pos:o,addAttr:!(!this.target||this.target.draggable),setUneditable:!(!this.target||!wu||this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),Sh(t,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>Pd(this.view)),this.view.input.mouseDown=null}up(t){if(this.done(),!this.view.dom.contains(t.target))return;let e=this.pos;this.view.state.doc!=this.startDoc&&(e=this.view.posAtCoords(Th(t))),this.updateAllowDefault(t),this.allowDefault||!e?Sh(this.view,"pointer"):Ih(this.view,e.pos,e.inside,t,this.selectNode)?t.preventDefault():0==t.button&&(this.flushed||Pu&&this.mightDrag&&!this.mightDrag.node.isAtom||Lu&&!this.view.state.selection.visible&&Math.min(Math.abs(e.pos-this.view.state.selection.from),Math.abs(e.pos-this.view.state.selection.to))<=2)?(yh(this.view,Lc.near(this.view.state.doc.resolve(e.pos)),"pointer"),t.preventDefault()):Sh(this.view,"pointer")}move(t){this.updateAllowDefault(t),Sh(this.view,"pointer"),0==t.buttons&&this.done()}updateAllowDefault(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0)}};function Lh(t,e){return!!t.composing||!!(Pu&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500)&&(t.input.compositionEndedAt=-2e8,!0)}Eh.touchstart=t=>{t.input.lastTouch=Date.now(),bh(t),Sh(t,"pointer")},Eh.touchmove=t=>{t.input.lastTouch=Date.now(),Sh(t,"pointer")},Eh.contextmenu=t=>bh(t);const Mh=Bu?5e3:-1;function Ph(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>Hh(t),e))}function xh(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=function(){let t=document.createEvent("Event");return t.initEvent("event",!0,!0),t.timeStamp}());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function Fh(t){let e=t.domSelectionRange();if(!e.focusNode)return null;let n=function(t,e){for(;;){if(3==t.nodeType&&e)return t;if(1==t.nodeType&&e>0){if("false"==t.contentEditable)return null;e=cu(t=t.childNodes[e-1])}else{if(!t.parentNode||uu(t))return null;e=nu(t),t=t.parentNode}}}(e.focusNode,e.focusOffset),r=function(t,e){for(;;){if(3==t.nodeType&&e<t.nodeValue.length)return t;if(1==t.nodeType&&e<t.childNodes.length){if("false"==t.contentEditable)return null;t=t.childNodes[e],e=0}else{if(!t.parentNode||uu(t))return null;e=nu(t)+1,t=t.parentNode}}}(e.focusNode,e.focusOffset);if(n&&r&&n!=r){let e=r.pmViewDesc,i=t.domObserver.lastChangedTextNode;if(n==i||r==i)return i;if(!e||!e.isText(r.nodeValue))return r;if(t.input.compositionNode==r){let t=n.pmViewDesc;if(t&&t.isText(n.nodeValue))return r}}return n||r}function Hh(t,e=!1){if(!(Bu&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),xh(t),e||t.docView&&t.docView.dirty){let n=Ld(t),r=t.state.selection;return n&&!n.eq(r)?t.dispatch(t.state.tr.setSelection(n)):!t.markCursor&&!e||r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?t.updateState(t.state):t.dispatch(t.state.tr.deleteSelection()),!0}return!1}}_h.compositionstart=_h.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,n=e.selection.$to;if(e.selection instanceof Fc&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(t=>!1===t.type.spec.inclusive)||Lu&&Uu&&function(t){let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(!e||1!=e.nodeType||n>=e.childNodes.length)return!1;let r=e.childNodes[n];return 1==r.nodeType&&"false"==r.contentEditable}(t)))t.markCursor=t.state.storedMarks||n.marks(),Hh(t,!0),t.markCursor=null;else if(Hh(t,!e.selection.empty),wu&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let e=t.domSelectionRange();for(let n=e.focusNode,r=e.focusOffset;n&&1==n.nodeType&&0!=r;){let e=r<0?n.lastChild:n.childNodes[r-1];if(!e)break;if(3==e.nodeType){let n=t.domSelection();n&&n.collapse(e,e.nodeValue.length);break}n=e,r=-1}}t.input.composing=!0}Ph(t,Mh)},_h.compositionend=(t,e)=>{t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=e.timeStamp,t.input.compositionPendingChanges=t.domObserver.pendingRecords().length?t.input.compositionID:0,t.input.compositionNode=null,t.input.badSafariComposition?t.domObserver.forceFlush():t.input.compositionPendingChanges&&Promise.resolve().then(()=>t.domObserver.flush()),t.input.compositionID++,Ph(t,20))};const Uh=Cu&&Nu<15||xu&&Vu<604;function Bh(t,e,n,r,i){let o=oh(t,e,n,r,t.state.selection.$from);if(t.someProp("handlePaste",e=>e(t,i,o||Wa.empty)))return!0;if(!o)return!1;let s=function(t){return 0==t.openStart&&0==t.openEnd&&1==t.content.childCount?t.content.firstChild:null}(o),a=s?t.state.tr.replaceSelectionWith(s,r):t.state.tr.replaceSelection(o);return t.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function jh(t){let e=t.getData("text/plain")||t.getData("Text");if(e)return e;let n=t.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}Eh.copy=_h.cut=(t,e)=>{let n=e,r=t.state.selection,i="cut"==n.type;if(r.empty)return;let o=Uh?null:n.clipboardData,{dom:s,text:a}=ih(t,r.content());o?(n.preventDefault(),o.clearData(),o.setData("text/html",s.innerHTML),o.setData("text/plain",a)):function(t,e){if(!t.dom.parentNode)return;let n=t.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(e),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),i=document.createRange();i.selectNodeContents(e),t.dom.blur(),r.removeAllRanges(),r.addRange(i),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),t.focus()},50)}(t,s),i&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))},_h.paste=(t,e)=>{let n=e;if(t.composing&&!Bu)return;let r=Uh?null:n.clipboardData,i=t.input.shiftKey&&45!=t.input.lastKeyCode;r&&Bh(t,jh(r),r.getData("text/html"),i,n)?n.preventDefault():function(t,e){if(!t.dom.parentNode)return;let n=t.input.shiftKey||t.state.selection.$from.parent.type.spec.code,r=t.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let i=t.input.shiftKey&&45!=t.input.lastKeyCode;setTimeout(()=>{t.focus(),r.parentNode&&r.parentNode.removeChild(r),n?Bh(t,r.value,null,i,e):Bh(t,r.textContent,r.innerHTML,i,e)},50)}(t,n)};var Vh=class{constructor(t,e,n){this.slice=t,this.move=e,this.node=n}};const zh=Hu?"altKey":"ctrlKey";function $h(t,e){let n=t.someProp("dragCopies",t=>!t(e));return null!=n?n:!e[zh]}Eh.dragstart=(t,e)=>{let n=e,r=t.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let i,o=t.state.selection,s=o.empty?null:t.posAtCoords(Th(n));if(!(s&&s.pos>=o.from&&s.pos<=(o instanceof Uc?o.to-1:o.to)))if(r&&r.mightDrag)i=Uc.create(t.state.doc,r.mightDrag.pos);else if(n.target&&1==n.target.nodeType){let e=t.docView.nearestDesc(n.target,!0);e&&e.node.type.spec.draggable&&e!=t.docView&&(i=Uc.create(t.state.doc,e.posBefore))}let{dom:a,text:l,slice:c}=ih(t,(i||t.state.selection).content());(!n.dataTransfer.files.length||!Lu||Mu>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(Uh?"Text":"text/html",a.innerHTML),n.dataTransfer.effectAllowed="copyMove",Uh||n.dataTransfer.setData("text/plain",l),t.dragging=new Vh(c,$h(t,n),i)},Eh.dragend=t=>{let e=t.dragging;window.setTimeout(()=>{t.dragging==e&&(t.dragging=null)},50)},_h.dragover=_h.dragenter=(t,e)=>e.preventDefault(),_h.drop=(t,e)=>{try{!function(t,e,n){if(!e.dataTransfer)return;let r=t.posAtCoords(Th(e));if(!r)return;let i=t.state.doc.resolve(r.pos),o=n&&n.slice;o?t.someProp("transformPasted",e=>{o=e(o,t,!1)}):o=oh(t,jh(e.dataTransfer),Uh?null:e.dataTransfer.getData("text/html"),!1,i);let s=!(!n||!$h(t,e));if(t.someProp("handleDrop",n=>n(t,e,o||Wa.empty,s)))return void e.preventDefault();if(!o)return;e.preventDefault();let a=o?function(t,e,n){let r=t.resolve(e);if(!n.content.size)return e;let i=n.content;for(let t=0;t<n.openStart;t++)i=i.firstChild.content;for(let t=1;t<=(0==n.openStart&&n.size?2:1);t++)for(let e=r.depth;e>=0;e--){let n=e==r.depth?0:r.pos<=(r.start(e+1)+r.end(e+1))/2?-1:1,o=r.index(e)+(n>0?1:0),s=r.node(e),a=!1;if(1==t)a=s.canReplace(o,o,i);else{let t=s.contentMatchAt(o).findWrapping(i.firstChild.type);a=t&&s.canReplaceWith(o,o,t[0])}if(a)return 0==n?r.pos:n<0?r.before(e+1):r.after(e+1)}return null}(t.state.doc,i.pos,o):i.pos;null==a&&(a=i.pos);let l=t.state.tr;if(s){let{node:t}=n;t?t.replace(l):l.deleteSelection()}let c=l.mapping.map(a),d=0==o.openStart&&0==o.openEnd&&1==o.content.childCount,h=l.doc;if(d?l.replaceRangeWith(c,c,o.content.firstChild):l.replaceRange(c,c,o),l.doc.eq(h))return;let p=l.doc.resolve(c);if(d&&Uc.isSelectable(o.content.firstChild)&&p.nodeAfter&&p.nodeAfter.sameMarkup(o.content.firstChild))l.setSelection(new Uc(p));else{let e=l.mapping.map(a);l.mapping.maps[l.mapping.maps.length-1].forEach((t,n,r,i)=>e=i),l.setSelection(Vd(t,p,l.doc.resolve(e)))}t.focus(),t.dispatch(l.setMeta("uiEvent","drop"))}(t,e,t.dragging)}finally{t.dragging=null}},Eh.focus=t=>{t.input.lastFocus=Date.now(),t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0,setTimeout(()=>{t.docView&&t.hasFocus()&&!t.domObserver.currentSelection.eq(t.domSelectionRange())&&Pd(t)},20))},Eh.blur=(t,e)=>{let n=e;t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),n.relatedTarget&&t.dom.contains(n.relatedTarget)&&t.domObserver.currentSelection.clear(),t.focused=!1)},Eh.beforeinput=(t,e)=>{if(Lu&&Bu&&"deleteContentBackward"==e.inputType){t.domObserver.flushSoon();let{domChangeCount:e}=t.input;setTimeout(()=>{if(t.input.domChangeCount!=e||(t.dom.blur(),t.focus(),t.someProp("handleKeyDown",e=>e(t,hu(8,"Backspace")))))return;let{$cursor:n}=t.state.selection;n&&n.pos>0&&t.dispatch(t.state.tr.delete(n.pos-1,n.pos).scrollIntoView())},50)}};for(let t in _h)Eh[t]=_h[t];function Yh(t,e){if(t==e)return!0;for(let n in t)if(t[n]!==e[n])return!1;for(let n in e)if(!(n in t))return!1;return!0}var Gh=class tg{constructor(t,e){this.toDOM=t,this.spec=e||Jh,this.side=this.spec.side||0}map(t,e,n,r){let{pos:i,deleted:o}=t.mapResult(e.from+r,this.side<0?-1:1);return o?null:new Kh(i-n,i-n,this)}valid(){return!0}eq(t){return this==t||t instanceof tg&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&Yh(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}},Wh=class Fu{constructor(t,e){this.attrs=t,this.spec=e||Jh}map(t,e,n,r){let i=t.map(e.from+r,this.spec.inclusiveStart?-1:1)-n,o=t.map(e.to+r,this.spec.inclusiveEnd?1:-1)-n;return i>=o?null:new Kh(i,o,this)}valid(t,e){return e.from<e.to}eq(t){return this==t||t instanceof Fu&&Yh(this.attrs,t.attrs)&&Yh(this.spec,t.spec)}static is(t){return t.type instanceof Fu}destroy(){}},Xh=class ng{constructor(t,e){this.attrs=t,this.spec=e||Jh}map(t,e,n,r){let i=t.mapResult(e.from+r,1);if(i.deleted)return null;let o=t.mapResult(e.to+r,-1);return o.deleted||o.pos<=i.pos?null:new Kh(i.pos-n,o.pos-n,this)}valid(t,e){let n,{index:r,offset:i}=t.content.findIndex(e.from);return i==e.from&&!(n=t.child(r)).isText&&i+n.nodeSize==e.to}eq(t){return this==t||t instanceof ng&&Yh(this.attrs,t.attrs)&&Yh(this.spec,t.spec)}destroy(){}},Kh=class Ii{constructor(t,e,n){this.from=t,this.to=e,this.type=n}copy(t,e){return new Ii(t,e,this.type)}eq(t,e=0){return this.type.eq(t.type)&&this.from+e==t.from&&this.to+e==t.to}map(t,e,n){return this.type.map(t,this,e,n)}static widget(t,e,n){return new Ii(t,t,new Gh(e,n))}static inline(t,e,n,r){return new Ii(t,e,new Wh(n,r))}static node(t,e,n,r){return new Ii(t,e,new Xh(n,r))}get spec(){return this.type.spec}get inline(){return this.type instanceof Wh}get widget(){return this.type instanceof Gh}};const qh=[],Jh={};var Zh=class pn{constructor(t,e){this.local=t.length?t:qh,this.children=e.length?e:qh}static create(t,e){return e.length?ip(e,t,0,Jh):Qh}find(t,e,n){let r=[];return this.findInner(null==t?0:t,null==e?1e9:e,r,0,n),r}findInner(t,e,n,r,i){for(let o=0;o<this.local.length;o++){let s=this.local[o];s.from<=e&&s.to>=t&&(!i||i(s.spec))&&n.push(s.copy(s.from+r,s.to+r))}for(let o=0;o<this.children.length;o+=3)if(this.children[o]<e&&this.children[o+1]>t){let s=this.children[o]+1;this.children[o+2].findInner(t-s,e-s,n,r+s,i)}}map(t,e,n){return this==Qh||0==t.maps.length?this:this.mapInner(t,e,0,0,n||Jh)}mapInner(t,e,n,r,i){let o;for(let s=0;s<this.local.length;s++){let a=this.local[s].map(t,n,r);a&&a.type.valid(e,a)?(o||(o=[])).push(a):i.onRemove&&i.onRemove(this.local[s].spec)}return this.children.length?function(t,e,n,r,i,o,s){let a=t.slice();for(let t=0,e=o;t<n.maps.length;t++){let r=0;n.maps[t].forEach((t,n,i,o)=>{let s=o-i-(n-t);for(let i=0;i<a.length;i+=3){let o=a[i+1];if(o<0||t>o+e-r)continue;let l=a[i]+e-r;n>=l?a[i+1]=t<=l?-2:-1:t>=e&&s&&(a[i]+=s,a[i+1]+=s)}r+=s}),e=n.maps[t].map(e,-1)}let l=!1;for(let e=0;e<a.length;e+=3)if(a[e+1]<0){if(-2==a[e+1]){l=!0,a[e+1]=-1;continue}let c=n.map(t[e]+o),d=c-i;if(d<0||d>=r.content.size){l=!0;continue}let h=n.map(t[e+1]+o,-1)-i,{index:p,offset:f}=r.content.findIndex(d),m=r.maybeChild(p);if(m&&f==d&&f+m.nodeSize==h){let r=a[e+2].mapInner(n,m,c+1,t[e]+o+1,s);r!=Qh?(a[e]=d,a[e+1]=h,a[e+2]=r):(a[e+1]=-2,l=!0)}else l=!0}if(l){let l=ip(function(t,e,n,r,i,o,s){function a(t,e){for(let o=0;o<t.local.length;o++){let a=t.local[o].map(r,i,e);a?n.push(a):s.onRemove&&s.onRemove(t.local[o].spec)}for(let n=0;n<t.children.length;n+=3)a(t.children[n+2],t.children[n]+e+1)}for(let n=0;n<t.length;n+=3)-1==t[n+1]&&a(t[n+2],e[n]+o+1);return n}(a,t,e,n,i,o,s),r,0,s);e=l.local;for(let t=0;t<a.length;t+=3)a[t+1]<0&&(a.splice(t,3),t-=3);for(let t=0,e=0;t<l.children.length;t+=3){let n=l.children[t];for(;e<a.length&&a[e]<n;)e+=3;a.splice(e,0,l.children[t],l.children[t+1],l.children[t+2])}}return new Zh(e.sort(op),a)}(this.children,o||[],t,e,n,r,i):o?new pn(o.sort(op),qh):Qh}add(t,e){return e.length?this==Qh?pn.create(t,e):this.addInner(t,e,0):this}addInner(t,e,n){let r,i=0;t.forEach((t,o)=>{let s,a=o+n;if(s=np(e,t,a)){for(r||(r=this.children.slice());i<r.length&&r[i]<o;)i+=3;r[i]==o?r[i+2]=r[i+2].addInner(t,s,a+1):r.splice(i,0,o,o+t.nodeSize,ip(s,t,a+1,Jh)),i+=3}});let o=ep(i?rp(e):e,-n);for(let e=0;e<o.length;e++)o[e].type.valid(t,o[e])||o.splice(e--,1);return new pn(o.length?this.local.concat(o).sort(op):this.local,r||this.children)}remove(t){return 0==t.length||this==Qh?this:this.removeInner(t,0)}removeInner(t,e){let n=this.children,r=this.local;for(let r=0;r<n.length;r+=3){let i,o=n[r]+e,s=n[r+1]+e;for(let e,n=0;n<t.length;n++)(e=t[n])&&e.from>o&&e.to<s&&(t[n]=null,(i||(i=[])).push(e));if(!i)continue;n==this.children&&(n=this.children.slice());let a=n[r+2].removeInner(i,o+1);a!=Qh?n[r+2]=a:(n.splice(r,3),r-=3)}if(r.length)for(let n,i=0;i<t.length;i++)if(n=t[i])for(let t=0;t<r.length;t++)r[t].eq(n,e)&&(r==this.local&&(r=this.local.slice()),r.splice(t--,1));return n==this.children&&r==this.local?this:r.length||n.length?new pn(r,n):Qh}forChild(t,e){if(this==Qh)return this;if(e.isLeaf)return pn.empty;let n,r;for(let e=0;e<this.children.length;e+=3)if(this.children[e]>=t){this.children[e]==t&&(n=this.children[e+2]);break}let i=t+1,o=i+e.content.size;for(let t=0;t<this.local.length;t++){let e=this.local[t];if(e.from<o&&e.to>i&&e.type instanceof Wh){let t=Math.max(i,e.from)-i,n=Math.min(o,e.to)-i;t<n&&(r||(r=[])).push(e.copy(t,n))}}if(r){let t=new pn(r.sort(op),qh);return n?new tp([t,n]):t}return n||Qh}eq(t){if(this==t)return!0;if(!(t instanceof pn)||this.local.length!=t.local.length||this.children.length!=t.children.length)return!1;for(let e=0;e<this.local.length;e++)if(!this.local[e].eq(t.local[e]))return!1;for(let e=0;e<this.children.length;e+=3)if(this.children[e]!=t.children[e]||this.children[e+1]!=t.children[e+1]||!this.children[e+2].eq(t.children[e+2]))return!1;return!0}locals(t){return sp(this.localsInner(t))}localsInner(t){if(this==Qh)return qh;if(t.inlineContent||!this.local.some(Wh.is))return this.local;let e=[];for(let t=0;t<this.local.length;t++)this.local[t].type instanceof Wh||e.push(this.local[t]);return e}forEachSet(t){t(this)}};Zh.empty=new Zh([],[]),Zh.removeOverlap=sp;const Qh=Zh.empty;var tp=class Cr{constructor(t){this.members=t}map(t,e){const n=this.members.map(n=>n.map(t,e,Jh));return Cr.from(n)}forChild(t,e){if(e.isLeaf)return Zh.empty;let n=[];for(let r=0;r<this.members.length;r++){let i=this.members[r].forChild(t,e);i!=Qh&&(i instanceof Cr?n=n.concat(i.members):n.push(i))}return Cr.from(n)}eq(t){if(!(t instanceof Cr)||t.members.length!=this.members.length)return!1;for(let e=0;e<this.members.length;e++)if(!this.members[e].eq(t.members[e]))return!1;return!0}locals(t){let e,n=!0;for(let r=0;r<this.members.length;r++){let i=this.members[r].localsInner(t);if(i.length)if(e){n&&(e=e.slice(),n=!1);for(let t=0;t<i.length;t++)e.push(i[t])}else e=i}return e?sp(n?e:e.sort(op)):qh}static from(t){switch(t.length){case 0:return Qh;case 1:return t[0];default:return new Cr(t.every(t=>t instanceof Zh)?t:t.reduce((t,e)=>t.concat(e instanceof Zh?e:e.members),[]))}}forEachSet(t){for(let e=0;e<this.members.length;e++)this.members[e].forEachSet(t)}};function ep(t,e){if(!e||!t.length)return t;let n=[];for(let r=0;r<t.length;r++){let i=t[r];n.push(new Kh(i.from+e,i.to+e,i.type))}return n}function np(t,e,n){if(e.isLeaf)return null;let r=n+e.nodeSize,i=null;for(let e,o=0;o<t.length;o++)(e=t[o])&&e.from>n&&e.to<r&&((i||(i=[])).push(e),t[o]=null);return i}function rp(t){let e=[];for(let n=0;n<t.length;n++)null!=t[n]&&e.push(t[n]);return e}function ip(t,e,n,r){let i=[],o=!1;e.forEach((e,s)=>{let a=np(t,e,s+n);if(a){o=!0;let t=ip(a,e,n+s+1,r);t!=Qh&&i.push(s,s+e.nodeSize,t)}});let s=ep(o?rp(t):t,-n).sort(op);for(let t=0;t<s.length;t++)s[t].type.valid(e,s[t])||(r.onRemove&&r.onRemove(s[t].spec),s.splice(t--,1));return s.length||i.length?new Zh(s,i):Qh}function op(t,e){return t.from-e.from||t.to-e.to}function sp(t){let e=t;for(let n=0;n<e.length-1;n++){let r=e[n];if(r.from!=r.to)for(let i=n+1;i<e.length;i++){let o=e[i];if(o.from!=r.from){o.from<r.to&&(e==t&&(e=t.slice()),e[n]=r.copy(r.from,o.from),ap(e,i,r.copy(o.from,r.to)));break}o.to!=r.to&&(e==t&&(e=t.slice()),e[i]=o.copy(o.from,r.to),ap(e,i+1,o.copy(r.to,o.to)))}}return e}function ap(t,e,n){for(;e<t.length&&op(n,t[e])>0;)e++;t.splice(e,0,n)}function lp(t){let e=[];return t.someProp("decorations",n=>{let r=n(t.state);r&&r!=Qh&&e.push(r)}),t.cursorWrapper&&e.push(Zh.create(t.state.doc,[t.cursorWrapper.deco])),tp.from(e)}const cp={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},up=Cu&&Nu<=11;var dp=class{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(t){this.anchorNode=t.anchorNode,this.anchorOffset=t.anchorOffset,this.focusNode=t.focusNode,this.focusOffset=t.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(t){return t.anchorNode==this.anchorNode&&t.anchorOffset==this.anchorOffset&&t.focusNode==this.focusNode&&t.focusOffset==this.focusOffset}},hp=class{constructor(t,e){this.view=t,this.handleDOMChange=e,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new dp,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(e=>{for(let t=0;t<e.length;t++)this.queue.push(e[t]);Cu&&Nu<=11&&e.some(t=>"childList"==t.type&&t.removedNodes.length||"characterData"==t.type&&t.oldValue.length>t.target.nodeValue.length)?this.flushSoon():Pu&&t.composing&&e.some(t=>"childList"==t.type&&"TR"==t.target.nodeName)?(t.input.badSafariComposition=!0,this.flushSoon()):this.flush()}),up&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,cp)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let t=this.observer.takeRecords();if(t.length){for(let e=0;e<t.length;e++)this.queue.push(t[e]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(zd(this.view)){if(this.suppressingSelectionUpdates)return Pd(this.view);if(Cu&&Nu<=11&&!this.view.state.selection.empty){let t=this.view.domSelectionRange();if(t.focusNode&&su(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(t){if(!t.focusNode)return!0;let e,n=new Set;for(let e=t.focusNode;e;e=ru(e))n.add(e);for(let r=t.anchorNode;r;r=ru(r))if(n.has(r)){e=r;break}let r=e&&this.view.docView.nearestDesc(e);return r&&r.ignoreMutation({type:"selection",target:3==e.nodeType?e.parentNode:e})?(this.setCurSelection(),!0):void 0}pendingRecords(){if(this.observer)for(let t of this.observer.takeRecords())this.queue.push(t);return this.queue}flush(){let{view:t}=this;if(!t.docView||this.flushingSoon>-1)return;let e=this.pendingRecords();e.length&&(this.queue=[]);let n=t.domSelectionRange(),r=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(n)&&zd(t)&&!this.ignoreSelectionChange(n),i=-1,o=-1,s=!1,a=[];if(t.editable)for(let t=0;t<e.length;t++){let n=this.registerMutation(e[t],a);n&&(i=i<0?n.from:Math.min(n.from,i),o=o<0?n.to:Math.max(n.to,o),n.typeOver&&(s=!0))}if(wu&&a.length){let e=a.filter(t=>"BR"==t.nodeName);if(2==e.length){let[t,n]=e;t.parentNode&&t.parentNode.parentNode==n.parentNode?n.remove():t.remove()}else{let{focusNode:n}=this.currentSelection;for(let r of e){let e=r.parentNode;e&&"LI"==e.nodeName&&(!n||Ep(t,n)!=e)&&r.remove()}}}else if((Lu||Pu)&&a.some(t=>"BR"==t.nodeName)&&(8==t.input.lastKeyCode||46==t.input.lastKeyCode))for(let t of a)if("BR"==t.nodeName&&t.parentNode){let e=t.nextSibling;e&&1==e.nodeType&&"false"==e.contentEditable&&t.parentNode.removeChild(t)}let l=null;i<0&&r&&t.input.lastFocus>Date.now()-200&&Math.max(t.input.lastTouch,t.input.lastClick.time)<Date.now()-300&&du(n)&&(l=Ld(t))&&l.eq(Lc.near(t.state.doc.resolve(0),1))?(t.input.lastFocus=0,Pd(t),this.currentSelection.set(n),t.scrollToSelection()):(i>-1||r)&&(i>-1&&(t.docView.markDirty(i,o),function(t){if(!pp.has(t)&&(pp.set(t,null),-1!==["normal","nowrap","pre-line"].indexOf(getComputedStyle(t.dom).whiteSpace))){if(t.requiresGeckoHackNode=wu,fp)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),fp=!0}}(t)),t.input.badSafariComposition&&(t.input.badSafariComposition=!1,function(t,e){var n;let{focusNode:r,focusOffset:i}=t.domSelectionRange();for(let o of e)if("TR"==(null===(n=o.parentNode)||void 0===n?void 0:n.nodeName)){let e=o.nextSibling;for(;e&&"TD"!=e.nodeName&&"TH"!=e.nodeName;)e=e.nextSibling;if(e){let n=e;for(;;){let t=n.firstChild;if(!t||1!=t.nodeType||"false"==t.contentEditable||/^(BR|IMG)$/.test(t.nodeName))break;n=t}n.insertBefore(o,n.firstChild),r==o&&t.domSelection().collapse(o,i)}else o.parentNode.removeChild(o)}}(t,a)),this.handleDOMChange(i,o,s,a),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(n)||Pd(t),this.currentSelection.set(n))}registerMutation(t,e){if(e.indexOf(t.target)>-1)return null;let n=this.view.docView.nearestDesc(t.target);if("attributes"==t.type&&(n==this.view.docView||"contenteditable"==t.attributeName||"style"==t.attributeName&&!t.oldValue&&!t.target.getAttribute("style"))||!n||n.ignoreMutation(t))return null;if("childList"==t.type){for(let n=0;n<t.addedNodes.length;n++){let r=t.addedNodes[n];e.push(r),3==r.nodeType&&(this.lastChangedTextNode=r)}if(n.contentDOM&&n.contentDOM!=n.dom&&!n.contentDOM.contains(t.target))return{from:n.posBefore,to:n.posAfter};let r=t.previousSibling,i=t.nextSibling;if(Cu&&Nu<=11&&t.addedNodes.length)for(let e=0;e<t.addedNodes.length;e++){let{previousSibling:n,nextSibling:o}=t.addedNodes[e];(!n||Array.prototype.indexOf.call(t.addedNodes,n)<0)&&(r=n),(!o||Array.prototype.indexOf.call(t.addedNodes,o)<0)&&(i=o)}let o=r&&r.parentNode==t.target?nu(r)+1:0,s=n.localPosFromDOM(t.target,o,-1),a=i&&i.parentNode==t.target?nu(i):t.target.childNodes.length;return{from:s,to:n.localPosFromDOM(t.target,a,1)}}return"attributes"==t.type?{from:n.posAtStart-n.border,to:n.posAtEnd+n.border}:(this.lastChangedTextNode=t.target,{from:n.posAtStart,to:n.posAtEnd,typeOver:t.target.nodeValue==t.oldValue})}};let pp=new WeakMap,fp=!1;function mp(t,e){let n=e.startContainer,r=e.startOffset,i=e.endContainer,o=e.endOffset,s=t.domAtPos(t.state.selection.anchor);return su(s.node,s.offset,i,o)&&([n,r,i,o]=[i,o,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:o}}function Ep(t,e){for(let n=e.parentNode;n&&n!=t.dom;n=n.parentNode){let e=t.docView.nearestDesc(n,!0);if(e&&e.node.isBlock)return n}return null}function _p(t){let e=t.pmViewDesc;if(e)return e.parseRule();if("BR"==t.nodeName&&t.parentNode){if(Pu&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){let t=document.createElement("div");return t.appendChild(document.createElement("li")),{skip:t}}if(t.parentNode.lastChild==t||Pu&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if("IMG"==t.nodeName&&t.getAttribute("mark-placeholder"))return{ignore:!0};return null}const Ap=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function gp(t,e,n,r,i){let o=t.input.compositionPendingChanges||(t.composing?t.input.compositionID:0);if(t.input.compositionPendingChanges=0,e<0){let e=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,n=Ld(t,e);if(n&&!t.state.selection.eq(n)){if(Lu&&Bu&&13===t.input.lastKeyCode&&Date.now()-100<t.input.lastKeyCodeTime&&t.someProp("handleKeyDown",e=>e(t,hu(13,"Enter"))))return;let r=t.state.tr.setSelection(n);"pointer"==e?r.setMeta("pointer",!0):"key"==e&&r.scrollIntoView(),o&&r.setMeta("composition",o),t.dispatch(r)}return}let s=t.state.doc.resolve(e),a=s.sharedDepth(n);e=s.before(a+1),n=t.state.doc.resolve(n).after(a+1);let l,c,d=t.state.selection,h=function(t,e,n){let r,{node:i,fromOffset:o,toOffset:s,from:a,to:l}=t.docView.parseRange(e,n),c=t.domSelectionRange(),d=c.anchorNode;if(d&&t.dom.contains(1==d.nodeType?d:d.parentNode)&&(r=[{node:d,offset:c.anchorOffset}],du(c)||r.push({node:c.focusNode,offset:c.focusOffset})),Lu&&8===t.input.lastKeyCode)for(let t=s;t>o;t--){let e=i.childNodes[t-1],n=e.pmViewDesc;if("BR"==e.nodeName&&!n){s=t;break}if(!n||n.size)break}let h=t.state.doc,p=t.someProp("domParser")||wl.fromSchema(t.state.schema),f=h.resolve(a),m=null,E=p.parse(i,{topNode:f.parent,topMatch:f.parent.contentMatchAt(f.index()),topOpen:!0,from:o,to:s,preserveWhitespace:"pre"!=f.parent.type.whitespace||"full",findPositions:r,ruleFromNode:_p,context:f});if(r&&null!=r[0].pos){let t=r[0].pos,e=r[1]&&r[1].pos;null==e&&(e=t),m={anchor:t+a,head:e+a}}return{doc:E,sel:m,from:a,to:l}}(t,e,n),p=t.state.doc,f=p.slice(h.from,h.to);8===t.input.lastKeyCode&&Date.now()-100<t.input.lastKeyCodeTime?(l=t.state.selection.to,c="end"):(l=t.state.selection.from,c="start"),t.input.lastKeyCode=null;let m=function(t,e,n,r,i){let o=t.findDiffStart(e,n);if(null==o)return null;let{a:s,b:a}=t.findDiffEnd(e,n+t.size,n+e.size);if("end"==i){r-=s+Math.max(0,o-Math.min(s,a))-o}if(s<o&&t.size<e.size){let t=r<=o&&r>=s?o-r:0;o-=t,o&&o<e.size&&Op(e.textBetween(o-1,o+1))&&(o+=t?1:-1),a=o+(a-s),s=o}else if(a<o){let e=r<=o&&r>=a?o-r:0;o-=e,o&&o<t.size&&Op(t.textBetween(o-1,o+1))&&(o+=e?1:-1),s=o+(s-a),a=o}return{start:o,endA:s,endB:a}}(f.content,h.doc.content,h.from,l,c);if(m&&t.input.domChangeCount++,(xu&&t.input.lastIOSEnter>Date.now()-225||Bu)&&i.some(t=>1==t.nodeType&&!Ap.test(t.nodeName))&&(!m||m.endA>=m.endB)&&t.someProp("handleKeyDown",e=>e(t,hu(13,"Enter"))))return void(t.input.lastIOSEnter=0);if(!m){if(!(r&&d instanceof Fc&&!d.empty&&d.$head.sameParent(d.$anchor))||t.composing||h.sel&&h.sel.anchor!=h.sel.head){if(h.sel){let e=Sp(t,t.state.doc,h.sel);if(e&&!e.eq(t.state.selection)){let n=t.state.tr.setSelection(e);o&&n.setMeta("composition",o),t.dispatch(n)}}return}m={start:d.from,endA:d.to,endB:d.to}}t.state.selection.from<t.state.selection.to&&m.start==m.endB&&t.state.selection instanceof Fc&&(m.start>t.state.selection.from&&m.start<=t.state.selection.from+2&&t.state.selection.from>=h.from?m.start=t.state.selection.from:m.endA<t.state.selection.to&&m.endA>=t.state.selection.to-2&&t.state.selection.to<=h.to&&(m.endB+=t.state.selection.to-m.endA,m.endA=t.state.selection.to)),Cu&&Nu<=11&&m.endB==m.start+1&&m.endA==m.start&&m.start>h.from&&" "==h.doc.textBetween(m.start-h.from-1,m.start-h.from+1)&&(m.start--,m.endA--,m.endB--);let E=h.doc.resolveNoCache(m.start-h.from),_=h.doc.resolveNoCache(m.endB-h.from),A=p.resolve(m.start),g=E.sameParent(_)&&E.parent.inlineContent&&A.end()>=m.endA;if((xu&&t.input.lastIOSEnter>Date.now()-225&&(!g||i.some(t=>"DIV"==t.nodeName||"P"==t.nodeName))||!g&&E.pos<h.doc.content.size&&(!E.sameParent(_)||!E.parent.inlineContent)&&E.pos<_.pos&&!/\S/.test(h.doc.textBetween(E.pos,_.pos,"","")))&&t.someProp("handleKeyDown",e=>e(t,hu(13,"Enter"))))return void(t.input.lastIOSEnter=0);if(t.state.selection.anchor>m.start&&function(t,e,n,r,i){if(n-e<=i.pos-r.pos||vp(r,!0,!1)<i.pos)return!1;let o=t.resolve(e);if(!r.parent.isTextblock){let t=o.nodeAfter;return null!=t&&n==e+t.nodeSize}if(o.parentOffset<o.parent.content.size||!o.parent.isTextblock)return!1;let s=t.resolve(vp(o,!0,!0));return!(!s.parent.isTextblock||s.pos>n||vp(s,!0,!1)<n)&&r.parent.content.cut(r.parentOffset).eq(s.parent.content)}(p,m.start,m.endA,E,_)&&t.someProp("handleKeyDown",e=>e(t,hu(8,"Backspace"))))return void(Bu&&Lu&&t.domObserver.suppressSelectionUpdates());Lu&&m.endB==m.start&&(t.input.lastChromeDelete=Date.now()),Bu&&!g&&E.start()!=_.start()&&0==_.parentOffset&&E.depth==_.depth&&h.sel&&h.sel.anchor==h.sel.head&&h.sel.head==m.endA&&(m.endB-=2,_=h.doc.resolveNoCache(m.endB-h.from),setTimeout(()=>{t.someProp("handleKeyDown",function(e){return e(t,hu(13,"Enter"))})},20));let S,v=m.start,O=m.endA,D=e=>{let n=e||t.state.tr.replace(v,O,h.doc.slice(m.start-h.from,m.endB-h.from));if(h.sel){let e=Sp(t,n.doc,h.sel);e&&!(Lu&&t.composing&&e.empty&&(m.start!=m.endB||t.input.lastChromeDelete<Date.now()-100)&&(e.head==v||e.head==n.mapping.map(O)-1)||Cu&&e.empty&&e.head==v)&&n.setSelection(e)}return o&&n.setMeta("composition",o),n.scrollIntoView()};if(g)if(E.pos==_.pos){Cu&&Nu<=11&&0==E.parentOffset&&(t.domObserver.suppressSelectionUpdates(),setTimeout(()=>Pd(t),20));let e=D(t.state.tr.delete(v,O)),n=p.resolve(m.start).marksAcross(p.resolve(m.endA));n&&e.ensureMarks(n),t.dispatch(e)}else if(m.endA==m.endB&&(S=function(t,e){let n,r,i,o=t.firstChild.marks,s=e.firstChild.marks,a=o,l=s;for(let t=0;t<s.length;t++)a=s[t].removeFromSet(a);for(let t=0;t<o.length;t++)l=o[t].removeFromSet(l);if(1==a.length&&0==l.length)r=a[0],n="add",i=t=>t.mark(r.addToSet(t.marks));else{if(0!=a.length||1!=l.length)return null;r=l[0],n="remove",i=t=>t.mark(r.removeFromSet(t.marks))}let c=[];for(let t=0;t<e.childCount;t++)c.push(i(e.child(t)));if(ja.from(c).eq(t))return{mark:r,type:n}}(E.parent.content.cut(E.parentOffset,_.parentOffset),A.parent.content.cut(A.parentOffset,m.endA-A.start())))){let e=D(t.state.tr);"add"==S.type?e.addMark(v,O,S.mark):e.removeMark(v,O,S.mark),t.dispatch(e)}else if(E.parent.child(E.index()).isText&&E.index()==_.index()-(_.textOffset?0:1)){let e=E.parent.textBetween(E.parentOffset,_.parentOffset),n=()=>D(t.state.tr.insertText(e,v,O));t.someProp("handleTextInput",r=>r(t,v,O,e,n))||t.dispatch(n())}else t.dispatch(D());else t.dispatch(D())}function Sp(t,e,n){return Math.max(n.anchor,n.head)>e.content.size?null:Vd(t,e.resolve(n.anchor),e.resolve(n.head))}function vp(t,e,n){let r=t.depth,i=e?t.end():t.pos;for(;r>0&&(e||t.indexAfter(r)==t.node(r).childCount);)r--,i++,e=!1;if(n){let e=t.node(r).maybeChild(t.indexAfter(r));for(;e&&!e.isLeaf;)e=e.firstChild,i++}return i}function Op(t){if(2!=t.length)return!1;let e=t.charCodeAt(0),n=t.charCodeAt(1);return e>=56320&&e<=57343&&n>=55296&&n<=56319}var Dp=class{constructor(t,e){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new gh,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=e,this.state=e.state,this.directPlugins=e.plugins||[],this.directPlugins.forEach(Cp),this.dispatch=this.dispatch.bind(this),this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):"function"==typeof t?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=yp(this),Rp(this),this.nodeViews=Ip(this),this.docView=_d(this.state.doc,Tp(this),lp(this),this.dom,this),this.domObserver=new hp(this,(t,e,n,r)=>gp(this,t,e,n,r)),this.domObserver.start(),function(t){for(let e in Eh){let n=Eh[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=e=>{Dh(t,e)&&!Oh(t,e)&&(t.editable||!(e.type in _h))&&n(t,e)},Ah[e]?{passive:!0}:void 0)}Pu&&t.dom.addEventListener("input",()=>null),vh(t)}(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let t=this._props;this._props={};for(let e in t)this._props[e]=t[e];this._props.state=this.state}return this._props}update(t){t.handleDOMEvents!=this._props.handleDOMEvents&&vh(this);let e=this._props;this._props=t,t.plugins&&(t.plugins.forEach(Cp),this.directPlugins=t.plugins),this.updateStateInner(t.state,e)}setProps(t){let e={};for(let t in this._props)e[t]=this._props[t];e.state=this.state;for(let n in t)e[n]=t[n];this.update(e)}updateState(t){this.updateStateInner(t,this._props)}updateStateInner(t,e){var n;let r=this.state,i=!1,o=!1;t.storedMarks&&this.composing&&(xh(this),o=!0),this.state=t;let s=r.plugins!=t.plugins||this._props.plugins!=e.plugins;if(s||this._props.plugins!=e.plugins||this._props.nodeViews!=e.nodeViews){let t=Ip(this);(function(t,e){let n=0,r=0;for(let r in t){if(t[r]!=e[r])return!0;n++}for(let t in e)r++;return n!=r})(t,this.nodeViews)&&(this.nodeViews=t,i=!0)}(s||e.handleDOMEvents!=this._props.handleDOMEvents)&&vh(this),this.editable=yp(this),Rp(this);let a=lp(this),l=Tp(this),c=r.plugins==t.plugins||r.doc.eq(t.doc)?t.scrollToSelection>r.scrollToSelection?"to selection":"preserve":"reset",d=i||!this.docView.matchesNode(t.doc,l,a);(d||!t.selection.eq(r.selection))&&(o=!0);let h="preserve"==c&&o&&null==this.dom.style.overflowAnchor&&function(t){let e,n,r=t.dom.getBoundingClientRect(),i=Math.max(0,r.top);for(let o=(r.left+r.right)/2,s=i+1;s<Math.min(innerHeight,r.bottom);s+=5){let r=t.root.elementFromPoint(o,s);if(!r||r==t.dom||!t.dom.contains(r))continue;let a=r.getBoundingClientRect();if(a.top>=i-20){e=r,n=a.top;break}}return{refDOM:e,refTop:n,stack:Wu(t.dom)}}(this);if(o){this.domObserver.stop();let e=d&&(Cu||Lu)&&!this.composing&&!r.selection.empty&&!t.selection.empty&&function(t,e){let n=Math.min(t.$anchor.sharedDepth(t.head),e.$anchor.sharedDepth(e.head));return t.$anchor.start(n)!=e.$anchor.start(n)}(r.selection,t.selection);if(d){let n=Lu?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=Fh(this)),(i||!this.docView.update(t.doc,l,a,this))&&(this.docView.updateOuterDeco(l),this.docView.destroy(),this.docView=_d(t.doc,l,a,this.dom,this)),n&&(!this.trackWrites||!this.dom.contains(this.trackWrites))&&(e=!0)}e||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&function(t){let e=t.docView.domFromPos(t.state.selection.anchor,0),n=t.domSelectionRange();return su(e.node,e.offset,n.anchorNode,n.anchorOffset)}(this))?Pd(this,e):(Bd(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(r),!(null===(n=this.dragging)||void 0===n)&&n.node&&!r.doc.eq(t.doc)&&this.updateDraggedNode(this.dragging,r),"reset"==c?this.dom.scrollTop=0:"to selection"==c?this.scrollToSelection():h&&function({refDOM:t,refTop:e,stack:n}){let r=t?t.getBoundingClientRect().top:0;Xu(n,0==r?0:r-e)}(h)}scrollToSelection(){let t=this.domSelectionRange().focusNode;if(t&&this.dom.contains(1==t.nodeType?t:t.parentNode)&&!this.someProp("handleScrollToSelection",t=>t(this)))if(this.state.selection instanceof Uc){let e=this.docView.domAfterPos(this.state.selection.from);1==e.nodeType&&Gu(this,e.getBoundingClientRect(),t)}else Gu(this,this.coordsAtPos(this.state.selection.head,1),t)}destroyPluginViews(){let t;for(;t=this.pluginViews.pop();)t.destroy&&t.destroy()}updatePluginViews(t){if(t&&t.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(let e=0;e<this.pluginViews.length;e++){let n=this.pluginViews[e];n.update&&n.update(this,t)}else{this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let t=0;t<this.directPlugins.length;t++){let e=this.directPlugins[t];e.spec.view&&this.pluginViews.push(e.spec.view(this))}for(let t=0;t<this.state.plugins.length;t++){let e=this.state.plugins[t];e.spec.view&&this.pluginViews.push(e.spec.view(this))}}}updateDraggedNode(t,e){let n=t.node,r=-1;if(this.state.doc.nodeAt(n.from)==n.node)r=n.from;else{let t=n.from+(this.state.doc.content.size-e.doc.content.size);(t>0&&this.state.doc.nodeAt(t))==n.node&&(r=t)}this.dragging=new Vh(t.slice,t.move,r<0?void 0:Uc.create(this.state.doc,r))}someProp(t,e){let n,r=this._props&&this._props[t];if(null!=r&&(n=e?e(r):r))return n;for(let r=0;r<this.directPlugins.length;r++){let i=this.directPlugins[r].props[t];if(null!=i&&(n=e?e(i):i))return n}let i=this.state.plugins;if(i)for(let r=0;r<i.length;r++){let o=i[r].props[t];if(null!=o&&(n=e?e(o):o))return n}}hasFocus(){if(Cu){let t=this.root.activeElement;if(t==this.dom)return!0;if(!t||!this.dom.contains(t))return!1;for(;t&&this.dom!=t&&this.dom.contains(t);){if("false"==t.contentEditable)return!1;t=t.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&function(t){if(t.setActive)return t.setActive();if(Ku)return t.focus(Ku);let e=Wu(t);t.focus(null==Ku?{get preventScroll(){return Ku={preventScroll:!0},!0}}:void 0),Ku||(Ku=!1,Xu(e,0))}(this.dom),Pd(this),this.domObserver.start()}get root(){let t=this._root;if(null==t)for(let t=this.dom.parentNode;t;t=t.parentNode)if(9==t.nodeType||11==t.nodeType&&t.host)return t.getSelection||(Object.getPrototypeOf(t).getSelection=()=>t.ownerDocument.getSelection()),this._root=t;return t||document}updateRoot(){this._root=null}posAtCoords(t){return Qu(this,t)}coordsAtPos(t,e=1){return rd(this,t,e)}domAtPos(t,e=0){return this.docView.domFromPos(t,e)}nodeDOM(t){let e=this.docView.descAt(t);return e?e.nodeDOM:null}posAtDOM(t,e,n=-1){let r=this.docView.posFromDOM(t,e,n);if(null==r)throw new RangeError("DOM position not inside the editor");return r}endOfTextblock(t,e){return dd(this,e||this.state,t)}pasteHTML(t,e){return Bh(this,"",t,!1,e||new ClipboardEvent("paste"))}pasteText(t,e){return Bh(this,t,null,!0,e||new ClipboardEvent("paste"))}serializeForClipboard(t){return ih(this,t)}destroy(){this.docView&&(function(t){t.domObserver.stop();for(let e in t.input.eventHandlers)t.dom.removeEventListener(e,t.input.eventHandlers[e]);clearTimeout(t.input.composingTimeout),clearTimeout(t.input.lastIOSEnterFallbackTimeout)}(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],lp(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,iu=null)}get isDestroyed(){return null==this.docView}dispatchEvent(t){return function(t,e){!Oh(t,e)&&Eh[e.type]&&(t.editable||!(e.type in _h))&&Eh[e.type](t,e)}(this,t)}domSelectionRange(){let t=this.domSelection();return t?Pu&&11===this.root.nodeType&&function(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}(this.dom.ownerDocument)==this.dom&&function(t,e){if(e.getComposedRanges){let n=e.getComposedRanges(t.root)[0];if(n)return mp(t,n)}let n;function r(t){t.preventDefault(),t.stopImmediatePropagation(),n=t.getTargetRanges()[0]}return t.dom.addEventListener("beforeinput",r,!0),document.execCommand("indent"),t.dom.removeEventListener("beforeinput",r,!0),n?mp(t,n):null}(this,t)||t:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}};function Tp(t){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(t.editable),t.someProp("attributes",n=>{if("function"==typeof n&&(n=n(t.state)),n)for(let t in n)"class"==t?e.class+=" "+n[t]:"style"==t?e.style=(e.style?e.style+";":"")+n[t]:!e[t]&&"contenteditable"!=t&&"nodeName"!=t&&(e[t]=String(n[t]))}),e.translate||(e.translate="no"),[Kh.node(0,t.state.doc.content.size,e)]}function Rp(t){if(t.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),t.cursorWrapper={dom:e,deco:Kh.widget(t.state.selection.from,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function yp(t){return!t.someProp("editable",e=>!1===e(t.state))}function Ip(t){let e=Object.create(null);function n(t){for(let n in t)Object.prototype.hasOwnProperty.call(e,n)||(e[n]=t[n])}return t.someProp("nodeViews",n),t.someProp("markViews",n),e}function Cp(t){if(t.spec.state||t.spec.filterTransaction||t.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}Dp.prototype.dispatch=function(t){let e=this._props.dispatchTransaction;e?e.call(this,t):this.updateState(this.state.apply(t))};const Np=new class{constructor(t){this.linebreakReplacement=null,this.cached=Object.create(null);let e=this.spec={};for(let n in t)e[n]=t[n];e.nodes=Ha.from(t.nodes),e.marks=Ha.from(t.marks||{}),this.nodes=Il.compile(this.spec.nodes,this),this.marks=Nl.compile(this.spec.marks,this);let n=Object.create(null);for(let t in this.nodes){if(t in this.marks)throw new RangeError(t+" can not be both a node and a mark");let e=this.nodes[t],r=e.spec.content||"",i=e.spec.marks;if(e.contentMatch=n[r]||(n[r]=fl.parse(r,this.nodes)),e.inlineContent=e.contentMatch.inlineContent,e.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!e.isInline||!e.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=e}e.markSet="_"==i?null:i?bl(this,i.split(" ")):""!=i&&e.inlineContent?null:[]}for(let t in this.marks){let e=this.marks[t],n=e.spec.excludes;e.excluded=null==n?[e]:""==n?[]:bl(this,n.split(" "))}this.nodeFromJSON=t=>dl.fromJSON(this,t),this.markFromJSON=t=>Ya.fromJSON(this,t),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,e=null,n,r){if("string"==typeof t)t=this.nodeType(t);else{if(!(t instanceof Il))throw new RangeError("Invalid node type: "+t);if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}return t.createChecked(e,n,r)}text(t,e){let n=this.nodes.text;return new hl(n,n.defaultAttrs,t,Ya.setFrom(e))}mark(t,e){return"string"==typeof t&&(t=this.marks[t]),t.create(e)}nodeType(t){let e=this.nodes[t];if(!e)throw new RangeError("Unknown node type: "+t);return e}}({nodes:{doc:{content:"paragraph+"},paragraph:{code:!0,content:"inline*",parseDOM:[{tag:"p"}],toDOM:()=>["p",0]},text:{group:"inline"},mention:{group:"inline",inline:!0,attrs:{id:{},name:{}},content:"text*",toDOM:t=>["span",{"data-mention-id":t.attrs.id,class:"t-mention"},`@${t.attrs.name}`],parseDOM:[{tag:"span[data-mention-id]",getAttrs:t=>({id:t.dataset["mention-id"]})}]},customemoji:{group:"inline",inline:!0,attrs:{name:{},url:{}},content:"text*",selectable:!1,toDOM:t=>["img",{src:t.attrs.url,alt:t.attrs.name,"data-custom-emoji":t.attrs.name}],parseDOM:[{tag:"img[data-custom-emoji]",getAttrs:t=>{const e=t;return{name:e.dataset.customEmoji,url:e.src}}}]}},marks:{literal:{toDOM:()=>["span",{"data-literal":""}],parseDOM:[{tag:"span[data-literal]"}]},bold:{toDOM:()=>["b"],parseDOM:[{tag:"b"}]},italic:{toDOM:()=>["i"],parseDOM:[{tag:"i"}]},strikethrough:{toDOM:()=>["del"],parseDOM:[{tag:"del"}]},emoji:{attrs:{emoji:{}},toDOM:t=>["span",{"data-emoji":t.attrs.emoji},t.attrs.emoji],parseDOM:[{tag:"span[data-emoji]",getAttrs:t=>({emoji:t.dataset.emoji})}]}}}),bp=new eu("placeholder"),wp=new Zc({key:bp,props:{decorations(t){if(kp(t.doc))return;const e=t.doc.firstChild,n=Kh.node(0,e.nodeSize,{class:"empty-node","data-placeholder":bp.getState(t)});return Zh.create(t.doc,[n])}},state:{init:()=>"",apply:(t,e)=>{var n;return null!==(n=t.getMeta(bp))&&void 0!==n?n:e}}});function kp(t){return 1!==t.childCount||0!==t.firstChild.childCount}for(var Lp={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},Mp={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Pp="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),xp="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),Fp=0;Fp<10;Fp++)Lp[48+Fp]=Lp[96+Fp]=String(Fp);for(Fp=1;Fp<=24;Fp++)Lp[Fp+111]="F"+Fp;for(Fp=65;Fp<=90;Fp++)Lp[Fp]=String.fromCharCode(Fp+32),Mp[Fp]=String.fromCharCode(Fp);for(var Hp in Lp)Mp.hasOwnProperty(Hp)||(Mp[Hp]=Lp[Hp]);const Up="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function Bp(t){let e,n,r,i,o=t.split(/-(?!$)/),s=o[o.length-1];"Space"==s&&(s=" ");for(let t=0;t<o.length-1;t++){let s=o[t];if(/^(cmd|meta|m)$/i.test(s))i=!0;else if(/^a(lt)?$/i.test(s))e=!0;else if(/^(c|ctrl|control)$/i.test(s))n=!0;else if(/^s(hift)?$/i.test(s))r=!0;else{if(!/^mod$/i.test(s))throw new Error("Unrecognized modifier name: "+s);Up?i=!0:n=!0}}return e&&(s="Alt-"+s),n&&(s="Ctrl-"+s),i&&(s="Meta-"+s),r&&(s="Shift-"+s),s}function jp(t,e,n=!0){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n&&e.shiftKey&&(t="Shift-"+t),t}function Vp(t){return new Zc({props:{handleKeyDown:zp(t)}})}function zp(t){let e=function(t){let e=Object.create(null);for(let n in t)e[Bp(n)]=t[n];return e}(t);return function(t,n){let r,i=function(t){var e=!(Pp&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||xp&&t.shiftKey&&t.key&&1==t.key.length||"Unidentified"==t.key)&&t.key||(t.shiftKey?Mp:Lp)[t.keyCode]||t.key||"Unidentified";return"Esc"==e&&(e="Escape"),"Del"==e&&(e="Delete"),"Left"==e&&(e="ArrowLeft"),"Up"==e&&(e="ArrowUp"),"Right"==e&&(e="ArrowRight"),"Down"==e&&(e="ArrowDown"),e}(n),o=e[jp(i,n)];if(o&&o(t.state,t.dispatch,t))return!0;if(1==i.length&&" "!=i){if(n.shiftKey){let r=e[jp(i,n,!1)];if(r&&r(t.state,t.dispatch,t))return!0}if((n.shiftKey||n.altKey||n.metaKey||i.charCodeAt(0)>127)&&(r=Lp[n.keyCode])&&r!=i){let i=e[jp(r,n)];if(i&&i(t.state,t.dispatch,t))return!0}}return!1}}var $p=200,Yp=function(){};Yp.prototype.append=function(t){return t.length?(t=Yp.from(t),!this.length&&t||t.length<$p&&this.leafAppend(t)||this.length<$p&&t.leafPrepend(this)||this.appendInner(t)):this},Yp.prototype.prepend=function(t){return t.length?Yp.from(t).append(this):this},Yp.prototype.appendInner=function(t){return new Wp(this,t)},Yp.prototype.slice=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.length),t>=e?Yp.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,e))},Yp.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)},Yp.prototype.forEach=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=this.length),e<=n?this.forEachInner(t,e,n,0):this.forEachInvertedInner(t,e,n,0)},Yp.prototype.map=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=this.length);var r=[];return this.forEach(function(e,n){return r.push(t(e,n))},e,n),r},Yp.from=function(t){return t instanceof Yp?t:t&&t.length?new Gp(t):Yp.empty};var Gp=function(t){function e(e){t.call(this),this.values=e}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(t,n){return 0==t&&n==this.length?this:new e(this.values.slice(t,n))},e.prototype.getInner=function(t){return this.values[t]},e.prototype.forEachInner=function(t,e,n,r){for(var i=e;i<n;i++)if(!1===t(this.values[i],r+i))return!1},e.prototype.forEachInvertedInner=function(t,e,n,r){for(var i=e-1;i>=n;i--)if(!1===t(this.values[i],r+i))return!1},e.prototype.leafAppend=function(t){if(this.length+t.length<=$p)return new e(this.values.concat(t.flatten()))},e.prototype.leafPrepend=function(t){if(this.length+t.length<=$p)return new e(t.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e}(Yp);Yp.empty=new Gp([]);var Wp=function(t){function e(e,n){t.call(this),this.left=e,this.right=n,this.length=e.length+n.length,this.depth=Math.max(e.depth,n.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(t){return t<this.left.length?this.left.get(t):this.right.get(t-this.left.length)},e.prototype.forEachInner=function(t,e,n,r){var i=this.left.length;if(e<i&&!1===this.left.forEachInner(t,e,Math.min(n,i),r)||n>i&&!1===this.right.forEachInner(t,Math.max(e-i,0),Math.min(this.length,n)-i,r+i))return!1},e.prototype.forEachInvertedInner=function(t,e,n,r){var i=this.left.length;if(e>i&&!1===this.right.forEachInvertedInner(t,e-i,Math.max(n,i)-i,r+i)||n<i&&!1===this.left.forEachInvertedInner(t,Math.min(e,i),n,r))return!1},e.prototype.sliceInner=function(t,e){if(0==t&&e==this.length)return this;var n=this.left.length;return e<=n?this.left.slice(t,e):t>=n?this.right.slice(t-n,e-n):this.left.slice(t,n).append(this.right.slice(0,e-n))},e.prototype.leafAppend=function(t){var n=this.right.leafAppend(t);if(n)return new e(this.left,n)},e.prototype.leafPrepend=function(t){var n=this.left.leafPrepend(t);if(n)return new e(n,this.right)},e.prototype.appendInner=function(t){return this.left.depth>=Math.max(this.right.depth,t.depth)+1?new e(this.left,new e(this.right,t)):new e(this,t)},e}(Yp);var Xp=class Ir{constructor(t,e){this.items=t,this.eventCount=e}popEvent(t,e){if(0==this.eventCount)return null;let n,r,i=this.items.length;for(;;i--)if(this.items.get(i-1).selection){--i;break}e&&(n=this.remapping(i,this.items.length),r=n.maps.length);let o,s,a=t.tr,l=[],c=[];return this.items.forEach((t,e)=>{if(!t.step)return n||(n=this.remapping(i,e+1),r=n.maps.length),r--,void c.push(t);if(n){c.push(new Kp(t.map));let e,i=t.step.map(n.slice(r));i&&a.maybeStep(i).doc&&(e=a.mapping.maps[a.mapping.maps.length-1],l.push(new Kp(e,void 0,void 0,l.length+c.length))),r--,e&&n.appendMap(e,r)}else a.maybeStep(t.step);return t.selection?(o=n?t.selection.map(n.slice(r)):t.selection,s=new Ir(this.items.slice(0,i).append(c.reverse().concat(l)),this.eventCount-1),!1):void 0},this.items.length,0),{remaining:s,transform:a,selection:o}}addTransform(t,e,n,r){let i=[],o=this.eventCount,s=this.items,a=!r&&s.length?s.get(s.length-1):null;for(let n=0;n<t.steps.length;n++){let l,c=t.steps[n].invert(t.docs[n]),d=new Kp(t.mapping.maps[n],c,e);(l=a&&a.merge(d))&&(d=l,n?i.pop():s=s.slice(0,s.length-1)),i.push(d),e&&(o++,e=void 0),r||(a=d)}let l=o-n.depth;return l>Jp&&(s=function(t,e){let n;return t.forEach((t,r)=>{if(t.selection&&0==e--)return n=r,!1}),t.slice(n)}(s,l),o-=l),new Ir(s.append(i),o)}remapping(t,e){let n=new Zl;return this.items.forEach((e,r)=>{let i=null!=e.mirrorOffset&&r-e.mirrorOffset>=t?n.maps.length-e.mirrorOffset:void 0;n.appendMap(e.map,i)},t,e),n}addMaps(t){return 0==this.eventCount?this:new Ir(this.items.append(t.map(t=>new Kp(t))),this.eventCount)}rebased(t,e){if(!this.eventCount)return this;let n=[],r=Math.max(0,this.items.length-e),i=t.mapping,o=t.steps.length,s=this.eventCount;this.items.forEach(t=>{t.selection&&s--},r);let a=e;this.items.forEach(e=>{let r=i.getMirror(--a);if(null==r)return;o=Math.min(o,r);let l=i.maps[r];if(e.step){let o=t.steps[r].invert(t.docs[r]),c=e.selection&&e.selection.map(i.slice(a+1,r));c&&s++,n.push(new Kp(l,o,c))}else n.push(new Kp(l))},r);let l=[];for(let t=e;t<o;t++)l.push(new Kp(i.maps[t]));let c=this.items.slice(0,r).append(l).append(n),d=new Ir(c,s);return d.emptyItemCount()>500&&(d=d.compress(this.items.length-n.length)),d}emptyItemCount(){let t=0;return this.items.forEach(e=>{e.step||t++}),t}compress(t=this.items.length){let e=this.remapping(0,t),n=e.maps.length,r=[],i=0;return this.items.forEach((o,s)=>{if(s>=t)r.push(o),o.selection&&i++;else if(o.step){let t=o.step.map(e.slice(n)),s=t&&t.getMap();if(n--,s&&e.appendMap(s,n),t){let a=o.selection&&o.selection.map(e.slice(n));a&&i++;let l,c=new Kp(s.invert(),t,a),d=r.length-1;(l=r.length&&r[d].merge(c))?r[d]=l:r.push(c)}}else o.map&&n--},this.items.length,0),new Ir(Yp.from(r.reverse()),i)}};Xp.empty=new Xp(Yp.empty,0);var Kp=class dg{constructor(t,e,n,r){this.map=t,this.step=e,this.selection=n,this.mirrorOffset=r}merge(t){if(this.step&&t.step&&!t.selection){let e=t.step.merge(this.step);if(e)return new dg(e.getMap().invert(),e,this.selection)}}},qp=class{constructor(t,e,n,r,i){this.done=t,this.undone=e,this.prevRanges=n,this.prevTime=r,this.prevComposition=i}};const Jp=20;function Zp(t){let e=[];for(let n=t.length-1;n>=0&&0==e.length;n--)t[n].forEach((t,n,r,i)=>e.push(r,i));return e}function Qp(t,e){if(!t)return null;let n=[];for(let r=0;r<t.length;r+=2){let i=e.map(t[r],1),o=e.map(t[r+1],-1);i<=o&&n.push(i,o)}return n}let tf=!1,ef=null;function nf(t){let e=t.plugins;if(ef!=e){tf=!1,ef=e;for(let t=0;t<e.length;t++)if(e[t].spec.historyPreserveItems){tf=!0;break}}return tf}const rf=new eu("history"),of=new eu("closeHistory");function sf(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new Zc({key:rf,state:{init:()=>new qp(Xp.empty,Xp.empty,null,0,-1),apply:(e,n,r)=>function(t,e,n,r){let i,o=n.getMeta(rf);if(o)return o.historyState;n.getMeta(of)&&(t=new qp(t.done,t.undone,null,0,-1));let s=n.getMeta("appendedTransaction");if(0==n.steps.length)return t;if(s&&s.getMeta(rf))return s.getMeta(rf).redo?new qp(t.done.addTransform(n,void 0,r,nf(e)),t.undone,Zp(n.mapping.maps),t.prevTime,t.prevComposition):new qp(t.done,t.undone.addTransform(n,void 0,r,nf(e)),null,t.prevTime,t.prevComposition);if(!1===n.getMeta("addToHistory")||s&&!1===s.getMeta("addToHistory"))return(i=n.getMeta("rebased"))?new qp(t.done.rebased(n,i),t.undone.rebased(n,i),Qp(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new qp(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),Qp(t.prevRanges,n.mapping),t.prevTime,t.prevComposition);{let i=n.getMeta("composition"),o=0==t.prevTime||!s&&t.prevComposition!=i&&(t.prevTime<(n.time||0)-r.newGroupDelay||!function(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach((t,r)=>{for(let i=0;i<e.length;i+=2)t<=e[i+1]&&r>=e[i]&&(n=!0)}),n}(n,t.prevRanges)),a=s?Qp(t.prevRanges,n.mapping):Zp(n.mapping.maps);return new qp(t.done.addTransform(n,o?e.selection.getBookmark():void 0,r,nf(e)),Xp.empty,a,n.time,null==i?t.prevComposition:i)}}(n,r,e,t)},config:t,props:{handleDOMEvents:{beforeinput(t,e){let n=e.inputType,r="historyUndo"==n?lf:"historyRedo"==n?cf:null;return!(!r||!t.editable)&&(e.preventDefault(),r(t.state,t.dispatch))}}}})}function af(t,e){return(n,r)=>{let i=rf.getState(n);if(!i||0==(t?i.undone:i.done).eventCount)return!1;if(r){let o=function(t,e,n){let r=nf(e),i=rf.get(e).spec.config,o=(n?t.undone:t.done).popEvent(e,r);if(!o)return null;let s=o.selection.resolve(o.transform.doc),a=(n?t.done:t.undone).addTransform(o.transform,e.selection.getBookmark(),i,r),l=new qp(n?a:o.remaining,n?o.remaining:a,null,0,-1);return o.transform.setSelection(s).setMeta(rf,{redo:n,historyState:l})}(i,n,t);o&&r(e?o.scrollIntoView():o)}return!0}}const lf=af(!1,!0),cf=af(!0,!0),uf=(af(!1,!1),af(!0,!1),(t,e)=>!t.selection.empty&&(e&&e(t.tr.deleteSelection().scrollIntoView()),!0));function df(t,e,n=!1){for(let r=t;r;r="start"==e?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&1!=r.childCount)return!1}return!1}function hf(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){if(t.index(e)>0)return t.doc.resolve(t.before(e+1));if(t.node(e).type.spec.isolating)break}return null}function pf(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){let n=t.node(e);if(t.index(e)+1<n.childCount)return t.doc.resolve(t.after(e+1));if(n.type.spec.isolating)break}return null}function ff(t){for(let e=0;e<t.edgeCount;e++){let{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const mf=function(t){return(e,n)=>{let{$from:r,$to:i}=e.selection;if(e.selection instanceof Uc&&e.selection.node.isBlock)return!(!r.parentOffset||!mc(e.doc,r.pos))&&(n&&n(e.tr.split(r.pos).scrollIntoView()),!0);if(!r.parent.isBlock)return!1;if(n){let o=i.parentOffset==i.parent.content.size,s=e.tr;(e.selection instanceof Fc||e.selection instanceof jc)&&s.deleteSelection();let a=0==r.depth?null:ff(r.node(-1).contentMatchAt(r.indexAfter(-1))),l=t&&t(i.parent,o),c=l?[l]:o&&a?[{type:a}]:void 0,d=mc(s.doc,s.mapping.map(r.pos),1,c);if(!c&&!d&&mc(s.doc,s.mapping.map(r.pos),1,a?[{type:a}]:void 0)&&(a&&(c=[{type:a}]),d=!0),d&&(s.split(s.mapping.map(r.pos),1,c),!o&&!r.parentOffset&&r.parent.type!=a)){let t=s.mapping.map(r.before()),e=s.doc.resolve(t);a&&r.node(-1).canReplaceWith(e.index(),e.index()+1,a)&&s.setNodeMarkup(s.mapping.map(r.before()),a)}n(s.scrollIntoView())}return!0}}();function Ef(t,e,n){let r,i,o=e.nodeBefore,s=e.nodeAfter;if(o.type.spec.isolating||s.type.spec.isolating)return!1;if(function(t,e,n){let r=e.nodeBefore,i=e.nodeAfter,o=e.index();return!(!(r&&i&&r.type.compatibleContent(i.type))||(!r.content.size&&e.parent.canReplace(o-1,o)?(n&&n(t.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),0):!e.parent.canReplace(o,o+1)||!i.isTextblock&&!Ec(t.doc,e.pos)||(n&&n(t.tr.clearIncompatible(e.pos,r.type,r.contentMatchAt(r.childCount)).join(e.pos).scrollIntoView()),0)))}(t,e,n))return!0;let a=e.parent.canReplace(e.index(),e.index()+1);if(a&&(r=(i=o.contentMatchAt(o.childCount)).findWrapping(s.type))&&i.matchType(r[0]||s.type).validEnd){if(n){let i=e.pos+s.nodeSize,a=ja.empty;for(let t=r.length-1;t>=0;t--)a=ja.from(r[t].create(null,a));a=ja.from(o.copy(a));let l=t.tr.step(new lc(e.pos-1,i,e.pos,i,new Wa(a,1,0),r.length,!0)),c=i+2*r.length;Ec(l.doc,c)&&l.join(c),n(l.scrollIntoView())}return!0}let l=Lc.findFrom(e,1),c=l&&l.$from.blockRange(l.$to),d=c&&hc(c);if(null!=d&&d>=e.depth)return n&&n(t.tr.lift(c,d).scrollIntoView()),!0;if(a&&df(s,"start",!0)&&df(o,"end")){let r=o,i=[];for(;i.push(r),!r.isTextblock;)r=r.lastChild;let a=s,l=1;for(;!a.isTextblock;a=a.firstChild)l++;if(r.canReplace(r.childCount,r.childCount,a.content)){if(n){let r=ja.empty;for(let t=i.length-1;t>=0;t--)r=ja.from(i[t].copy(r));n(t.tr.step(new lc(e.pos-i.length,e.pos+s.nodeSize,e.pos+l,e.pos+s.nodeSize-l,new Wa(r,i.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function _f(t){return function(e,n){let r=e.selection,i=t<0?r.$from:r.$to,o=i.depth;for(;i.node(o).isInline;){if(!o)return!1;o--}return!!i.node(o).isTextblock&&(n&&n(e.tr.setSelection(Fc.create(e.doc,t<0?i.start(o):i.end(o)))),!0)}}const Af=_f(-1),gf=_f(1);function Sf(...t){return function(e,n,r){for(let i=0;i<t.length;i++)if(t[i](e,n,r))return!0;return!1}}let vf=Sf(uf,(t,e,n)=>{let r=function(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("backward",t):n.parentOffset>0)?null:n}(t,n);if(!r)return!1;let i=hf(r);if(!i){let n=r.blockRange(),i=n&&hc(n);return null!=i&&(e&&e(t.tr.lift(n,i).scrollIntoView()),!0)}let o=i.nodeBefore;if(!o.type.spec.isolating&&Ef(t,i,e))return!0;if(0==r.parent.content.size&&(df(o,"end")||Uc.isSelectable(o))){let n=_c(t.doc,r.before(),r.after(),Wa.empty);if(n&&n.slice.size<n.to-n.from){if(e){let r=t.tr.step(n);r.setSelection(df(o,"end")?Lc.findFrom(r.doc.resolve(r.mapping.map(i.pos,-1)),-1):Uc.create(r.doc,i.pos-o.nodeSize)),e(r.scrollIntoView())}return!0}}return!(!o.isAtom||i.depth!=r.depth-1)&&(e&&e(t.tr.delete(i.pos-o.nodeSize,i.pos).scrollIntoView()),!0)},(t,e,n)=>{let{$head:r,empty:i}=t.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",t):r.parentOffset>0)return!1;o=hf(r)}let s=o&&o.nodeBefore;return!(!s||!Uc.isSelectable(s))&&(e&&e(t.tr.setSelection(Uc.create(t.doc,o.pos-s.nodeSize)).scrollIntoView()),!0)}),Of=Sf(uf,(t,e,n)=>{let r=function(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("forward",t):n.parentOffset<n.parent.content.size)?null:n}(t,n);if(!r)return!1;let i=pf(r);if(!i)return!1;let o=i.nodeAfter;if(Ef(t,i,e))return!0;if(0==r.parent.content.size&&(df(o,"start")||Uc.isSelectable(o))){let n=_c(t.doc,r.before(),r.after(),Wa.empty);if(n&&n.slice.size<n.to-n.from){if(e){let r=t.tr.step(n);r.setSelection(df(o,"start")?Lc.findFrom(r.doc.resolve(r.mapping.map(i.pos)),1):Uc.create(r.doc,r.mapping.map(i.pos))),e(r.scrollIntoView())}return!0}}return!(!o.isAtom||i.depth!=r.depth-1)&&(e&&e(t.tr.delete(i.pos,i.pos+o.nodeSize).scrollIntoView()),!0)},(t,e,n)=>{let{$head:r,empty:i}=t.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",t):r.parentOffset<r.parent.content.size)return!1;o=pf(r)}let s=o&&o.nodeAfter;return!(!s||!Uc.isSelectable(s))&&(e&&e(t.tr.setSelection(Uc.create(t.doc,o.pos)).scrollIntoView()),!0)});const Df={Enter:Sf((t,e)=>{let{$head:n,$anchor:r}=t.selection;return!(!n.parent.type.spec.code||!n.sameParent(r))&&(e&&e(t.tr.insertText("\n").scrollIntoView()),!0)},(t,e)=>{let n=t.selection,{$from:r,$to:i}=n;if(n instanceof jc||r.parent.inlineContent||i.parent.inlineContent)return!1;let o=ff(i.parent.contentMatchAt(i.indexAfter()));if(!o||!o.isTextblock)return!1;if(e){let n=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,s=t.tr.insert(n,o.createAndFill());s.setSelection(Fc.create(s.doc,n+1)),e(s.scrollIntoView())}return!0},(t,e)=>{let{$cursor:n}=t.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let r=n.before();if(mc(t.doc,r))return e&&e(t.tr.split(r).scrollIntoView()),!0}let r=n.blockRange(),i=r&&hc(r);return null!=i&&(e&&e(t.tr.lift(r,i).scrollIntoView()),!0)},mf),"Mod-Enter":(t,e)=>{let{$head:n,$anchor:r}=t.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let i=n.node(-1),o=n.indexAfter(-1),s=ff(i.contentMatchAt(o));if(!s||!i.canReplaceWith(o,o,s))return!1;if(e){let r=n.after(),i=t.tr.replaceWith(r,r,s.createAndFill());i.setSelection(Lc.near(i.doc.resolve(r),1)),e(i.scrollIntoView())}return!0},Backspace:vf,"Mod-Backspace":vf,"Shift-Backspace":vf,Delete:Of,"Mod-Delete":Of,"Mod-a":(t,e)=>(e&&e(t.tr.setSelection(new jc(t.doc))),!0)},Tf={"Ctrl-h":Df.Backspace,"Alt-Backspace":Df["Mod-Backspace"],"Ctrl-d":Df.Delete,"Ctrl-Alt-Backspace":Df["Mod-Delete"],"Alt-Delete":Df["Mod-Delete"],"Alt-d":Df["Mod-Delete"],"Ctrl-a":Af,"Ctrl-e":gf};for(let t in Df)Tf[t]=Df[t];const Rf=("undefined"!=typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):"undefined"!=typeof os&&os.platform&&"darwin"==os.platform())?Tf:Df;function yf(t,e){return t.reduce((t,n,r)=>t.concat(e(n,r)),[])}const If=(t,e,n=void 0)=>yf(t,t=>{if("string"==typeof t)return e(t,n);switch(t.type){case"bold":case"italic":case"strikethrough":case"blockquote":case"bulletlist":case"bulletList":case"bulletpoint":case"bulletPoint":return[{type:t.type,children:If(t.children,e,t.type)}];case"link":return[{type:t.type,url:t.url,children:If(t.children,e,t.type)}];case"actionlink":case"actionLink":case"actionbutton":case"actionButton":return[{type:t.type,action:t.action,params:t.params,children:If(t.children,e,t.type)}];case"mention":case"autolink":case"autoLink":case"codeblock":case"codeBlock":case"codespan":case"codeSpan":case"suppressed":case"emoji":case"customemoji":case"customEmoji":return[t]}});function Cf(t,e){return n=>{const r=n;let i=0;const o=[];for(const s of rn(n,t)){s.index-i>0&&o.push(r.substring(i,s.index));const t=e(s);Array.isArray(t)?o.push(...t):o.push(t),i=s.index+s[0].length}return i<n.length&&o.push(n.substring(i)),o}}function Nf(t){return t.replace(/<!!mention:.*?\|([^>]*)>/gim,"@$1").replace(/<!!customemoji:(.*?)>/gim,"$1")}var bf="’'()[]{}<>:,‒–—―…!.«»-‐?‘’“”;/⁄␠·&@*\\•^¤¢$€£¥₩₪†‡°¡¿¬#№%‰‱¶′§~¨_|¦⁂☞∴‽※".replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),wf=function(t){return t[t.italic=1]="italic",t[t.strikethrough=2]="strikethrough",t[t.bold=4]="bold",t}(wf||{});const kf=[0,1,2,3,4,5,6].map(t=>{const e=[];return!(1&t)&&e.push(/_([^\s_].*?[^\s_])_|_([^\s_])_/),!(2&t)&&e.push(/~([^\s~].*?[^\s~])~|~([^\s~])~/),!(4&t)&&e.push(/\*([^\s*].*?[^\s*])\*|\*([^\s*])\*/),new RegExp(e.map(t=>t.source).join("|"),"g")}),Lf={_:1,"*":4,"~":2};function Mf(t){return Pf(t,0)}function Pf(t,e=0){const n=kf[e];return If((n?function(t){const e=Cf(xf.getOrCompute(t,()=>new RegExp(`(?:^|[\\s${bf}])(?:${t.source})(?=[\\s${bf}]|$)`,"g")),t=>{const e=t[0][1],n=t[1]||t[2]||t[3]||t[4]||t[5]||t[6];return[" ",{type:wf[Lf[e]],children:[n]}]});return t=>{const[n,...r]=e(" "+t);return n.length>1&&r.unshift(n.substring(1)),r}}(n):()=>[t])(t),(t,n)=>"bold"===n||"italic"===n||"strikethrough"===n?Pf(t,e|wf[n]):[t])}const xf=function(){const t=function(){try{return new WeakMap}catch(t){const e={has:()=>!1,get:()=>{},set:()=>e};return e}}();return{getOrCompute(e,n){if(t.has(e))return t.get(e);const r=n();return t.set(e,r),r}}}();var Ff=function(t,e){return(Ff=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function Hf(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}Ff(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var Uf=function(){return Uf=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},Uf.apply(this,arguments)};var Bf=Object.prototype.hasOwnProperty;function jf(t){return"boolean"==typeof t}function Vf(t,e){for(var n=t.length-1;n>=0;n--)!0===e(t[n])&&t.splice(n,1)}function zf(t){throw new Error("Unhandled case for value: '".concat(t,"'"))}var $f=/\s+/,Yf=function(){function t(t){void 0===t&&(t={}),this.tagName="",this.attrs={},this.innerHTML="",this.tagName=t.tagName||"",this.attrs=t.attrs||{},this.innerHTML=t.innerHtml||t.innerHTML||""}return t.prototype.setTagName=function(t){return this.tagName=t,this},t.prototype.getTagName=function(){return this.tagName},t.prototype.setAttr=function(t,e){return this.getAttrs()[t]=e,this},t.prototype.getAttr=function(t){return this.getAttrs()[t]},t.prototype.setAttrs=function(t){return Object.assign(this.getAttrs(),t),this},t.prototype.getAttrs=function(){return this.attrs},t.prototype.setClass=function(t){return this.setAttr("class",t)},t.prototype.addClass=function(t){for(var e,n=this.getClass(),r=n?n.split($f):[],i=t.split($f);e=i.shift();)-1===r.indexOf(e)&&r.push(e);return this.getAttrs().class=r.join(" "),this},t.prototype.removeClass=function(t){for(var e,n=this.getClass(),r=n?n.split($f):[],i=t.split($f);r.length&&(e=i.shift());){var o=r.indexOf(e);-1!==o&&r.splice(o,1)}return this.getAttrs().class=r.join(" "),this},t.prototype.getClass=function(){return this.getAttrs().class||""},t.prototype.hasClass=function(t){return-1!==(" "+this.getClass()+" ").indexOf(" "+t+" ")},t.prototype.setInnerHTML=function(t){return this.innerHTML=t,this},t.prototype.setInnerHtml=function(t){return this.setInnerHTML(t)},t.prototype.getInnerHTML=function(){return this.innerHTML||""},t.prototype.getInnerHtml=function(){return this.getInnerHTML()},t.prototype.toAnchorString=function(){var t=this.getTagName(),e=this.buildAttrsStr();return["<",t,e=e?" "+e:"",">",this.getInnerHtml(),"</",t,">"].join("")},t.prototype.buildAttrsStr=function(){var t=this.getAttrs(),e=[];for(var n in t)Bf.call(t,n)&&e.push(n+'="'+t[n]+'"');return e.join(" ")},t}();function Gf(t){var e="";return t.scheme&&t.host&&(e+=t.scheme+"://"),t.host&&(e+=t.host),t.path&&(e+="/"+t.path),t.query&&(e+="?"+t.query),t.fragment&&(e+="#"+t.fragment),e}function Wf(t,e,n){var r=e/2,i=Math.ceil(r),o=-1*Math.floor(r),s="";return o<0&&(s=t.substr(o)),t.substr(0,i)+n+s}var Xf=function(){function t(t){void 0===t&&(t={}),this.newWindow=!1,this.truncate={},this.className="",this.newWindow=t.newWindow||!1,this.truncate=t.truncate||{},this.className=t.className||""}return t.prototype.build=function(t){return new Yf({tagName:"a",attrs:this.createAttrs(t),innerHtml:this.processAnchorText(t.getAnchorText())})},t.prototype.createAttrs=function(t){var e={href:t.getAnchorHref()},n=this.createCssClass(t);return n&&(e.class=n),this.newWindow&&(e.target="_blank",e.rel="noopener noreferrer"),this.truncate.length&&this.truncate.length<t.getAnchorText().length&&(e.title=t.getAnchorHref()),e},t.prototype.createCssClass=function(t){var e=this.className;if(e){for(var n=[e],r=t.getCssClassSuffixes(),i=0,o=r.length;i<o;i++)n.push(e+"-"+r[i]);return n.join(" ")}return""},t.prototype.processAnchorText=function(t){return t=this.doTruncate(t)},t.prototype.doTruncate=function(t){var e=this.truncate;if(!e.length)return t;var n=e.length,r=e.location;return"smart"===r?function(t,e,n){var r,i;if(null==n?(n="…",i=3,r=8):(i=n.length,r=n.length),t.length<=e)return t;var o=e-i,s=function(t){var e={},n=t,r=n.match(/^([a-z]+):\/\//i);return r&&(e.scheme=r[1],n=n.slice(r[0].length)),(r=n.match(/^(.*?)(?=(\?|#|\/|$))/i))&&(e.host=r[1],n=n.slice(r[0].length)),(r=n.match(/^\/(.*?)(?=(\?|#|$))/i))&&(e.path=r[1],n=n.slice(r[0].length)),(r=n.match(/^\?(.*?)(?=(#|$))/i))&&(e.query=r[1],n=n.slice(r[0].length)),(r=n.match(/^#(.*?)$/i))&&(e.fragment=r[1]),e}(t);if(s.query){var a=s.query.match(/^(.*?)(?=(\?|#))(.*?)$/i);a&&(s.query=s.query.substr(0,a[1].length),t=Gf(s))}if(t.length<=e||(s.host&&(s.host=s.host.replace(/^www\./,""),t=Gf(s)),t.length<=e))return t;var l="";if(s.host&&(l+=s.host),l.length>=o)return s.host.length===e?(s.host.substr(0,e-i)+n).substr(0,o+r):Wf(l,o,n).substr(0,o+r);var c="";if(s.path&&(c+="/"+s.path),s.query&&(c+="?"+s.query),c){if((l+c).length>=o)return(l+c).length==e?(l+c).substr(0,e):(l+Wf(c,o-l.length,n)).substr(0,o+r);l+=c}if(s.fragment){var d="#"+s.fragment;if((l+d).length>=o)return(l+d).length==e?(l+d).substr(0,e):(l+Wf(d,o-l.length,n)).substr(0,o+r);l+=d}if(s.scheme&&s.host){var h=s.scheme+"://";if((l+h).length<o)return(h+l).substr(0,e)}if(l.length<=e)return l;var p="";return o>0&&(p=l.substr(-1*Math.floor(o/2))),(l.substr(0,Math.ceil(o/2))+n+p).substr(0,o+r)}(t,n):"middle"===r?function(t,e,n){if(t.length<=e)return t;var r,i;null==n?(n="…",r=8,i=3):(r=n.length,i=n.length);var o=e-i,s="";return o>0&&(s=t.substr(-1*Math.floor(o/2))),(t.substr(0,Math.ceil(o/2))+n+s).substr(0,o+r)}(t,n):function(t,e,n){return function(t,e,n){var r;return t.length>e&&(null==n?(n="…",r=3):r=n.length,t=t.substring(0,e-r)+n),t}(t,e,n)}(t,n)},t}(),Kf=function(){function t(t){this._=null,this.matchedText="",this.offset=0,this.tagBuilder=t.tagBuilder,this.matchedText=t.matchedText,this.offset=t.offset}return t.prototype.getMatchedText=function(){return this.matchedText},t.prototype.setOffset=function(t){this.offset=t},t.prototype.getOffset=function(){return this.offset},t.prototype.getCssClassSuffixes=function(){return[this.type]},t.prototype.buildTag=function(){return this.tagBuilder.build(this)},t}();function qf(t){return t>=65&&t<=90||t>=97&&t<=122}function Jf(t){return t>=48&&t<=57}function Zf(t){return 34==t||39==t}function Qf(t){return t<8232?t<160?t>=9&&t<=13||32==t:t<5760?160==t:5760==t||t>=8192&&t<=8202:t<8287?t>=8232&&t<=8233||8239==t:t<12288?8287==t:12288==t||65279==t}function tm(t){return t<4800?t<2949?t<2451?t<1425?t<768?t<192?t<169?t<65?t>=48&&t<=57:t>=65&&t<=90||t>=97&&t<=122:t<181?t>=169&&t<=170||174==t:181==t||186==t:t<710?t<216?t>=192&&t<=214:t>=216&&t<=246||t>=248&&t<=705:t<748?t>=710&&t<=721||t>=736&&t<=740:748==t||750==t:t<910?t<895?t<886?t>=768&&t<=884:t>=886&&t<=887||t>=890&&t<=893:t<904?895==t||902==t:t>=904&&t<=906||908==t:t<1155?t<931?t>=910&&t<=929:t>=931&&t<=1013||t>=1015&&t<=1153:t<1369?t>=1155&&t<=1327||t>=1329&&t<=1366:1369==t||t>=1377&&t<=1415:t<1808?t<1552?t<1476?t<1471?t>=1425&&t<=1469:1471==t||t>=1473&&t<=1474:t<1488?t>=1476&&t<=1477||1479==t:t>=1488&&t<=1514||t>=1520&&t<=1522:t<1749?t<1568?t>=1552&&t<=1562:t>=1568&&t<=1641||t>=1646&&t<=1747:t<1770?t>=1749&&t<=1756||t>=1759&&t<=1768:t>=1770&&t<=1788||1791==t:t<2230?t<2042?t<1869?t>=1808&&t<=1866:t>=1869&&t<=1969||t>=1984&&t<=2037:t<2112?2042==t||t>=2048&&t<=2093:t>=2112&&t<=2139||t>=2208&&t<=2228:t<2406?t<2260?t>=2230&&t<=2237:t>=2260&&t<=2273||t>=2275&&t<=2403:t<2437?t>=2406&&t<=2415||t>=2417&&t<=2435:t>=2437&&t<=2444||t>=2447&&t<=2448:t<2693?t<2579?t<2519?t<2486?t<2474?t>=2451&&t<=2472:t>=2474&&t<=2480||2482==t:t<2503?t>=2486&&t<=2489||t>=2492&&t<=2500:t>=2503&&t<=2504||t>=2507&&t<=2510:t<2534?t<2524?2519==t:t>=2524&&t<=2525||t>=2527&&t<=2531:t<2565?t>=2534&&t<=2545||t>=2561&&t<=2563:t>=2565&&t<=2570||t>=2575&&t<=2576:t<2631?t<2613?t<2602?t>=2579&&t<=2600:t>=2602&&t<=2608||t>=2610&&t<=2611:t<2620?t>=2613&&t<=2614||t>=2616&&t<=2617:2620==t||t>=2622&&t<=2626:t<2649?t<2635?t>=2631&&t<=2632:t>=2635&&t<=2637||2641==t:t<2662?t>=2649&&t<=2652||2654==t:t>=2662&&t<=2677||t>=2689&&t<=2691:t<2821?t<2759?t<2730?t<2703?t>=2693&&t<=2701:t>=2703&&t<=2705||t>=2707&&t<=2728:t<2741?t>=2730&&t<=2736||t>=2738&&t<=2739:t>=2741&&t<=2745||t>=2748&&t<=2757:t<2784?t<2763?t>=2759&&t<=2761:t>=2763&&t<=2765||2768==t:t<2809?t>=2784&&t<=2787||t>=2790&&t<=2799:2809==t||t>=2817&&t<=2819:t<2887?t<2858?t<2831?t>=2821&&t<=2828:t>=2831&&t<=2832||t>=2835&&t<=2856:t<2869?t>=2858&&t<=2864||t>=2866&&t<=2867:t>=2869&&t<=2873||t>=2876&&t<=2884:t<2911?t<2902?t>=2887&&t<=2888||t>=2891&&t<=2893:t>=2902&&t<=2903||t>=2908&&t<=2909:t<2929?t>=2911&&t<=2915||t>=2918&&t<=2927:2929==t||t>=2946&&t<=2947:t<3517?t<3205?t<3046?t<2984?t<2969?t<2958?t>=2949&&t<=2954:t>=2958&&t<=2960||t>=2962&&t<=2965:t<2974?t>=2969&&t<=2970||2972==t:t>=2974&&t<=2975||t>=2979&&t<=2980:t<3014?t<2990?t>=2984&&t<=2986:t>=2990&&t<=3001||t>=3006&&t<=3010:t<3024?t>=3014&&t<=3016||t>=3018&&t<=3021:3024==t||3031==t:t<3142?t<3086?t<3072?t>=3046&&t<=3055:t>=3072&&t<=3075||t>=3077&&t<=3084:t<3114?t>=3086&&t<=3088||t>=3090&&t<=3112:t>=3114&&t<=3129||t>=3133&&t<=3140:t<3160?t<3146?t>=3142&&t<=3144:t>=3146&&t<=3149||t>=3157&&t<=3158:t<3174?t>=3160&&t<=3162||t>=3168&&t<=3171:t>=3174&&t<=3183||t>=3200&&t<=3203:t<3333?t<3274?t<3242?t<3214?t>=3205&&t<=3212:t>=3214&&t<=3216||t>=3218&&t<=3240:t<3260?t>=3242&&t<=3251||t>=3253&&t<=3257:t>=3260&&t<=3268||t>=3270&&t<=3272:t<3296?t<3285?t>=3274&&t<=3277:t>=3285&&t<=3286||3294==t:t<3313?t>=3296&&t<=3299||t>=3302&&t<=3311:t>=3313&&t<=3314||t>=3329&&t<=3331:t<3423?t<3389?t<3342?t>=3333&&t<=3340:t>=3342&&t<=3344||t>=3346&&t<=3386:t<3402?t>=3389&&t<=3396||t>=3398&&t<=3400:t>=3402&&t<=3406||t>=3412&&t<=3415:t<3458?t<3430?t>=3423&&t<=3427:t>=3430&&t<=3439||t>=3450&&t<=3455:t<3482?t>=3458&&t<=3459||t>=3461&&t<=3478:t>=3482&&t<=3505||t>=3507&&t<=3515:t<3804?t<3722?t<3570?t<3535?t<3520?3517==t:t>=3520&&t<=3526||3530==t:t<3544?t>=3535&&t<=3540||3542==t:t>=3544&&t<=3551||t>=3558&&t<=3567:t<3664?t<3585?t>=3570&&t<=3571:t>=3585&&t<=3642||t>=3648&&t<=3662:t<3716?t>=3664&&t<=3673||t>=3713&&t<=3714:3716==t||t>=3719&&t<=3720:t<3754?t<3737?t<3725?3722==t:3725==t||t>=3732&&t<=3735:t<3749?t>=3737&&t<=3743||t>=3745&&t<=3747:3749==t||3751==t:t<3776?t<3757?t>=3754&&t<=3755:t>=3757&&t<=3769||t>=3771&&t<=3773:t<3784?t>=3776&&t<=3780||3782==t:t>=3784&&t<=3789||t>=3792&&t<=3801:t<4176?t<3902?t<3872?t<3840?t>=3804&&t<=3807:3840==t||t>=3864&&t<=3865:t<3895?t>=3872&&t<=3881||3893==t:3895==t||3897==t:t<3974?t<3913?t>=3902&&t<=3911:t>=3913&&t<=3948||t>=3953&&t<=3972:t<4038?t>=3974&&t<=3991||t>=3993&&t<=4028:4038==t||t>=4096&&t<=4169:t<4688?t<4301?t<4256?t>=4176&&t<=4253:t>=4256&&t<=4293||4295==t:t<4348?4301==t||t>=4304&&t<=4346:t>=4348&&t<=4680||t>=4682&&t<=4685:t<4746?t<4698?t>=4688&&t<=4694||4696==t:t>=4698&&t<=4701||t>=4704&&t<=4744:t<4786?t>=4746&&t<=4749||t>=4752&&t<=4784:t>=4786&&t<=4789||t>=4792&&t<=4798:t<11035?t<7416?t<6176?t<5873?t<4992?t<4824?t<4802?4800==t:t>=4802&&t<=4805||t>=4808&&t<=4822:t<4888?t>=4824&&t<=4880||t>=4882&&t<=4885:t>=4888&&t<=4954||t>=4957&&t<=4959:t<5121?t<5024?t>=4992&&t<=5007:t>=5024&&t<=5109||t>=5112&&t<=5117:t<5761?t>=5121&&t<=5740||t>=5743&&t<=5759:t>=5761&&t<=5786||t>=5792&&t<=5866:t<6002?t<5920?t<5888?t>=5873&&t<=5880:t>=5888&&t<=5900||t>=5902&&t<=5908:t<5984?t>=5920&&t<=5940||t>=5952&&t<=5971:t>=5984&&t<=5996||t>=5998&&t<=6e3:t<6108?t<6016?t>=6002&&t<=6003:t>=6016&&t<=6099||6103==t:t<6155?t>=6108&&t<=6109||t>=6112&&t<=6121:t>=6155&&t<=6157||t>=6160&&t<=6169:t<6783?t<6512?t<6400?t<6272?t>=6176&&t<=6263:t>=6272&&t<=6314||t>=6320&&t<=6389:t<6448?t>=6400&&t<=6430||t>=6432&&t<=6443:t>=6448&&t<=6459||t>=6470&&t<=6509:t<6608?t<6528?t>=6512&&t<=6516:t>=6528&&t<=6571||t>=6576&&t<=6601:t<6688?t>=6608&&t<=6617||t>=6656&&t<=6683:t>=6688&&t<=6750||t>=6752&&t<=6780:t<7040?t<6832?t<6800?t>=6783&&t<=6793:t>=6800&&t<=6809||6823==t:t<6992?t>=6832&&t<=6846||t>=6912&&t<=6987:t>=6992&&t<=7001||t>=7019&&t<=7027:t<7245?t<7168?t>=7040&&t<=7155:t>=7168&&t<=7223||t>=7232&&t<=7241:t<7376?t>=7245&&t<=7293||t>=7296&&t<=7304:t>=7376&&t<=7378||t>=7380&&t<=7414:t<8450?t<8130?t<8025?t<7960?t<7424?t>=7416&&t<=7417:t>=7424&&t<=7669||t>=7675&&t<=7957:t<8008?t>=7960&&t<=7965||t>=7968&&t<=8005:t>=8008&&t<=8013||t>=8016&&t<=8023:t<8031?t<8027?8025==t:8027==t||8029==t:t<8118?t>=8031&&t<=8061||t>=8064&&t<=8116:t>=8118&&t<=8124||8126==t:t<8205?t<8150?t<8134?t>=8130&&t<=8132:t>=8134&&t<=8140||t>=8144&&t<=8147:t<8178?t>=8150&&t<=8155||t>=8160&&t<=8172:t>=8178&&t<=8180||t>=8182&&t<=8188:t<8305?t<8252?8205==t:8252==t||8265==t:t<8336?8305==t||8319==t:t>=8336&&t<=8348||t>=8400&&t<=8432:t<8579?t<8486?t<8469?t<8455?8450==t:8455==t||t>=8458&&t<=8467:t<8482?8469==t||t>=8473&&t<=8477:8482==t||8484==t:t<8495?t<8488?8486==t:8488==t||t>=8490&&t<=8493:t<8517?t>=8495&&t<=8505||t>=8508&&t<=8511:t>=8517&&t<=8521||8526==t:t<9410?t<9e3?t<8592?t>=8579&&t<=8580:t>=8592&&t<=8703||t>=8986&&t<=8987:t<9193?9e3==t||9167==t:t>=9193&&t<=9203||t>=9208&&t<=9210:t<9723?t<9654?9410==t||t>=9642&&t<=9643:9654==t||9664==t:t<10548?t>=9723&&t<=9726||t>=9728&&t<=10175:t>=10548&&t<=10549||t>=11013&&t<=11015:t<43259?t<12445?t<11688?t<11520?t<11264?t<11088?t>=11035&&t<=11036:11088==t||11093==t:t<11360?t>=11264&&t<=11310||t>=11312&&t<=11358:t>=11360&&t<=11492||t>=11499&&t<=11507:t<11568?t<11559?t>=11520&&t<=11557:11559==t||11565==t:t<11647?t>=11568&&t<=11623||11631==t:t>=11647&&t<=11670||t>=11680&&t<=11686:t<11744?t<11712?t<11696?t>=11688&&t<=11694:t>=11696&&t<=11702||t>=11704&&t<=11710:t<11728?t>=11712&&t<=11718||t>=11720&&t<=11726:t>=11728&&t<=11734||t>=11736&&t<=11742:t<12330?t<11823?t>=11744&&t<=11775:11823==t||t>=12293&&t<=12294:t<12353?t>=12330&&t<=12341||t>=12347&&t<=12349:t>=12353&&t<=12438||t>=12441&&t<=12442:t<42512?t<12951?t<12549?t<12449?t>=12445&&t<=12447:t>=12449&&t<=12538||t>=12540&&t<=12543:t<12704?t>=12549&&t<=12589||t>=12593&&t<=12686:t>=12704&&t<=12730||t>=12784&&t<=12799:t<19968?t<12953?12951==t:12953==t||t>=13312&&t<=19893:t<42192?t>=19968&&t<=40917||t>=40960&&t<=42124:t>=42192&&t<=42237||t>=42240&&t<=42508:t<42891?t<42623?t<42560?t>=42512&&t<=42539:t>=42560&&t<=42610||t>=42612&&t<=42621:t<42775?t>=42623&&t<=42725||t>=42736&&t<=42737:t>=42775&&t<=42783||t>=42786&&t<=42888:t<43072?t<42928?t>=42891&&t<=42926:t>=42928&&t<=42935||t>=42999&&t<=43047:t<43216?t>=43072&&t<=43123||t>=43136&&t<=43205:t>=43216&&t<=43225||t>=43232&&t<=43255:t<55243?t<43744?t<43488?t<43312?t<43261?43259==t:43261==t||t>=43264&&t<=43309:t<43392?t>=43312&&t<=43347||t>=43360&&t<=43388:t>=43392&&t<=43456||t>=43471&&t<=43481:t<43600?t<43520?t>=43488&&t<=43518:t>=43520&&t<=43574||t>=43584&&t<=43597:t<43642?t>=43600&&t<=43609||t>=43616&&t<=43638:t>=43642&&t<=43714||t>=43739&&t<=43741:t<43824?t<43785?t<43762?t>=43744&&t<=43759:t>=43762&&t<=43766||t>=43777&&t<=43782:t<43808?t>=43785&&t<=43790||t>=43793&&t<=43798:t>=43808&&t<=43814||t>=43816&&t<=43822:t<44012?t<43868?t>=43824&&t<=43866:t>=43868&&t<=43877||t>=43888&&t<=44010:t<44032?t>=44012&&t<=44013||t>=44016&&t<=44025:t>=44032&&t<=55203||t>=55216&&t<=55238:t<64848?t<64298?t<64112?t<55296?t>=55243&&t<=55291:t>=55296&&t<=57343||t>=63744&&t<=64109:t<64275?t>=64112&&t<=64217||t>=64256&&t<=64262:t>=64275&&t<=64279||t>=64285&&t<=64296:t<64320?t<64312?t>=64298&&t<=64310:t>=64312&&t<=64316||64318==t:t<64326?t>=64320&&t<=64321||t>=64323&&t<=64324:t>=64326&&t<=64433||t>=64467&&t<=64829:t<65296?t<65024?t<64914?t>=64848&&t<=64911:t>=64914&&t<=64967||t>=65008&&t<=65019:t<65136?t>=65024&&t<=65039||t>=65056&&t<=65071:t>=65136&&t<=65140||t>=65142&&t<=65276:t<65474?t<65345?t>=65296&&t<=65305||t>=65313&&t<=65338:t>=65345&&t<=65370||t>=65382&&t<=65470:t<65490?t>=65474&&t<=65479||t>=65482&&t<=65487:t>=65490&&t<=65495||t>=65498&&t<=65500}function em(t){return t<58?t<44?33==t:44==t||46==t:t<63?t>=58&&t<=59:63==t||94==t}function nm(t){return t<91?40==t:91==t||123==t}function rm(t){return t<93?41==t:93==t||125==t}var im=/^(?:xn--vermgensberatung-pwb|xn--vermgensberater-ctb|xn--clchc0ea0b2g2a9gcd|xn--w4r85el8fhu5dnra|travelersinsurance|vermögensberatung|xn--5su34j936bgsg|xn--bck1b9a5dre4c|xn--mgbah1a3hjkrd|xn--mgbai9azgqp6j|xn--mgberp4a5d4ar|xn--xkc2dl3a5ee0h|vermögensberater|xn--fzys8d69uvgm|xn--mgba7c0bbn0a|xn--mgbcpq6gpa1a|xn--xkc2al3hye2a|americanexpress|kerryproperties|sandvikcoromant|xn--i1b6b1a6a2e|xn--kcrx77d1x4a|xn--lgbbat1ad8j|xn--mgba3a4f16a|xn--mgbc0a9azcg|xn--nqv7fs00ema|americanfamily|weatherchannel|xn--54b7fta0cc|xn--6qq986b3xl|xn--80aqecdr1a|xn--b4w605ferd|xn--fiq228c5hs|xn--h2breg3eve|xn--jlq480n2rg|xn--mgba3a3ejt|xn--mgbaam7a8h|xn--mgbayh7gpa|xn--mgbbh1a71e|xn--mgbca7dzdo|xn--mgbi4ecexp|xn--mgbx4cd0ab|xn--rvc1e0am3e|international|lifeinsurance|wolterskluwer|xn--cckwcxetd|xn--eckvdtc9d|xn--fpcrj9c3d|xn--fzc2c9e2c|xn--h2brj9c8c|xn--tiq49xqyj|xn--yfro4i67o|xn--ygbi2ammx|construction|lplfinancial|scholarships|versicherung|xn--3e0b707e|xn--45br5cyl|xn--4dbrk0ce|xn--80adxhks|xn--80asehdb|xn--8y0a063a|xn--gckr3f0f|xn--mgb9awbf|xn--mgbab2bd|xn--mgbgu82a|xn--mgbpl2fh|xn--mgbt3dhd|xn--mk1bu44c|xn--ngbc5azd|xn--ngbe9e0a|xn--ogbpf8fl|xn--qcka1pmc|accountants|barclaycard|blackfriday|blockbuster|bridgestone|calvinklein|contractors|creditunion|engineering|enterprises|investments|kerryhotels|lamborghini|motorcycles|olayangroup|photography|playstation|productions|progressive|redumbrella|williamhill|xn--11b4c3d|xn--1ck2e1b|xn--1qqw23a|xn--2scrj9c|xn--3bst00m|xn--3ds443g|xn--3hcrj9c|xn--42c2d9a|xn--45brj9c|xn--55qw42g|xn--6frz82g|xn--80ao21a|xn--9krt00a|xn--cck2b3b|xn--czr694b|xn--d1acj3b|xn--efvy88h|xn--fct429k|xn--fjq720a|xn--flw351e|xn--g2xx48c|xn--gecrj9c|xn--gk3at1e|xn--h2brj9c|xn--hxt814e|xn--imr513n|xn--j6w193g|xn--jvr189m|xn--kprw13d|xn--kpry57d|xn--mgbbh1a|xn--mgbtx2b|xn--mix891f|xn--nyqy26a|xn--otu796d|xn--pgbs0dh|xn--q9jyb4c|xn--rhqv96g|xn--rovu88b|xn--s9brj9c|xn--ses554g|xn--t60b56a|xn--vuq861b|xn--w4rs40l|xn--xhq521b|xn--zfr164b|சிங்கப்பூர்|accountant|apartments|associates|basketball|bnpparibas|boehringer|capitalone|consulting|creditcard|cuisinella|eurovision|extraspace|foundation|healthcare|immobilien|industries|management|mitsubishi|nextdirect|properties|protection|prudential|realestate|republican|restaurant|schaeffler|tatamotors|technology|university|vlaanderen|xn--30rr7y|xn--3pxu8k|xn--45q11c|xn--4gbrim|xn--55qx5d|xn--5tzm5g|xn--80aswg|xn--90a3ac|xn--9dbq2a|xn--9et52u|xn--c2br7g|xn--cg4bki|xn--czrs0t|xn--czru2d|xn--fiq64b|xn--fiqs8s|xn--fiqz9s|xn--io0a7i|xn--kput3i|xn--mxtq1m|xn--o3cw4h|xn--pssy2u|xn--q7ce6a|xn--unup4y|xn--wgbh1c|xn--wgbl6a|xn--y9a3aq|accenture|allfinanz|amsterdam|analytics|aquarelle|barcelona|bloomberg|christmas|community|directory|education|equipment|fairwinds|financial|firestone|fresenius|furniture|goldpoint|hisamitsu|homedepot|homegoods|homesense|institute|insurance|kuokgroup|landrover|lifestyle|marketing|marshalls|melbourne|microsoft|panasonic|pramerica|richardli|shangrila|solutions|statebank|statefarm|stockholm|travelers|vacations|xn--90ais|xn--c1avg|xn--d1alf|xn--e1a4c|xn--fhbei|xn--j1aef|xn--j1amh|xn--l1acc|xn--ngbrx|xn--nqv7f|xn--p1acf|xn--qxa6a|xn--tckwe|xn--vhquv|yodobashi|موريتانيا|abudhabi|airforce|allstate|attorney|barclays|barefoot|bargains|baseball|boutique|bradesco|broadway|brussels|builders|business|capetown|catering|catholic|cipriani|cleaning|clinique|clothing|commbank|computer|delivery|deloitte|democrat|diamonds|discount|discover|download|engineer|ericsson|exchange|feedback|fidelity|firmdale|football|frontier|goodyear|grainger|graphics|hdfcbank|helsinki|holdings|hospital|infiniti|ipiranga|istanbul|jpmorgan|lighting|lundbeck|marriott|mckinsey|memorial|merckmsd|mortgage|observer|partners|pharmacy|pictures|plumbing|property|redstone|reliance|saarland|samsclub|security|services|shopping|softbank|software|stcgroup|supplies|training|vanguard|ventures|verisign|woodside|xn--90ae|xn--node|xn--p1ai|xn--qxam|yokohama|السعودية|abogado|academy|agakhan|alibaba|android|athleta|auction|audible|auspost|banamex|bauhaus|bestbuy|booking|brother|capital|caravan|careers|channel|charity|chintai|citadel|clubmed|college|cologne|company|compare|contact|cooking|corsica|country|coupons|courses|cricket|cruises|dentist|digital|domains|exposed|express|farmers|fashion|ferrari|ferrero|finance|fishing|fitness|flights|florist|flowers|forsale|frogans|fujitsu|gallery|genting|godaddy|grocery|guitars|hamburg|hangout|hitachi|holiday|hosting|hotmail|hyundai|ismaili|jewelry|juniper|kitchen|komatsu|lacaixa|lanxess|lasalle|latrobe|leclerc|limited|lincoln|markets|monster|netbank|netflix|network|neustar|okinawa|organic|origins|philips|pioneer|politie|realtor|recipes|rentals|reviews|rexroth|samsung|sandvik|schmidt|schwarz|science|shiksha|singles|staples|storage|support|surgery|systems|temasek|theater|theatre|tickets|toshiba|trading|walmart|wanggou|watches|weather|website|wedding|whoswho|windows|winners|yamaxun|youtube|zuerich|католик|البحرين|الجزائر|العليان|پاکستان|كاثوليك|இந்தியா|abbott|abbvie|africa|agency|airbus|airtel|alipay|alsace|alstom|amazon|anquan|aramco|author|bayern|beauty|berlin|bharti|bostik|boston|broker|camera|career|casino|center|chanel|chrome|church|circle|claims|clinic|coffee|comsec|condos|coupon|credit|cruise|dating|datsun|dealer|degree|dental|design|direct|doctor|dunlop|dupont|durban|emerck|energy|estate|events|expert|family|flickr|futbol|gallup|garden|george|giving|global|google|gratis|health|hermes|hiphop|hockey|hotels|hughes|imamat|insure|intuit|jaguar|joburg|juegos|kaufen|kindle|kosher|latino|lawyer|lefrak|living|locker|london|luxury|madrid|maison|makeup|market|mattel|mobile|monash|mormon|moscow|museum|nagoya|nissan|nissay|norton|nowruz|office|olayan|online|oracle|orange|otsuka|pfizer|photos|physio|pictet|quebec|racing|realty|reisen|repair|report|review|rogers|ryukyu|safety|sakura|sanofi|school|schule|search|secure|select|shouji|soccer|social|stream|studio|supply|suzuki|swatch|sydney|taipei|taobao|target|tattoo|tennis|tienda|tjmaxx|tkmaxx|toyota|travel|unicom|viajes|viking|villas|virgin|vision|voting|voyage|walter|webcam|xihuan|yachts|yandex|zappos|москва|онлайн|ابوظبي|ارامكو|الاردن|المغرب|امارات|فلسطين|مليسيا|भारतम्|இலங்கை|ファッション|actor|adult|aetna|amfam|amica|apple|archi|audio|autos|azure|baidu|beats|bible|bingo|black|boats|bosch|build|canon|cards|chase|cheap|cisco|citic|click|cloud|coach|codes|crown|cymru|dance|deals|delta|drive|dubai|earth|edeka|email|epson|faith|fedex|final|forex|forum|gallo|games|gifts|gives|glass|globo|gmail|green|gripe|group|gucci|guide|homes|honda|horse|house|hyatt|ikano|irish|jetzt|koeln|kyoto|lamer|lease|legal|lexus|lilly|loans|locus|lotte|lotto|mango|media|miami|money|movie|music|nexus|nikon|ninja|nokia|nowtv|omega|osaka|paris|parts|party|phone|photo|pizza|place|poker|praxi|press|prime|promo|quest|radio|rehab|reise|ricoh|rocks|rodeo|rugby|salon|sener|seven|sharp|shell|shoes|skype|sling|smart|smile|solar|space|sport|stada|store|study|style|sucks|swiss|tatar|tires|tirol|tmall|today|tokyo|tools|toray|total|tours|trade|trust|tunes|tushu|ubank|vegas|video|vodka|volvo|wales|watch|weber|weibo|works|world|xerox|yahoo|ישראל|ایران|بازار|بھارت|سودان|سورية|همراه|भारोत|संगठन|বাংলা|భారత్|ഭാരതം|嘉里大酒店|aarp|able|aero|akdn|ally|amex|arab|army|arpa|arte|asda|asia|audi|auto|baby|band|bank|bbva|beer|best|bike|bing|blog|blue|bofa|bond|book|buzz|cafe|call|camp|care|cars|casa|case|cash|cbre|cern|chat|citi|city|club|cool|coop|cyou|data|date|dclk|deal|dell|desi|diet|dish|docs|dvag|erni|fage|fail|fans|farm|fast|fido|film|fire|fish|flir|food|ford|free|fund|game|gbiz|gent|ggee|gift|gmbh|gold|golf|goog|guge|guru|hair|haus|hdfc|help|here|host|hsbc|icbc|ieee|imdb|immo|info|itau|java|jeep|jobs|jprs|kddi|kids|kiwi|kpmg|kred|land|lego|lgbt|lidl|life|like|limo|link|live|loan|love|ltda|luxe|maif|meet|meme|menu|mini|mint|mobi|moda|moto|name|navy|news|next|nico|nike|ollo|open|page|pars|pccw|pics|ping|pink|play|plus|pohl|porn|post|prod|prof|qpon|read|reit|rent|rest|rich|room|rsvp|ruhr|safe|sale|sarl|save|saxo|scot|seat|seek|sexy|shia|shop|show|silk|sina|site|skin|sncf|sohu|song|sony|spot|star|surf|talk|taxi|team|tech|teva|tiaa|tips|town|toys|tube|vana|visa|viva|vivo|vote|voto|wang|weir|wien|wiki|wine|work|xbox|yoga|zara|zero|zone|дети|сайт|بارت|بيتك|ڀارت|تونس|شبكة|عراق|عمان|موقع|भारत|ভারত|ভাৰত|ਭਾਰਤ|ભારત|ଭାରତ|ಭಾರತ|ලංකා|アマゾン|グーグル|クラウド|ポイント|组织机构|電訊盈科|香格里拉|aaa|abb|abc|aco|ads|aeg|afl|aig|anz|aol|app|art|aws|axa|bar|bbc|bbt|bcg|bcn|bet|bid|bio|biz|bms|bmw|bom|boo|bot|box|buy|bzh|cab|cal|cam|car|cat|cba|cbn|ceo|cfa|cfd|com|cpa|crs|dad|day|dds|dev|dhl|diy|dnp|dog|dot|dtv|dvr|eat|eco|edu|esq|eus|fan|fit|fly|foo|fox|frl|ftr|fun|fyi|gal|gap|gay|gdn|gea|gle|gmo|gmx|goo|gop|got|gov|hbo|hiv|hkt|hot|how|ibm|ice|icu|ifm|inc|ing|ink|int|ist|itv|jcb|jio|jll|jmp|jnj|jot|joy|kfh|kia|kim|kpn|krd|lat|law|lds|llc|llp|lol|lpl|ltd|man|map|mba|med|men|mil|mit|mlb|mls|mma|moe|moi|mom|mov|msd|mtn|mtr|nab|nba|nec|net|new|nfl|ngo|nhk|now|nra|nrw|ntt|nyc|obi|one|ong|onl|ooo|org|ott|ovh|pay|pet|phd|pid|pin|pnc|pro|pru|pub|pwc|red|ren|ril|rio|rip|run|rwe|sap|sas|sbi|sbs|scb|sew|sex|sfr|ski|sky|soy|spa|srl|stc|tab|tax|tci|tdk|tel|thd|tjx|top|trv|tui|tvs|ubs|uno|uol|ups|vet|vig|vin|vip|wed|win|wme|wow|wtc|wtf|xin|xxx|xyz|you|yun|zip|бел|ком|қаз|мкд|мон|орг|рус|срб|укр|հայ|קום|عرب|قطر|كوم|مصر|कॉम|नेट|คอม|ไทย|ລາວ|ストア|セール|みんな|中文网|亚马逊|天主教|我爱你|新加坡|淡马锡|飞利浦|ac|ad|ae|af|ag|ai|al|am|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cw|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|ss|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|za|zm|zw|ελ|ευ|бг|ею|рф|გე|닷넷|닷컴|삼성|한국|コム|世界|中信|中国|中國|企业|佛山|信息|健康|八卦|公司|公益|台湾|台灣|商城|商店|商标|嘉里|在线|大拿|娱乐|家電|广东|微博|慈善|手机|招聘|政务|政府|新闻|时尚|書籍|机构|游戏|澳門|点看|移动|网址|网店|网站|网络|联通|谷歌|购物|通販|集团|食品|餐厅|香港)$/,om=/https?:\/\//i,sm=new RegExp("^"+om.source,"i"),am=/^(javascript|vbscript):/i,lm=/^[A-Za-z][-.+A-Za-z0-9]*:(\/\/)?([^:/]*)/,cm=/^(?:\/\/)?([^/#?:]+)/,um=qf;function dm(t){return qf(t)||Jf(t)||43===t||45===t||46===t}var hm=tm;function pm(t){return 95===t||hm(t)}function fm(t){return tm(t)||function(t){return t<91?t<47?t>=35&&t<=43||45==t:t<61?47==t:61==t||64==t:t<95?91==t||93==t:t<123?95==t:t>=123&&t<=126||10003==t}(t)||em(t)}function mm(t){return 47===t||63===t||35===t}function Em(t){return im.test(t.toLowerCase())}var _m=/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,Am=/[:/?#]/;var gm=/^(https?:\/\/)?(?:www\.)?/i,Sm=/^\/\//,vm=function(t){function e(e){var n=t.call(this,e)||this;return n.type="url",n.url="",n.urlMatchType="scheme",n.protocolRelativeMatch=!1,n.stripPrefix={scheme:!0,www:!0},n.stripTrailingSlash=!0,n.decodePercentEncoding=!0,n.protocolPrepended=!1,n.urlMatchType=e.urlMatchType,n.url=e.url,n.protocolRelativeMatch=e.protocolRelativeMatch,n.stripPrefix=e.stripPrefix,n.stripTrailingSlash=e.stripTrailingSlash,n.decodePercentEncoding=e.decodePercentEncoding,n}return Hf(e,t),e.prototype.getType=function(){return"url"},e.prototype.getUrlMatchType=function(){return this.urlMatchType},e.prototype.getUrl=function(){var t=this.url;return!this.protocolRelativeMatch&&"scheme"!==this.urlMatchType&&!this.protocolPrepended&&(t=this.url="http://"+t,this.protocolPrepended=!0),t},e.prototype.getAnchorHref=function(){return this.getUrl().replace(/&/g,"&")},e.prototype.getAnchorText=function(){var t=this.getMatchedText();return this.protocolRelativeMatch&&(t=function(t){return t.replace(Sm,"")}(t)),this.stripPrefix.scheme&&(t=function(t){return t.replace(sm,"")}(t)),this.stripPrefix.www&&(t=function(t){return t.includes("www.")?t.replace(gm,"$1"):t}(t)),this.stripTrailingSlash&&(t=function(t){return"/"===t.charAt(t.length-1)&&(t=t.slice(0,-1)),t}(t)),this.decodePercentEncoding&&(t=function(t){var e=t.replace(/%(?:22|26|27|3C|3E)/gi,function(t){return"%22"===t?""":"%26"===t?"&":"%27"===t?"'":"%3C"===t||"%3c"===t?"<":">"});if(e.includes("%"))try{return decodeURIComponent(e)}catch(t){}return e}(t)),t},e}(Kf);var Om=/^mailto:/i,Dm=tm;function Tm(t){return Dm(t)||function(t){return t<47?t<42?33==t||t>=35&&t<=39:t>=42&&t<=43||45==t:t<63?47==t||61==t:t<94?63==t:t>=94&&t<=96||t>=123&&t<=126}(t)}var Rm=function(t){function e(e){var n=t.call(this,e)||this;return n.type="email",n.email="",n.email=e.email,n}return Hf(e,t),e.prototype.getType=function(){return"email"},e.prototype.getEmail=function(){return this.email},e.prototype.getAnchorHref=function(){return"mailto:"+this.email},e.prototype.getAnchorText=function(){return this.email},e}(Kf);function ym(t){return 95===t||tm(t)}var Im=["twitter","facebook","instagram","tiktok","youtube"],Cm=function(t){function e(e){var n=t.call(this,e)||this;return n.type="hashtag",n.serviceName="twitter",n.hashtag="",n.serviceName=e.serviceName,n.hashtag=e.hashtag,n}return Hf(e,t),e.prototype.getType=function(){return"hashtag"},e.prototype.getServiceName=function(){return this.serviceName},e.prototype.getHashtag=function(){return this.hashtag},e.prototype.getAnchorHref=function(){var t=this.serviceName,e=this.hashtag;switch(t){case"twitter":return"https://twitter.com/hashtag/"+e;case"facebook":return"https://www.facebook.com/hashtag/"+e;case"instagram":return"https://instagram.com/explore/tags/"+e;case"tiktok":return"https://www.tiktok.com/tag/"+e;case"youtube":return"https://youtube.com/hashtag/"+e;default:zf(t)}},e.prototype.getAnchorText=function(){return"#"+this.hashtag},e.prototype.getCssClassSuffixes=function(){var e=t.prototype.getCssClassSuffixes.call(this),n=this.getServiceName();return n&&e.push(n),e},e}(Kf),Nm={twitter:/^@\w{1,15}$/,instagram:/^@[_\w]{1,30}$/,soundcloud:/^@[-a-z0-9_]{3,25}$/,tiktok:/^@[.\w]{1,23}[\w]$/,youtube:/^@[-.·\w]{3,30}$/};function bm(t){return 45===t||46===t||95===t||qf(t)||Jf(t)}var wm=["twitter","instagram","soundcloud","tiktok","youtube"],km=function(t){function e(e){var n=t.call(this,e)||this;return n.type="mention",n.serviceName="twitter",n.mention="",n.mention=e.mention,n.serviceName=e.serviceName,n}return Hf(e,t),e.prototype.getType=function(){return"mention"},e.prototype.getMention=function(){return this.mention},e.prototype.getServiceName=function(){return this.serviceName},e.prototype.getAnchorHref=function(){switch(this.serviceName){case"twitter":return"https://twitter.com/"+this.mention;case"instagram":return"https://instagram.com/"+this.mention;case"soundcloud":return"https://soundcloud.com/"+this.mention;case"tiktok":return"https://www.tiktok.com/@"+this.mention;case"youtube":return"https://youtube.com/@"+this.mention;default:zf(this.serviceName)}},e.prototype.getAnchorText=function(){return"@"+this.mention},e.prototype.getCssClassSuffixes=function(){var e=t.prototype.getCssClassSuffixes.call(this),n=this.getServiceName();return n&&e.push(n),e},e}(Kf),Lm=/[-. ()]/,Mm=new RegExp("^".concat(/(?:(?:(?:(\+)?\d{1,3}[-. ]?)?\(?\d{3}\)?[-. ]?\d{3}[-. ]?\d{4})|(?:(\+)(?:9[976]\d|8[987530]\d|6[987]\d|5[90]\d|42\d|3[875]\d|2[98654321]\d|9[8543210]|8[6421]|6[6543210]|5[87654321]|4[987654310]|3[9643210]|2[70]|7|1)[-. ]?(?:\d[-. ]?){6,12}\d+))([,;]+[0-9]+#?)*/.source,"|").concat(/(0([1-9]-?[1-9]\d{3}|[1-9]{2}-?\d{3}|[1-9]{2}\d{1}-?\d{2}|[1-9]{2}\d{2}-?\d{1})-?\d{4}|0[789]0-?\d{4}-?\d{4}|050-?\d{4}-?\d{4})/.source,"$"));function Pm(t){return 45===t||46===t||32===t}function xm(t){return 44===t||59===t}var Fm=function(t){function e(e){var n=t.call(this,e)||this;return n.type="phone",n.number="",n.plusSign=!1,n.number=e.number,n.plusSign=e.plusSign,n}return Hf(e,t),e.prototype.getType=function(){return"phone"},e.prototype.getPhoneNumber=function(){return this.number},e.prototype.getNumber=function(){return this.getPhoneNumber()},e.prototype.getAnchorHref=function(){return"tel:"+(this.plusSign?"+":"")+this.number},e.prototype.getAnchorText=function(){return this.matchedText},e}(Kf),Hm=function(){function t(t,e){this.charIdx=0,this.matches=[],this._stateMachines=[],this.schemeUrlMachinesCount=0,this.text=t,this.tagBuilder=e.tagBuilder,this.stripPrefix=e.stripPrefix,this.stripTrailingSlash=e.stripTrailingSlash,this.decodePercentEncoding=e.decodePercentEncoding,this.hashtagServiceName=e.hashtagServiceName,this.mentionServiceName=e.mentionServiceName}return Object.defineProperty(t.prototype,"stateMachines",{get:function(){return this._stateMachines},enumerable:!1,configurable:!0}),t.prototype.addMachine=function(t){this._stateMachines.push(t),PE(t)&&this.schemeUrlMachinesCount++},t.prototype.removeMachine=function(t){this._stateMachines=this._stateMachines.filter(function(e){return e!==t}),PE(t)&&this.schemeUrlMachinesCount--},t.prototype.hasSchemeUrlMachine=function(){return this.schemeUrlMachinesCount>0},t}();function Um(t,e,n){var r=t.charIdx;if(35===n)t.addMachine(function(t,e){return{type:2,startIdx:t,state:e,acceptStateReached:!1}}(r,28));else if(64===n)t.addMachine(function(t,e){return{type:3,startIdx:t,state:e,acceptStateReached:!1}}(r,30));else if(47===n)t.addMachine(LE(r,11));else if(43===n)t.addMachine(ME(r,37));else if(40===n)t.addMachine(ME(r,32));else{if(Jf(n)&&(t.addMachine(ME(r,38)),t.addMachine(function(t,e){return{type:0,startIdx:t,state:e,acceptStateReached:!1,matchType:2,octetsEncountered:1}}(r,13))),Dm(n)){var i="m"===e.toLowerCase()?15:22;t.addMachine(function(t,e){return{type:1,startIdx:t,state:e,acceptStateReached:!1}}(r,i))}um(n)&&t.addMachine(kE(r,0)),tm(n)&&t.addMachine(LE(r,5))}}function Bm(t,e,n){58===n?e.state=2:45===n?e.state=1:dm(n)||t.removeMachine(e)}function jm(t,e,n){var r=t.charIdx;45===n||(47===n?(t.removeMachine(e),t.addMachine(LE(r,11))):dm(n)?e.state=0:t.removeMachine(e))}function Vm(t,e,n){var r=t.charIdx;47===n?e.state=3:46===n?t.removeMachine(e):hm(n)?(e.state=5,um(n)&&t.addMachine(kE(r,0))):t.removeMachine(e)}function zm(t,e,n){47===n?e.state=4:fm(n)?(e.state=10,e.acceptStateReached=!0):NE(t,e)}function $m(t,e,n,r){47===r?(e.state=10,e.acceptStateReached=!0):hm(r)?(e.state=5,e.acceptStateReached=!0):t.removeMachine(e)}function Ym(t,e,n){47===n?e.state=12:t.removeMachine(e)}function Gm(t,e,n){hm(n)?e.state=5:t.removeMachine(e)}function Wm(t,e,n){46===n?e.state=7:45===n?e.state=6:58===n?e.state=8:mm(n)?e.state=10:pm(n)||NE(t,e)}function Xm(t,e,n,r){45===r||(46===r?NE(t,e):hm(r)?e.state=5:NE(t,e))}function Km(t,e,n,r){46===r?NE(t,e):hm(r)?(e.state=5,e.acceptStateReached=!0):NE(t,e)}function qm(t,e,n){46===n?e.state=14:58===n?e.state=8:Jf(n)||(mm(n)?e.state=10:tm(n)?t.removeMachine(e):NE(t,e))}function Jm(t,e,n){Jf(n)?(e.octetsEncountered++,4===e.octetsEncountered&&(e.acceptStateReached=!0),e.state=13):NE(t,e)}function Zm(t,e,n){Jf(n)?e.state=9:NE(t,e)}function Qm(t,e,n){Jf(n)||(mm(n)?e.state=10:NE(t,e))}function tE(t,e,n){fm(n)||NE(t,e)}function eE(t,e,n,r){"a"===n.toLowerCase()?e.state=16:lE(t,e,r)}function nE(t,e,n,r){"i"===n.toLowerCase()?e.state=17:lE(t,e,r)}function rE(t,e,n,r){"l"===n.toLowerCase()?e.state=18:lE(t,e,r)}function iE(t,e,n,r){"t"===n.toLowerCase()?e.state=19:lE(t,e,r)}function oE(t,e,n,r){"o"===n.toLowerCase()?e.state=20:lE(t,e,r)}function sE(t,e,n){58===n?e.state=21:lE(t,e,n)}function aE(t,e,n){Tm(n)?e.state=22:t.removeMachine(e)}function lE(t,e,n){46===n?e.state=23:64===n?e.state=24:Tm(n)?e.state=22:t.removeMachine(e)}function cE(t,e,n){46===n||64===n?t.removeMachine(e):Tm(n)?e.state=22:t.removeMachine(e)}function uE(t,e,n){hm(n)?e.state=25:t.removeMachine(e)}function dE(t,e,n){46===n?e.state=27:45===n?e.state=26:pm(n)||NE(t,e)}function hE(t,e,n){45===n||46===n?NE(t,e):pm(n)?e.state=25:NE(t,e)}function pE(t,e,n){46===n||45===n?NE(t,e):hm(n)?(e.state=25,e.acceptStateReached=!0):NE(t,e)}function fE(t,e,n){ym(n)?(e.state=29,e.acceptStateReached=!0):t.removeMachine(e)}function mE(t,e,n){ym(n)||NE(t,e)}function EE(t,e,n){bm(n)?(e.state=31,e.acceptStateReached=!0):t.removeMachine(e)}function _E(t,e,n){bm(n)||(tm(n)?t.removeMachine(e):NE(t,e))}function AE(t,e,n,r){Jf(r)?e.state=38:(t.removeMachine(e),Um(t,n,r))}function gE(t,e,n,r){Jf(r)?e.state=33:t.removeMachine(e),Um(t,n,r)}function SE(t,e,n){Jf(n)?e.state=34:t.removeMachine(e)}function vE(t,e,n){Jf(n)?e.state=35:t.removeMachine(e)}function OE(t,e,n){41===n?e.state=36:t.removeMachine(e)}function DE(t,e,n,r){Jf(r)?e.state=38:Pm(r)?e.state=39:t.removeMachine(e)}function TE(t,e,n,r){var i=t.charIdx;e.acceptStateReached=!0,xm(r)?e.state=40:35===r?e.state=41:Jf(r)||(40===r?e.state=32:Pm(r)?e.state=39:(NE(t,e),um(r)&&t.addMachine(kE(i,0))))}function RE(t,e,n,r){Jf(r)?e.state=38:40===r?e.state=32:(NE(t,e),Um(t,n,r))}function yE(t,e,n){xm(n)||(35===n?e.state=41:Jf(n)?e.state=38:NE(t,e))}function CE(t,e,n){xm(n)?e.state=40:Jf(n)?t.removeMachine(e):NE(t,e)}function NE(t,e){var n=t.matches,r=t.text,i=t.charIdx,o=t.tagBuilder,s=t.stripPrefix,a=t.stripTrailingSlash,l=t.decodePercentEncoding,c=t.hashtagServiceName,d=t.mentionServiceName;if(t.removeMachine(e),e.acceptStateReached){var h=e.startIdx,p=r.slice(e.startIdx,i);switch(p=function(t){for(var e={"(":0,"{":0,"[":0},n=0;n<t.length;n++){var r=t.charAt(n);nm(o=t.charCodeAt(n))?e[r]++:rm(o)&&e[wE[r]]--}for(var i=t.length-1;i>=0;){var o;r=t.charAt(i);if(rm(o=t.charCodeAt(i))){var s=wE[r];if(!(e[s]<0))break;e[s]++,i--}else{if(!em(o))break;i--}}return t.slice(0,i+1)}(p),e.type){case 0:if(64===r.charCodeAt(e.startIdx-1))return;switch(e.matchType){case 0:var f=om.exec(p);if(f&&(h+=f.index,p=p.slice(f.index)),!function(t){if(am.test(t))return!1;var e=t.match(lm);if(!e)return!1;var n=!!e[1],r=e[2];return!!n||!(-1===r.indexOf(".")||!/[A-Za-z]/.test(r))}(p))return;break;case 1:if(!function(t){var e=t.match(cm);if(!e)return!1;var n=e[0].split(".");return!(n.length<2||!Em(n[n.length-1]))}(p))return;break;case 2:if(!function(t){var e=t.split(Am,1)[0];return _m.test(e)}(p))return;break;default:zf(e)}n.push(new vm({tagBuilder:o,matchedText:p,offset:h,urlMatchType:bE(e.matchType),url:p,protocolRelativeMatch:"//"===p.slice(0,2),stripPrefix:s,stripTrailingSlash:a,decodePercentEncoding:l}));break;case 1:(function(t){return Em(t.split(".").pop())})(p)&&n.push(new Rm({tagBuilder:o,matchedText:p,offset:h,email:p.replace(Om,"")}));break;case 2:(function(t){return t.length<=140})(p)&&n.push(new Cm({tagBuilder:o,matchedText:p,offset:h,serviceName:c,hashtag:p.slice(1)}));break;case 3:(function(t,e){return Nm[e].test(t)})(p,d)&&n.push(new km({tagBuilder:o,matchedText:p,offset:h,serviceName:d,mention:p.slice(1)}));break;case 4:if(function(t){return("+"===t.charAt(0)||Lm.test(t))&&Mm.test(t)}(p=p.replace(/ +$/g,""))){var m=p.replace(/[^0-9,;#]/g,"");n.push(new Fm({tagBuilder:o,matchedText:p,offset:h,number:m,plusSign:"+"===p.charAt(0)}))}break;default:zf(e)}}}function bE(t){switch(t){case 0:return"scheme";case 1:return"tld";case 2:return"ipV4";default:zf(t)}}var wE={")":"(","}":"{","]":"["};function kE(t,e){return{type:0,startIdx:t,state:e,acceptStateReached:!1,matchType:0}}function LE(t,e){return{type:0,startIdx:t,state:e,acceptStateReached:!1,matchType:1}}function ME(t,e){return{type:4,startIdx:t,state:e,acceptStateReached:!1}}function PE(t){return 0===t.type&&0===t.matchType}var xE=function(){return function(t){void 0===t&&(t={}),this.idx=void 0!==t.idx?t.idx:-1,this.type=t.type||"tag",this.name=t.name||"",this.isOpening=!!t.isOpening,this.isClosing=!!t.isClosing}}(),FE=new xE,HE=function(){return function(t,e){this.charIdx=0,this.state=0,this.currentDataIdx=0,this.currentTag=FE,this.html=t,this.callbacks=e}}();function UE(t,e){"<"===e&&d_(t)}function BE(t,e,n){"!"===e?t.state=13:"/"===e?(t.state=2,t.currentTag=new xE(Uf(Uf({},t.currentTag),{isClosing:!0}))):"<"===e?d_(t):qf(n)?(t.state=3,t.currentTag=new xE(Uf(Uf({},t.currentTag),{isOpening:!0}))):(t.state=0,t.currentTag=FE)}function VE(t,e,n){Qf(n)?(t.currentTag=new xE(Uf(Uf({},t.currentTag),{name:p_(t)})),t.state=4):"<"===e?d_(t):"/"===e?(t.currentTag=new xE(Uf(Uf({},t.currentTag),{name:p_(t)})),t.state=12):">"===e?(t.currentTag=new xE(Uf(Uf({},t.currentTag),{name:p_(t)})),h_(t)):!qf(n)&&!Jf(n)&&":"!==e&&u_(t)}function zE(t,e,n){">"===e?u_(t):qf(n)?t.state=3:u_(t)}function $E(t,e,n){Qf(n)||("/"===e?t.state=12:">"===e?h_(t):"<"===e?d_(t):"="===e||Zf(n)||function(t){return t>=0&&t<=31||127==t}(n)?u_(t):t.state=5)}function YE(t,e,n){Qf(n)?t.state=6:"/"===e?t.state=12:"="===e?t.state=7:">"===e?h_(t):"<"===e?d_(t):Zf(n)&&u_(t)}function GE(t,e,n){Qf(n)||("/"===e?t.state=12:"="===e?t.state=7:">"===e?h_(t):"<"===e?d_(t):Zf(n)?u_(t):t.state=5)}function WE(t,e,n){Qf(n)||('"'===e?t.state=8:"'"===e?t.state=9:/[>=`]/.test(e)?u_(t):"<"===e?d_(t):t.state=10)}function XE(t,e){'"'===e&&(t.state=11)}function JE(t,e){"'"===e&&(t.state=11)}function ZE(t,e,n){Qf(n)?t.state=4:">"===e?h_(t):"<"===e&&d_(t)}function QE(t,e,n){Qf(n)?t.state=4:"/"===e?t.state=12:">"===e?h_(t):"<"===e?d_(t):(t.state=4,function(t){t.charIdx--}(t))}function e_(t,e){">"===e?(t.currentTag=new xE(Uf(Uf({},t.currentTag),{isClosing:!0})),h_(t)):u_(t)}function n_(t){var e=t.html,n=t.charIdx;"--"===e.slice(n,n+2)?(t.charIdx++,t.currentTag=new xE(Uf(Uf({},t.currentTag),{type:"comment"})),t.state=14):"DOCTYPE"===e.slice(n,n+7).toUpperCase()?(t.charIdx+=6,t.currentTag=new xE(Uf(Uf({},t.currentTag),{type:"doctype"})),t.state=20):u_(t)}function r_(t,e){"-"===e?t.state=15:">"===e?u_(t):t.state=16}function i_(t,e){"-"===e?t.state=18:">"===e?u_(t):t.state=16}function o_(t,e){"-"===e&&(t.state=17)}function s_(t,e){t.state="-"===e?18:16}function a_(t,e){">"===e?h_(t):"!"===e?t.state=19:"-"===e||(t.state=16)}function l_(t,e){"-"===e?t.state=17:">"===e?h_(t):t.state=16}function c_(t,e){">"===e?h_(t):"<"===e&&d_(t)}function u_(t){t.state=0,t.currentTag=FE}function d_(t){t.state=1,t.currentTag=new xE({idx:t.charIdx})}function h_(t){var e=t.html.slice(t.currentDataIdx,t.currentTag.idx);e&&t.callbacks.onText(e,t.currentDataIdx);var n=t.currentTag;"comment"===n.type?t.callbacks.onComment(n.idx):"doctype"===n.type?t.callbacks.onDoctype(n.idx):(n.isOpening&&t.callbacks.onOpenTag(n.name,n.idx),n.isClosing&&t.callbacks.onCloseTag(n.name,n.idx)),u_(t),t.currentDataIdx=t.charIdx+1}function p_(t){var e=t.currentTag.idx+(t.currentTag.isClosing?2:1);return t.html.slice(e,t.charIdx).toLowerCase()}var f_=function(){function t(e){void 0===e&&(e={}),this.version=t.version,this.urls={},this.email=!0,this.phone=!0,this.hashtag=!1,this.mention=!1,this.newWindow=!0,this.stripPrefix={scheme:!0,www:!0},this.stripTrailingSlash=!0,this.decodePercentEncoding=!0,this.truncate={length:0,location:"end"},this.className="",this.replaceFn=null,this.context=void 0,this.sanitizeHtml=!1,this.tagBuilder=null,this.urls=function(t){return null==t&&(t=!0),jf(t)?{schemeMatches:t,tldMatches:t,ipV4Matches:t}:{schemeMatches:!jf(t.schemeMatches)||t.schemeMatches,tldMatches:!jf(t.tldMatches)||t.tldMatches,ipV4Matches:!jf(t.ipV4Matches)||t.ipV4Matches}}(e.urls),this.email=jf(e.email)?e.email:this.email,this.phone=jf(e.phone)?e.phone:this.phone,this.hashtag=e.hashtag||this.hashtag,this.mention=e.mention||this.mention,this.newWindow=jf(e.newWindow)?e.newWindow:this.newWindow,this.stripPrefix=function(t){return null==t&&(t=!0),jf(t)?{scheme:t,www:t}:{scheme:!jf(t.scheme)||t.scheme,www:!jf(t.www)||t.www}}(e.stripPrefix),this.stripTrailingSlash=jf(e.stripTrailingSlash)?e.stripTrailingSlash:this.stripTrailingSlash,this.decodePercentEncoding=jf(e.decodePercentEncoding)?e.decodePercentEncoding:this.decodePercentEncoding,this.sanitizeHtml=e.sanitizeHtml||!1;var n=this.mention;if(!1!==n&&-1===wm.indexOf(n))throw new Error("invalid `mention` cfg '".concat(n,"' - see docs"));var r=this.hashtag;if(!1!==r&&-1===Im.indexOf(r))throw new Error("invalid `hashtag` cfg '".concat(r,"' - see docs"));this.truncate=function(t){return"number"==typeof t?{length:t,location:"end"}:Uf({length:Number.POSITIVE_INFINITY,location:"end"},t)}(e.truncate),this.className=e.className||this.className,this.replaceFn=e.replaceFn||this.replaceFn,this.context=e.context||this}return t.link=function(e,n){return new t(n).link(e)},t.parse=function(e,n){return new t(n).parse(e)},t.prototype.parse=function(t){var e=this,n=["a","style","script"],r=0,i=[];return function(t,e){for(var n=new HE(t,e),r=t.length;n.charIdx<r;){var i=t.charAt(n.charIdx),o=t.charCodeAt(n.charIdx);switch(n.state){case 0:UE(n,i);break;case 1:BE(n,i,o);break;case 2:zE(n,i,o);break;case 3:VE(n,i,o);break;case 4:$E(n,i,o);break;case 5:YE(n,i,o);break;case 6:GE(n,i,o);break;case 7:WE(n,i,o);break;case 8:XE(n,i);break;case 9:JE(n,i);break;case 10:ZE(n,i,o);break;case 11:QE(n,i,o);break;case 12:e_(n,i);break;case 13:n_(n);break;case 14:r_(n,i);break;case 15:i_(n,i);break;case 16:o_(n,i);break;case 17:s_(n,i);break;case 18:a_(n,i);break;case 19:l_(n,i);break;case 20:c_(n,i);break;default:zf(n.state)}n.charIdx++}n.currentDataIdx<n.charIdx&&function(t){var e=t.html.slice(t.currentDataIdx,t.charIdx);t.callbacks.onText(e,t.currentDataIdx),t.currentDataIdx=t.charIdx+1}(n)}(t,{onOpenTag:function(t){n.indexOf(t)>=0&&r++},onText:function(t,n){if(0===r){var o=t.split(/( | |<|<|>|>|"|"|')/gi),s=n;o.forEach(function(t,n){if(n%2==0){var r=e.parseText(t,s);i.push.apply(i,function(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)(r||!(i in e))&&(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}([],function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}(r),!1))}s+=t.length})}},onCloseTag:function(t){n.indexOf(t)>=0&&(r=Math.max(r-1,0))},onComment:function(){},onDoctype:function(){}}),i=this.compactMatches(i),i=this.removeUnwantedMatches(i)},t.prototype.compactMatches=function(t){t.sort(m_);for(var e=0;e<t.length-1;){var n=t[e],r=n.getOffset(),i=n.getMatchedText().length;if(e+1<t.length&&t[e+1].getOffset()===r){var o=t[e+1].getMatchedText().length>i?e:e+1;t.splice(o,1)}else e++}return t},t.prototype.removeUnwantedMatches=function(t){return this.hashtag||Vf(t,function(t){return"hashtag"===t.getType()}),this.email||Vf(t,function(t){return"email"===t.getType()}),this.phone||Vf(t,function(t){return"phone"===t.getType()}),this.mention||Vf(t,function(t){return"mention"===t.getType()}),this.urls.schemeMatches||Vf(t,function(t){return"url"===t.getType()&&"scheme"===t.getUrlMatchType()}),this.urls.tldMatches||Vf(t,function(t){return"url"===t.getType()&&"tld"===t.getUrlMatchType()}),this.urls.ipV4Matches||Vf(t,function(t){return"url"===t.getType()&&"ipV4"===t.getUrlMatchType()}),t},t.prototype.parseText=function(t,e){e=e||0;for(var n=function(t,e){for(var n=new Hm(t,e);n.charIdx<n.text.length;n.charIdx++){var r=t.charAt(n.charIdx),i=t.charCodeAt(n.charIdx);if(0===n.stateMachines.length)Um(n,r,i);else{for(var o=n.stateMachines.length-1;o>=0;o--){var s=n.stateMachines[o];switch(s.state){case 11:Ym(n,s,i);break;case 12:Gm(n,s,i);break;case 0:Bm(n,s,i);break;case 1:jm(n,s,i);break;case 2:Vm(n,s,i);break;case 3:zm(n,s,i);break;case 4:$m(n,s,0,i);break;case 5:Wm(n,s,i);break;case 6:Xm(n,s,0,i);break;case 7:Km(n,s,0,i);break;case 13:qm(n,s,i);break;case 14:Jm(n,s,i);break;case 8:Zm(n,s,i);break;case 9:Qm(n,s,i);break;case 10:tE(n,s,i);break;case 15:eE(n,s,r,i);break;case 16:nE(n,s,r,i);break;case 17:rE(n,s,r,i);break;case 18:iE(n,s,r,i);break;case 19:oE(n,s,r,i);break;case 20:sE(n,s,i);break;case 21:aE(n,s,i);break;case 22:lE(n,s,i);break;case 23:cE(n,s,i);break;case 24:uE(n,s,i);break;case 25:dE(n,s,i);break;case 26:hE(n,s,i);break;case 27:pE(n,s,i);break;case 28:fE(n,s,i);break;case 29:mE(n,s,i);break;case 30:EE(n,s,i);break;case 31:_E(n,s,i);break;case 32:gE(n,s,r,i);break;case 33:SE(n,s,i);break;case 34:vE(n,s,i);break;case 35:OE(n,s,i);break;case 36:DE(n,s,0,i);break;case 37:AE(n,s,r,i);break;case 38:TE(n,s,0,i);break;case 39:RE(n,s,r,i);break;case 40:yE(n,s,i);break;case 41:CE(n,s,i);break;default:zf(s.state)}}!n.hasSchemeUrlMachine()&&n.charIdx>0&&um(i)&&(um(n.text.charCodeAt(n.charIdx-1))||n.addMachine(kE(n.charIdx,0)))}}for(var a=n.stateMachines.length-1;a>=0;a--)n.stateMachines.forEach(function(t){return NE(n,t)});return n.matches}(t,{tagBuilder:this.getTagBuilder(),stripPrefix:this.stripPrefix,stripTrailingSlash:this.stripTrailingSlash,decodePercentEncoding:this.decodePercentEncoding,hashtagServiceName:this.hashtag,mentionServiceName:this.mention||"twitter"}),r=0,i=n.length;r<i;r++)n[r].setOffset(e+n[r].getOffset());return n},t.prototype.link=function(t){if(!t)return"";this.sanitizeHtml&&(t=t.replace(/</g,"<").replace(/>/g,">"));for(var e=this.parse(t),n=new Array(2*e.length+1),r=0,i=0,o=e.length;i<o;i++){var s=e[i];n.push(t.substring(r,s.getOffset())),n.push(this.createMatchReturnVal(s)),r=s.getOffset()+s.getMatchedText().length}return n.push(t.substring(r)),n.join("")},t.prototype.createMatchReturnVal=function(t){var e;return this.replaceFn&&(e=this.replaceFn.call(this.context,t)),"string"==typeof e?e:!1===e?t.getMatchedText():e instanceof Yf?e.toAnchorString():t.buildTag().toAnchorString()},t.prototype.getTagBuilder=function(){var t=this.tagBuilder;return t||(t=this.tagBuilder=new Xf({newWindow:this.newWindow,truncate:this.truncate,className:this.className})),t},t.version="4.1.5",t}();function m_(t,e){return t.getOffset()-e.getOffset()}var E_=f_;function A_(t,e=t){return{type:"autolink",url:t,text:e}}Cf(/^([ \t]*`{3,4})(?![^\r?\n]*```)([^\r\n`]*)([\s\S]+?)(^[ \t]*\1)\r?\n?/gm,([t,e,n,r])=>function(t,e){return{type:"codeblock",language:t,text:e}}(n,r.replace(/^\s*\n/m,"").replace(/\n\s*$/m,""))),Cf(/^> (?:.*|\r?\n> )*\r?\n?/gm,([t])=>function(t=[]){return{type:"blockquote",children:t}}([t.trim().replace(/^> /gm,"")]));const S_=Cf(/<!!mention:([^>\s]*?)\|(.*?)>/gm,([t,e,n])=>function(t,e){return{type:"mention",id:t,text:e}}(decodeURIComponent(e),n)),v_=Cf(/<!!customemoji:(.*?)>/gm,([t,e])=>function(t){return{type:"customemoji",text:t}}(e)),O_=Cf(/<((?:https?|mailto):.*?)\|(.*?)>/gi,([t,e,n])=>function(t,e=[]){return{type:"link",url:t,children:e}}(e,[n])),D_=Cf(/<actionlink:([^|]+)[|]([^>]*)>/gi,([t,e,n])=>{const{action:r,params:i}=R_(e);return function(t,e,n=[]){return{type:"actionlink",action:t,params:e,children:n}}(r,i,[n])}),T_=Cf(/<actionbutton:([^|]+)[|]([^>]*)>/gi,([t,e,n])=>{const{action:r,params:i}=R_(e);return function(t,e,n=[]){return{type:"actionbutton",action:t,params:e,children:n}}(r,i,[n])});function R_(t){const e=t.indexOf("?");return-1===e?{action:t,params:{}}:{action:t.slice(0,e),params:Object.fromEntries(new URLSearchParams(t.slice(e)))}}const y_=Cf(/(?:^|\n)(?:\s*[-*+]\s+[^\n]+(?:\n|$))+/g,([t])=>function(t=[]){return{type:"bulletlist",children:t}}([t.startsWith("\n")?t.slice(1):t])),I_=Cf(/^\s*[-*+]\s+([^\n]+)(?:\n|$)/gm,([t,e])=>({type:"bulletpoint",children:[e]})),C_=t=>{const e=/(?:^|[^-:/\w])([(+]?[0-9](?:[-_+ ().]?[0-9]){5,11}[0-9])(?:[^-:/\w]|$)/g,n=/^(\d{4})-(\d{4})$/,r=/^(\d{1,2})\.(\d{2})-(\d{1,2})\.(\d{2})$/;let i=0;const o=[];for(const s of rn(t,e)){const e=s[0],a=s[1],l=a.match(n);if(l&&Number(l[1])<Number(l[2]))continue;const c=a.match(r);if(c){const t=Number(c[1]),e=Number(c[2]),n=Number(c[3]),r=Number(c[4]);if(t<=23&&n<=23&&e<=59&&r<=59)continue}const d=e.startsWith(a)?s.index:s.index+1;d-i>0&&o.push(t.substring(i,d));const h=A_("tel:"+a.replace(/[^0-9+]/g,""),a);o.push(h),i=d+a.length}return i<t.length&&o.push(t.substring(i)),o},N_=t=>O_(t).flatMap(t=>"string"==typeof t?b_(t):["<",...b_(t.url),...b_("|"+t.children[0]+">")]),b_=t=>{const e=E_.parse(t,{urls:!0,email:!0,phone:!1,hashtag:!1,mention:!1}),n=[];let r=0;for(const i of e){const e=i.getOffset(),o=i.getMatchedText(),s=o.length;let a=o;i instanceof Rm?a="mailto:"+i.getEmail():i instanceof vm&&(a=i.getUrl()),e>r&&n.push(t.substring(r,e)),n.push(A_(a,o)),r=e+s}return r<t.length&&n.push(t.substring(r)),n},k_=["Codeblock","Codespan","FormattedLink","Wikitext","Autolink","Actions","Mention","Mention","BulletPoint","CustomEmoji"];function M_(t={except:[]}){var e;const n={multilineSteps:[],singlelineSteps:[]},r=null!==(e=t.except)&&void 0!==e?e:k_.filter(e=>!t.only.includes(e));return r.includes("BulletPoint")||n.multilineSteps.push(y_,I_),r.includes("Mention")||n.singlelineSteps.push(S_),r.includes("CustomEmoji")||n.singlelineSteps.push(v_),r.includes("Codespan")||n.multilineSteps.push(Cf(/```([^]+?)```/g,([t,e])=>function(t){return{type:"codespan",text:t}}(Nf(e)))),r.includes("FormattedLink")||n.singlelineSteps.push(O_),r.includes("Actions")||(n.singlelineSteps.push(D_),n.singlelineSteps.push(T_)),r.includes("Wikitext")||n.singlelineSteps.push(Mf),r.includes("Autolink")||n.singlelineSteps.push(N_,C_),n}const P_=function(t){const e=RegExp(`[^${t}]+${t}?|${t}`,"g");return t=>Array.from(t.match(e)||[])}("\n");function x_(t,e={except:[]}){let n=H_(t,M_(e));return n=j_(n,!1),n}function F_(t){return x_(t,{except:["FormattedLink","Actions"]})}function H_(t,e){let n=[t];return n=U_(n,e.multilineSteps),n=U_(n,[P_]),n=U_(n,e.singlelineSteps),n=B_(n),n}function U_(t,e){return e.reduce((t,e)=>If(t,e),t)}function B_(t){const e=[];let n=-1;for(const r of t)"string"==typeof r?"string"==typeof e[n]?e[n]+=r:e[++n]=r:e[++n]="children"in r?{...r,children:B_(r.children)}:r;return e}function j_(t,e){const n=[];let r=[];for(let i=0;i<t.length;i++){const o=t[i];if("string"==typeof o)r.push(o);else if("children"in o){r.length>0&&(n.push(r.join("")),r=[]);const t=j_(o.children,e||"link"===o.type||"actionbutton"===o.type||"actionlink"===o.type);n.push({...o,children:t})}else"autolink"===o.type&&e?r.push(o.text):(r.length>0&&(n.push(r.join("")),r=[]),n.push(o))}return r.length>0&&(n.push(r.join("")),r=[]),n}function V_(){let t,e=0;return n=>{const r=(r=Date.now())=>{if(window.clearTimeout(t),t=void 0,e=r,n.isDestroyed)return;const i=function(t){t=t.removeMark(0,t.doc.content.size,Np.marks.bold),t=t.removeMark(0,t.doc.content.size,Np.marks.italic),t=t.removeMark(0,t.doc.content.size,Np.marks.strikethrough),t.doc.firstChild;const e=function(t){const e=[];let n,r="";return t.descendants((t,i)=>{var o;t.isText?(r+=t.text,null!==(o=n)&&void 0!==o||(n=i)):r&&void 0!==n&&(e.push({text:r,pos:n}),r="",n=void 0);return t.type!==Np.nodes.mention}),r&&void 0!==n&&e.push({text:r,pos:n}),e}(t.doc);for(const{text:n,pos:r}of e){const e=x_(n,{only:["Wikitext"]});[t]=z_(t,r,e)}return t}(n.state.tr);n.dispatch(i)},i=Date.now();i-e<300?t||(t=window.setTimeout(r,300)):r(i)}}function z_(t,e,n,r=0,i=[]){for(const o of n)if("string"==typeof o){for(const n of i)t.addMark(e+r,e+r+o.length,n.create());r+=o.length}else if("bold"===o.type||"italic"===o.type||"strikethrough"===o.type){r+=1;const n=Np.marks[o.type],s=[...i,n];[t,r]=z_(t,e,o.children,r,s),r+=1}else En.unreachable();return[t,r]}function $_(t){return(e,n)=>{if(!n)return!0;let r=e.tr;const i=Fc.between(e.selection.$from,e.selection.$to);return r=r.replaceRangeWith(i.from,i.from,Np.text(t,r.storedMarks)),r=r.replaceRangeWith(i.to+1,i.to+1,Np.text(t,r.storedMarks)),r=r.setSelection(Fc.near(r.doc.resolve(i.to+1))),n(r),!0}}function Y_(t,e,n){const r=e.clipboardData;if(!r)return!1;const i=function(t){const e=t.items||[],n={"image/gif":"gif","image/png":"png","image/jpeg":"jpg","image/svg+xml":"svg"},r=Array.from(e).filter(t=>"file"===t.kind&&n[t.type]);if(0===r.length||t.types.includes("text/rtf"))return;const i=r[0];let o=i.getAsFile();if(!o.name){const t="image."+n[i.type];o=new File([o],t,{type:i.type,lastModified:Date.now()})}return o}(r);return i?n(i):function(t,e){const n=t.state.tr.insertText(e).scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste");t.dispatch(n)}(t,r.getData("text/plain")),!0}function G_(t){const{matcher:e,suggestionClass:n="ProseMirror-suggestion",onEnter:r=()=>!1,onChange:i=()=>!1,onExit:o=()=>!1,onKeyDown:s=()=>!1,debug:a=!1}=t;return new Zc({key:new eu("suggestions"),view(){return{update:(t,e)=>{const n=this.key.getState(e),s=this.key.getState(t.state);if(!n||!s)return;const a=n.active&&s.active&&n.range.from!==s.range.from,l=!n.active&&s.active,c=n.active&&!s.active,d=!l&&!c&&n.text!==s.text;(c||a)&&o({view:t,range:n.range,text:n.text}),d&&!a&&i({view:t,range:s.range,text:s.text}),(l||a)&&r({view:t,range:s.range,text:s.text})}}},state:{init:()=>({active:!1,range:{from:0,to:0},text:null}),apply(t,n){const{selection:r}=t,i={...n};if(r.from===r.to){(r.from<n.range.from||r.from>n.range.to)&&(i.active=!1);const t=r.$from,o=e(t);o?(i.active=!0,i.range=o.range,i.text=o.text):i.active=!1}else i.active=!1;return i.active||(i.range={from:0,to:0},i.text=null),i}},props:{handleKeyDown(t,e){var n;const r=this.getState(t.state);return!(null==r||!r.active||null===(n=s({view:t,event:e}))||void 0===n)&&n},decorations(t){const e=this.getState(t);return null!=e&&e.active?Zh.create(t.doc,[Kh.inline(e.range.from,e.range.to,{nodeName:"span",class:n,style:a?"background: rgba(0, 0, 255, 0.05); color: blue; border: 2px solid blue;":void 0})]):null}}})}const W_=(t,e)=>n=>{var r;const i=null===(r=n.nodeBefore)||void 0===r?void 0:r.text;if(!i)return;const o=i.match(t);if(!o)return;const s=o[2],a=n.pos-s.length,l=n.pos;return n.doc.rangeHasMark(a,l,e.marks.literal)?void 0:{range:{from:a,to:l},text:s}},X_=/(^|\s)(:[^:\s]+:?)$/,K_=/(^|\s)(@[^@]*)$/;var q_;function J_({placeholder:t,disabled:e,className:n="",characterLimit:r,spellcheck:i}){const o=Sn(),s=ft(),a=ft(null);return ht(()=>(s.current=function(t,e,n,r,i){const o=qc.create({schema:Np,plugins:[...i.filter(eA),sf(),Vp({...Rf,"Mod-z":lf,"Mod-y":cf,"Mod-Shift-z":cf,"Mod-b":$_("*"),"Mod-i":$_("_"),"Mod-Enter":Rf.Enter,"Shift-Enter":Rf.Enter,Enter:n}),Vp({Enter:Rf.Enter}),wp]}),s=V_(),a=new Dp(t,{handlePaste:(t,e,n)=>Y_(t,e,r),clipboardTextSerializer(t){const e=[];return t.content.forEach(t=>{t&&e.push(Nf(t.textContent))}),e.join()},state:o,dispatchTransaction(t){t=(t=t.removeStoredMark(Np.marks.literal)).removeStoredMark(Np.marks.emoji);const n=a.state.apply(t);a.state.doc.eq(n.doc)||e(new tA(n.doc)),a.updateState(n),t.steps.some(t=>t instanceof ac)&&s(a)}});return a}(a.current,t=>o.onChange(t),()=>!!o.onEnter&&(o.onEnter(),!0),t=>o.onPasteImage(t),[o.emojiSuggesterPlugin(),o.mentionsPlugin()]),o.setEditorView(s.current),()=>{var t;o.setEditorView(void 0),null===(t=s.current)||void 0===t||t.destroy()}),[o]),ht(()=>{var t;null===(t=s.current)||void 0===t||t.setProps({editable:()=>!e})},[e]),ht(()=>Hi(()=>{var t,e,n;return null===(t=s.current)||void 0===t?void 0:t.setProps({attributes:{spellcheck:String(null!==(e=null!==(n=o.spellcheck$.get())&&void 0!==n?n:i)&&void 0!==e&&e),class:"t-text-input","aria-label":"Message Field",role:"textbox"}})}),[o,i]),ht(()=>Hi(()=>{var e;const n=s.current;null==n||n.dispatch(n.state.tr.setMeta(wp,null!==(e=o.placeholder$.get())&&void 0!==e?e:t))}),[o,t]),ht(()=>{r&&Number.isInteger(r)&&o.setMaxLength(r)},[r,o]),Gs("div",{className:`t-editor ${n}`,ref:a})}function Z_(t){if(t.startsWith(":"))throw new Error("Not implemented");{const e=Np.marks.emoji.create({emoji:t});return Np.text(t,[e])}}function Q_(t,e){const n=encodeURIComponent(t);return Np.nodes.mention.create({id:t,name:e},Np.text(`<!!mention:${n}|${e}>`))}Xe();var tA=class{constructor(t){this.doc=t,this.size=this.doc.content.size,this.hasContent=kp(this.doc)}hasNonWhitespaceContent(){return this.hasContent&&function(t){let e=!1;return t.descendants(t=>!(t.isText&&t.text&&/\S/.test(t.text))||(e=!0,!1)),e}(this.doc)}asText(){return this.doc.textContent.replace(/\xa0/g," ")}};function eA(t){return null!=t}(q_=tA).EMPTY=new q_(Np.topNodeType.create());const rA=/^\/.*[^\\]\/[im]*$/;function iA(t){return!!rA.test(t)&&!oA(t).test("")}function oA(t){const e=t.match(/^\/(.*[^\\])\/(.*)$/);if(!e)throw new Error(`Expected ${t} to be a (non-empty) regex`);let n=e[2]||"";return n=n.replace(/[^im]/g,"")+"g",new RegExp(e[1],n)}function sA(t){const e=t.replace(/\./g,"\\.").replace(/\*/g,".*");return new RegExp("^"+e+"$","i")}function aA(t,e){const n=sn(e),r=sA(t);return void 0!==n&&r.test(n)}const lA=/^[]/g;function cA(t){return t.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}function uA(t,e){t()||e||(e=t.toString().replace(/^function\s*\(\)\s*\{\s*return\s*(.*);\s*\}\s*$/,"`$1`")+" was not true")}!function(t){function e(t){}function n(t,e){(function(t,e){switch(e){case"undefined":return void 0===t;case String:return"string"==typeof t||t instanceof String;case Boolean:return"boolean"==typeof t||t instanceof Boolean;case Number:return"number"==typeof t||t instanceof Number;default:return t instanceof e}})(t,e)||(e.name,String(t))}t.defined=e,t.has=function(t,e){t[e]},t.is=n,t.equals=function(t,e){t!==e&&(String(e),String(t))},t.oneOf=function(t,e){e.includes(t)||JSON.stringify(e)},t.isArray=function(t,e){n(t,Array),t&&t.length>0&&n(t[0],e)},t.optional=function(t,e){void 0!==t&&n(t,e)},t.falsy=function(t){t&&String(t)},t.never=function(t){}}(uA||(uA={}));var dA=uA;const hA=new RegExp(":arslan:|"+/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g.source,"g"),pA=/\uFE0F/g;function fA(t){return":arslan:"===t?"https://cdn.talkjs.com/__assets/5461191341cea882b3f227c085d5772c.gif":function(t){return`https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/svg/${t}.svg`}(function(t){return function(t){const e=[];let n=0,r=0,i=0;for(;i<t.length;)n=t.charCodeAt(i++),r?(e.push((65536+(r-55296<<10)+(n-56320)).toString(16)),r=0):55296<=n&&n<=56319?r=n:e.push(n.toString(16));return e.join("-")}(t.indexOf("")<0?t.replace(pA,""):t)}(t))}const mA=()=>{const t=document.createElement("canvas");t.width=t.height=1;const e=t.getContext("2d");return e.textBaseline="top",e.font='100px "Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Twemoji Mozilla","Noto Color Emoji","EmojiOne Color","Android Emoji",sans-serif',e.scale(.01,.01),e},EA=(t,e)=>{const n=mA();return n.fillStyle=e,n.fillText(t,0,0),n.getImageData(0,0,1,1).data};function _A(t){const e=EA(t,"#000"),n=EA(t,"#fff"),r=(t=>!t.includes("")||mA().measureText(t).width<160)(t);return e&&n&&r&&((t,e)=>{const n=[...t].join(",");return n===[...e].join(",")&&!n.startsWith("0,0,0,")})(e,n)}function AA(t){try{return _A(t)}catch(t){return!0}}var gA=class{constructor({mode:t,allowedHostnames:e,allowedPhoneNrs:n,allowedMatches:r,forbiddenMatches:i,forbiddenWords:o,suppressLinks:s,suppressEmailAddresses:a,suppressPhoneNumbers:l,replacement:c}){if(dA.oneOf(t,["all","otherOnly","off"]),this.mode=t,this.suppressLinks=!1!==s,this.suppressEmailAddresses=!1!==a,this.suppressPhoneNumbers=!1!==l,this.allowedHostnames=e||[],this.allowedPhoneNrs=(n||[]).filter(t=>t).map(t=>t.replace(/[^0-9]/g,"")),this.allowedMatches=(r||[]).filter(iA).map(t=>oA(t)),this.forbiddenMatches=(i||[]).filter(iA).map(t=>oA(t)),o){const t=o.split("\n").map(t=>t.trim().toLowerCase()).filter(t=>t.length>0&&!t.startsWith("#")).map(t=>cA(t));t.length&&this.forbiddenMatches.push(new RegExp(`\\b(${t.join("|")})\\b`,"gi"))}dA(()=>this.allowedMatches.every(t=>t.flags.includes("g")),"All regexes in `suppressContactInfo.allowedMatches` must be global. Check `allowedMatches`!"),dA(()=>this.forbiddenMatches.every(t=>t.flags.includes("g")),"All regexes in `suppressContactInfo.forbiddenMatches` must be global. Check `forbiddenMatches`!"),c=null==c?void 0:c.trim(),this.replacement=c&&c.length>0?c:void 0}shouldSuppress({isContentBySender:t}){return"all"===this.mode||"otherOnly"===this.mode&&!t}};function SA(t){var e,n,r,i,o,s,a,l,c,d,h,p,f,m;let E="";return t.t&&(E=`(${t.t("CONTACT_INFORMATION_HIDDEN")})`),{formattedLinks:null!==(e=t.formattedLinks)&&void 0!==e?e:"plaintext",markup:null!==(n=t.markup)&&void 0!==n&&n,useFallbackMentions:null!==(r=t.useFallbackMentions)&&void 0!==r&&r,sameTabLinkRules:null!==(i=t.sameTabLinkRules)&&void 0!==i?i:[],enableEmojiImageFallback:null!==(o=t.enableEmojiImageFallback)&&void 0!==o&&o,highlight:null!==(s=t.highlight)&&void 0!==s?s:[],highlightFromWordBeginnings:null!==(a=t.highlightFromWordBeginnings)&&void 0!==a&&a,contactInfo:null!==(l=t.contactInfo)&&void 0!==l&&l,suppression:null!==(c=t.suppression)&&void 0!==c?c:new gA({mode:"off"}),contactInfoHiddenText:null!==(d=null!==(h=t.contactInfoHiddenText)&&void 0!==h?h:null===(p=t.suppression)||void 0===p?void 0:p.replacement)&&void 0!==d?d:E,customEmojiUrls:null!==(f=t.customEmojiUrls)&&void 0!==f?f:{},enableActions:null===(m=t.enableActions)||void 0===m||m}}function vA({id:t,text:e}){var n;const r=Cn(),i=yo(()=>{var e;if("ConversationListStore"===r.type)return;const n=r.state$.currentConversationId.get(),i=n&&r.state$.participants.child(n).get();return null==i||null===(e=i.find(e=>e.user.id===t))||void 0===e?void 0:e.user});return Gs("span",{className:"t-mention","t-is-current-user":yo(r.extUserId$)===t?"":void 0,children:`@${null!==(n=null==i?void 0:i.name)&&void 0!==n?n:e}`})}function OA({message:t,type:e,action:n,params:r,children:i}){const o=bn(),s={"t-action":n,onClick:_t(e=>{e.preventDefault(),o.triggerMessageAction(t,n,r)},[o,t,n,r])};return"actionButton"===e?Gs("button",{...s,type:"button",children:i}):Gs("a",{...s,href:"#",children:i})}function DA(t,e={},n){return TA(t,{...SA(e),message:n})}function TA(t,e){const n=t.flatMap(t=>{if("string"==typeof t)return yA(t,e.highlight,e.highlightFromWordBeginnings);switch(t.type){case"bold":case"italic":case"strikethrough":case"blockquote":case"bulletpoint":case"bulletPoint":return CA(t,e);case"bulletlist":case"bulletList":return[g("ul",null,...TA(t.children,e))];case"autolink":case"autoLink":case"link":return bA(t,e);case"codeblock":case"codeBlock":return[Gs("code",{"data-language":t.language,children:yA(t.text,e.highlight,e.highlightFromWordBeginnings)})];case"codespan":case"codeSpan":return Gs("code",{children:yA(an(t.text),e.highlight,e.highlightFromWordBeginnings)});case"mention":return dA.falsy(e.useFallbackMentions),Gs(vA,{id:t.id,text:t.text},t.id);case"suppressed":return[Gs("i",{children:e.contactInfoHiddenText})];case"emoji":return e.enableEmojiImageFallback?[Gs(NA,{unicode:t.text})]:[t.text];case"actionlink":case"actionLink":case"actionbutton":case"actionButton":return wA(t,e);case"customemoji":case"customEmoji":return t.text;default:dA.never(t)}});return n.every(t=>"string"==typeof t)?[n.join("")]:n}function RA(t){return t.normalize("NFKC").normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase()}function yA(t,e,n=!1){if(!t||!e.length)return[t];const r=RA(t),i=t.toLowerCase()!==r,o=function(t){const e=t.map(t=>t.trim()).filter(t=>t).sort((t,e)=>e.length-t.length);if(0===e.length)return lA;const n=e.map(cA).join("|");return new RegExp(n,"gi")}(e.map(t=>RA(t).trim()).filter(t=>t.length));return on(t,rn(r,n?new RegExp(`(?<=^|\\s)(${o.source})`,o.flags):o).map(t=>({offset:t.index,matchedText:t[0],index:t.index})),({index:e,matchedText:n})=>[Gs("mark",{className:"t-highlighted-text",children:i?IA(t,e,n.length):t.slice(e,e+n.length)})])}function IA(t,e,n){let r=0,i=0;for(;i<e&&r<t.length;){i+=RA(t[r]).length,r+=1}let o=r;for(;i<e+n&&o<t.length;){i+=RA(t[o]).length,o+=1}return t.substring(r,o)}Xe(),Xe();const CA=(t,e)=>[g({bold:"strong",italic:"em",strikethrough:"del",blockquote:"blockquote",bulletpoint:"li",bulletPoint:"li"}[t.type],null,...TA(t.children,e))];function NA({unicode:t}){const[e,n]=ut(()=>":arslan:"!==t);return ht(()=>{e&&!AA(t)&&n(!1)},[]),e?Gs("span",{className:"t-emoji",children:t}):Gs("img",{className:"t-emoji",src:fA(t),alt:t})}const bA=(t,e)=>{const n="children"in t?t.children:[t.text];switch(e.formattedLinks){case"link":return[g("a",{target:kA(e.sameTabLinkRules,t.url),href:t.url,rel:"noreferrer"},...TA(n,e))];case"plaintext":return"children"in t&&t.children.every(t=>"string"==typeof t)?[t.children.join("")]:[g(O,null,...TA(n,e))];default:dA.never(e.formattedLinks)}},wA=(t,e)=>e.enableActions?[g(OA,{type:"actionlink"===t.type?"actionLink":"actionbutton"===t.type?"actionButton":t.type,action:t.action,params:t.params,message:e.message},...TA(t.children,e))]:"children"in t&&t.children.every(t=>"string"==typeof t)?[t.children.join("")]:[g(O,null,...TA(t.children,e))];function kA(t,e){for(const n of t)if(rA.test(n)){if(oA(n).test(e))return"_top"}else if(aA(n,e))return"_top";return"_blank"}function LA(t,e){return MA(t,SA(e))}function MA(t,e){return t.flatMap(t=>{if("string"==typeof t){let n=[t];return n=PA(n,t=>function(t,e){if("suppress"!==e.contactInfo)return[t];const{suppression:{forbiddenMatches:n,allowedMatches:r}}=e;return on(t,yf(n,e=>rn(t,e)).filter(([t])=>!r.some(e=>null!==t.match(e))).map(t=>({offset:t.index,matchedText:t[0]})),()=>[{type:"suppressed",text:"CONTACT_INFORMATION_HIDDEN"}])}(t,e)),n=PA(n,t=>function(t){return on(t,function(t){const e=[];let n;for(;n=hA.exec(t);){const t=n[0],r=n.index;e.push({offset:r,matchedText:t})}return e}(t),t=>[{type:"emoji",text:t.matchedText}])}(t)),n=PA(n,t=>function(t,e){if("suppress"!==e.contactInfo)return[t];const n=[];return(e.suppression.suppressEmailAddresses||e.suppression.suppressLinks)&&n.push(N_),e.suppression.suppressPhoneNumbers&&n.push(C_),0===n.length?[t]:B_(H_(t,{multilineSteps:[],singlelineSteps:n}).map(t=>"string"==typeof t?t:xA(t.url,e.suppression)?t.text:{type:"suppressed",text:"CONTACT_INFORMATION_HIDDEN"}))}(t,e)),n}switch(t.type){case"bold":case"italic":case"strikethrough":case"blockquote":case"bulletlist":case"bulletList":case"bulletpoint":case"bulletPoint":return{type:t.type,children:MA(t.children,e)};case"codespan":case"codeSpan":case"codeblock":case"codeBlock":case"suppressed":case"emoji":case"customemoji":case"customEmoji":return t;case"mention":return{type:"mention",id:t.id,text:t.text};case"autolink":case"autoLink":return function(t,e){return"link"===e.contactInfo?t:"suppress"===e.contactInfo?xA(t.url,e.suppression)?t:{type:"suppressed",text:"CONTACT_INFORMATION_HIDDEN"}:t.text}(t,e);case"link":return{type:"link",url:t.url,children:MA(t.children,e)};case"actionlink":case"actionLink":case"actionbutton":case"actionButton":return{type:t.type,action:t.action,params:t.params,children:MA(t.children,e)}}})}function PA(t,e){return yf(t,t=>"string"==typeof t?e(t):[t])}function xA(t,e){if(e.allowedMatches.some(e=>null!==t.match(e)))return!0;if(e.forbiddenMatches.some(e=>null!==t.match(e)))return!1;if(t.startsWith("mailto:")){const n=t.substring(7).replace(/^.*@/,"");return!e.suppressEmailAddresses||FA(e.allowedHostnames,n)}if(t.startsWith("tel:")){const n=t.substring(4).replace(/[^0-9]/g,"");return!e.suppressPhoneNumbers||e.allowedPhoneNrs.some(t=>n.endsWith(t))}{const n=sn(t);return!e.suppressLinks||!n||FA(e.allowedHostnames,n)}}function FA(t,e){for(const n of t)if(sA(n).test(e))return!0;return!1}function HA({block:t,nonInteractive:e,message:n,className:r=""}){const i=Cn(),o=!e,s=yo(i.highlightedStrings$),a="ConversationListStore"===i.type,{nodes:l,roleOptions:c}=function(t,e){var n;const r=Cn(),i=yo(r.app$.role);En.defined(i);const o="UserMessage"===e.type,s=(null===(n=e.sender)||void 0===n?void 0:n.id)===r.extUserId$.peek(),a=i.suppressContactInfo,l=o&&a.shouldSuppress({isContentBySender:s});return{nodes:LA(t.children,{contactInfo:l?"suppress":"link",suppression:a}),roleOptions:{sameTabLinkRules:i.sameTabLinkRules,contactInfoHiddenText:i.suppressContactInfo.replacement||`(${r.t$.peek().CONTACT_INFORMATION_HIDDEN})`}}}(t,n),d=DA(l,{enableEmojiImageFallback:!0,formattedLinks:o?"link":"plaintext",enableActions:o,highlight:s,highlightFromWordBeginnings:a,...c},n),h=function(t){return t.every(t=>"object"==typeof t&&"emoji"===t.type)?`t-emoji-only t-emoji-count-${t.length}`:""}(l);return g("span",{className:`t-text ${r} ${h}`},...d)}function UA({text:t,className:e=""}){const n=Cn();return g("span",{className:`t-highlightable ${e}`},...DA([t],{enableEmojiImageFallback:!0,formattedLinks:"plaintext",enableActions:!1,highlight:yo(n.highlightedStrings$),highlightFromWordBeginnings:"ConversationListStore"===n.type},null))}function BA(t){const e=An(),n=Cn(),{className:r="",...i}=t,o=yo(()=>n.state$.messages.child(t.common.conversation.id).lookup.child(t.message.id).content.child(0).url.get());return Gs("div",{className:`t-message-content ${r}`,children:t.message.content.map(n=>{var r;return Gs(jA,{block:n,theme:e,downloadUrl:o,...i},t.message.createdAt+(null!==(r=t.message.editedAt)&&void 0!==r?r:0))})})}function jA({common:t,block:e,message:n,theme:r,downloadUrl:i}){return Gs(function(t,e){switch(e.type){case"text":return t.TextBlock;case"location":return t.LocationBlock;case"file":switch(e.subtype){case"image":return t.ImageBlock;case"video":return t.VideoBlock;case"voice":return t.VoiceBlock;case"audio":return t.AudioBlock;default:return t.FileBlock}default:En.never(e)}}(r,e),{block:e,common:t,message:n,downloadUrl:i})}Xe(),Xe();const VA=27;function zA(t,e,n=!0){const r=_t(e=>{e.keyCode===VA&&t()},[t]),i=_t(n=>{null===n.target.closest(e)&&t(n)},[e,t]);ht(()=>{if(n)return window.addEventListener("keydown",r,!0),document.addEventListener("mousedown",i,!0),()=>{window.removeEventListener("keydown",r,!0),document.removeEventListener("mousedown",i,!0)}},[r,i,n])}function $A(){return Gs(Na,{type:"spinner","aria-label":yo(Cn().t$).LOADING,className:"t-loading-icon"})}var YA=class nA{constructor(t={}){this._handlers=new Set,this._meta=t}meta(t){return new nA(t)}_emit(t,e){for(const n of this._handlers)n({level:t,data:e,timestamp:Date.now(),meta:this._meta})}error(...t){return this._emit("error",t)}warn(...t){return this._emit("warn",t)}info(...t){return this._emit("info",t)}log(...t){return this._emit("log",t)}trace(...t){return this._emit("trace",t)}registerHandler(t){return this._handlers.add(t),()=>this._handlers.delete(t)}};const GA=new YA,WA=new YA,XA={code:"en-US",name:"English (US)",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/en.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/en/emojibase/data.json",translation:{YESTERDAY:"Yesterday",TODAY:"Today",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"just now",LOCATION:"Location",CANCEL:"Cancel",INBOX:"Inbox",DESKTOP_NOTIFICATIONS:"Browser notifications",DESKTOP_NOTIFICATIONS_ERROR:"Can't enable browser notifications because your browser actively blocks them. Try looking in the settings or using a different browser.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} demo notification`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"If you keep your browser tab open, you'll see this pop up when someone talks to you.",SEND_BUTTON_TEXT:"Send",ENTRYBOX_TEXT_LIMIT:"Only 10,000 characters are allowed.",ENTRYBOX_PLACEHOLDER:"Say something...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"This conversation is no longer active.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"You can read, but not send messages.",MESSAGELIST_LOADING_OLDER:"Loading older messages...",MESSAGELIST_SHOW_OLDER:"Show older messages",MESSAGELIST_NEW_MARKER:"New",MESSAGE_SENT_VIA_EMAIL:"This message was sent via email",YOU_MARKER:"you",UPLOAD_IN_PROGRESS:"Uploading...",UPLOAD_SEND_FILE:"Send file",UPLOAD_SHARE_LOCATION:"Share location",UPLOAD_ERROR:"Unfortunately, something went wrong uploading. The file might be unsupported or too large.",SHARE_LOCATION_ERROR:"Cannot share location: ",LOADING:"Loading...",HUB_EMPTY:"Your chat history will show up here",HUB_SHOW_EARLIER:"Show earlier chats",INBOX_NO_CHATS_TITLE:"No chats yet!",INBOX_NO_CHATS_BODY:"Once you've had one or more conversations, they will show up here.",ENABLE_TRANSLATION:"Translate this conversation to English",DISABLE_TRANSLATION:"Show original",SEARCH_PLACEHOLDER_TEXT:"Search...",SEARCH_SEARCHING:"Searching...",SEARCH_NO_RESULTS:"No results found",SEARCH_NO_MORE_RESULTS:"No more results",SEARCH_RESULTS_CONVERSATIONS:"Conversations",SEARCH_RESULTS_MESSAGES:"Messages",SEARCH_RESULTS_SHOW_MORE:"Show more",CHAT_NOT_FOUND:"Conversation not found",DELETE_MESSAGE:"Delete message",DELETION_EXPLANATION:"If you delete this message, it will disappear for everybody.",EDIT_MESSAGE:"Edit message",SAVE:"Save",EDITED_INDICATOR:"edited",REPLY_TO_MESSAGE:"Reply",ADD_REACTION:"Add reaction",AUTH_EXPIRED_OVERLAY_TITLE:"Your chat session has expired",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Refresh the page to continue",VOICE_MESSAGE:"Voice message",LEAVE_CONVERSATION:"Leave conversation",MARK_CONVERSATION_AS_UNREAD:"Mark as unread",STATUS_INDICATOR_ONLINE:"Online",STATUS_INDICATOR_OFFLINE:"Offline",CONTACT_INFORMATION_HIDDEN:"hidden information",ARIA_LEAVE_SEARCH_MODE:"Leave search mode",ARIA_SEARCH_UP:"Search up",ARIA_SEARCH_DOWN:"Search down",ARIA_CLOSE_CHAT_POPUP:"Close the chat popup",ARIA_SEARCH_INSIDE_CONVERSATION:"Search inside this conversation",ARIA_SEARCH:"Search",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"set playback speed",ARIA_CANCEL_UPLOAD:"Cancel upload",ARIA_STOP_RECORDING:"Stop recording",ARIA_CANCEL_RECORDING:"Cancel recording",ARIA_INSERT_EMOJI:"Insert an emoji",ARIA_PLAY_AUDIO:"play audio",ARIA_PAUSE_AUDIO:"pause audio",ARIA_REACTION_COUNT:(t,e)=>`${t} reactions with ${e}`,ARIA_MORE_ACTIONS:"More actions",ARIA_REPLYING_TO:(t,e)=>`Replying to ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Exit reply mode",SELECT_CONVERSATION:"Select a conversation"}},KA="https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/+esm",qA="https://cdn.jsdelivr.net/npm/opus-media-recorder@0.8.0/WebMOpusEncoder.wasm";async function JA(t,e){if("undefined"==typeof window||void 0===window.document)return new Promise(()=>{});try{const n=null!=t?t:XA.emojiPickerTranslationUrl,r=KA,[i,o]=await Promise.all([ZA(r),ZA(n)]),s=null!=e?e:XA.emojiDataUrl,a={...i,i18n:o.default,dataSource:s};return await new a.Database({dataSource:s}).ready(),a}catch(t){return GA.error("Failed to load emoji picker:",t),new Promise(()=>{})}}async function ZA(t){return import(
|
|
3
3
|
/* webpackIgnore: true */
|
|
4
4
|
/* @vite-ignore */
|
|
5
|
-
t).catch(()=>new Function("url","return import(url)")(t)).catch(()=>{throw new Error("Cannot dynamically import module in this environment")})}function QA(){const t=Cn(),[e,n]=ut();return zo(()=>{const e=t.translationData$.get();t.app$.get()&&t.currentUser$.get()&&e&&function(t,e){const n=JSON.stringify([t,e]);if(n in eg)return eg[n];const r=JA(t,e);return eg[n]=r,r}(e.emojiPickerTranslationUrl,e.emojiDataUrl).then(t=>n({value:t}))},[]),e}Xe();const eg={};function rg(t){const{onClose:e,onEmojiSelected:n}=Fn(),r=ft(null),i=Cn(),o=yo(i.t$),s=QA();return ht(()=>{if(!s)return;En.defined(r.current);const t=r.current,e=t.shadowRoot;!function(t,e){const n=document.createElement("style");n.textContent=e,t.appendChild(n)}(e,".search-row{margin-right:var(--emoji-padding)}.emoji-menu{grid-template-columns:repeat(auto-fill,var(--total-emoji-size));padding:var(--emoji-padding)}.emoji,button.emoji{border-radius:8px}.favorites{border-top-width:1px}input.search:focus{border-color:var(--input-focused-border-color);outline:0}.picker{container-type:size}@container (height < 300px){.favorites{display:none}}#skintone-button{margin:0 -3px 0 4px}.custom-emoji{padding:0}#emo-🏻,#emo-🏼,#emo-🏽,#emo-🏾,#emo-🏿{display:none}[data-has-mouse] .emoji:hover{background-color:var(--button-hover-background)}");const i=t=>{var e;const r=null!==(e=t.detail.unicode)&&void 0!==e?e:t.detail.name;n(r)};function o(t){"mouse"===t.pointerType&&(e.querySelector("section").dataset.hasMouse="true")}return t.addEventListener("emoji-click",i),t.addEventListener("pointermove",o,{once:!0}),t.i18n=s.value.i18n,()=>{t.removeEventListener("emoji-click",i),t.removeEventListener("pointermove",o)}},[s,n]),ht(()=>{var t;s&&r.current&&!i.device$.isMobile.peek()&&(null===(t=r.current.shadowRoot.getElementById("search"))||void 0===t||t.focus())},[s,i]),zA(()=>e(),".t-emoji-picker"),Gs("div",s?{className:"t-emoji-picker",children:Gs("emoji-picker",{locale:o.locale,ref:r,class:t.colorScheme,"data-source":s.value.dataSource})}:{className:"t-emoji-picker","t-loading":"",children:Gs($A,{})})}function ig({messageId:t,colorScheme:e}){const{closePopover:n}=Un(),r=bn();return Gs("div",{className:"t-reaction-picker",children:Gs(xn.Provider,{value:{onClose:n,onEmojiSelected:e=>{r.addReaction(t,e),n()}},children:Gs(rg,{colorScheme:e})})})}function og(){return og=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},og.apply(null,arguments)}function sg(t,e){if(null==t)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(-1!==e.indexOf(r))continue;n[r]=t[r]}return n}function ag(t,e){return(ag=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function lg(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,ag(t,e)}Xe();var cg=l((t,e)=>{e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}),ug=l((t,e)=>{var n=cg();function r(){}function i(){}i.resetWarningCache=r,e.exports=function(){function t(t,e,r,i,o,s){if(s!==n){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function e(){return t}t.isRequired=t;var o={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:i,resetWarningCache:r};return o.PropTypes=o,o}}),hg=l((t,e)=>{e.exports=ug()()});function pg(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}var fg=!1;Xe();var mg=We.createContext(null);hg();Xe();var Eg="unmounted",_g="exited",Ag="entering",gg="entered",Sg="exiting",vg=function(t){function e(e,n){var r,i=t.call(this,e,n)||this,o=n&&!n.isMounting?e.enter:e.appear;return i.appearStatus=null,e.in?o?(r=_g,i.appearStatus=Ag):r=gg:r=e.unmountOnExit||e.mountOnEnter?Eg:_g,i.state={status:r},i.nextCallback=null,i}lg(e,t),e.getDerivedStateFromProps=function(t,e){return t.in&&"unmounted"===e.status?{status:_g}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(t){var e=null;if(t!==this.props){var n=this.state.status;this.props.in?"entering"!==n&&"entered"!==n&&(e=Ag):("entering"===n||"entered"===n)&&(e=Sg)}this.updateStatus(!1,e)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var t,e,n=this.props.timeout,r=t=e=n;return null!=n&&"number"!=typeof n&&(r=n.exit,t=n.enter,e=void 0!==n.appear?n.appear:t),{exit:r,enter:t,appear:e}},n.updateStatus=function(t,e){void 0===t&&(t=!1),null!==e?(this.cancelNextCallback(),"entering"===e?this.performEnter(t):this.performExit()):this.props.unmountOnExit&&"exited"===this.state.status&&this.setState({status:Eg})},n.performEnter=function(t){var e=this,n=this.props.enter,r=this.context?this.context.isMounting:t,i=this.props.nodeRef?[r]:[We.findDOMNode(this),r],o=i[0],s=i[1],a=this.getTimeouts(),l=r?a.appear:a.enter;!t&&!n||fg?this.safeSetState({status:gg},function(){e.props.onEntered(o)}):(this.props.onEnter(o,s),this.safeSetState({status:Ag},function(){e.props.onEntering(o,s),e.onTransitionEnd(l,function(){e.safeSetState({status:gg},function(){e.props.onEntered(o,s)})})}))},n.performExit=function(){var t=this,e=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:We.findDOMNode(this);e&&!fg?(this.props.onExit(r),this.safeSetState({status:Sg},function(){t.props.onExiting(r),t.onTransitionEnd(n.exit,function(){t.safeSetState({status:_g},function(){t.props.onExited(r)})})})):this.safeSetState({status:_g},function(){t.props.onExited(r)})},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(t,e){e=this.setNextCallback(e),this.setState(t,e)},n.setNextCallback=function(t){var e=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,e.nextCallback=null,t(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(t,e){this.setNextCallback(e);var n=this.props.nodeRef?this.props.nodeRef.current:We.findDOMNode(this),r=null==t&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],o=i[0],s=i[1];this.props.addEndListener(o,s)}null!=t&&setTimeout(this.nextCallback,t)}else setTimeout(this.nextCallback,0)},n.render=function(){var t=this.state.status;if("unmounted"===t)return null;var e=this.props,n=e.children;e.in,e.mountOnEnter,e.unmountOnExit,e.appear,e.enter,e.exit,e.timeout,e.addEndListener,e.onEnter,e.onEntering,e.onEntered,e.onExit,e.onExiting,e.onExited,e.nodeRef;var r=sg(e,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return We.createElement(mg.Provider,{value:null},"function"==typeof n?n(t,r):We.cloneElement(We.Children.only(n),r))},e}(We.Component);function Og(){}vg.contextType=mg,vg.propTypes={},vg.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Og,onEntering:Og,onEntered:Og,onExit:Og,onExiting:Og,onExited:Og},vg.UNMOUNTED=Eg,vg.EXITED=_g,vg.ENTERING=Ag,vg.ENTERED=gg,vg.EXITING=Sg,Xe();var Dg=function(t,e){return t&&e&&e.split(" ").forEach(function(e){return function(t,e){t.classList?t.classList.remove(e):"string"==typeof t.className?t.className=pg(t.className,e):t.setAttribute("class",pg(t.className&&t.className.baseVal||"",e))}(t,e)})},Tg=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).appliedClasses={appear:{},enter:{},exit:{}},e.onEnter=function(t,n){var r=e.resolveArguments(t,n),i=r[0],o=r[1];e.removeClasses(i,"exit"),e.addClass(i,o?"appear":"enter","base"),e.props.onEnter&&e.props.onEnter(t,n)},e.onEntering=function(t,n){var r=e.resolveArguments(t,n),i=r[0],o=r[1]?"appear":"enter";e.addClass(i,o,"active"),e.props.onEntering&&e.props.onEntering(t,n)},e.onEntered=function(t,n){var r=e.resolveArguments(t,n),i=r[0],o=r[1]?"appear":"enter";e.removeClasses(i,o),e.addClass(i,o,"done"),e.props.onEntered&&e.props.onEntered(t,n)},e.onExit=function(t){var n=e.resolveArguments(t)[0];e.removeClasses(n,"appear"),e.removeClasses(n,"enter"),e.addClass(n,"exit","base"),e.props.onExit&&e.props.onExit(t)},e.onExiting=function(t){var n=e.resolveArguments(t)[0];e.addClass(n,"exit","active"),e.props.onExiting&&e.props.onExiting(t)},e.onExited=function(t){var n=e.resolveArguments(t)[0];e.removeClasses(n,"exit"),e.addClass(n,"exit","done"),e.props.onExited&&e.props.onExited(t)},e.resolveArguments=function(t,n){return e.props.nodeRef?[e.props.nodeRef.current,t]:[t,n]},e.getClassNames=function(t){var n=e.props.classNames,r="string"==typeof n,i=r?""+(r&&n?n+"-":"")+t:n[t];return{baseClassName:i,activeClassName:r?i+"-active":n[t+"Active"],doneClassName:r?i+"-done":n[t+"Done"]}},e}lg(e,t);var n=e.prototype;return n.addClass=function(t,e,n){var r=this.getClassNames(e)[n+"ClassName"],i=this.getClassNames("enter").doneClassName;"appear"===e&&"done"===n&&i&&(r+=" "+i),"active"===n&&t&&t.scrollTop,r&&(this.appliedClasses[e][n]=r,function(t,e){t&&e&&e.split(" ").forEach(function(e){return function(t,e){t.classList?t.classList.add(e):function(t,e){return t.classList?!!e&&t.classList.contains(e):-1!==(" "+(t.className.baseVal||t.className)+" ").indexOf(" "+e+" ")}(t,e)||("string"==typeof t.className?t.className=t.className+" "+e:t.setAttribute("class",(t.className&&t.className.baseVal||"")+" "+e))}(t,e)})}(t,r))},n.removeClasses=function(t,e){var n=this.appliedClasses[e],r=n.base,i=n.active,o=n.done;this.appliedClasses[e]={},r&&Dg(t,r),i&&Dg(t,i),o&&Dg(t,o)},n.render=function(){var t=this.props;t.classNames;var e=sg(t,["classNames"]);return We.createElement(vg,og({},e,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},e}(We.Component);Tg.defaultProps={classNames:""},Tg.propTypes={};const Rg={ltr:["ArrowLeft","ArrowRight"],rtl:["ArrowRight","ArrowLeft"],ttb:["ArrowUp","ArrowDown"]};function yg(t,{focused:e,setFocused:n,itemCount:r,dir:i,onConfirm:o,onSpace:s}){if(0===r)return!1;const a=t=>{t=cn(0,t,r-1),n(t)},[l,c]=Rg[i];switch(t){case l:return a(e-1),!0;case c:return a(e+1),!0;case" ":return!!s&&s();case"Enter":case"Tab":return o(),!0}return!1}function Ig({focused:t,setFocused:e,buttonId:n}){pt(()=>{const e=n(t);var r;e&&(null===(r=document.getElementById(e))||void 0===r||r.scrollIntoView({block:"nearest"}))},[t,n]);const r=_t(t=>{const n=t.currentTarget.dataset.index;e(+n)},[e]);return{containerProps:Et(()=>({role:"menu","aria-activedescendant":n(t)}),[t,n]),itemProps:_t(t=>({onMouseMove:r,id:n(t),"data-index":t}),[r,n])}}var Cg;Xe();const Ng=null!==(Cg=globalThis.window)&&void 0!==Cg&&Cg.document?function(){if("undefined"==typeof window||window.E2E||window.__talkjsE2E)return 16;for(const[t,e]of Object.entries({"":16,"🚶➡️":15.1,"🫨":15,"🫠":14,"😵💫":13.1,"🥲":13,"🧑🦰":12.1,"🥻":12,"🥰":11,"🤩":5,"👱♀️":4,"🤣":3,"👁️🗨️":2,"😀":1,"😐️":.7,"😃":.6}))if(AA(t))return e}():0;function bg(t){const[e,n]=ut([]),[r,i]=ut([]),[o,s]=ut(0),[a,l]=ut(0),c=QA(),d=Et(()=>(null==c?void 0:c.value)&&new c.value.Database({dataSource:c.value.dataSource}),[c]),h=Sn(),p=yo(h.state$.suggestEmojiQuery);ht(()=>{if(d){if(!p)return void n([]);!async function(){const t=await d.getPreferredSkinTone();l(t);let e=await d.getEmojiBySearchQuery(p);if(e=e.filter(t=>t.url||function(t){return t.version<=Ng&&!Pg.includes(t.unicode)}(t)),function(t,e){e.sort((e,n)=>{var r,i;const o=null===(r=e.shortcodes)||void 0===r?void 0:r.find(e=>e.startsWith(t)),s=null===(i=n.shortcodes)||void 0===i?void 0:i.find(e=>e.startsWith(t));return o&&!s?-1:!o&&s?1:o&&s?o.length-s.length:0})}(p.substring(1),e),s(0),n(e),e.length>0&&i(e),p.endsWith(":")){const n=p.slice(1,-1),r=e.find(t=>{var e;return null===(e=t.shortcodes)||void 0===e?void 0:e.includes(n)});r&&h.selectEmoji(wg(r,t))}}()}},[p,h,d]);const{containerProps:f,itemProps:m}=Ig({focused:o,setFocused:s,buttonId:_t(t=>{const n=e[t];return n&&"emoji-button-"+wg(n,a)},[e,a])}),E=e.length>0;zA(()=>h.closeSuggester(),".t-emoji-suggest-bar",E),ht(()=>{if(E)return h.listenKeydown("emoji",t=>yg(t,{dir:"ltr",focused:o,setFocused:s,itemCount:e.length,onConfirm(){const t=e[o];En.defined(t),h.selectEmoji(wg(t,a))}})),()=>{h.listenKeydown("emoji",void 0)};h.listenKeydown("emoji",void 0)},[h,e,o,E,a]);const _=ft(null);return Gs(Tg,{in:E,timeout:100,classNames:"slide",mountOnEnter:!0,unmountOnExit:!0,nodeRef:_,children:Gs("div",{className:"t-emoji-suggest-bar",ref:_,...f,children:r.map((t,e)=>Gs(Lg,{emoji:t,skinTone:a,focused:e===o,onSelect:t=>h.selectEmoji(t),...m(e)},wg(t,a)))})})}function wg(t,e){return kg(t)?Mg(t,e):t.name}function kg(t){return!!t.unicode}function Lg(t){var e;const{emoji:n,focused:r,skinTone:i,onSelect:o,...s}=t,a=(null!==(e=n.shortcodes)&&void 0!==e?e:[]).join(", "),l=kg(n)?[n.unicode,a].join(", "):a;return Gs("button",{"t-focused":r?"":void 0,title:a,"aria-label":l,onClick:()=>o(wg(n,i)),...s,children:kg(n)?Mg(n,i):null})}function Mg(t,e){var n,r;const i=null===(n=t.skins)||void 0===n?void 0:n.find(t=>t.tone===e);return null!==(r=null==i?void 0:i.unicode)&&void 0!==r?r:t.unicode}Xe();const Pg=["🏻","🏼","🏽","🏾","🏿"];const xg=["top","right","bottom","left"],Fg=Math.min,Hg=Math.max,Ug=Math.round,Bg=Math.floor,jg=t=>({x:t,y:t}),Vg={left:"right",right:"left",bottom:"top",top:"bottom"},zg={start:"end",end:"start"};function $g(t,e,n){return Hg(t,Fg(e,n))}function Yg(t,e){return"function"==typeof t?t(e):t}function Gg(t){return t.split("-")[0]}function Wg(t){return t.split("-")[1]}function Xg(t){return"x"===t?"y":"x"}function Kg(t){return"y"===t?"height":"width"}const qg=new Set(["top","bottom"]);function Jg(t){return qg.has(Gg(t))?"y":"x"}function Zg(t){return Xg(Jg(t))}function Qg(t){return t.replace(/start|end/g,t=>zg[t])}const eS=["left","right"],nS=["right","left"],rS=["top","bottom"],iS=["bottom","top"];function oS(t,e,n,r){const i=Wg(t);let o=function(t,e,n){switch(t){case"top":case"bottom":return n?e?nS:eS:e?eS:nS;case"left":case"right":return e?rS:iS;default:return[]}}(Gg(t),"start"===n,r);return i&&(o=o.map(t=>t+"-"+i),e&&(o=o.concat(o.map(Qg)))),o}function sS(t){return t.replace(/left|right|bottom|top/g,t=>Vg[t])}function aS(t){const{x:e,y:n,width:r,height:i}=t;return{width:r,height:i,top:n,left:e,right:e+r,bottom:n+i,x:e,y:n}}function lS(t,e,n){let{reference:r,floating:i}=t;const o=Jg(e),s=Zg(e),a=Kg(s),l=Gg(e),c="y"===o,d=r.x+r.width/2-i.width/2,h=r.y+r.height/2-i.height/2,p=r[a]/2-i[a]/2;let f;switch(l){case"top":f={x:d,y:r.y-i.height};break;case"bottom":f={x:d,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:h};break;case"left":f={x:r.x-i.width,y:h};break;default:f={x:r.x,y:r.y}}switch(Wg(e)){case"start":f[s]-=p*(n&&c?-1:1);break;case"end":f[s]+=p*(n&&c?-1:1)}return f}async function cS(t,e){var n;void 0===e&&(e={});const{x:r,y:i,platform:o,rects:s,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:p=!1,padding:f=0}=Yg(e,t),m=function(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}(f),E=a[p?"floating"===h?"reference":"floating":h],_=aS(await o.getClippingRect({element:null==(n=await(null==o.isElement?void 0:o.isElement(E)))||n?E:E.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),A="floating"===h?{x:r,y:i,width:s.floating.width,height:s.floating.height}:s.reference,g=await(null==o.getOffsetParent?void 0:o.getOffsetParent(a.floating)),S=await(null==o.isElement?void 0:o.isElement(g))&&await(null==o.getScale?void 0:o.getScale(g))||{x:1,y:1},v=aS(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:A,offsetParent:g,strategy:l}):A);return{top:(_.top-v.top+m.top)/S.y,bottom:(v.bottom-_.bottom+m.bottom)/S.y,left:(_.left-v.left+m.left)/S.x,right:(v.right-_.right+m.right)/S.x}}function uS(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function dS(t){return xg.some(e=>t[e]>=0)}const hS=new Set(["left","top"]);function pS(){return"undefined"!=typeof window}function fS(t){return _S(t)?(t.nodeName||"").toLowerCase():"#document"}function mS(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function ES(t){var e;return null==(e=(_S(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function _S(t){return!!pS()&&(t instanceof Node||t instanceof mS(t).Node)}function AS(t){return!!pS()&&(t instanceof Element||t instanceof mS(t).Element)}function gS(t){return!!pS()&&(t instanceof HTMLElement||t instanceof mS(t).HTMLElement)}function SS(t){return!(!pS()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof mS(t).ShadowRoot)}const vS=new Set(["inline","contents"]);function OS(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=MS(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!vS.has(i)}const DS=new Set(["table","td","th"]);function TS(t){return DS.has(fS(t))}const RS=[":popover-open",":modal"];function yS(t){return RS.some(e=>{try{return t.matches(e)}catch(t){return!1}})}const IS=["transform","translate","scale","rotate","perspective"],CS=["transform","translate","scale","rotate","perspective","filter"],NS=["paint","layout","strict","content"];function bS(t){const e=wS(),n=AS(t)?MS(t):t;return IS.some(t=>!!n[t]&&"none"!==n[t])||!!n.containerType&&"normal"!==n.containerType||!e&&!!n.backdropFilter&&"none"!==n.backdropFilter||!e&&!!n.filter&&"none"!==n.filter||CS.some(t=>(n.willChange||"").includes(t))||NS.some(t=>(n.contain||"").includes(t))}function wS(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const kS=new Set(["html","body","#document"]);function LS(t){return kS.has(fS(t))}function MS(t){return mS(t).getComputedStyle(t)}function PS(t){return AS(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function xS(t){if("html"===fS(t))return t;const e=t.assignedSlot||t.parentNode||SS(t)&&t.host||ES(t);return SS(e)?e.host:e}function FS(t){const e=xS(t);return LS(e)?t.ownerDocument?t.ownerDocument.body:t.body:gS(e)&&OS(e)?e:FS(e)}function HS(t,e,n){var r;void 0===e&&(e=[]),void 0===n&&(n=!0);const i=FS(t),o=i===(null==(r=t.ownerDocument)?void 0:r.body),s=mS(i);if(o){const t=US(s);return e.concat(s,s.visualViewport||[],OS(i)?i:[],t&&n?HS(t):[])}return e.concat(i,HS(i,[],n))}function US(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function BS(t){const e=MS(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=gS(t),o=i?t.offsetWidth:n,s=i?t.offsetHeight:r,a=Ug(n)!==o||Ug(r)!==s;return a&&(n=o,r=s),{width:n,height:r,$:a}}function jS(t){return AS(t)?t:t.contextElement}function VS(t){const e=jS(t);if(!gS(e))return jg(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:o}=BS(e);let s=(o?Ug(n.width):n.width)/r,a=(o?Ug(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const zS=jg(0);function $S(t){const e=mS(t);return wS()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:zS}function YS(t,e,n,r){void 0===e&&(e=!1),void 0===n&&(n=!1);const i=t.getBoundingClientRect(),o=jS(t);let s=jg(1);e&&(r?AS(r)&&(s=VS(r)):s=VS(t));const a=function(t,e,n){return void 0===e&&(e=!1),!(!n||e&&n!==mS(t))&&e}(o,n,r)?$S(o):jg(0);let l=(i.left+a.x)/s.x,c=(i.top+a.y)/s.y,d=i.width/s.x,h=i.height/s.y;if(o){const t=mS(o),e=r&&AS(r)?mS(r):r;let n=t,i=US(n);for(;i&&r&&e!==n;){const t=VS(i),e=i.getBoundingClientRect(),r=MS(i),o=e.left+(i.clientLeft+parseFloat(r.paddingLeft))*t.x,s=e.top+(i.clientTop+parseFloat(r.paddingTop))*t.y;l*=t.x,c*=t.y,d*=t.x,h*=t.y,l+=o,c+=s,n=mS(i),i=US(n)}}return aS({width:d,height:h,x:l,y:c})}function GS(t,e){const n=PS(t).scrollLeft;return e?e.left+n:YS(ES(t)).left+n}function WS(t,e){const n=t.getBoundingClientRect();return{x:n.left+e.scrollLeft-GS(t,n),y:n.top+e.scrollTop}}const XS=new Set(["absolute","fixed"]);function KS(t,e,n){let r;if("viewport"===e)r=function(t,e){const n=mS(t),r=ES(t),i=n.visualViewport;let o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;const t=wS();(!t||t&&"fixed"===e)&&(a=i.offsetLeft,l=i.offsetTop)}const c=GS(r);if(c<=0){const t=r.ownerDocument,e=t.body,n=getComputedStyle(e),i="CSS1Compat"===t.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,s=Math.abs(r.clientWidth-e.clientWidth-i);s<=25&&(o-=s)}else c<=25&&(o+=c);return{width:o,height:s,x:a,y:l}}(t,n);else if("document"===e)r=function(t){const e=ES(t),n=PS(t),r=t.ownerDocument.body,i=Hg(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),o=Hg(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+GS(t);const a=-n.scrollTop;return"rtl"===MS(r).direction&&(s+=Hg(e.clientWidth,r.clientWidth)-i),{width:i,height:o,x:s,y:a}}(ES(t));else if(AS(e))r=function(t,e){const n=YS(t,!0,"fixed"===e),r=n.top+t.clientTop,i=n.left+t.clientLeft,o=gS(t)?VS(t):jg(1);return{width:t.clientWidth*o.x,height:t.clientHeight*o.y,x:i*o.x,y:r*o.y}}(e,n);else{const n=$S(t);r={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return aS(r)}function qS(t,e){const n=xS(t);return!(n===e||!AS(n)||LS(n))&&("fixed"===MS(n).position||qS(n,e))}function JS(t,e){const n=e.get(t);if(n)return n;let r=HS(t,[],!1).filter(t=>AS(t)&&"body"!==fS(t)),i=null;const o="fixed"===MS(t).position;let s=o?xS(t):t;for(;AS(s)&&!LS(s);){const e=MS(s),n=bS(s);!n&&"fixed"===e.position&&(i=null),(o?!n&&!i:!n&&"static"===e.position&&i&&XS.has(i.position)||OS(s)&&!n&&qS(t,s))?r=r.filter(t=>t!==s):i=e,s=xS(s)}return e.set(t,r),r}function ZS(t,e,n){const r=gS(e),i=ES(e),o="fixed"===n,s=YS(t,!0,o,e);let a={scrollLeft:0,scrollTop:0};const l=jg(0);function c(){l.x=GS(i)}if(r||!r&&!o)if(("body"!==fS(e)||OS(i))&&(a=PS(e)),r){const t=YS(e,!0,o,e);l.x=t.x+e.clientLeft,l.y=t.y+e.clientTop}else i&&c();o&&!r&&i&&c();const d=!i||r||o?jg(0):WS(i,a);return{x:s.left+a.scrollLeft-l.x-d.x,y:s.top+a.scrollTop-l.y-d.y,width:s.width,height:s.height}}function QS(t){return"static"===MS(t).position}function tv(t,e){if(!gS(t)||"fixed"===MS(t).position)return null;if(e)return e(t);let n=t.offsetParent;return ES(t)===n&&(n=n.ownerDocument.body),n}function ev(t,e){const n=mS(t);if(yS(t))return n;if(!gS(t)){let e=xS(t);for(;e&&!LS(e);){if(AS(e)&&!QS(e))return e;e=xS(e)}return n}let r=tv(t,e);for(;r&&TS(r)&&QS(r);)r=tv(r,e);return r&&LS(r)&&QS(r)&&!bS(r)?n:r||function(t){let e=xS(t);for(;gS(e)&&!LS(e);){if(bS(e))return e;if(yS(e))return null;e=xS(e)}return null}(t)||n}const nv={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:r,strategy:i}=t;const o="fixed"===i,s=ES(r),a=!!e&&yS(e.floating);if(r===s||a&&o)return n;let l={scrollLeft:0,scrollTop:0},c=jg(1);const d=jg(0),h=gS(r);if((h||!h&&!o)&&(("body"!==fS(r)||OS(s))&&(l=PS(r)),gS(r))){const t=YS(r);c=VS(r),d.x=t.x+r.clientLeft,d.y=t.y+r.clientTop}const p=!s||h||o?jg(0):WS(s,l);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+d.x+p.x,y:n.y*c.y-l.scrollTop*c.y+d.y+p.y}},getDocumentElement:ES,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:r,strategy:i}=t;const o=[..."clippingAncestors"===n?yS(e)?[]:JS(e,this._c):[].concat(n),r],s=o[0],a=o.reduce((t,n)=>{const r=KS(e,n,i);return t.top=Hg(r.top,t.top),t.right=Fg(r.right,t.right),t.bottom=Fg(r.bottom,t.bottom),t.left=Hg(r.left,t.left),t},KS(e,s,i));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:ev,getElementRects:async function(t){const e=this.getOffsetParent||ev,n=this.getDimensions,r=await n(t.floating);return{reference:ZS(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:n}=BS(t);return{width:e,height:n}},getScale:VS,isElement:AS,isRTL:function(t){return"rtl"===MS(t).direction}};function rv(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function iv(t,e,n,r){void 0===r&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=jS(t),d=i||o?[...c?HS(c):[],...HS(e)]:[];d.forEach(t=>{i&&t.addEventListener("scroll",n,{passive:!0}),o&&t.addEventListener("resize",n)});const h=c&&a?function(t,e){let n,r=null;const i=ES(t);function o(){var t;clearTimeout(n),null==(t=r)||t.disconnect(),r=null}return function s(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),o();const c=t.getBoundingClientRect(),{left:d,top:h,width:p,height:f}=c;if(a||e(),!p||!f)return;const m={rootMargin:-Bg(h)+"px "+-Bg(i.clientWidth-(d+p))+"px "+-Bg(i.clientHeight-(h+f))+"px "+-Bg(d)+"px",threshold:Hg(0,Fg(1,l))||1};let E=!0;function _(e){const r=e[0].intersectionRatio;if(r!==l){if(!E)return s();r?s(!1,r):n=setTimeout(()=>{s(!1,1e-7)},1e3)}1===r&&!rv(c,t.getBoundingClientRect())&&s(),E=!1}try{r=new IntersectionObserver(_,{...m,root:i.ownerDocument})}catch(t){r=new IntersectionObserver(_,m)}r.observe(t)}(!0),o}(c,n):null;let p=-1,f=null;s&&(f=new ResizeObserver(t=>{let[r]=t;r&&r.target===c&&f&&(f.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var t;null==(t=f)||t.observe(e)})),n()}),c&&!l&&f.observe(c),f.observe(e));let m,E=l?YS(t):null;return l&&function e(){const r=YS(t);E&&!rv(E,r)&&n(),E=r,m=requestAnimationFrame(e)}(),n(),()=>{var t;d.forEach(t=>{i&&t.removeEventListener("scroll",n),o&&t.removeEventListener("resize",n)}),null==h||h(),null==(t=f)||t.disconnect(),f=null,l&&cancelAnimationFrame(m)}}const ov=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:i,y:o,placement:s,middlewareData:a}=e,l=await async function(t,e){const{placement:n,platform:r,elements:i}=t,o=await(null==r.isRTL?void 0:r.isRTL(i.floating)),s=Gg(n),a=Wg(n),l="y"===Jg(n),c=hS.has(s)?-1:1,d=o&&l?-1:1,h=Yg(e,t);let{mainAxis:p,crossAxis:f,alignmentAxis:m}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return a&&"number"==typeof m&&(f="end"===a?-1*m:m),l?{x:f*d,y:p*c}:{x:p*c,y:f*d}}(e,t);return s===(null==(n=a.offset)?void 0:n.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:s}}}}},sv=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:i}=e,{mainAxis:o=!0,crossAxis:s=!1,limiter:a={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}},...l}=Yg(t,e),c={x:n,y:r},d=await cS(e,l),h=Jg(Gg(i)),p=Xg(h);let f=c[p],m=c[h];if(o){const t="y"===p?"bottom":"right";f=$g(f+d["y"===p?"top":"left"],f,f-d[t])}if(s){const t="y"===h?"bottom":"right";m=$g(m+d["y"===h?"top":"left"],m,m-d[t])}const E=a.fn({...e,[p]:f,[h]:m});return{...E,data:{x:E.x-n,y:E.y-r,enabled:{[p]:o,[h]:s}}}}}},av=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:i,middlewareData:o,rects:s,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:E=!0,..._}=Yg(t,e);if(null!=(n=o.arrow)&&n.alignmentOffset)return{};const A=Gg(i),g=Jg(a),S=Gg(a)===a,v=await(null==l.isRTL?void 0:l.isRTL(c.floating)),O=p||(S||!E?[sS(a)]:function(t){const e=sS(t);return[Qg(t),e,Qg(e)]}(a)),D="none"!==m;!p&&D&&O.push(...oS(a,E,m,v));const T=[a,...O],R=await cS(e,_),y=[];let I=(null==(r=o.flip)?void 0:r.overflows)||[];if(d&&y.push(R[A]),h){const t=function(t,e,n){void 0===n&&(n=!1);const r=Wg(t),i=Zg(t),o=Kg(i);let s="x"===i?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return e.reference[o]>e.floating[o]&&(s=sS(s)),[s,sS(s)]}(i,s,v);y.push(R[t[0]],R[t[1]])}if(I=[...I,{placement:i,overflows:y}],!y.every(t=>t<=0)){var C,N;const t=((null==(C=o.flip)?void 0:C.index)||0)+1,e=T[t];if(e&&("alignment"!==h||g===Jg(e)||I.every(t=>Jg(t.placement)!==g||t.overflows[0]>0)))return{data:{index:t,overflows:I},reset:{placement:e}};let n=null==(N=I.filter(t=>t.overflows[0]<=0).sort((t,e)=>t.overflows[1]-e.overflows[1])[0])?void 0:N.placement;if(!n)switch(f){case"bestFit":{var b;const t=null==(b=I.filter(t=>{if(D){const e=Jg(t.placement);return e===g||"y"===e}return!0}).map(t=>[t.placement,t.overflows.filter(t=>t>0).reduce((t,e)=>t+e,0)]).sort((t,e)=>t[1]-e[1])[0])?void 0:b[0];t&&(n=t);break}case"initialPlacement":n=a}if(i!==n)return{reset:{placement:n}}}return{}}}},lv=function(t){return void 0===t&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:r="referenceHidden",...i}=Yg(t,e);switch(r){case"referenceHidden":{const t=uS(await cS(e,{...i,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:dS(t)}}}case"escaped":{const t=uS(await cS(e,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:t,escaped:dS(t)}}}default:return{}}}}},cv=(t,e,n)=>{const r=new Map,i={platform:nv,...n},o={...i.platform,_c:r};return(async(t,e,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:s}=n,a=o.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(e));let c=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:d,y:h}=lS(c,r,l),p=r,f={},m=0;for(let n=0;n<a.length;n++){const{name:o,fn:E}=a[n],{x:_,y:A,data:g,reset:S}=await E({x:d,y:h,initialPlacement:r,placement:p,strategy:i,middlewareData:f,rects:c,platform:s,elements:{reference:t,floating:e}});d=null!=_?_:d,h=null!=A?A:h,f={...f,[o]:{...f[o],...g}},S&&m<=50&&(m++,"object"==typeof S&&(S.placement&&(p=S.placement),S.rects&&(c=!0===S.rects?await s.getElementRects({reference:t,floating:e,strategy:i}):S.rects),({x:d,y:h}=lS(c,p,l))),n=-1)}return{x:d,y:h,placement:p,strategy:i,middlewareData:f}})(t,e,{...i,platform:o})};Xe();var uv="undefined"!=typeof document?pt:function(){};function dv(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if("function"==typeof t&&t.toString()===e.toString())return!0;let n,r,i;if(t&&e&&"object"==typeof t){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;0!==r--;)if(!dv(t[r],e[r]))return!1;return!0}if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(r=n;0!==r--;)if(!{}.hasOwnProperty.call(e,i[r]))return!1;for(r=n;0!==r--;){const n=i[r];if(!("_owner"===n&&t.$$typeof||dv(t[n],e[n])))return!1}return!0}return t!=t&&e!=e}function hv(t){return"undefined"==typeof window?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function pv(t,e){const n=hv(t);return Math.round(e*n)/n}function fv(t){const e=ft(t);return uv(()=>{e.current=t}),e}function mv(t){void 0===t&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=t,[d,h]=ut({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[p,f]=ut(r);dv(p,r)||f(r);const[m,E]=ut(null),[_,A]=ut(null),g=_t(t=>{t!==D.current&&(D.current=t,E(t))},[]),S=_t(t=>{t!==T.current&&(T.current=t,A(t))},[]),v=o||m,O=s||_,D=ft(null),T=ft(null),R=ft(d),y=null!=l,I=fv(l),C=fv(i),N=fv(c),b=_t(()=>{if(!D.current||!T.current)return;const t={placement:e,strategy:n,middleware:p};C.current&&(t.platform=C.current),cv(D.current,T.current,t).then(t=>{const e={...t,isPositioned:!1!==N.current};w.current&&!dv(R.current,e)&&(R.current=e,$e(()=>{h(e)}))})},[p,e,n,C,N]);uv(()=>{!1===c&&R.current.isPositioned&&(R.current.isPositioned=!1,h(t=>({...t,isPositioned:!1})))},[c]);const w=ft(!1);uv(()=>(w.current=!0,()=>{w.current=!1}),[]),uv(()=>{if(v&&(D.current=v),O&&(T.current=O),v&&O){if(I.current)return I.current(v,O,b);b()}},[v,O,b,I,y]);const k=Et(()=>({reference:D,floating:T,setReference:g,setFloating:S}),[g,S]),L=Et(()=>({reference:v,floating:O}),[v,O]),M=Et(()=>{const t={position:n,left:0,top:0};if(!L.floating)return t;const e=pv(L.floating,d.x),r=pv(L.floating,d.y);return a?{...t,transform:"translate("+e+"px, "+r+"px)",...hv(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:e,top:r}},[n,a,L.floating,d.x,d.y]);return Et(()=>({...d,update:b,refs:k,elements:L,floatingStyles:M}),[d,b,k,L,M])}const Ev=(t,e)=>({...ov(t),options:[t,e]}),_v=(t,e)=>({...sv(t),options:[t,e]}),Av=(t,e)=>({...av(t),options:[t,e]}),gv=(t,e)=>({...lv(t),options:[t,e]});var Sv,vv,Ov,Dv,Tv,Rv,yv,Iv,Cv,Nv,bv,wv,kv,Lv,Mv,Pv,xv,Fv,Hv,Uv,Bv,jv,Vv,zv,$v,Yv,Gv,Wv,Xv,Kv,qv,Jv,Zv,Qv=c({focusable:()=>Kv,getTabIndex:()=>bv,isFocusable:()=>Zv,isTabbable:()=>qv,tabbable:()=>Xv}),tO=a(()=>{vv=(Sv=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"]).join(","),Ov="undefined"==typeof Element,Dv=Ov?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Tv=!Ov&&Element.prototype.getRootNode?function(t){var e;return null==t||null===(e=t.getRootNode)||void 0===e?void 0:e.call(t)}:function(t){return null==t?void 0:t.ownerDocument},Rv=function(t,e){var n;void 0===e&&(e=!0);var r=null==t||null===(n=t.getAttribute)||void 0===n?void 0:n.call(t,"inert");return""===r||"true"===r||e&&t&&Rv(t.parentNode)},yv=function(t){var e,n=null==t||null===(e=t.getAttribute)||void 0===e?void 0:e.call(t,"contenteditable");return""===n||"true"===n},Iv=function(t,e,n){if(Rv(t))return[];var r=Array.prototype.slice.apply(t.querySelectorAll(vv));return e&&Dv.call(t,vv)&&r.unshift(t),r=r.filter(n)},Cv=function(t,e,n){for(var r=[],i=Array.from(t);i.length;){var o=i.shift();if(!Rv(o,!1))if("SLOT"===o.tagName){var s=o.assignedElements(),a=Cv(s.length?s:o.children,!0,n);n.flatten?r.push.apply(r,a):r.push({scopeParent:o,candidates:a})}else{Dv.call(o,vv)&&n.filter(o)&&(e||!t.includes(o))&&r.push(o);var l=o.shadowRoot||"function"==typeof n.getShadowRoot&&n.getShadowRoot(o),c=!Rv(l,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(o));if(l&&c){var d=Cv(!0===l?o.children:l.children,!0,n);n.flatten?r.push.apply(r,d):r.push({scopeParent:o,candidates:d})}else i.unshift.apply(i,o.children)}}return r},Nv=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},bv=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||yv(t))&&!Nv(t)?0:t.tabIndex},wv=function(t,e){var n=bv(t);return n<0&&e&&!Nv(t)?0:n},kv=function(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex},Lv=function(t){return"INPUT"===t.tagName},Mv=function(t){return Lv(t)&&"hidden"===t.type},Pv=function(t){return"DETAILS"===t.tagName&&Array.prototype.slice.apply(t.children).some(function(t){return"SUMMARY"===t.tagName})},xv=function(t,e){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===e)return t[n]},Fv=function(t){if(!t.name)return!0;var e,n=t.form||Tv(t),r=function(t){return n.querySelectorAll('input[type="radio"][name="'+t+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)e=r(window.CSS.escape(t.name));else try{e=r(t.name)}catch(t){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",t.message),!1}var i=xv(e,t.form);return!i||i===t},Hv=function(t){return Lv(t)&&"radio"===t.type},Uv=function(t){return Hv(t)&&!Fv(t)},Bv=function(t){var e,n,r,i,o=t&&Tv(t),s=null===(e=o)||void 0===e?void 0:e.host,a=!1;if(o&&o!==t)for(a=!!(null!==(n=s)&&void 0!==n&&null!==(r=n.ownerDocument)&&void 0!==r&&r.contains(s)||null!=t&&null!==(i=t.ownerDocument)&&void 0!==i&&i.contains(t));!a&&s;){var l,c,d;a=!(null===(c=s=null===(l=o=Tv(s))||void 0===l?void 0:l.host)||void 0===c||null===(d=c.ownerDocument)||void 0===d||!d.contains(s))}return a},jv=function(t){var e=t.getBoundingClientRect(),n=e.width,r=e.height;return 0===n&&0===r},Vv=function(t,e){var n=e.displayCheck,r=e.getShadowRoot;if("full-native"===n&&"checkVisibility"in t)return!t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if("hidden"===getComputedStyle(t).visibility)return!0;var i=Dv.call(t,"details>summary:first-of-type")?t.parentElement:t;if(Dv.call(i,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"full-native"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return jv(t)}else{if("function"==typeof r){for(var o=t;t;){var s=t.parentElement,a=Tv(t);if(s&&!s.shadowRoot&&!0===r(s))return jv(t);t=t.assignedSlot?t.assignedSlot:s||a===t.ownerDocument?s:a.host}t=o}if(Bv(t))return!t.getClientRects().length;if("legacy-full"!==n)return!0}return!1},zv=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var e=t.parentElement;e;){if("FIELDSET"===e.tagName&&e.disabled){for(var n=0;n<e.children.length;n++){var r=e.children.item(n);if("LEGEND"===r.tagName)return!!Dv.call(e,"fieldset[disabled] *")||!r.contains(t)}return!0}e=e.parentElement}return!1},$v=function(t,e){return!(e.disabled||Rv(e)||Mv(e)||Vv(e,t)||Pv(e)||zv(e))},Yv=function(t,e){return!(Uv(e)||bv(e)<0||!$v(t,e))},Gv=function(t){var e=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(e)||e>=0)},Wv=function(t){var e=[],n=[];return t.forEach(function(t,r){var i=!!t.scopeParent,o=i?t.scopeParent:t,s=wv(o,i),a=i?Wv(t.candidates):o;0===s?i?e.push.apply(e,a):e.push(o):n.push({documentOrder:r,tabIndex:s,item:t,isScope:i,content:a})}),n.sort(kv).reduce(function(t,e){return e.isScope?t.push.apply(t,e.content):t.push(e.content),t},[]).concat(e)},Xv=function(t,e){var n;return n=(e=e||{}).getShadowRoot?Cv([t],e.includeContainer,{filter:Yv.bind(null,e),flatten:!1,getShadowRoot:e.getShadowRoot,shadowRootFilter:Gv}):Iv(t,e.includeContainer,Yv.bind(null,e)),Wv(n)},Kv=function(t,e){return(e=e||{}).getShadowRoot?Cv([t],e.includeContainer,{filter:$v.bind(null,e),flatten:!0,getShadowRoot:e.getShadowRoot}):Iv(t,e.includeContainer,$v.bind(null,e))},qv=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return!1!==Dv.call(t,vv)&&Yv(e,t)},Jv=Sv.concat("iframe").join(","),Zv=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return!1!==Dv.call(t,Jv)&&$v(e,t)}});function eO(t){return(null==t?void 0:t.ownerDocument)||document}Xe(),tO();var nO="undefined"!=typeof document?pt:function(){};({...zt}).useInsertionEffect;const rO=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function iO(t,e){const n=Xv(t,rO()),r=n.length;if(0===r)return;const i=function(t){let e=t.activeElement;for(;null!=(null==(n=e)||null==(n=n.shadowRoot)?void 0:n.activeElement);){var n;e=e.shadowRoot.activeElement}return e}(eO(t)),o=n.indexOf(i);return n[-1===o?1===e?0:r-1:o+e]}function oO(t,e){const n=e||t.currentTarget,r=t.relatedTarget;return!r||!function(t,e){if(!t||!e)return!1;const n=null==e.getRootNode?void 0:e.getRootNode();if(t.contains(e))return!0;if(n&&SS(n)){let n=e;for(;n;){if(t===n)return!0;n=n.parentNode||n.host}}return!1}(n,r)}function sO(t){Xv(t,rO()).forEach(t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")})}function aO(t){t.querySelectorAll("[data-tabindex]").forEach(t=>{const e=t.dataset.tabindex;delete t.dataset.tabindex,e?t.setAttribute("tabindex",e):t.removeAttribute("tabindex")})}Xe();const lO={...zt};let cO=!1,uO=0;const dO=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+uO++;const hO=lO.useId||function(){const[t,e]=ut(()=>cO?dO():void 0);return nO(()=>{null==t&&e(dO())},[]),ht(()=>{cO=!0},[]),t};function pO(t){return"data-floating-ui-"+t}const fO={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},mO=Qt(function(t,e){const[n,r]=ut();nO(()=>{/apple/i.test(navigator.vendor)&&r("button")},[]);return Gs("span",{...t,...{ref:e,tabIndex:0,role:n,"aria-hidden":!n||void 0,[pO("focus-guard")]:"",style:fO}})}),EO=Y(null),_O=pO("portal");function AO(t){const{children:e,id:n,root:r,preserveTabOrder:i=!0}=t,o=function(t){void 0===t&&(t={});const{id:e,root:n}=t,r=hO(),i=gO(),[o,s]=ut(null),a=ft(null);return nO(()=>()=>{null==o||o.remove(),queueMicrotask(()=>{a.current=null})},[o]),nO(()=>{if(!r||a.current)return;const t=e?document.getElementById(e):null;if(!t)return;const n=document.createElement("div");n.id=r,n.setAttribute(_O,""),t.appendChild(n),a.current=n,s(n)},[e,r]),nO(()=>{if(null===n||!r||a.current)return;let t=n||(null==i?void 0:i.portalNode);t&&!_S(t)&&(t=t.current),t=t||document.body;let o=null;e&&(o=document.createElement("div"),o.id=e,t.appendChild(o));const l=document.createElement("div");l.id=r,l.setAttribute(_O,""),t=o||t,t.appendChild(l),a.current=l,s(l)},[e,n,r,i]),o}({id:n,root:r}),[s,a]=ut(null),l=ft(null),c=ft(null),d=ft(null),h=ft(null),p=null==s?void 0:s.modal,f=null==s?void 0:s.open,m=!!s&&!s.modal&&s.open&&i&&!(!r&&!o);return ht(()=>{if(o&&i&&!p)return o.addEventListener("focusin",t,!0),o.addEventListener("focusout",t,!0),()=>{o.removeEventListener("focusin",t,!0),o.removeEventListener("focusout",t,!0)};function t(t){o&&oO(t)&&("focusin"===t.type?aO:sO)(o)}},[o,i,p]),ht(()=>{o&&(f||aO(o))},[f,o]),Gs(EO.Provider,{value:Et(()=>({preserveTabOrder:i,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:d,afterInsideRef:h,portalNode:o,setFocusManagerState:a}),[i,o]),children:[m&&o&&Gs(mO,{"data-type":"outside",ref:l,onFocus:t=>{if(oO(t,o)){var e;null==(e=d.current)||e.focus()}else{const t=function(t){return iO(eO(t).body,-1)||t}(s?s.domReference:null);null==t||t.focus()}}}),m&&o&&Gs("span",{"aria-owns":o.id,style:fO}),o&&le(e,o),m&&o&&Gs(mO,{"data-type":"outside",ref:c,onFocus:t=>{if(oO(t,o)){var e;null==(e=h.current)||e.focus()}else{const e=function(t){return iO(eO(t).body,1)||t}(s?s.domReference:null);null==e||e.focus(),null!=s&&s.closeOnFocusOut&&(null==s||s.onOpenChange(!1,t.nativeEvent,"focus-out"))}}})]})}const gO=()=>At(EO);var SO=c({createFocusTrap:()=>HO});function vO(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function OO(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=IO(t))||e){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}function DO(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function TO(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function RO(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?TO(Object(n),!0).forEach(function(e){DO(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):TO(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function yO(t){return function(t){if(Array.isArray(t))return vO(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||IO(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function IO(t,e){if(t){if("string"==typeof t)return vO(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?vO(t,e):void 0}}var CO,NO,bO,wO,kO,LO,MO,PO,xO,FO,HO,UO=a(()=>{tO(),CO={getActiveTrap:function(t){return(null==t?void 0:t.length)>0?t[t.length-1]:null},activateTrap:function(t,e){e!==CO.getActiveTrap(t)&&CO.pauseTrap(t);var n=t.indexOf(e);-1===n||t.splice(n,1),t.push(e)},deactivateTrap:function(t,e){var n=t.indexOf(e);-1!==n&&t.splice(n,1),CO.unpauseTrap(t)},pauseTrap:function(t){var e=CO.getActiveTrap(t);null==e||e._setPausedState(!0)},unpauseTrap:function(t){var e=CO.getActiveTrap(t);e&&!e._isManuallyPaused()&&e._setPausedState(!1)}},NO=function(t){return t.tagName&&"input"===t.tagName.toLowerCase()&&"function"==typeof t.select},bO=function(t){return"Escape"===(null==t?void 0:t.key)||"Esc"===(null==t?void 0:t.key)||27===(null==t?void 0:t.keyCode)},wO=function(t){return"Tab"===(null==t?void 0:t.key)||9===(null==t?void 0:t.keyCode)},kO=function(t){return wO(t)&&!t.shiftKey},LO=function(t){return wO(t)&&t.shiftKey},MO=function(t){return setTimeout(t,0)},PO=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return"function"==typeof t?t.apply(void 0,n):t},xO=function(t){return t.target.shadowRoot&&"function"==typeof t.composedPath?t.composedPath()[0]:t.target},FO=[],HO=function(t,e){var n,r=(null==e?void 0:e.document)||document,i=(null==e?void 0:e.trapStack)||FO,o=RO({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isolateSubtrees:!1,isKeyForward:kO,isKeyBackward:LO},e),s={containers:[],containerGroups:[],tabbableGroups:[],adjacentElements:new Set,alreadyInert:new Set,nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,manuallyPaused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},a=function(t,e,n){return t&&void 0!==t[e]?t[e]:o[n||e]},l=function(t,e){var n="function"==typeof(null==e?void 0:e.composedPath)?e.composedPath():void 0;return s.containerGroups.findIndex(function(e){var r=e.container,i=e.tabbableNodes;return r.contains(t)||(null==n?void 0:n.includes(r))||i.find(function(e){return e===t})})},c=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.hasFallback,i=void 0!==n&&n,s=e.params,a=void 0===s?[]:s,l=o[t];if("function"==typeof l&&(l=l.apply(void 0,yO(a))),!0===l&&(l=void 0),!l){if(void 0===l||!1===l)return l;throw new Error("`".concat(t,"` was specified but was not a node, or did not return a node"))}var c=l;if("string"==typeof l){try{c=r.querySelector(l)}catch(e){throw new Error("`".concat(t,'` appears to be an invalid selector; error="').concat(e.message,'"'))}if(!c&&!i)throw new Error("`".concat(t,"` as selector refers to no known node"))}return c},d=function(){var t=c("initialFocus",{hasFallback:!0});if(!1===t)return!1;if(void 0===t||t&&!Zv(t,o.tabbableOptions))if(l(r.activeElement)>=0)t=r.activeElement;else{var e=s.tabbableGroups[0];t=e&&e.firstTabbableNode||c("fallbackFocus")}else null===t&&(t=c("fallbackFocus"));if(!t)throw new Error("Your focus-trap needs to have at least one focusable element");return t},h=function(){if(s.containerGroups=s.containers.map(function(t){var e=Xv(t,o.tabbableOptions),n=Kv(t,o.tabbableOptions),r=e.length>0?e[0]:void 0,i=e.length>0?e[e.length-1]:void 0,s=n.find(function(t){return qv(t)}),a=n.slice().reverse().find(function(t){return qv(t)});return{container:t,tabbableNodes:e,focusableNodes:n,posTabIndexesFound:!!e.find(function(t){return bv(t)>0}),firstTabbableNode:r,lastTabbableNode:i,firstDomTabbableNode:s,lastDomTabbableNode:a,nextTabbableNode:function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=e.indexOf(t);return i<0?r?n.slice(n.indexOf(t)+1).find(function(t){return qv(t)}):n.slice(0,n.indexOf(t)).reverse().find(function(t){return qv(t)}):e[i+(r?1:-1)]}}}),s.tabbableGroups=s.containerGroups.filter(function(t){return t.tabbableNodes.length>0}),s.tabbableGroups.length<=0&&!c("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(s.containerGroups.find(function(t){return t.posTabIndexesFound})&&s.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},p=function(t){var e=t.activeElement;if(e)return e.shadowRoot&&null!==e.shadowRoot.activeElement?p(e.shadowRoot):e},f=function(t){if(!1!==t&&t!==p(document)){if(!t||!t.focus)return void f(d());t.focus({preventScroll:!!o.preventScroll}),s.mostRecentlyFocusedNode=t,NO(t)&&t.select()}},m=function(t){var e=c("setReturnFocus",{params:[t]});return e||!1!==e&&t},E=function(t){var e=t.target,n=t.event,r=t.isBackward,i=void 0!==r&&r;e=e||xO(n),h();var a=null;if(s.tabbableGroups.length>0){var d=l(e,n),p=d>=0?s.containerGroups[d]:void 0;if(d<0)a=i?s.tabbableGroups[s.tabbableGroups.length-1].lastTabbableNode:s.tabbableGroups[0].firstTabbableNode;else if(i){var f=s.tabbableGroups.findIndex(function(t){var n=t.firstTabbableNode;return e===n});if(f<0&&(p.container===e||Zv(e,o.tabbableOptions)&&!qv(e,o.tabbableOptions)&&!p.nextTabbableNode(e,!1))&&(f=d),f>=0){var m=0===f?s.tabbableGroups.length-1:f-1,E=s.tabbableGroups[m];a=bv(e)>=0?E.lastTabbableNode:E.lastDomTabbableNode}else wO(n)||(a=p.nextTabbableNode(e,!1))}else{var _=s.tabbableGroups.findIndex(function(t){var n=t.lastTabbableNode;return e===n});if(_<0&&(p.container===e||Zv(e,o.tabbableOptions)&&!qv(e,o.tabbableOptions)&&!p.nextTabbableNode(e))&&(_=d),_>=0){var A=_===s.tabbableGroups.length-1?0:_+1,g=s.tabbableGroups[A];a=bv(e)>=0?g.firstTabbableNode:g.firstDomTabbableNode}else wO(n)||(a=p.nextTabbableNode(e))}}else a=c("fallbackFocus");return a},_=function(t){if(!(l(xO(t),t)>=0)){if(PO(o.clickOutsideDeactivates,t))return void n.deactivate({returnFocus:o.returnFocusOnDeactivate});PO(o.allowOutsideClick,t)||t.preventDefault()}},A=function(t){var e=xO(t),n=l(e,t)>=0;if(n||e instanceof Document)n&&(s.mostRecentlyFocusedNode=e);else{t.stopImmediatePropagation();var r,i=!0;if(s.mostRecentlyFocusedNode)if(bv(s.mostRecentlyFocusedNode)>0){var a=l(s.mostRecentlyFocusedNode),c=s.containerGroups[a].tabbableNodes;if(c.length>0){var h=c.findIndex(function(t){return t===s.mostRecentlyFocusedNode});h>=0&&(o.isKeyForward(s.recentNavEvent)?h+1<c.length&&(r=c[h+1],i=!1):h-1>=0&&(r=c[h-1],i=!1))}}else s.containerGroups.some(function(t){return t.tabbableNodes.some(function(t){return bv(t)>0})})||(i=!1);else i=!1;i&&(r=E({target:s.mostRecentlyFocusedNode,isBackward:o.isKeyBackward(s.recentNavEvent)})),f(r||s.mostRecentlyFocusedNode||d())}s.recentNavEvent=void 0},g=function(t){(o.isKeyForward(t)||o.isKeyBackward(t))&&function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];s.recentNavEvent=t;var n=E({event:t,isBackward:e});n&&(wO(t)&&t.preventDefault(),f(n))}(t,o.isKeyBackward(t))},S=function(t){bO(t)&&!1!==PO(o.escapeDeactivates,t)&&(t.preventDefault(),n.deactivate())},v=function(t){l(xO(t),t)>=0||PO(o.clickOutsideDeactivates,t)||PO(o.allowOutsideClick,t)||(t.preventDefault(),t.stopImmediatePropagation())},O=function(){if(s.active)return CO.activateTrap(i,n),s.delayInitialFocusTimer=o.delayInitialFocus?MO(function(){f(d())}):f(d()),r.addEventListener("focusin",A,!0),r.addEventListener("mousedown",_,{capture:!0,passive:!1}),r.addEventListener("touchstart",_,{capture:!0,passive:!1}),r.addEventListener("click",v,{capture:!0,passive:!1}),r.addEventListener("keydown",g,{capture:!0,passive:!1}),r.addEventListener("keydown",S),n},D=function(){if(s.active)return r.removeEventListener("focusin",A,!0),r.removeEventListener("mousedown",_,!0),r.removeEventListener("touchstart",_,!0),r.removeEventListener("click",v,!0),r.removeEventListener("keydown",g,!0),r.removeEventListener("keydown",S),n},T="undefined"!=typeof window&&"MutationObserver"in window?new MutationObserver(function(t){t.some(function(t){return Array.from(t.removedNodes).some(function(t){return t===s.mostRecentlyFocusedNode})})&&f(d())}):void 0,R=function(){T&&(T.disconnect(),s.active&&!s.paused&&s.containers.map(function(t){T.observe(t,{subtree:!0,childList:!0})}))};return n={get active(){return s.active},get paused(){return s.paused},activate:function(t){if(s.active)return this;var e=a(t,"onActivate"),l=a(t,"onPostActivate"),c=a(t,"checkCanFocusTrap"),d=CO.getActiveTrap(i),f=!1;d&&!d.paused&&(d._setSubtreeIsolation(!1),f=!0);try{c||h(),s.active=!0,s.paused=!1,s.nodeFocusedBeforeActivation=p(r),null==e||e();var m=function(){c&&h(),O(),R(),o.isolateSubtrees&&n._setSubtreeIsolation(!0),null==l||l()};if(c)return c(s.containers.concat()).then(m,m),this;m()}catch(t){throw d===CO.getActiveTrap(i)&&f&&d._setSubtreeIsolation(!0),t}return this},deactivate:function(t){if(!s.active)return this;var e=RO({onDeactivate:o.onDeactivate,onPostDeactivate:o.onPostDeactivate,checkCanReturnFocus:o.checkCanReturnFocus},t);clearTimeout(s.delayInitialFocusTimer),s.delayInitialFocusTimer=void 0,s.paused||n._setSubtreeIsolation(!1),s.alreadyInert.clear(),D(),s.active=!1,s.paused=!1,R(),CO.deactivateTrap(i,n);var r=a(e,"onDeactivate"),l=a(e,"onPostDeactivate"),c=a(e,"checkCanReturnFocus"),d=a(e,"returnFocus","returnFocusOnDeactivate");null==r||r();var h=function(){MO(function(){d&&f(m(s.nodeFocusedBeforeActivation)),null==l||l()})};return d&&c?(c(m(s.nodeFocusedBeforeActivation)).then(h,h),this):(h(),this)},pause:function(t){return s.active?(s.manuallyPaused=!0,this._setPausedState(!0,t)):this},unpause:function(t){return s.active?(s.manuallyPaused=!1,i[i.length-1]!==this?this:this._setPausedState(!1,t)):this},updateContainerElements:function(t){return s.containers=[].concat(t).filter(Boolean).map(function(t){return"string"==typeof t?r.querySelector(t):t}),o.isolateSubtrees&&function(t){s.active&&!s.paused&&n._setSubtreeIsolation(!1),s.adjacentElements.clear(),s.alreadyInert.clear();var e,r=new Set,i=new Set,o=OO(t);try{for(o.s();!(e=o.n()).done;){var a=e.value;r.add(a);for(var l="undefined"!=typeof ShadowRoot&&a.getRootNode()instanceof ShadowRoot,c=a;c;){r.add(c);var d=c.parentElement,h=[];d?h=d.children:!d&&l&&(h=c.getRootNode().children,d=c.getRootNode().host,l="undefined"!=typeof ShadowRoot&&d.getRootNode()instanceof ShadowRoot);var p,f=OO(h);try{for(f.s();!(p=f.n()).done;){var m=p.value;i.add(m)}}catch(t){f.e(t)}finally{f.f()}c=d}}}catch(t){o.e(t)}finally{o.f()}r.forEach(function(t){i.delete(t)}),s.adjacentElements=i}(s.containers),s.active&&(h(),o.isolateSubtrees&&!s.paused&&n._setSubtreeIsolation(!0)),R(),this}},Object.defineProperties(n,{_isManuallyPaused:{value:function(){return s.manuallyPaused}},_setPausedState:{value:function(t,e){if(s.paused===t)return this;if(s.paused=t,t){var r=a(e,"onPause"),i=a(e,"onPostPause");null==r||r(),D(),R(),n._setSubtreeIsolation(!1),null==i||i()}else{var o=a(e,"onUnpause"),l=a(e,"onPostUnpause");null==o||o(),n._setSubtreeIsolation(!0),h(),O(),R(),null==l||l()}return this}},_setSubtreeIsolation:{value:function(t){o.isolateSubtrees&&s.adjacentElements.forEach(function(e){t?((e.inert||e.hasAttribute("inert"))&&s.alreadyInert.add(e),e.inert=!0):s.alreadyInert.has(e)||(e.inert=!1)})}}}),n.updateContainerElements(t),n}}),BO=l((t,e)=>{function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var r,i;function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,d(r.key),r)}}function s(t,e,r){return e=l(e),function(t,e){if(e&&("object"==n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,a()?Reflect.construct(e,r||[],l(t).constructor):e.apply(t,r))}function a(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(a=function(){return!!t})()}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function c(t,e){return(c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function d(t){var e=function(t,e){if("object"!=n(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==n(e)?e:e+""}var h=(Xe(),p(zt)),f=(UO(),p(SO)).createFocusTrap,m=(tO(),p(Qv)).isFocusable,E=parseInt(null!==(r=null===(i=/^(\d+)\./.exec(h.version))||void 0===i?void 0:i[1])&&void 0!==r?r:0,10),_=function(t){function e(t){var n;(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,e),function(t,e,n){(e=d(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}(n=s(this,e,[t]),"getNodeForOption",function(t){var e,n=null!==(e=this.internalOptions[t])&&void 0!==e?e:this.originalOptions[t];if("function"==typeof n){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];n=n.apply(void 0,i)}if(!0===n&&(n=void 0),!n){if(void 0===n||!1===n)return n;throw new Error("`".concat(t,"` was specified but was not a node, or did not return a node"))}var s,a=n;if("string"==typeof n&&!(a=null===(s=this.getDocument())||void 0===s?void 0:s.querySelector(n)))throw new Error("`".concat(t,"` as selector refers to no known node"));return a}),n.handleDeactivate=n.handleDeactivate.bind(n),n.handlePostDeactivate=n.handlePostDeactivate.bind(n),n.handleClickOutsideDeactivates=n.handleClickOutsideDeactivates.bind(n),n.internalOptions={returnFocusOnDeactivate:!1,checkCanReturnFocus:null,onDeactivate:n.handleDeactivate,onPostDeactivate:n.handlePostDeactivate,clickOutsideDeactivates:n.handleClickOutsideDeactivates},n.originalOptions={returnFocusOnDeactivate:!0,onDeactivate:null,onPostDeactivate:null,checkCanReturnFocus:null,clickOutsideDeactivates:!1};var r=t.focusTrapOptions;for(var i in r)if(Object.prototype.hasOwnProperty.call(r,i)){if("returnFocusOnDeactivate"===i||"onDeactivate"===i||"onPostDeactivate"===i||"checkCanReturnFocus"===i||"clickOutsideDeactivates"===i){n.originalOptions[i]=r[i];continue}n.internalOptions[i]=r[i]}return n.outsideClick=null,n.focusTrapElements=t.containerElements||[],n.updatePreviousElement(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&c(t,e)}(e,t),function(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}(e,[{key:"getDocument",value:function(){return this.props.focusTrapOptions.document||("undefined"!=typeof document?document:void 0)}},{key:"getReturnFocusNode",value:function(){var t=this.getNodeForOption("setReturnFocus",this.previouslyFocusedElement);return t||!1!==t&&this.previouslyFocusedElement}},{key:"updatePreviousElement",value:function(){var t=this.getDocument();t&&(this.previouslyFocusedElement=t.activeElement)}},{key:"deactivateTrap",value:function(){!this.focusTrap||!this.focusTrap.active||this.focusTrap.deactivate({returnFocus:!1,checkCanReturnFocus:null,onDeactivate:this.originalOptions.onDeactivate})}},{key:"handleClickOutsideDeactivates",value:function(t){var e="function"==typeof this.originalOptions.clickOutsideDeactivates?this.originalOptions.clickOutsideDeactivates.call(null,t):this.originalOptions.clickOutsideDeactivates;return e&&(this.outsideClick={target:t.target,allowDeactivation:e}),e}},{key:"handleDeactivate",value:function(){this.originalOptions.onDeactivate&&this.originalOptions.onDeactivate.call(null),this.deactivateTrap()}},{key:"handlePostDeactivate",value:function(){var t=this,e=function(){var e=t.getReturnFocusNode(),n=!(!t.originalOptions.returnFocusOnDeactivate||null==e||!e.focus||t.outsideClick&&(!t.outsideClick.allowDeactivation||m(t.outsideClick.target,t.internalOptions.tabbableOptions))),r=t.internalOptions.preventScroll,i=void 0!==r&&r;n&&e.focus({preventScroll:i}),t.originalOptions.onPostDeactivate&&t.originalOptions.onPostDeactivate.call(null),t.outsideClick=null};this.originalOptions.checkCanReturnFocus?this.originalOptions.checkCanReturnFocus.call(null,this.getReturnFocusNode()).then(e,e):e()}},{key:"setupFocusTrap",value:function(){this.focusTrap?this.props.active&&!this.focusTrap.active&&(this.focusTrap.activate(),this.props.paused&&this.focusTrap.pause()):this.focusTrapElements.some(Boolean)&&(this.focusTrap=this.props._createFocusTrap(this.focusTrapElements,this.internalOptions),this.props.active&&this.focusTrap.activate(),this.props.paused&&this.focusTrap.pause())}},{key:"componentDidMount",value:function(){this.props.active&&this.setupFocusTrap()}},{key:"componentDidUpdate",value:function(t){if(this.focusTrap){t.containerElements!==this.props.containerElements&&this.focusTrap.updateContainerElements(this.props.containerElements);var e=!t.active&&this.props.active,n=t.active&&!this.props.active,r=!t.paused&&this.props.paused,i=t.paused&&!this.props.paused;if(e&&(this.updatePreviousElement(),this.focusTrap.activate()),n)return void this.deactivateTrap();r&&this.focusTrap.pause(),i&&this.focusTrap.unpause()}else t.containerElements!==this.props.containerElements&&(this.focusTrapElements=this.props.containerElements),this.props.active&&(this.updatePreviousElement(),this.setupFocusTrap())}},{key:"componentWillUnmount",value:function(){this.deactivateTrap()}},{key:"render",value:function(){var t=this,e=this.props.children?h.Children.only(this.props.children):void 0;if(e){if(e.type&&e.type===h.Fragment)throw new Error("A focus-trap cannot use a Fragment as its child container. Try replacing it with a <div> element.");return h.cloneElement(e,{ref:function(n){var r=t.props.containerElements;e&&(E>=19?"function"==typeof e.props.ref?e.props.ref(n):e.props.ref&&(e.props.ref.current=n):"function"==typeof e.ref?e.ref(n):e.ref&&(e.ref.current=n)),t.focusTrapElements=r||[n]}})}return null}}])}(h.Component);_.defaultProps={active:!0,paused:!1,focusTrapOptions:{},_createFocusTrap:f},e.exports=_,e.exports.FocusTrap=_});Xe();var jO=BO();function VO(t){var e;const{children:n,preferredPlacement:r="top-start",anchorElement:i,boundaryElement:o,trapFocus:s=!1,initialFocus:a,portal:l,...c}=t,{anchor:d,boundary:h}=Et(()=>({anchor:zO(i),boundary:o?zO(o):void 0}),[i,o]);let p=[];h&&(p=[Av({boundary:h,fallbackPlacements:["top-start","top-end","bottom-start","bottom-end","top","bottom"]}),_v({boundary:h,padding:8}),gv({boundary:h})]);const{refs:f,floatingStyles:m,middlewareData:E}=mv({placement:r,middleware:p,whileElementsMounted:iv});pt(()=>{d&&f.setReference(d)},[f,d]);const _=s?Gs(jO.FocusTrap,{focusTrapOptions:{initialFocus:a,fallbackFocus:".t-fallback-focus",allowOutsideClick:!0,tabbableOptions:{getShadowRoot:!0}},children:Gs("div",{children:[n,Gs("span",{className:"t-fallback-focus",tabIndex:-1})]})}):n,A=Gs("div",{ref:f.setFloating,style:{...m,zIndex:1e3,visibility:null!==(e=E.hide)&&void 0!==e&&e.referenceHidden?"hidden":"visible"},...c,children:_});var g;return l?Gs(AO,{root:null===(g=h||d)||void 0===g?void 0:g.closest("[t-menu-boundary='root']"),children:A}):A}function zO(t){return"string"==typeof t?document.querySelector(t):t}function $O(t){const e=Cn(),n=Sn(),r=yo(n.state$.suggestMentionQuery),i=yo(e.state$.currentConversationId),{transformMentions:o}=yn(),s=jn(i,r?1e3:0),a=Et(()=>{const t=s.map(t=>({id:t.user.id,name:t.user.name}));if(!o)return t;try{return o(t)}catch(e){return WA.error("Exception in transformMentions, using default mention suggestions",e),t}},[s,o]),[l,c]=ut(0),d=Et(()=>Object.fromEntries(a.map(t=>[t.id,dn(t.name)])),[a]),h=Et(()=>{if(!r)return[];const t=GO(r);return""===t?a:a.filter(e=>d[e.id].some(e=>function(t,e){return un(t.substring(0,e.length),e)}(e,t)))},[r,a,d]),p=ft(void 0);ht(()=>{if(p.current){const t=h.findIndex(t=>t.id===p.current);c(-1===t?0:t)}},[h]),ht(()=>{var t;p.current=null===(t=h[l])||void 0===t?void 0:t.id},[l,h]);const{containerProps:f,itemProps:m}=Ig({focused:l,setFocused:c,buttonId:_t(t=>{var e;const n=null===(e=h[t])||void 0===e?void 0:e.id;return n&&"mention-button-"+n},[h])});if(ht(()=>{if(0!==h.length)return n.listenKeydown("mention",t=>yg(t,{dir:"ttb",focused:l,setFocused:c,itemCount:h.length,onSpace(){if(r){const t=h[l];if(un(t.name,GO(r)))return n.selectMention(t),!0}return!1},onConfirm(){const t=h[l];n.selectMention(t)}})),()=>{n.listenKeydown("mention",void 0)}},[n,l,h,r]),zA(()=>n.closeSuggester(),".t-mention-suggest-list",h.length>0),0===h.length)return null;const E=document.querySelector(".ProseMirror-suggestion");let _;if(E){let t=E.getBoundingClientRect();_={getBoundingClientRect(){const e=E.getBoundingClientRect();return e.width>0&&(t=e),t}}}return Gs(VO,{className:"t-mention-suggest-list",...f,anchorElement:_,children:h.map((t,e)=>Gs(YO,{user:t,isFocused:e===l,onSelect:()=>n.selectMention(t),...m(e)},t.id))})}Xe();const YO=Zt(function(t){const{user:e,isFocused:n,onSelect:r,...i}=t;return Gs("button",{className:n?"focused":"",onClick:()=>r(e.id),...i,children:e.name})});function GO(t){return En("@"===t[0]),t.substring(1)}function WO(t,e,n){const r=Kv(t),i=r.indexOf(e);return-1===i?null:r[i+n]||null}tO(),Xe();const XO=Qt(function(t,e){const{children:n,triggerElement:r}=t,{closePopover:i}=Un(),o=ft(null);return mt(e,()=>o.current),ht(()=>{var t;null===(t=o.current)||void 0===t||t.focus()},[]),Gs("div",{"t-menu":"",role:"menu",tabIndex:-1,ref:o,onKeyDown:_t(t=>{!function(t,e,n,r){var i;const o=e.querySelectorAll("[t-menu-item]"),s=document.activeElement;if(!s||!s.hasAttribute("t-menu-item")&&!s.hasAttribute("t-menu"))return;const a=Array.from(o).indexOf(s);let l;switch(t.key){case"ArrowDown":l=Math.min(a+1,o.length-1);break;case"ArrowUp":l=Math.max(a-1,0),-1===a&&(l=o.length-1);break;case"Home":l=0;break;case"End":l=o.length-1;break;case"Tab":{const e=n.closest("t-chatbox,t-conversation-list,.t-chatbox,.t-conversation-list"),i=t.shiftKey?function(t,e){return WO(t,e,-1)}(e,n):function(t,e){return WO(t,e,1)}(e,n);return null==i||i.focus(),void r()}default:return}null===(i=o[l])||void 0===i||i.focus()}(t,o.current,r,i)},[i,r]),children:n})});function KO(t){const{popoverComponent:e,popoverProps:n,children:r,type:i="popover",initialFocus:o,portal:s,...a}=t,[l,c]=ut(void 0),d=ft(null),[h,p]=ut(!1);zA(_t(t=>{var e,n;t&&null!==(e=d.current)&&void 0!==e&&e.contains(t.target)||(p(!1),null===(n=d.current)||void 0===n||n.focus())},[]),"[t-popover-content]",h);const f="menu"===i?Gs(XO,{triggerElement:d.current,children:Gs(e,{...n})}):Gs(e,{...n});return Gs(Hn.Provider,{value:{closePopover:()=>p(!1)},children:[Gs(qO,{...a,"aria-haspopup":"menu"===i?"menu":"true","aria-expanded":h,onTrigger:()=>p(t=>!t),ref:t=>(t=>{var e;const n=null!==(e=null==t?void 0:t.closest("[t-menu-boundary]"))&&void 0!==e?e:void 0;d.current=t,c(n)})(t),children:r}),h&&Gs(VO,{portal:s,"t-popover-content":"",anchorElement:d.current,boundaryElement:l,preferredPlacement:"bottom-start",trapFocus:"popover"===i,initialFocus:"menu"===i?"t-menu":o,role:"menu"===i?void 0:"dialog",children:f})]})}Xe();const qO=Qt(function(t,e){const{onTrigger:n,...r}=t,i=_t(t=>{("Enter"===t.key||" "===t.key)&&n()},[n]);return Gs("button",{...r,ref:e,onClick:n,onKeyDown:i})});function JO(t){const{onSelect:e,...n}=t,{closePopover:r}=Un(),i=_t(t=>{("Enter"===t.key||" "===t.key)&&(r(),null==e||e())},[e,r]);return Gs("div",{tabIndex:-1,role:"menuitem",onClick:_t(()=>{r(),null==e||e()},[r,e]),onKeyDown:i,"t-menu-item":"",...n})}function ZO(t){const{as:e="div",children:n,...r}=t;return g(e,{...r,"t-keyboard-nav-list-item":""},n)}function QO(t){const e=ft(t);return pt(()=>{e.current=t},[t]),e}function tD(t){const e=Cn(),n=bn(),r=ft(null),{value:i,onChange:o,onKeyDown:s,onKeyUp:a,...l}=t,c=QO(o),d=QO(s),h=QO(a);ht(()=>()=>{si(()=>{"ChatboxStore"===e.type&&(e.searchQuery$.set(""),e.highlightedStrings$.set([]),e.focusedMessage$.set(null))})},[e]);const p=_t(()=>{r.current.blur(),n.jumpToHighlight("up")},[n]),f=_t(t=>{var n;null===(n=d.current)||void 0===n||n.call(d,t),!t.defaultPrevented&&"ChatboxStore"===e.type&&e.state$.enterSendsMessage.peek()&&ln(t)&&t.preventDefault()},[d,e]),m=_t(t=>{var n;null===(n=h.current)||void 0===n||n.call(h,t),!t.defaultPrevented&&"ChatboxStore"===e.type&&e.state$.enterSendsMessage.peek()&&ln(t)&&(t.preventDefault(),p())},[h,e,p]),E=_t(t=>{var n;const r=t.target.value;"ChatboxStore"===e.type?e.setSearchQuery(r):e.setGlobalSearchQuery(r),null===(n=c.current)||void 0===n||n.call(c,t)},[e,c]),_=yo(()=>"ChatboxStore"===e.type?e.searchQuery$.get():e.globalSearchState$.query.get());return Gs("input",{type:"search",enterKeyHint:"search",autoComplete:"off",value:null!=i?i:_,onChange:E,onKeyUp:m,onKeyDown:f,...l,ref:r})}Xe(),Xe(),Xe(),Xe(),Xe();const eD={barHeight:4,barRadius:2,barGap:2,barWidth:2,height:24},nD={state:null,duration:0,recordingUrl:void 0,uploadState:"done",fileToken:void 0},rD=new WeakMap;function iD({className:t,voiceRecorder:e}){const n=rD.get(e);return n?Gs("div",{className:t,style:{shapeRendering:"crispEdges"},ref:n}):(WA.warn("Can only use Waveform component if a voice recorder is active"),null)}Xe();const oD=Symbol("no_render");function sD(t){const e=Vo(!1),n=ft({_value:"function"==typeof t?t():t.peek(),get value(){return setTimeout(()=>{e.set(!0)}),n.current._value},set value(t){n.current._value=t}});return yo(()=>{if(!e.get())return oD;const r="function"==typeof t?t():t.get();return n.current.value=r,r}),n.current}function aD(){const t=Tn(),e=Cn(),n=Pn(),r=An(),i=sD(e.app$.appMetadata),o=sD(e.currentUser$),s=sD(e.state$.currentConversation),a=sD(e.state$.currentConversationId),l=sD(e.t$),c=sD(e.device$),d=sD(e.themeCustom$),h=sD(e.chatSearchState$),p=sD(e.focusedMessage$),f=sD(()=>{const t=e.state$.currentConversationId.get(),n=t&&e.state$.typing.child(t).get();return null!=n?n:{many:!1,users:[]}}),m=sD(()=>{const t=e.state$.currentConversationId.get();return t&&e.state$.participants.child(t).get()});return Et(()=>({session:t,store:e,chatbox:n,theme:r,get app(){return i.value},get currentUser(){return o.value},get conversation(){return s.value},get conversationId(){return a.value},get t(){return l.value},get device(){return c.value},get themeCustom(){return d.value.value},get typing(){return f.value},get participants(){return m.value},get focusedMessage(){return p.value},get chatSearchState(){return h.value}}),[i,n,s,a,o,c,e,l,r,d,f,m,t,h,p])}function lD(){const t=Tn(),e=Cn(),n=An(),r=Pn(),i=sD(e.app$.appMetadata),o=sD(e.currentUser$),s=sD(e.t$),a=sD(e.device$),l=sD(e.themeCustom$);return Et(()=>({session:t,store:e,theme:n,conversationList:r,get app(){return i.value},get currentUser(){return o.value},get t(){return s.value},get device(){return a.value},get themeCustom(){return l.value.value}}),[i,r,o,a,t,e,s,n,l])}function cD(t){return t.map(t=>function(t){if("text"===t.type)return function(t,e){return uD(t,SA(e))}(t.children,{});if("file"===t.type&&"video"===t.subtype)return`🎥 ${t.filename}`;if("file"===t.type&&"image"===t.subtype)return`📷 ${t.filename}`;if("file"===t.type&&"audio"===t.subtype)return`🎧 ${t.filename}`;if("file"===t.type&&"voice"===t.subtype){const e=t.duration;return void 0===e?"🎙️":`🎙️ (${Math.floor(e/60)}:${Math.floor(e%60).toString().padStart(2,"0")})`}return"file"===t.type?(t.subtype,`📎 ${t.filename}`):"location"===t.type?"📍":""}(t)).join("\n\n")}function uD(t,e){return t.flatMap(t=>{if("string"==typeof t)return t;switch(t.type){case"blockquote":case"bold":case"italic":case"strikethrough":case"link":case"actionlink":case"actionLink":case"actionbutton":case"actionButton":return uD(t.children,e);case"bulletlist":case"bulletList":return"\n"+uD(t.children,e);case"bulletpoint":case"bulletPoint":return"- "+uD(t.children,e)+"\n";case"autolink":case"autoLink":case"codeblock":case"codeBlock":case"codespan":case"codeSpan":case"emoji":case"customemoji":case"customEmoji":return t.text;case"suppressed":return e.contactInfoHiddenText;case"mention":return`@${t.text}`}}).join("")}function dD(t){var e,n,r;const{sender:i}=t,o=Tn(),s=aD(),a=An(),[l,c]=ut(i&&"object"==typeof i?i:null);ht(()=>{"string"==typeof i&&o.user(i).get().then(c)},[o,i]);const d="virtual-message-"+vt(),[h,p]=Et(()=>{var e;const n=null!==(e=t.content)&&void 0!==e?e:function(t){return[{type:"text",children:F_(null!=t?t:"")}]}(t.text);return[n,cD(n)]},[t.content,t.text]);if(i&&!l)return null;const f={id:d,type:l?"UserMessage":"SystemMessage",sender:l,custom:null!==(e=t.custom)&&void 0!==e?e:{},createdAt:null!==(n=t.createdAt)&&void 0!==n?n:-1,editedAt:null,referencedMessage:null,origin:"web",plaintext:p,content:h,reactions:[]};return Gs(a.Message,{common:s,message:f,messageStatus:null!==(r=t.status)&&void 0!==r?r:"virtual",permissions:{showTypingIndicator:!1,canShareFile:!1,canShareLocation:!1,canMention:!1,showOnlineStatus:!1,canSendVoiceMessage:!1,canLeaveConversation:!1,canMarkConversationAsUnread:!1,canDeleteMessage:!1,canReplyToMessage:!1,canAddReaction:!1,canEditMessage:!1,canSearch:!1}})}function hD(t){return nn(t)}function pD(t){var e;return null!==(e=t.photoUrl)&&void 0!==e?e:en(t.id,tn(t.name))}function fD(t,e){return en(t,e)}function mD(t){return t<1024?t+" B":t<1048576?Math.floor(t/1024)+" KB":t<1073741824?Math.floor(t/1048576)+" MB":t<1099511627776?Math.floor(t/1073741824)+" GB":Math.floor(t/1099511627776)+" TB"}function ED({latitude:t,longitude:e}){const n=t+","+e;return{imageUrl:`https://maps.googleapis.com/maps/api/staticmap?center=${n}&zoom=15&size=300x200&scale=2&maptype=roadmap&markers=${n}&key=${Ke}`,linkUrl:`https://maps.google.com/maps?q=${n}&z=15`}}function _D(t,e){const[n,r]=ut({long:"",short:""});return pt(()=>{let n,i=!0;const o=()=>{const n=Date.now(),i=function(t,e,n){const r=t-e;let i,o,s;const a=new Date(e),l={month:"short",day:"numeric"};if(r<vD)return{changeTimeout:5e3,short:n.JUST_NOW,long:n.JUST_NOW};if(r<OD)i=vD,o="MINUTES",s=n.MINUTES;else if(r<DD)i=OD,o="HOURS",s=n.HOURS;else{if(!(r<TD)){if(a.getFullYear()===new Date(t).getFullYear()){const t=a.toLocaleDateString(n.locale,l);return{changeTimeout:void 0,short:t,long:t}}{const t=a.toLocaleDateString(n.locale,{...l,year:"numeric"});return{changeTimeout:void 0,short:t,long:t}}}i=DD,o="DAYS",s=n.DAYS}const c=Math.floor(r/i);return{changeTimeout:i,short:c+s,long:RD(c,o.toLowerCase(),n.locale)}}(n,t>n?n-2e3:t,e);return r(i),i},s=()=>{const t=o();i&&t.changeTimeout&&(n=window.setTimeout(s,t.changeTimeout))};return o(),n=window.setTimeout(s,100),()=>{i=!1,clearTimeout(n)}},[e,t]),n}function AD(t){t=Math.floor(t);const e=Math.floor(t/3600);t%=3600;const n=Math.floor(t/60);t%=60;const r=t=>t.toString().padStart(2,"0");let i=`${r(n)}:${r(t)}`;return e>0&&(i=`${r(e)}:${i}`),i}Xe(),Xe();const gD=864e5;function SD(t,e){const n=Date.now(),r=function(t,e){return Math.floor((e-t)/gD)}(t,n);if(r<0)return e.TODAY;if(0===r)return e.TODAY;if(1===r)return e.YESTERDAY;const i={weekday:"long"},o=new Date(t);if(r<7)return o.toLocaleDateString(e.locale,i);const s=new Date(n);return 0===function(t,e){return Math.floor((e-t)/(365*gD))}(s.setFullYear(s.getFullYear()-1),t)?o.toLocaleDateString(e.locale,{...i,month:"long",day:"numeric"}):o.toLocaleDateString(e.locale,{...i,year:"numeric",month:"long",day:"numeric"})}const vD=6e4,OD=36e5,DD=864e5,TD=6048e5;function RD(t,e,n){return new Intl.RelativeTimeFormat(n).format(-t,e)}function yD(t,...e){const n=E.bind(g)(t,...e);return Array.isArray(n)?g(O,{},...n):n}function ID(t,e=10){return jn(t,Math.min(e,100))}function CD(t,e,n){const r=Tn(),i=Vo([]),o=Vo(!1);zo(s=>{if(o.get()){const o=r.conversation(t).message(e).reactions(n).subscribe(t=>{var e;null!==(e=t)&&void 0!==e||(t=[]),t=t.slice(0,10),i.set(t)});s.onCleanup=()=>{o.unsubscribe()}}});const s=_t(()=>o.set(!0),[o]);return[yo(i),s]}function ND(t){const{conversation:e,theme:n,chatbox:r,t:i,chatSearchState:o}=t.common,{ConversationImage:s,ChatSearchBox:a}=n,l=ID(e.id,10);return t.permissions.canSearch&&"hidden"!==o?Gs("div",{className:"t-theme-chat-header",children:Gs(a,{common:t.common,searchQuery:t.searchQuery})}):Gs("div",{className:"t-theme-chat-header",children:Gs("div",{className:"t-inner",children:[Gs("div",{className:"t-content",children:[Gs("button",{className:"t-back-button","aria-label":i.INBOX,title:i.INBOX,onClick:()=>r.clickBackButton(),children:Gs(Na,{type:"chevronLeft",size:20})}),Gs("div",{className:"t-image",children:Gs(s,{conversation:e,participants:l,common:t.common})}),Gs("div",{className:"t-info",children:Gs(bD,{...t})})]}),Gs("div",{className:"t-actions",children:Gs("button",{className:"t-action-button","aria-label":i.ARIA_SEARCH_INSIDE_CONVERSATION,title:i.ARIA_SEARCH_INSIDE_CONVERSATION,onClick:()=>r.toggleSearchBox(),children:Gs(Na,{type:"search",size:20})})})]})})}function bD(t){const{common:e}=t;return e.conversation.subject?Gs(O,{children:[Gs("div",{className:"t-title",children:e.conversation.subject}),Gs("div",{className:"t-subtitle",children:Gs(wD,{...t})})]}):Gs("div",{className:"t-title",children:Gs(wD,{...t})})}function wD({common:t,isUserConnected:e,permissions:n}){const r=ID(t.conversation.id,10),i=r.find(({user:e})=>e.id===t.currentUser.id),o=r.filter(({user:e})=>e.id!==t.currentUser.id),s=o.length>2?r:2===r.length?o:i?[i,...o]:[];return n.showOnlineStatus?Gs("span",{className:"t-participants",children:s.map(({user:n})=>Gs("span",{className:"t-participant",children:[Gs("span",{children:n.name}),n.id===t.currentUser.id&&Gs("span",{className:"t-participant-you",children:" (you)"}),Gs("span",{className:"t-online-indicator","t-status":e[n.id]?"online":"offline"})]},n.id))}):Gs("span",{className:"t-participants",children:s.map(({user:t})=>t.name).join(", ")})}function kD(t){return null}function LD(t){var e,n;const{message:r,messageStatus:i,permissions:o,common:s}=t,{currentUser:a,theme:l,conversation:c,t:d}=s,{Avatar:h,ReferencedMessage:p,MessageActionMenu:f}=l,m=ID(c.id,3).length>=3,E=r.sender,_=(null==E?void 0:E.id)!==a.id&&m,A=r.referencedMessage,g="sending"!==i&&(o.canReplyToMessage||o.canDeleteMessage),S=o.canAddReaction&&"ReadWrite"===c.access;let v;v=E?E.id===a.id?"currentUser":"other":"system";const O=null===(e=s.focusedMessage)||void 0===e?void 0:e.id,D=void 0!==O&&r.id===O,T={messageId:r.id,colorScheme:"light"};return Gs("div",{className:"t-theme-message","t-sender":v,"t-message-id":r.id,"t-status":i,"t-focused":D?"":void 0,children:[E&&Gs("div",{className:"t-avatar-wrapper",children:Gs(h,{photoUrl:pD(E),common:s})}),E&&_&&Gs("div",{className:"t-message-sender-name",style:{color:hD(E.id)},children:E.name}),Gs("div",{className:"t-message-body",children:["system"===v&&Gs("span",{className:"sys-icon",children:Gs(Na,{type:"info",size:14})}),A&&Gs(p,{referencedMessage:A,common:s}),Gs(BA,{common:s,message:r,messageStatus:i}),(null===(n=r.reactions)||void 0===n?void 0:n.length)>0&&Gs("div",{className:"t-emoji-reactions",children:r.reactions.map(t=>Gs(MD,{summary:t,message:r,common:s,permissions:o},t.emoji))})]}),Gs("div",{className:"t-message-status",children:[Gs(xD,{timestamp:r.createdAt,common:s}),"currentUser"==v&&Gs(PD,{...t})]}),Gs("div",{className:"t-message-buttons",children:[g&&Gs(KO,{type:"menu",popoverComponent:f,popoverProps:{message:r,permissions:o,common:s},className:"t-message-action-menu-button","aria-label":d.ARIA_MORE_ACTIONS,children:Gs(Na,{type:"horizontalDots",className:"t-action-menu-icon",size:20})}),S&&Gs(KO,{className:"t-add-reaction-button",popoverComponent:ig,popoverProps:T,"aria-label":d.ADD_REACTION,children:Gs(Na,{type:"addEmoji",className:"t-add-reaction-icon",size:20})})]})]})}function MD({summary:t,message:e,common:n,permissions:r}){const{t:i,chatbox:o,conversation:s}=n,{emoji:a,count:l,currentUserReacted:c}=t,[d,h]=CD(s.id,e.id,t.emoji),p=d.map(t=>t.user.name);d.length&&d.length<t.count&&p.push("...");const f=p.join(", ");return Gs("button",{className:"t-reaction-button","t-active":c?"true":void 0,onClick:()=>o.toggleReaction(e.id,a),disabled:!r.canAddReaction,"aria-label":i.ARIA_REACTION_COUNT(l,a),"aria-pressed":c,onMouseOver:h,onTouchStart:h,"t-tooltip-text":f,children:[Gs("span",{className:"t-emoji",children:a}),Gs("span",{className:"t-num-reactions",children:l})]})}function PD({messageStatus:t}){return"sending"===t?Gs("span",{className:"t-status-icon","t-status":"sending",children:Gs(Na,{type:"inProgress",className:"t-message-loading-spinner",size:"20px"})}):"sent"===t?Gs("span",{className:"t-status-icon","t-status":"sent",children:Gs(Na,{type:"checkmark",size:12})}):"everyoneRead"===t?Gs("span",{className:"t-status-icon","t-status":"everyoneRead",children:[Gs(Na,{type:"checkmark",size:12}),Gs(Na,{type:"checkmark",size:12})]}):null}function xD({timestamp:t,common:e}){if(-1===t)return null;const{t:n}=e;return Gs("span",{className:"t-theme-time-ago",children:Gs("span",{role:"time",title:new Date(t).toLocaleString(n.locale,{weekday:"short",year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),children:new Date(t).toLocaleTimeString(n.locale,{hour:"numeric",minute:"numeric"})})})}function FD(t){const{message:e,permissions:n,common:r}=t,{chatbox:i,t:o}=r;return Gs("div",{className:"t-theme-message-action-menu",children:[n.canReplyToMessage&&Gs(JO,{className:"t-menu-item",onSelect:()=>i.setReferencedMessage(e.id),children:[Gs("span",{className:"t-menu-item-icon-box",children:Gs(Na,{type:"reply",className:"t-menu-item-icon",size:16})}),Gs("span",{children:o.REPLY_TO_MESSAGE})]}),n.canEditMessage&&Gs(JO,{className:"t-menu-item",onSelect:()=>i.setEditing(e.id),children:[Gs("span",{className:"t-menu-item-icon-box",children:Gs(Na,{type:"edit",className:"t-menu-item-icon",size:16})}),Gs("span",{children:o.EDIT_MESSAGE})]}),n.canDeleteMessage&&Gs(JO,{className:"t-menu-item t-danger",onSelect:()=>i.deleteMessage(e.id),children:[Gs("span",{className:"t-menu-item-icon-box",children:Gs(Na,{type:"trash",className:"t-menu-item-icon",size:16})}),Gs("span",{children:o.DELETE_MESSAGE})]})]})}function HD(t){const{common:e,referencedMessage:n,editor:r,voiceRecorder:i,permissions:o,editMessageId:s}=t,{chatbox:a,device:l,conversation:c,t:d,theme:h}=e,{ReplyBar:p,VoiceRecorder:f,RecordingPreview:m}=h,E=s?"edit":"send",_="edit"===E&&!r.atTextLimit&&r.characterCount>0,A=!r.isEmpty&&!r.atTextLimit&&!r.sendBlocked&&"ReadWrite"===c.access,g=!i&&"ReadWrite"===c.access,S="send"===E&&r.isEmpty&&o.canShareLocation,v="send"===E&&o.canShareFile,D="send"===E&&l.supportsEmojiPicker&&!l.isMobile,T="send"===E&&r.isEmpty&&o.canSendVoiceMessage;return Gs("div",{className:"t-theme-message-field","t-mode":E,children:[r.showEmojiPicker&&Gs("div",{className:"t-emoji-picker-wrapper",children:Gs(rg,{colorScheme:"light"})}),Gs(bg,{}),Gs($O,{}),n&&Gs(p,{common:e,referencedMessage:n}),Gs("div",{className:"t-wrapper",children:[r.atTextLimit&&Gs("div",{className:"t-text-limit-indicator",children:d.ENTRYBOX_TEXT_LIMIT}),Gs("div",{className:"t-text-form",children:["Read"===c.access&&Gs("div",{className:"t-readonly",children:d.ENTRYBOX_PLACEHOLDER_CHAT_READONLY}),i&&"recording"===i.state&&Gs(f,{common:e,voiceRecorder:i}),i&&"previewing"===i.state&&Gs(m,{common:e,voiceRecorder:i}),g&&Gs(O,{children:[v&&Gs("div",{className:"t-attachment-column",children:Gs("button",{className:"t-attachment-button","t-kind":"icon-button","aria-label":d.UPLOAD_SEND_FILE,title:d.UPLOAD_SEND_FILE,onClick:()=>r.attachFile(),children:Gs(Na,{type:"attachment",size:20})})}),Gs("div",{className:"t-textbox-column",children:[Gs(J_,{placeholder:d.ENTRYBOX_PLACEHOLDER}),Gs("div",{className:"t-button-overlay",children:[S&&Gs("button",{className:"t-location-button","t-kind":"icon-button","aria-label":d.UPLOAD_SHARE_LOCATION,title:d.UPLOAD_SHARE_LOCATION,onClick:()=>r.shareLocation(),children:Gs(Na,{type:"location",size:20})}),D&&Gs("button",{className:"t-emoji-button","t-kind":"icon-button","aria-label":d.ARIA_INSERT_EMOJI,title:d.ARIA_INSERT_EMOJI,onClick:()=>r.toggleEmojiPicker(),children:Gs(Na,{type:r.showEmojiPicker?"close":"emoji",size:r.showEmojiPicker?24:20})})]})]})]}),"send"===E&&g&&Gs("div",{className:"t-send-column",children:[T&&Gs("button",{className:"t-record-button","t-kind":"icon-button","aria-label":d.VOICE_MESSAGE,title:d.VOICE_MESSAGE,onClick:()=>r.recordVoiceMessage(),disabled:r.sendBlocked,children:Gs(Na,{type:"microphone",size:20})}),!T&&Gs("button",{className:"t-send-button","t-kind":"icon-button","aria-label":d.SEND_BUTTON_TEXT,title:d.SEND_BUTTON_TEXT,onClick:()=>r.send(),disabled:!A,children:Gs(Na,{type:"arrowUp",size:20})})]}),"edit"===E&&Gs("div",{className:"t-edit-row",children:[Gs("button",{"t-action":"cancel",onClick:()=>a.setEditing(null),children:d.CANCEL}),Gs("button",{"t-action":"save",onClick:()=>r.send(),disabled:!_,children:d.SAVE})]})]})]})]})}function UD(t){const{timestamp:e,isReadMarker:n,isDayMarker:r,common:i}=t,{t:o}=i;return Gs("div",{className:"t-message-divider",children:[Gs("div",{className:"t-line","t-side":"left",children:Gs("div",{className:"t-line-segment"})}),r&&void 0!==e&&Gs("span",{className:"t-day-marker",children:SD(e,o)}),Gs("div",{className:"t-line","t-side":"right",children:[Gs("div",{className:"t-line-segment"}),n&&Gs("span",{className:"t-unread-marker",children:o.MESSAGELIST_NEW_MARKER})]})]})}function BD(t){return null}function jD({common:t}){const e=t.conversation.welcomeMessages;return 0===e.length?null:Gs("div",{className:"t-message-group",children:e.map((t,e)=>Gs(dD,{text:t},e)).reverse()})}function VD({common:t}){const{typing:e,theme:n}=t,{Avatar:r}=n;if(!e.many&&0===e.users.length)return null;const i=e.many?Gs("div",{className:"t-theme-avatar",children:"5+"}):e.users.slice(0,2).map(e=>Gs(r,{photoUrl:pD(e),common:t},e.id));return Gs("div",{className:"t-theme-after-messages","t-many":String(e.many),"aria-label":zD(e),children:[Gs("div",{className:"t-typing-avatars","aria-hidden":"true",children:[i,!e.many&&e.users.length>2&&Gs("div",{className:"t-theme-avatar",children:["+",e.users.length-2]})]}),Gs("div",{className:"t-typing-bubble",children:Gs("div",{className:"t-typing-animation",children:[Gs("span",{}),Gs("span",{}),Gs("span",{})]})})]})}function zD(t){if(t.many)return"Several people are typing";const{users:e}=t;return 1===e.length?`${e[0].name} is typing`:2===e.length?`${e[0].name} and ${e[1].name} are typing`:`${e[0].name}, ${e[1].name}, and ${e.length-2} others are typing`}function $D(t){return Gs("span",{className:"t-theme-compact-message-content",children:Gs(YD,{...t})})}function YD({message:t,common:e}){const n=t.content[0],{t:r}=e;if("text"===n.type)return Gs(HA,{block:n,message:t,nonInteractive:!0});if("location"===n.type)return Gs(O,{children:[Gs(Na,{type:"location",size:16})," ",r.LOCATION]});if("file"===n.type){if("image"===n.subtype)return Gs(O,{children:[Gs(Na,{type:"image",size:16}),n.filename]});if("video"===n.subtype)return Gs(O,{children:[Gs(Na,{type:"movie",size:16}),n.filename]});if("audio"===n.subtype)return Gs(O,{children:[Gs(Na,{type:"attachment",size:16}),n.filename]});var i;if("voice"===n.subtype)return Gs(O,{children:[Gs(Na,{type:"microphone",size:16}),r.VOICE_MESSAGE," (",AD(null!==(i=n.duration)&&void 0!==i?i:0),")"]});if(void 0===n.subtype)return Gs(O,{children:[Gs(Na,{type:"attachment",size:16}),n.filename]})}return null}function GD(t){const{t:e,chatbox:n,chatSearchState:r}=t.common,{searchQuery:i}=t;let o;"searching"===r?o=e.SEARCH_SEARCHING:"noResults"===r?o=e.SEARCH_NO_RESULTS:"noMoreResults"===r&&(o=e.SEARCH_NO_MORE_RESULTS);return Gs("div",{className:"t-theme-chat-search-wrap",children:[Gs("div",{className:"t-theme-chat-search-box",children:[Gs("button",{className:"t-button t-back-button","aria-label":e.ARIA_LEAVE_SEARCH_MODE,onClick:()=>n.toggleSearchBox(),children:Gs(Na,{type:"chevronLeft",size:20})}),Gs("div",{className:"t-search-field",children:[Gs(tD,{id:"t-search-input",autoFocus:!0,placeholder:e.SEARCH_PLACEHOLDER_TEXT,className:"t-search-input"}),i.length>0&&Gs("button",{type:"button",className:"t-clear","aria-label":e.ARIA_LEAVE_SEARCH_MODE,onClick:()=>{n.setSearchQuery("")},children:Gs(Na,{type:"close",size:20})})]}),Gs("button",{className:"t-button t-previous-button","aria-label":e.ARIA_SEARCH_UP,disabled:"searching"===r,onClick:()=>n.jumpToPreviousHighlight(),children:Gs(Na,{type:"chevronUp",size:20})}),Gs("button",{className:"t-button t-next-button","aria-label":e.ARIA_SEARCH_DOWN,disabled:"searching"===r,onClick:()=>n.jumpToNextHighlight(),children:Gs(Na,{type:"chevronDown",size:20})})]}),o&&Gs("div",{className:"t-theme-chat-search-status",role:"status","aria-live":"polite",children:Gs("span",{className:"t-text",children:o})})]})}function WD({block:t,downloadUrl:e}){return Gs("div",{className:"t-theme-audio-block",children:[Gs(ka,{src:t.url,filename:t.filename}),Gs("div",{className:"t-metadata",children:[Gs("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:[Gs(Na,{className:"t-download-icon",type:"download"}),Gs(UA,{className:"t-filename",text:t.filename})]}),Gs("span",{className:"t-filesize",children:[" (",mD(t.size),")"]})]})]})}function XD({block:t,downloadUrl:e}){return Gs("div",{className:"t-theme-file-block",children:Gs("div",{className:"t-metadata",children:[Gs("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:[Gs(Na,{type:"attachment",className:"t-attachment-icon"}),Gs(UA,{className:"t-filename",text:t.filename})]}),Gs("span",{className:"t-filesize",children:[" (",mD(t.size),")"]})]})})}function KD({block:t,downloadUrl:e}){const n={"--img-w":t.width||1,"--img-h":t.height||1};return Gs("div",{className:"t-theme-image-block",children:[Gs("a",{href:t.url,className:"t-image-wrapper",target:"_blank",rel:"noopener noreferrer",children:Gs("div",{className:"t-root",style:n,children:Gs("img",{src:t.url,className:"t-image"})})}),Gs("div",{className:"t-metadata",children:[Gs("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:[Gs(Na,{className:"t-download-icon",type:"download"}),Gs(UA,{className:"t-filename",text:t.filename})]}),Gs("span",{className:"t-filesize",children:[" (",mD(t.size),")"]})]})]})}function qD({block:t}){const{imageUrl:e,linkUrl:n}=ED(t);return Gs("div",{className:"t-theme-location-block",children:[Gs("div",{className:"t-location-wrapper",children:Gs("a",{href:n,target:"_blank",rel:"noopener noreferrer",className:"t-root",style:{backgroundImage:`url(${JSON.stringify(e)})`}})}),Gs("div",{className:"t-metadata",children:Gs("a",{href:n,target:"_blank",rel:"noopener noreferrer",children:[Gs(Na,{className:"t-location-icon",type:"pin"}),Gs("span",{className:"t-location-link",children:n})]})})]})}function JD({block:t,message:e}){return Gs("div",{className:"t-theme-text-block",children:Gs(HA,{block:t,message:e})})}function ZD({block:t,downloadUrl:e}){return Gs("div",{className:"t-theme-video-block",children:[Gs("div",{className:"t-video-wrapper",children:Gs("div",{className:"t-root",style:{"--video-w":t.width||1,"--video-h":t.height||1},children:Gs("video",{className:"t-video",controls:!0,preload:"metadata",src:`${t.url}#t=0.1`,playsInline:!0})})}),Gs("div",{className:"t-metadata",children:[Gs("a",{href:e,className:"t-body-text",target:"_blank",rel:"noopener noreferrer",children:[Gs(Na,{className:"t-download-icon",type:"download"}),Gs(UA,{className:"t-filename",text:t.filename})]}),Gs("span",{className:"t-filesize",children:[" (",mD(t.size),")"]})]})]})}function QD({block:t}){return Gs(ka,{className:"t-theme-voice-block",src:t.url,filename:t.filename})}function tT({photoUrl:t}){return Gs("div",{className:"t-theme-avatar",style:{backgroundImage:`url("${t}")`}})}function eT({common:t,conversation:e,participants:n}){const{currentUser:r,theme:i}=t,{Avatar:o,GroupChatImage:s}=i;if(e.photoUrl)return Gs(o,{photoUrl:e.photoUrl,common:t});if(0===n.length)return null;if(1===n.length)return Gs(o,{photoUrl:pD(r),common:t});if(2===n.length){const e=n[0],i=n[1];return e&&i?Gs(o,{photoUrl:pD(e.user.id===r.id?i.user:e.user),common:t}):null}return Gs(s,{conversation:e,participants:n,common:t})}function nT({participants:t,conversation:e}){var n;const r=t[0];return Gs("div",{className:"t-theme-group-chat-image",children:[Gs("div",{className:"t-mini-avatar",style:{backgroundImage:`url("${e.subject?fD(e.id,(null!==(n=e.subject[0])&&void 0!==n?n:"").toUpperCase()):r?pD(r.user):""}")`}}),t.length>2&&Gs("svg",{className:"t-counter",viewBox:"0 0 22 22",xmlns:"http://www.w3.org/2000/svg",children:[Gs("g",{className:"t-group",children:Gs("rect",{x:"0",y:"0",width:22,height:22,fill:"currentColor"})}),Gs("text",{textAnchor:"middle",dominantBaseline:"central",x:11,y:10,fontSize:t.length>9?10:12,fill:"currentColor",children:t.length>9?"9+":t.length})]})]})}function rT({referencedMessage:t,common:e}){const{theme:n,chatbox:r}=e,{CompactMessageContent:i}=n;return Gs("div",{className:"t-theme-referenced-message",onClick:()=>r.focusMessage(t.id),children:[Gs("span",{className:"t-accent-bar"}),Gs("div",{className:"t-inner",children:[Gs("span",{className:"t-sender-name",children:t.sender.name}),Gs("div",{className:"t-content",children:Gs(i,{message:t,common:e})})]})]})}function iT(t){const{common:e,referencedMessage:n}=t,{chatbox:r,t:i,theme:o}=e,{CompactMessageContent:s}=o;return Gs("div",{className:"t-theme-reply-bar",children:[Gs(Na,{className:"t-reply-icon",type:"reply",size:20}),Gs("div",{className:"t-body",onClick:()=>r.focusMessage(n.id),children:[Gs("div",{className:"t-sender-name",children:n.sender.name}),Gs("div",{className:"t-content",children:Gs(s,{message:n,common:e})})]}),Gs("button",{className:"t-close-button",title:i.REPLY_MODE_LEAVE_ARIA_LABEL,"aria-label":i.REPLY_MODE_LEAVE_ARIA_LABEL,onClick:()=>r.setReferencedMessage(null),children:Gs(Na,{className:"t-close-icon",type:"close",size:24})})]})}function oT({timestamp:t,common:e}){const{t:n}=e,r=_D(t,n);return-1===t?null:Gs("span",{className:"t-theme-time-ago",children:Gs("span",{role:"time",title:new Date(t).toLocaleString(n.locale,{weekday:"short",year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),"aria-description":r.long,children:r.short})})}function sT(t){var e,n,r;const{common:i,conversation:o,isSelected:s}=t,{currentUser:a,theme:l,conversationList:c}=i,{TimeAgo:d,ConversationImage:h,CompactMessageContent:p}=l,{lastMessage:f}=o,m=ID(o.id,10),E=m.length>=3,_=null==f||null===(e=f.sender)||void 0===e?void 0:e.name,A=null!==(n=null==f?void 0:f.editedAt)&&void 0!==n?n:null==f?void 0:f.createdAt,g=m.filter(t=>t.user.id!==a.id),S=g.length?g:m,v=null!==(r=o.subject)&&void 0!==r?r:S.map(t=>t.user.name).join(", ");return Gs("div",{className:"t-theme-conversation-list-item","t-unread":o.unreadMessageCount?"":void 0,"t-selected":s?"":void 0,children:[Gs(h,{conversation:o,participants:m,common:i}),Gs("div",{className:"t-inner",children:[Gs("div",{className:"t-header",children:[Gs(ZO,{as:"a",className:"t-conversation-name-link",href:"#","aria-current":s?"page":void 0,"t-selected":s?"":void 0,onClick:t=>{t.preventDefault(),c.selectConversation(o.id)},children:Gs("h3",{className:"t-conversation-name",children:v})}),A&&Gs("span",{className:"t-timestamp",children:Gs(d,{timestamp:A,common:i})})]}),Gs("div",{className:"t-body",children:[f&&Gs("div",{className:"t-message",children:[E&&_&&Gs("span",{className:"t-message-sender",children:[_,":"]}),Gs(p,{message:f,common:i})]}),Gs(aT,{...t})]})]})]})}function aT({conversation:t}){const{isUnread:e,unreadMessageCount:n}=t;return e?Gs("div",0===n?{className:"t-unread-generic-dot"}:n>999?{className:"t-unread-dot",children:Gs("span",{children:"999+"})}:{className:"t-unread-dot",children:Gs("span",{children:n})}):null}function lT(t){var e,n,r;const{common:i,conversation:o,message:s,isSelected:a}=t,{currentUser:l,theme:c,conversationList:d}=i,{TimeAgo:h,ConversationImage:p,CompactMessageContent:f}=c,m=ID(o.id,10),E=m.length>=3,_=null==s||null===(e=s.sender)||void 0===e?void 0:e.name,A=null!==(n=null==s?void 0:s.editedAt)&&void 0!==n?n:null==s?void 0:s.createdAt,g=m.filter(t=>t.user.id!==l.id),S=g.length?g:m,v=null!==(r=o.subject)&&void 0!==r?r:S.map(t=>t.user.name).join(", ");return Gs("div",{className:"t-theme-global-search-result-item","t-selected":a?"":void 0,onClick:()=>{d.selectConversation(o.id,null==s?void 0:s.id)},children:[Gs(p,{conversation:o,participants:m,common:i}),Gs("div",{className:"t-inner",children:[Gs("div",{className:"t-header",children:[Gs("div",{className:"t-conversation-name",children:Gs(UA,{text:v})}),A&&Gs("span",{className:"t-timestamp",children:Gs(h,{timestamp:A,common:i})})]}),Gs("div",{className:"t-body",children:s&&Gs("div",{className:"t-message",children:[E&&_&&Gs("span",{className:"t-message-sender",children:[Gs(UA,{text:_}),":"]}),Gs(f,{message:s,common:i})]})})]})]})}function cT(t){const{common:e,query:n,cancel:r}=t,{t:i}=e;return Gs("div",{className:"t-theme-global-search-header",children:Gs("div",{className:"t-theme-global-search-box",children:[Gs("span",{className:"t-search-icon","aria-hidden":"true",children:Gs(Na,{type:"search",size:20})}),Gs(tD,{placeholder:i.SEARCH_PLACEHOLDER_TEXT,className:"t-input"}),n.length>0&&Gs("button",{type:"button",onClick:r,"aria-label":i.ARIA_LEAVE_SEARCH_MODE,className:"t-clear",children:Gs(Na,{type:"close",size:20})})]})})}function uT(t){const{common:e,canLoadMore:n,loadMore:r,type:i}=t,{t:o}=e;return Gs("div",{className:"t-theme-global-search-result-header",children:[Gs("span",{className:"t-title",children:"messages"===i?o.SEARCH_RESULTS_MESSAGES:o.SEARCH_RESULTS_CONVERSATIONS}),n&&Gs("button",{className:"t-show-more",onClick:r,children:o.SEARCH_RESULTS_SHOW_MORE})]})}function dT(t){const{common:e,voiceRecorder:n}=t,{t:r}=e;return Gs("div",{className:"t-theme-recording-preview",children:[Gs("button",{className:"t-close-button","t-kind":"icon-button","aria-label":r.ARIA_CANCEL_UPLOAD,title:r.ARIA_CANCEL_UPLOAD,onClick:()=>n.cancel(),children:Gs(Na,{type:"close",size:24})}),Gs("div",{className:"t-textbox-column",children:Gs(ka,{src:n.recordingUrl})}),"pending"===n.uploadState&&Gs("div",{className:"t-send-column",children:Gs("div",{className:"t-loading",children:Gs(Na,{type:"spinner",className:"t-spinner",size:24})})}),"done"===n.uploadState&&Gs("div",{className:"t-send-column",children:Gs("button",{className:"t-send-button","t-kind":"icon-button","aria-label":r.SEND_BUTTON_TEXT,title:r.SEND_BUTTON_TEXT,onClick:()=>n.send(),children:Gs(Na,{type:"send",size:24})})})]})}function hT(t){const{common:e,voiceRecorder:n}=t,{t:r}=e;return Gs("div",{className:"t-theme-voice-recorder",children:[Gs("button",{className:"t-close-button","t-kind":"icon-button","aria-label":r.ARIA_CANCEL_RECORDING,title:r.ARIA_CANCEL_RECORDING,onClick:()=>n.cancel(),children:Gs(Na,{type:"close",size:24})}),Gs("div",{className:"t-textbox-column t-waveform-wrapper",children:[Gs(iD,{className:"t-waveform",voiceRecorder:n}),Gs("span",{className:"t-duration",children:AD(n.duration)})]}),Gs("div",{className:"t-send-column",children:Gs("button",{className:"t-stop-button","t-kind":"icon-button","aria-label":r.ARIA_STOP_RECORDING,title:r.ARIA_STOP_RECORDING,onClick:()=>n.stop(),children:Gs(Na,{type:"stop",className:"t-stop-icon",size:20})})})]})}function pT({common:t}){return Gs("div",{className:"t-theme-no-conversation-selected",children:t.t.SELECT_CONVERSATION})}var fT=c({AfterMessages:()=>VD,AudioBlock:()=>WD,Avatar:()=>tT,BeforeMessages:()=>jD,ChatHeader:()=>ND,ChatSearchBox:()=>GD,CompactMessageContent:()=>$D,ConversationImage:()=>eT,ConversationListItem:()=>sT,FileBlock:()=>XD,GlobalSearchBox:()=>cT,GlobalSearchResultHeader:()=>uT,GlobalSearchResultItem:()=>lT,GroupChatImage:()=>nT,ImageBlock:()=>KD,LocationBlock:()=>qD,Message:()=>LD,MessageActionMenu:()=>FD,MessageDivider:()=>UD,MessageField:()=>HD,MessageListFooter:()=>BD,MessageListHeader:()=>kD,NoConversationSelected:()=>pT,RecordingPreview:()=>dT,ReferencedMessage:()=>rT,ReplyBar:()=>iT,TextBlock:()=>JD,TimeAgo:()=>oT,VideoBlock:()=>ZD,VoiceBlock:()=>QD,VoiceRecorder:()=>hT});function mT(t){const{conversation:e,theme:n,t:r,chatbox:i,chatSearchState:o}=t.common,{ConversationImage:s,ChatSearchBox:a}=n,l=ID(e.id,10);return t.permissions.canSearch&&"hidden"!==o?Gs("div",{className:"t-theme-chat-header",children:Gs(a,{common:t.common,searchQuery:t.searchQuery})}):Gs("div",{className:"t-theme-chat-header",children:Gs("div",{className:"t-inner",children:[Gs("div",{className:"t-content",children:[Gs("button",{className:"t-back-button","aria-label":r.INBOX,title:r.INBOX,onClick:()=>i.clickBackButton(),children:Gs(Na,{type:"chevronLeft"})}),Gs("div",{className:"t-image",children:Gs(s,{conversation:e,participants:l,common:t.common})}),Gs("div",{className:"t-info",children:Gs(ET,{...t})})]}),Gs("div",{className:"t-actions",children:Gs("button",{className:"t-action-button","aria-label":r.ARIA_SEARCH_INSIDE_CONVERSATION,title:r.ARIA_SEARCH_INSIDE_CONVERSATION,onClick:()=>i.toggleSearchBox(),children:Gs(Na,{type:"search",size:"20px"})})})]})})}function ET(t){const{common:e}=t;return e.conversation.subject?Gs(O,{children:[Gs("div",{className:"t-title",children:e.conversation.subject}),Gs("div",{className:"t-subtitle",children:Gs(_T,{...t})})]}):Gs("div",{className:"t-title",children:Gs(_T,{...t})})}function _T(t){const{common:e,isUserConnected:n,permissions:r}=t,i=ID(e.conversation.id,10),o=i.filter(({user:t})=>t.id!==e.currentUser.id),s=0===o.length?i:o;return r.showOnlineStatus?Gs("span",{className:"t-participants",children:s.map(({user:t})=>Gs("span",{className:"t-participant",children:[Gs("span",{children:t.name}),Gs("span",{className:"t-online-indicator","t-status":n[t.id]?"online":"offline"})]},t.id))}):Gs("span",{className:"t-participants",children:s.map(({user:t})=>t.name).join(", ")})}function AT(t){return null}function gT(t){const{message:e,messageStatus:n,permissions:r,common:i}=t,{currentUser:o,theme:s,conversation:a,conversationId:l,t:c,focusedMessage:d}=i,{Avatar:h,ReferencedMessage:p,TimeAgo:f,MessageActionMenu:m}=s,E=ID(l,3).length>=3,_=e.sender,A=(null==_?void 0:_.id)!==o.id&&E,g=e.referencedMessage,S=r.canReplyToMessage||r.canDeleteMessage,v=r.canAddReaction&&"ReadWrite"===a.access;let O;O=_?_.id===o.id?"currentUser":"other":"system";const D=e.id===(null==d?void 0:d.id);return Gs("div",{className:"t-theme-message","t-sender":O,"t-message-id":e.id,"t-status":n,"t-focused":D?"":void 0,children:[Gs("div",{className:"t-message-row",children:[_&&Gs(h,{photoUrl:pD(_),common:i}),Gs("div",{className:"t-message-body",children:[_&&A&&Gs("div",{className:"t-message-sender-name",style:{color:hD(_.id)},children:_.name}),g&&Gs(p,{referencedMessage:g,common:i}),Gs(BA,{common:i,message:e,messageStatus:n}),Gs("div",{className:"t-message-status",children:[Gs(f,{timestamp:e.createdAt,common:i}),"currentUser"==O&&Gs(vT,{...t})]})]}),(S||v)&&Gs("div",{className:"t-message-buttons",children:[S&&Gs(KO,{type:"menu",popoverComponent:m,popoverProps:{message:e,permissions:r,common:i},className:"t-message-action-menu-button","aria-label":c.ARIA_MORE_ACTIONS,children:Gs(Na,{className:"t-action-menu-icon",type:"horizontalDots"})}),v&&Gs(KO,{className:"t-add-reaction-button",popoverComponent:ig,popoverProps:{messageId:e.id,colorScheme:"light"},"aria-label":c.ADD_REACTION,children:Gs(Na,{type:"addEmoji"})})]})]}),e.reactions.length>0&&Gs("div",{className:"t-emoji-reactions",children:e.reactions.map(t=>Gs(ST,{summary:t,message:e,common:i,permissions:r},t.emoji))})]})}function ST(t){const{summary:e,message:n,common:r,permissions:i}=t,{t:o,chatbox:s,conversationId:a}=r,{emoji:l,count:c,currentUserReacted:d}=e,[h,p]=CD(a,n.id,e.emoji),f=h.map(t=>t.user.name);return h.length&&h.length<e.count&&f.push("..."),Gs("button",{className:"t-reaction-button","t-active":d?"true":void 0,onClick:()=>s.toggleReaction(n.id,l),disabled:!i.canAddReaction,"aria-label":o.ARIA_REACTION_COUNT(c,l),"aria-pressed":d,onMouseOver:p,onTouchStart:p,"t-tooltip-text":f.join(", "),children:[Gs("span",{className:"t-emoji",children:l}),Gs("span",{className:"t-num-reactions",children:c})]})}function vT({messageStatus:t}){return"virtual"===t?null:"sending"===t?Gs("span",{className:"t-status-icon",children:Gs(Na,{type:"spinner",className:"t-message-loading-spinner"})}):"sent"===t?Gs("span",{className:"t-status-icon",children:"✓"}):"everyoneRead"===t?Gs("span",{className:"t-status-icon",children:"✓✓"}):null}function OT(t){const{message:e,permissions:n,common:r}=t,{chatbox:i,t:o}=r;return Gs("div",{className:"t-theme-message-action-menu",children:[n.canReplyToMessage&&Gs(JO,{className:"t-menu-item",onSelect:()=>i.setReferencedMessage(e.id),children:o.REPLY_TO_MESSAGE}),n.canEditMessage&&Gs(JO,{className:"t-menu-item",onSelect:()=>i.setEditing(e.id),children:o.EDIT_MESSAGE}),n.canDeleteMessage&&Gs(JO,{className:"t-menu-item t-danger",onSelect:()=>i.deleteMessage(e.id),children:o.DELETE_MESSAGE})]})}function DT(t){const{common:e,referencedMessage:n,editor:r,voiceRecorder:i,permissions:o,editMessageId:s}=t,{chatbox:a,device:l,conversation:c,t:d,theme:h}=e,{ReplyBar:p,VoiceRecorder:f,RecordingPreview:m}=h,E=s?"edit":"send",_=!r.atTextLimit&&!r.isEmpty&&!r.sendBlocked&&"ReadWrite"===c.access,A="send"===E&&r.isEmpty&&o.canShareLocation,g="send"===E&&r.isEmpty&&o.canShareFile,S="send"===E&&l.supportsEmojiPicker&&!l.isMobile,v="send"===E&&r.isEmpty&&o.canSendVoiceMessage,O=!i&&"ReadWrite"===c.access;return Gs("div",{className:"t-theme-message-field","t-mode":E,children:[r.showEmojiPicker&&Gs("div",{className:"t-emoji-picker-wrapper",children:Gs(rg,{colorScheme:"light"})}),Gs(bg,{}),Gs($O,{}),n&&Gs(p,{common:e,referencedMessage:n}),Gs("div",{className:"t-wrapper",children:[r.atTextLimit&&Gs("div",{className:"t-text-limit-indicator",children:d.ENTRYBOX_TEXT_LIMIT}),Gs("div",{className:"t-text-form",children:["Read"===c.access&&Gs("div",{className:"t-readonly",children:d.ENTRYBOX_PLACEHOLDER_CHAT_READONLY}),"recording"===(null==i?void 0:i.state)&&Gs(f,{common:e,voiceRecorder:i}),"previewing"===(null==i?void 0:i.state)&&Gs(m,{common:e,voiceRecorder:i}),O&&Gs("div",{className:"t-textbox-column",children:[Gs(J_,{placeholder:d.ENTRYBOX_PLACEHOLDER}),Gs("div",{className:"t-button-overlay",children:[A&&Gs("button",{className:"t-location-button","t-kind":"icon-button","aria-label":d.UPLOAD_SHARE_LOCATION,title:d.UPLOAD_SHARE_LOCATION,onClick:()=>r.shareLocation(),children:Gs(Na,{type:"location",size:"20px"})}),g&&Gs("button",{className:"t-attachment-button","t-kind":"icon-button","aria-label":d.UPLOAD_SEND_FILE,title:d.UPLOAD_SEND_FILE,onClick:()=>r.attachFile(),children:Gs(Na,{type:"attachment"})}),S&&Gs("button",{className:"t-emoji-button","t-kind":"icon-button","aria-label":d.ARIA_INSERT_EMOJI,title:d.ARIA_INSERT_EMOJI,onClick:()=>r.toggleEmojiPicker(),children:Gs(Na,{type:r.showEmojiPicker?"close":"emoji",size:r.showEmojiPicker?"24px":"20px"})})]})]}),"send"===E&&O&&Gs("div",{className:"t-send-column",children:[v&&Gs("button",{className:"t-record-button","t-kind":"icon-button","aria-label":d.VOICE_MESSAGE,title:d.VOICE_MESSAGE,onClick:()=>r.recordVoiceMessage(),disabled:r.sendBlocked,children:Gs(Na,{type:"microphone",size:"20px"})}),!v&&Gs("button",{className:"t-send-button","t-kind":"icon-button","aria-label":d.SEND_BUTTON_TEXT,title:d.SEND_BUTTON_TEXT,onClick:()=>r.send(),disabled:!_,children:Gs(Na,{type:"arrowUp",size:"20px"})})]}),"edit"===E&&Gs("div",{className:"t-edit-row",children:[Gs("button",{"t-action":"cancel",onClick:()=>a.setEditing(null),children:d.CANCEL}),Gs("button",{"t-action":"save",onClick:()=>r.send(),disabled:!_,children:d.SAVE})]})]})]})]})}function TT(t){const{common:e,voiceRecorder:n}=t,{t:r}=e;return Gs("div",{className:"t-theme-voice-recorder",children:[Gs("button",{className:"t-close-button","t-kind":"icon-button","aria-label":r.ARIA_CANCEL_RECORDING,title:r.ARIA_CANCEL_RECORDING,onClick:()=>n.cancel(),children:Gs(Na,{type:"close",size:"24px"})}),Gs("div",{className:"t-textbox-column t-waveform-wrapper",children:[Gs(iD,{className:"t-waveform",voiceRecorder:n}),Gs("span",{className:"t-duration",children:AD(n.duration)})]}),Gs("div",{className:"t-send-column",children:Gs("button",{className:"t-stop-button","t-kind":"icon-button","aria-label":r.ARIA_STOP_RECORDING,title:r.ARIA_STOP_RECORDING,onClick:()=>n.stop(),children:Gs(Na,{type:"stop",className:"t-stop-icon",size:"20px"})})})]})}function RT(t){const{common:e,voiceRecorder:n}=t,{t:r}=e;return Gs("div",{className:"t-theme-recording-preview",children:[Gs("button",{className:"t-close-button","t-kind":"icon-button","aria-label":r.ARIA_CANCEL_UPLOAD,title:r.ARIA_CANCEL_UPLOAD,onClick:()=>n.cancel(),children:Gs(Na,{type:"close",size:"24px"})}),Gs("div",{className:"t-textbox-column",children:Gs(ka,{src:n.recordingUrl})}),"pending"===n.uploadState&&Gs("div",{className:"t-send-column",children:Gs("div",{className:"t-loading",children:Gs(Na,{type:"spinner",className:"t-spinner"})})}),"done"===n.uploadState&&Gs("div",{className:"t-send-column",children:Gs("button",{className:"t-send-button","t-kind":"icon-button","aria-label":r.SEND_BUTTON_TEXT,title:r.SEND_BUTTON_TEXT,onClick:()=>n.send(),children:Gs(Na,{type:"arrowUp",size:"20px"})})})]})}function yT(t){const{timestamp:e,isReadMarker:n,isDayMarker:r,common:i}=t,{t:o}=i;return Gs("div",{className:"t-message-divider",children:[Gs("div",{className:"t-line","t-side":"left",children:Gs("div",{className:"t-line-segment"})}),r&&Gs("span",{className:"t-day-marker",children:SD(e,o)}),Gs("div",{className:"t-line","t-side":"right",children:[Gs("div",{className:"t-line-segment"}),n&&Gs("span",{className:"t-unread-marker",children:o.MESSAGELIST_NEW_MARKER})]})]})}function IT(t){return null}function CT({common:t}){const e=t.conversation.welcomeMessages;return 0===e.length?null:Gs("div",{className:"t-message-group",children:e.map((t,e)=>Gs(dD,{text:t},e)).reverse()})}function NT({common:t}){const{typing:e,theme:n}=t,{Avatar:r}=n;if(!e.many&&0===e.users.length)return null;const i=e.many?Gs("div",{className:"t-theme-avatar",children:"5+"}):e.users.slice(0,2).map(e=>Gs(r,{photoUrl:pD(e),common:t},e.id));return Gs("div",{className:"t-theme-after-messages","t-many":String(e.many),"aria-label":bT(e),children:[Gs("div",{className:"t-typing-avatars","aria-hidden":"true",children:[i,!e.many&&e.users.length>2&&Gs("div",{className:"t-theme-avatar",children:["+",e.users.length-2]})]}),Gs("div",{className:"t-typing-bubble",children:Gs("div",{className:"t-typing-animation",children:[Gs("span",{}),Gs("span",{}),Gs("span",{})]})})]})}function bT(t){if(t.many)return"Several people are typing";const{users:e}=t;return 1===e.length?`${e[0].name} is typing`:2===e.length?`${e[0].name} and ${e[1].name} are typing`:`${e[0].name}, ${e[1].name}, and ${e.length-2} others are typing`}function wT({common:t}){return Gs("div",{className:"t-theme-no-conversation-selected",children:t.t.SELECT_CONVERSATION})}function kT(t){return Gs("span",{className:"t-theme-compact-message-content",children:Gs(LT,{...t})})}function LT({message:t,common:e}){const n=t.content[0],{t:r}=e;if("text"===n.type)return Gs(HA,{block:n,message:t,nonInteractive:!0});if("location"===n.type)return Gs(O,{children:[Gs(Na,{type:"location"})," ",r.LOCATION]});if("file"===n.type){if("image"===n.subtype)return Gs(O,{children:[Gs(Na,{type:"image"})," ",n.filename]});if("video"===n.subtype)return Gs(O,{children:[Gs(Na,{type:"movie"})," ",n.filename]});if("audio"===n.subtype)return Gs(O,{children:[Gs(Na,{type:"attachment"})," ",n.filename]});var i;if("voice"===n.subtype)return Gs(O,{children:[Gs(Na,{type:"microphone"})," ",r.VOICE_MESSAGE," (",AD(null!==(i=n.duration)&&void 0!==i?i:0),")"]});if(void 0===n.subtype)return Gs(O,{children:[Gs(Na,{type:"attachment"})," ",n.filename]})}return null}function MT(t){const{t:e,chatbox:n,chatSearchState:r}=t.common;let i;return"searching"===r?i=e.SEARCH_SEARCHING:"noResults"===r?i=e.SEARCH_NO_RESULTS:"noMoreResults"===r&&(i=e.SEARCH_NO_MORE_RESULTS),Gs("div",{className:"t-theme-chat-search-box",children:[Gs("button",{className:"t-button t-back-button","aria-label":e.ARIA_LEAVE_SEARCH_MODE,onClick:()=>n.toggleSearchBox(),children:Gs(Na,{type:"arrowLeft",size:"20px"})}),Gs("div",{className:"t-search-field",children:[Gs("label",{htmlFor:"t-search-input","t-label-text":i?"on":"off",children:i}),Gs(tD,{id:"t-search-input",autoFocus:!0,className:"t-search-input",placeholder:e.SEARCH_PLACEHOLDER_TEXT})]}),Gs("button",{className:"t-button t-previous-button","aria-label":e.ARIA_SEARCH_UP,disabled:"searching"===r,onClick:()=>n.jumpToPreviousHighlight(),children:Gs(Na,{type:"chevronUp",size:"20px"})}),Gs("button",{className:"t-button t-next-button","aria-label":e.ARIA_SEARCH_DOWN,disabled:"searching"===r,onClick:()=>n.jumpToNextHighlight(),children:Gs(Na,{type:"chevronDown",size:"20px"})})]})}function PT({block:t,downloadUrl:e}){return Gs("div",{className:"t-theme-audio-block",children:[Gs(ka,{src:t.url,filename:t.filename}),Gs("a",{className:"t-body-text",href:e,target:"_blank",rel:"noreferrer",children:[Gs(Na,{type:"attachment",className:"t-attachment-icon"}),Gs(UA,{text:t.filename}),Gs("span",{className:"t-filesize",children:[" (",mD(t.size),")"]})]})]})}function xT({block:t,downloadUrl:e}){return Gs("div",{className:"t-theme-file-block",children:Gs("a",{className:"t-body-text",href:e,target:"_blank",rel:"noreferrer",children:[Gs(Na,{type:"attachment",className:"t-attachment-icon"}),Gs(UA,{className:"t-filename",text:t.filename}),Gs("span",{className:"t-filesize",children:[" (",mD(t.size),")"]})]})})}function FT({block:t,downloadUrl:e}){const n={"--img-w":t.width||1,"--img-h":t.height||1};return Gs("div",{className:"t-theme-image-block",children:[Gs("a",{href:t.url,className:"t-image-wrapper",target:"_blank",rel:"noopener noreferrer",children:Gs("div",{className:"t-root",style:n,children:Gs("img",{src:t.url,className:"t-image"})})}),Gs("a",{href:e,className:"t-body-text",target:"_blank",rel:"noreferrer",children:[Gs(Na,{className:"download-icon",type:"download"}),Gs(UA,{text:t.filename}),Gs("span",{className:"t-filesize",children:[" (",mD(t.size),")"]})]})]})}function HT({block:t}){const{imageUrl:e,linkUrl:n}=ED(t);return Gs("div",{className:"t-theme-location-block",children:[Gs("a",{href:n,target:"_blank",rel:"noreferrer",className:"t-root",style:{background:`url(${JSON.stringify(e)}) center center / cover no-repeat`}}),Gs("span",{className:"t-body-text",children:Gs("a",{href:n,target:"_blank",rel:"noopener noreferrer",children:n})})]})}function UT({block:t,message:e}){return Gs("div",{className:"t-theme-text-block",children:Gs(HA,{block:t,message:e})})}function BT({block:t,downloadUrl:e}){return Gs("div",{className:"t-theme-video-block",children:[Gs("div",{className:"t-video-wrapper",children:Gs("div",{className:"t-root",style:{"--video-w":t.width||1,"--video-h":t.height||1},children:Gs("video",{className:"t-video",controls:!0,preload:"metadata",src:`${t.url}#t=0.1`,playsInline:!0})})}),Gs("a",{href:e,className:"t-body-text",target:"_blank",rel:"noreferrer",children:[Gs(Na,{className:"download-icon",type:"download"}),Gs(UA,{text:t.filename}),Gs("span",{className:"t-filesize",children:[" (",mD(t.size),")"]})]})]})}function jT({block:t}){return Gs(ka,{className:"t-theme-voice-block",src:t.url,filename:t.filename})}function VT({photoUrl:t}){return Gs("div",{className:"t-theme-avatar",style:{backgroundImage:`url("${t}")`}})}function zT(t){const{common:e,conversation:n,participants:r}=t,{currentUser:i,theme:o}=e,{Avatar:s,GroupChatImage:a}=o;return n.photoUrl?Gs(s,{photoUrl:n.photoUrl,common:e}):0===r.length?null:1===r.length?Gs(s,{photoUrl:pD(i),common:e}):2===r.length?Gs(s,{photoUrl:pD(r[0].user.id===i.id?r[1].user:r[0].user),common:e}):Gs(a,{conversation:n,participants:r,common:e})}function $T({participants:t}){return Gs("div",{className:"t-theme-group-chat-image",children:[Gs("div",{className:"t-mini-avatar",style:{backgroundImage:`url("${pD(t[0].user)}")`}}),Gs("div",{className:"t-mini-avatar",style:{backgroundImage:`url("${pD(t[1].user)}")`}}),t.length>2&&Gs("svg",{className:"t-counter",viewBox:"0 0 22 22",xmlns:"http://www.w3.org/2000/svg",children:[Gs("g",{className:"t-group",children:Gs("rect",{x:"0",y:"0",width:22,height:22,fill:"currentColor"})}),Gs("text",{textAnchor:"middle",x:11,y:Math.round(22*.666),width:22,height:22,fontSize:t.length>9?10:12,fill:"currentColor",children:t.length>9?"9+":t.length})]})]})}function YT(t){const{referencedMessage:e,common:n}=t,{theme:r,chatbox:i}=n,{CompactMessageContent:o}=r;return Gs("div",{className:"t-theme-referenced-message",onClick:()=>i.focusMessage(e.id),children:[Gs("div",{className:"t-sender-name",children:e.sender.name}),Gs("div",{className:"t-content",children:Gs(o,{message:e,common:n})})]})}function GT(t){const{common:e,referencedMessage:n}=t,{chatbox:r,t:i,theme:o}=e,{CompactMessageContent:s}=o;return Gs("div",{className:"t-theme-reply-bar",children:[Gs(Na,{className:"t-reply-icon",type:"reply"}),Gs("div",{className:"t-body",onClick:()=>r.focusMessage(n.id),children:[Gs("div",{className:"t-sender-name",children:n.sender.name}),Gs("div",{className:"t-content",children:Gs(s,{message:n,common:e})})]}),Gs("button",{className:"t-close-button",title:i.REPLY_MODE_LEAVE_ARIA_LABEL,"aria-label":i.REPLY_MODE_LEAVE_ARIA_LABEL,onClick:()=>r.setReferencedMessage(null),children:Gs(Na,{className:"t-close-icon",type:"close"})})]})}function WT(t){return-1===t.timestamp?null:Gs(XT,{...t})}function XT({timestamp:t,common:e}){const{t:n}=e,r=new Date(t).toLocaleString(n.locale,{weekday:"short",year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),i=_D(t,n);return Gs("span",{className:"t-theme-time-ago",children:Gs("span",{role:"time",title:r,"aria-description":i.long,children:i.short})})}function KT(t){var e,n,r;const{common:i,conversation:o,isSelected:s}=t,{currentUser:a,theme:l,conversationList:c}=i,{TimeAgo:d,ConversationImage:h,CompactMessageContent:p}=l,{lastMessage:f}=o,m=ID(o.id,10),E=m.length>=3,_=null==f||null===(e=f.sender)||void 0===e?void 0:e.name,A=null!==(n=null==f?void 0:f.editedAt)&&void 0!==n?n:null==f?void 0:f.createdAt,g=m.filter(t=>t.user.id!==a.id),S=g.length?g:m,v=null!==(r=o.subject)&&void 0!==r?r:S.map(t=>t.user.name).join(", ");return Gs("div",{className:"t-theme-conversation-list-item","t-unread":o.unreadMessageCount?"":void 0,"t-selected":s?"":void 0,children:[Gs(h,{conversation:o,participants:m,common:i}),Gs("div",{className:"t-inner",children:[Gs("div",{className:"t-header",children:[Gs(ZO,{as:"a",className:"t-conversation-name-link",href:"#","aria-current":s?"page":void 0,"t-selected":s?"":void 0,onClick:t=>{t.preventDefault(),c.selectConversation(o.id)},children:Gs("h3",{className:"t-conversation-name",children:v})}),A&&Gs("span",{className:"t-timestamp",children:Gs(d,{timestamp:A,common:i})})]}),Gs("div",{className:"t-body",children:[f&&Gs("div",{className:"t-message",children:[E&&_&&Gs("span",{className:"t-message-sender",children:[_,":"]}),Gs(p,{message:f,common:i})]}),Gs(qT,{...t})]})]})]})}function qT({conversation:t}){const{isUnread:e,unreadMessageCount:n}=t;return e?Gs("div",0===n?{className:"t-unread-generic-dot"}:n>999?{className:"t-unread-dot",children:Gs("span",{children:"999+"})}:{className:"t-unread-dot",children:Gs("span",{children:n})}):null}function JT(t){var e,n,r;const{common:i,conversation:o,message:s,isSelected:a}=t,{currentUser:l,theme:c,conversationList:d}=i,{TimeAgo:h,ConversationImage:p,CompactMessageContent:f}=c,m=ID(o.id,10),E=m.length>=3,_=null==s||null===(e=s.sender)||void 0===e?void 0:e.name,A=null!==(n=null==s?void 0:s.editedAt)&&void 0!==n?n:null==s?void 0:s.createdAt,g=m.filter(t=>t.user.id!==l.id),S=g.length?g:m,v=null!==(r=o.subject)&&void 0!==r?r:S.map(t=>t.user.name).join(", ");return Gs("div",{className:"t-theme-global-search-result-item","t-selected":a?"":void 0,onClick:()=>{d.selectConversation(o.id,null==s?void 0:s.id)},children:[Gs(p,{conversation:o,participants:m,common:i}),Gs("div",{className:"t-inner",children:[Gs("div",{className:"t-header",children:[Gs("div",{className:"t-conversation-name",children:Gs(UA,{text:v})}),A&&Gs("span",{className:"t-timestamp",children:Gs(h,{timestamp:A,common:i})})]}),Gs("div",{className:"t-body",children:s&&Gs("div",{className:"t-message",children:[E&&_&&Gs("span",{className:"t-message-sender",children:[Gs(UA,{text:_}),":"]}),Gs(f,{message:s,common:i})]})})]})]})}function ZT(t){const{common:e,query:n,cancel:r}=t,{t:i}=e;return Gs("div",{className:"t-theme-global-search-box",children:[Gs(tD,{className:"t-input",placeholder:i.SEARCH_PLACEHOLDER_TEXT}),n.length>0&&Gs("button",{type:"button",onClick:r,"aria-label":i.ARIA_LEAVE_SEARCH_MODE,className:"t-clear",children:Gs(Na,{type:"close",size:"20px"})}),0===n.length&&Gs(Na,{className:"t-submit",type:"search",size:"20px"})]})}function QT(t){const{common:e,canLoadMore:n,loadMore:r,type:i}=t,{t:o}=e;return Gs("div",{className:"t-theme-global-search-result-header",children:[Gs("span",{className:"t-title",children:"messages"===i?o.SEARCH_RESULTS_MESSAGES:o.SEARCH_RESULTS_CONVERSATIONS}),n&&Gs("button",{className:"t-show-more",onClick:r,children:o.SEARCH_RESULTS_SHOW_MORE})]})}var tR=c({AfterMessages:()=>NT,AudioBlock:()=>PT,Avatar:()=>VT,BeforeMessages:()=>CT,ChatHeader:()=>mT,ChatSearchBox:()=>MT,CompactMessageContent:()=>kT,ConversationImage:()=>zT,ConversationListItem:()=>KT,FileBlock:()=>xT,GlobalSearchBox:()=>ZT,GlobalSearchResultHeader:()=>QT,GlobalSearchResultItem:()=>JT,GroupChatImage:()=>$T,ImageBlock:()=>FT,LocationBlock:()=>HT,Message:()=>gT,MessageActionMenu:()=>OT,MessageDivider:()=>yT,MessageField:()=>DT,MessageListFooter:()=>IT,MessageListHeader:()=>AT,NoConversationSelected:()=>wT,RecordingPreview:()=>RT,ReferencedMessage:()=>YT,ReplyBar:()=>GT,TextBlock:()=>UT,TimeAgo:()=>WT,VideoBlock:()=>BT,VoiceBlock:()=>jT,VoiceRecorder:()=>TT}),{globalState:eR,observableProperties:nR,observableFns:rR,ObservablePrimitiveClass:iR}=go;function oR(t,e){return void 0===t||"default"===t?"default":"classic"===t?"classic":(WA.warn(`Invalid \`baseTheme\` value '${t}' for ${e}; expected "classic" or "default", falling back to "default".`),"default")}function sR(t,e,n){return{..."classic"===oR(t,n)?tR:fT,...null!=e?e:{}}}function aR(t,e,n){return t.clearRect(0,0,100,100),t.fillStyle=n,t.fillText(e,0,0),t.getImageData(0,0,1,1).data.join(",")}function lR(t){const e=function(){const t=document.createElement("canvas");t.width=t.height=1;const e=t.getContext("2d",{willReadFrequently:!0});return e.textBaseline="top",e.font='100px "Twemoji Mozilla","Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji","EmojiOne Color","Android Emoji",sans-serif',e.scale(.01,.01),e}(),n=aR(e,t,"#fff"),r=aR(e,t,"#000");return r===n&&!r.startsWith("0,0,0,")}Xe();const cR=Y(null),uR={didCatch:!1,error:null};var dR=class extends D{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=uR}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(null!==t){for(var e,n,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];null===(e=(n=this.props).onReset)||void 0===e||e.call(n,{args:i,reason:"imperative-api"}),this.setState(uR)}}componentDidCatch(t,e){var n,r;null===(n=(r=this.props).onError)||void 0===n||n.call(r,t,e)}componentDidUpdate(t,e){const{didCatch:n}=this.state,{resetKeys:r}=this.props;var i,o;n&&null!==e.error&&function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.length!==e.length||t.some((t,n)=>!Object.is(t,e[n]))}(t.resetKeys,r)&&(null===(i=(o=this.props).onReset)||void 0===i||i.call(o,{next:r,prev:t.resetKeys,reason:"keys"}),this.setState(uR))}render(){const{children:t,fallbackRender:e,FallbackComponent:n,fallback:r}=this.props,{didCatch:i,error:o}=this.state;let s=t;if(i){const t={error:o,resetErrorBoundary:this.resetErrorBoundary};if("function"==typeof e)s=e(t);else if(n)s=g(n,t);else{if(void 0===r)throw o;s=r}}return g(cR.Provider,{value:{didCatch:i,error:o,resetErrorBoundary:this.resetErrorBoundary}},s)}};const hR={ar:{code:"ar",name:"Arabic",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/ar.js",emojiDataUrl:null,translation:{YESTERDAY:"الأمس",TODAY:"اليوم",DAYS:"يوم",HOURS:"ساعة",MINUTES:"دقيقة",JUST_NOW:"فقط الآن",LOCATION:"الموقع",CANCEL:"إلغاء",INBOX:"علبة الوارد",DESKTOP_NOTIFICATIONS:"إشعارات المتصفح",DESKTOP_NOTIFICATIONS_ERROR:"لا يمكن تمكين إشعارات المتصفح لأن متصفحك يمنعها بشكل نشط. جرّب البحث في الإعدادات أو استخدام متصفح آخر.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`إعلام ${t} التجريبي`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"إذا أبقيت علامة تبويب المتصفح مفتوحة ، فسترى هذا ينبثق عندما يتحدث شخص معك.",SEND_BUTTON_TEXT:"إرسال",ENTRYBOX_TEXT_LIMIT:"يُسمح فقط بـ 10.000 حرف.",ENTRYBOX_PLACEHOLDER:"قل شيئًا ...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"هذه المحادثة لم تعد نشطة.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"يمكنك القراءة ، لكن لا يمكنك إرسال الرسائل.",MESSAGELIST_LOADING_OLDER:"جارٍ تحميل الرسائل القديمة ...",MESSAGELIST_SHOW_OLDER:"عرض الرسائل الأقدم",MESSAGELIST_NEW_MARKER:"جديد",MESSAGE_SENT_VIA_EMAIL:"تم إرسال هذه الرسالة عبر البريد الإلكتروني",YOU_MARKER:"أنت",UPLOAD_IN_PROGRESS:"جارٍ التحميل ...",UPLOAD_SEND_FILE:"إرسال ملف",UPLOAD_SHARE_LOCATION:"مشاركة الموقع",UPLOAD_ERROR:"حدث خطأ ما في تحميل شيء. ربما يكون الملف غير متوافق أو كبير جدًا.",SHARE_LOCATION_ERROR:"لا يمكن مشاركة الموقع:",LOADING:"جارٍ التحميل ...",HUB_EMPTY:"سوف يظهر سجل الدردشات هنا",HUB_SHOW_EARLIER:"إظهار الدردشات السابقة",INBOX_NO_CHATS_TITLE:"لا توجد دردشات بعد!",INBOX_NO_CHATS_BODY:"بمجرد أن يكون لديك واحد أو أكثر من المحادثات ، سوف تظهر هنا.",ENABLE_TRANSLATION:"ترجم هذه المحادثة إلى العربية",DISABLE_TRANSLATION:"إظهار الأصلي",SEARCH_PLACEHOLDER_TEXT:"...بحث",SEARCH_SEARCHING:"...يتم الآن البحث",SEARCH_NO_RESULTS:"لم يتم العثور على نتائج",SEARCH_NO_MORE_RESULTS:"لا يوجد المزيد من النتائج",SEARCH_RESULTS_CONVERSATIONS:"المحادثات",SEARCH_RESULTS_MESSAGES:"الرسائل",SEARCH_RESULTS_SHOW_MORE:"إظهار المزيد",CHAT_NOT_FOUND:"لم يتم العثور على الدردشة",DELETE_MESSAGE:"احذف الرسالة",DELETION_EXPLANATION:"إذا قمت بحذف هذه الرسالة، فهي ستختفي للجميع.",EDIT_MESSAGE:"تعديل الرسالة",SAVE:"حفظ",EDITED_INDICATOR:"معدّلة",REPLY_TO_MESSAGE:"رد",ADD_REACTION:"أضف تفاعلاً",AUTH_EXPIRED_OVERLAY_TITLE:"انتهت جلسة الدردشة المخصصة لك",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"يُرجى إعادة تحميل الصفحة للمتابعة",VOICE_MESSAGE:"رسالة صوتية",LEAVE_CONVERSATION:"الخروج من المحادثة",MARK_CONVERSATION_AS_UNREAD:"وضع علامة غير مقروءة",STATUS_INDICATOR_ONLINE:"نشط",STATUS_INDICATOR_OFFLINE:"بعيد",CONTACT_INFORMATION_HIDDEN:"المعلومات المخفية",ARIA_LEAVE_SEARCH_MODE:"الخروج من وضع البحث",ARIA_SEARCH_UP:"البحث لأعلى",ARIA_SEARCH_DOWN:"البحث لأسفل",ARIA_CLOSE_CHAT_POPUP:"إغلاق نافذة الدردشة",ARIA_SEARCH_INSIDE_CONVERSATION:"البحث داخل هذه المحادثة",ARIA_SEARCH:"بحث",ARIA_CHAT:"دردشة",ARIA_SET_PLAYBACK_SPEED:"تعيين سرعة التشغيل",ARIA_CANCEL_UPLOAD:"إلغاء الرفع",ARIA_STOP_RECORDING:"إيقاف التسجيل",ARIA_CANCEL_RECORDING:"إلغاء التسجيل",ARIA_INSERT_EMOJI:"إدراج رمز تعبيري",ARIA_PLAY_AUDIO:"تشغيل الصوت",ARIA_PAUSE_AUDIO:"إيقاف الصوت مؤقتاً",ARIA_REACTION_COUNT:(t,e)=>`${t} تفاعل مع ${e}`,ARIA_MORE_ACTIONS:"المزيد من الإجراءات",ARIA_REPLYING_TO:(t,e)=>`الرد على ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"الخروج من وضع الرد",SELECT_CONVERSATION:"حدد محادثة"}},bg:{code:"bg-BG",name:"Bulgarian",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Вчера",TODAY:"Днес",DAYS:"Ден",HOURS:"Час",MINUTES:"m",JUST_NOW:"Току-що",LOCATION:"местоположението",CANCEL:"Откажи",INBOX:"Кутия",DESKTOP_NOTIFICATIONS:"Известия на браузъра",DESKTOP_NOTIFICATIONS_ERROR:"Не можете да активирате известията на браузъра, защото браузърът ви ги блокира активно. Опитайте да погледнете в настройките или да използвате друг браузър.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} демо известие`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Ако държите раздела на браузъра си отворен, ще видите този изскачащ прозорец, когато някой говори с вас.",SEND_BUTTON_TEXT:"Изпрати",ENTRYBOX_TEXT_LIMIT:"Разрешени са само до 10.000 знака.",ENTRYBOX_PLACEHOLDER:"Кажете нещо...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Този разговор вече не е активен.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Можете да четете, но не и да изпращате съобщения.",MESSAGELIST_LOADING_OLDER:"Зареждане на по-стари съобщения...",MESSAGELIST_SHOW_OLDER:"Показване на по-стари съобщения",MESSAGELIST_NEW_MARKER:"Нови",MESSAGE_SENT_VIA_EMAIL:"Това съобщение беше изпратено по имейл",YOU_MARKER:"Вие",UPLOAD_IN_PROGRESS:"Качване...",UPLOAD_SEND_FILE:"Изпращане на файл",UPLOAD_SHARE_LOCATION:"Споделяне на местоположението",UPLOAD_ERROR:"За съжаление нещо се обърка при качването. Файлът може да не се поддържа или е твърде голям.",SHARE_LOCATION_ERROR:"Не може да се сподели местоположението: ",LOADING:"Зареждане...",HUB_EMPTY:"Историята на вашите разговори ще се покаже тук",HUB_SHOW_EARLIER:"Показване на по-ранни чатове",INBOX_NO_CHATS_TITLE:"Все още нямате разговори!",INBOX_NO_CHATS_BODY:"След като проведете един или повече разговори, те ще се покажат тук.",ENABLE_TRANSLATION:"Преведете този разговор на български",DISABLE_TRANSLATION:"Показване на оригинал",SEARCH_PLACEHOLDER_TEXT:"Търсене...",SEARCH_SEARCHING:"Търсене...",SEARCH_NO_RESULTS:"Няма намерени резултати",SEARCH_NO_MORE_RESULTS:"Няма повече резултати",SEARCH_RESULTS_CONVERSATIONS:"Разговори",SEARCH_RESULTS_MESSAGES:"Съобщения",SEARCH_RESULTS_SHOW_MORE:"Покажи повече",CHAT_NOT_FOUND:"Чатът не е намерен",DELETE_MESSAGE:"Изтриване на съобщение",DELETION_EXPLANATION:"Ако изтриете това съобщение, то ще изчезне за всички.",EDIT_MESSAGE:"Редактиране на съобщението",SAVE:"Запиши",EDITED_INDICATOR:"редактирано",REPLY_TO_MESSAGE:"Отговори",ADD_REACTION:"Добави реакция",AUTH_EXPIRED_OVERLAY_TITLE:"Вашата чат сесия е изтекла",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Обновете страницата, за да продължите",VOICE_MESSAGE:"Гласово съобщение",CONTACT_INFORMATION_HIDDEN:"Скрита информация",LEAVE_CONVERSATION:"Напускане на разговора",MARK_CONVERSATION_AS_UNREAD:"Маркирай като непрочетено",STATUS_INDICATOR_ONLINE:"Активен",STATUS_INDICATOR_OFFLINE:"Отсъстващ",ARIA_LEAVE_SEARCH_MODE:"Напусни режим на търсене",ARIA_SEARCH_UP:"Търси нагоре",ARIA_SEARCH_DOWN:"Търси надолу",ARIA_CLOSE_CHAT_POPUP:"Затвори прозореца за чат",ARIA_SEARCH_INSIDE_CONVERSATION:"Търси в този разговор",ARIA_SEARCH:"Търсене",ARIA_CHAT:"Чат",ARIA_SET_PLAYBACK_SPEED:"задай скорост на възпроизвеждане",ARIA_CANCEL_UPLOAD:"Отмени качване",ARIA_STOP_RECORDING:"Спри запис",ARIA_CANCEL_RECORDING:"Отмени запис",ARIA_INSERT_EMOJI:"Вмъкни emoji",ARIA_PLAY_AUDIO:"възпроизведи аудио",ARIA_PAUSE_AUDIO:"паузирай аудио",ARIA_REACTION_COUNT:(t,e)=>`${t} реакции с ${e}`,ARIA_MORE_ACTIONS:"Още действия",ARIA_REPLYING_TO:(t,e)=>`Отговор на ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Излизане от режим на отговор",SELECT_CONVERSATION:"Изберете разговор"}},bs:{code:"bs-BA",name:"Bosnian",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Jučer",TODAY:"Danas",DAYS:"d",HOURS:"s",MINUTES:"m",JUST_NOW:"Upravo sad",LOCATION:"Lokacija",CANCEL:"Otkaži",INBOX:"Pretinac",DESKTOP_NOTIFICATIONS:"Obavijesti preglednika",DESKTOP_NOTIFICATIONS_ERROR:"Notifikacije preglednika se ne mogu omogućiti jer ih vaš preglednik aktivno blokira. Pokušajte pregledati postavke ili koristiti drugi preglednik.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} demo notifikacija`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Ako karticu preglednika ostavite otvorenu, pojavit će se ovaj pop-up kada netko razgovara s vama.",SEND_BUTTON_TEXT:"Pošalji",ENTRYBOX_TEXT_LIMIT:"Dozvoljeno je samo 10.000 znakova.",ENTRYBOX_PLACEHOLDER:"Reci nešto...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Ovaj razgovor više nije aktivan.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Možeš čitati, ali ne i slati poruke.",MESSAGELIST_LOADING_OLDER:"Učitavam starije poruke...",MESSAGELIST_SHOW_OLDER:"Prikaži starije poruke",MESSAGELIST_NEW_MARKER:"Novo",MESSAGE_SENT_VIA_EMAIL:"Ova poruka je poslana e-poštom",YOU_MARKER:"ti",UPLOAD_IN_PROGRESS:"Učitavam...",UPLOAD_SEND_FILE:"Pošalji datoteku",UPLOAD_SHARE_LOCATION:"Podijeli lokaciju",UPLOAD_ERROR:"Nažalost, nešto je pošlo krivo. Datoteka možda nije podržana ili je prevelika.",SHARE_LOCATION_ERROR:"Nije moguće podijeliti lokaciju: ",LOADING:"Učitavam...",HUB_EMPTY:"Ovdje će se prikazati vaša povijest razgovora",HUB_SHOW_EARLIER:"Prikaži ranije razgovore",INBOX_NO_CHATS_TITLE:"Nema razgovora!",INBOX_NO_CHATS_BODY:"Nakon što vodite jedan ili više razgovora, oni će se pojaviti ovdje.",ENABLE_TRANSLATION:"Prevedi ovaj razgovor na bosanski jezik",DISABLE_TRANSLATION:"Prikaži original",SEARCH_PLACEHOLDER_TEXT:"Pretraži...",SEARCH_SEARCHING:"Pretraživanje...",SEARCH_NO_RESULTS:"Nema rezultata",SEARCH_NO_MORE_RESULTS:"Nema više rezultata",SEARCH_RESULTS_CONVERSATIONS:"Razgovori",SEARCH_RESULTS_MESSAGES:"Poruke",SEARCH_RESULTS_SHOW_MORE:"Prikaži više",CHAT_NOT_FOUND:"Ćaskanje nije pronađeno",DELETE_MESSAGE:"Obriši poruku",DELETION_EXPLANATION:"Ako izbrišete ovu poruku, ona će nestati za sve.",EDIT_MESSAGE:"Uredi poruku",SAVE:"Sačuvati",EDITED_INDICATOR:"uređeno",REPLY_TO_MESSAGE:"Odgovorite",ADD_REACTION:"Dodajte reakciju",AUTH_EXPIRED_OVERLAY_TITLE:"Vaša chat sesija je istekla",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Osvježite stranicu da nastavite",VOICE_MESSAGE:"Glasovna poruka",CONTACT_INFORMATION_HIDDEN:"Skrivene informacije",LEAVE_CONVERSATION:"Napusti razgovor",MARK_CONVERSATION_AS_UNREAD:"Označi kao nepročitano",STATUS_INDICATOR_ONLINE:"Aktivan",STATUS_INDICATOR_OFFLINE:"Odsutan",ARIA_LEAVE_SEARCH_MODE:"Napusti način pretrage",ARIA_SEARCH_UP:"Traži gore",ARIA_SEARCH_DOWN:"Traži dolje",ARIA_CLOSE_CHAT_POPUP:"Zatvori prozor chata",ARIA_SEARCH_INSIDE_CONVERSATION:"Traži u ovom razgovoru",ARIA_SEARCH:"Traži",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"postavi brzinu reprodukcije",ARIA_CANCEL_UPLOAD:"Otkaži učitavanje",ARIA_STOP_RECORDING:"Zaustavi snimanje",ARIA_CANCEL_RECORDING:"Otkaži snimanje",ARIA_INSERT_EMOJI:"Umetni emoji",ARIA_PLAY_AUDIO:"reproduciraj audio",ARIA_PAUSE_AUDIO:"pauziraj audio",ARIA_REACTION_COUNT:(t,e)=>`${t} reakcija s ${e}`,ARIA_MORE_ACTIONS:"Više radnji",ARIA_REPLYING_TO:(t,e)=>`Odgovaranje korisniku ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Izađi iz moda odgovaranja",SELECT_CONVERSATION:"Odaberite razgovor"}},ca:{code:"ca-ES",name:"Catalan (ES)",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Ahir",TODAY:"Avui",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"ara mateix",LOCATION:"Ubicació",CANCEL:"Cancel·lar",INBOX:"Safata d'entrada",DESKTOP_NOTIFICATIONS:"Notificacions d'escriptori",DESKTOP_NOTIFICATIONS_ERROR:"No es poden habilitar les notificacions del navegador perquè el teu navegador les bloqueja activament. Prova de buscar a la configuració o utilitza un altre navegador.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`Notificació de demostració de ${t}`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Si mantens la pestanya del navegador oberta, veuràs aquesta notificació quan algú et parli.",SEND_BUTTON_TEXT:"Enviar",ENTRYBOX_TEXT_LIMIT:"Només es permeten 10.000 caràcters.",ENTRYBOX_PLACEHOLDER:"Digues alguna cosa...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Aquesta conversa ja no està activa.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Pots llegir, però no enviar missatges.",MESSAGELIST_LOADING_OLDER:"Carregant missatges antics...",MESSAGELIST_SHOW_OLDER:"Mostrar missatges més antics",MESSAGELIST_NEW_MARKER:"Nou",MESSAGE_SENT_VIA_EMAIL:"Aquest missatge s'ha enviat per correu electrònic",YOU_MARKER:"tu",UPLOAD_IN_PROGRESS:"S'està pujant...",UPLOAD_SEND_FILE:"Enviar arxiu",UPLOAD_SHARE_LOCATION:"Compartir ubicació",UPLOAD_ERROR:"Desafortunadament, alguna cosa ha anat malament en pujar. L'arxiu pot ser no compatible o massa gran.",SHARE_LOCATION_ERROR:"No es pot compartir la ubicació: ",LOADING:"Carregant...",HUB_EMPTY:"El teu historial de xat apareixerà aquí",HUB_SHOW_EARLIER:"Mostra xats anteriors",INBOX_NO_CHATS_TITLE:"Encara no hi ha xats!",INBOX_NO_CHATS_BODY:"Un cop hagis tingut una o més converses, apareixeran aquí.",ENABLE_TRANSLATION:"Traduir aquesta conversa al català",DISABLE_TRANSLATION:"Mostrar original",SEARCH_PLACEHOLDER_TEXT:"Cerca...",SEARCH_SEARCHING:"Buscant...",SEARCH_NO_RESULTS:"No s'han trobat resultats",SEARCH_NO_MORE_RESULTS:"No hi ha més resultats",SEARCH_RESULTS_CONVERSATIONS:"Converses",SEARCH_RESULTS_MESSAGES:"Missatges",SEARCH_RESULTS_SHOW_MORE:"Mostrar més",CHAT_NOT_FOUND:"Xat no trobat",DELETE_MESSAGE:"Esborrar missatge",DELETION_EXPLANATION:"Si esborres aquest missatge, desapareixerà per a tothom.",EDIT_MESSAGE:"Editar missatge",SAVE:"Desar",EDITED_INDICATOR:"editat",REPLY_TO_MESSAGE:"Respondre",ADD_REACTION:"Afegir reacció",VOICE_MESSAGE:"Missatge de veu",LEAVE_CONVERSATION:"Abandonar la conversa",MARK_CONVERSATION_AS_UNREAD:"marcar com no llegit",STATUS_INDICATOR_ONLINE:"Actiu",STATUS_INDICATOR_OFFLINE:"Absent",CONTACT_INFORMATION_HIDDEN:"informació oculta",AUTH_EXPIRED_OVERLAY_TITLE:"La teva sessió de xat ha caducat",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Actualitza la pàgina per continuar",ARIA_LEAVE_SEARCH_MODE:"Sortir del mode de cerca",ARIA_SEARCH_UP:"Cercar cap amunt",ARIA_SEARCH_DOWN:"Cercar cap avall",ARIA_CLOSE_CHAT_POPUP:"Tancar la finestra de xat",ARIA_SEARCH_INSIDE_CONVERSATION:"Cercar en aquesta conversa",ARIA_SEARCH:"Cercar",ARIA_CHAT:"Xat",ARIA_SET_PLAYBACK_SPEED:"establir velocitat de reproducció",ARIA_CANCEL_UPLOAD:"Cancel·lar la càrrega",ARIA_STOP_RECORDING:"Aturar l'enregistrament",ARIA_CANCEL_RECORDING:"Cancel·lar l'enregistrament",ARIA_INSERT_EMOJI:"Inserir un emoji",ARIA_PLAY_AUDIO:"reproduir àudio",ARIA_PAUSE_AUDIO:"pausar àudio",ARIA_REACTION_COUNT:(t,e)=>`${t} reaccions amb ${e}`,ARIA_MORE_ACTIONS:"Més accions",ARIA_REPLYING_TO:(t,e)=>`Responent a ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Sortir del mode de resposta",SELECT_CONVERSATION:"Selecciona una conversa"}},cs:{code:"cs-CZ",name:"Czech",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Včera",TODAY:"Dnes",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"právě teď",LOCATION:"Lokace",CANCEL:"Zrušit",INBOX:"Doručené",DESKTOP_NOTIFICATIONS:"Oznámení v prohlížeči",DESKTOP_NOTIFICATIONS_ERROR:"Nelze povolit notifikace prohlížeče, protože váš prohlížeč je aktivně blokuje. Zkuste se podívat na nastavení nebo zkuste použít jiný prohlížeč.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} demo notifikace`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Pokud necháte kartu prohlížeče otevřenou, uvidíte tento popup jakmile s vámi bude někdo mluvit.",SEND_BUTTON_TEXT:"Odeslat",ENTRYBOX_TEXT_LIMIT:"Je povoleno Maximálně 10.000 znaků.",ENTRYBOX_PLACEHOLDER:"Napište něco...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Tato konverzace již není aktivní.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Můžete číst, ale nemůžete posílat zprávy.",MESSAGELIST_LOADING_OLDER:"Nahrávám starší zprávy...",MESSAGELIST_SHOW_OLDER:"Zobrazit starší zprávy",MESSAGELIST_NEW_MARKER:"Nové",MESSAGE_SENT_VIA_EMAIL:"Tato zpráva byla odeslána přes mail.",YOU_MARKER:"vy",UPLOAD_IN_PROGRESS:"Nahrávám...",UPLOAD_SEND_FILE:"Poslat soubor",UPLOAD_SHARE_LOCATION:"Sdílet pozici",UPLOAD_ERROR:"Nepodařilo se nahrát soubor. Ten je buď nepodporován a/nebo příliš velký.",SHARE_LOCATION_ERROR:"Není možné sdílet pozici: ",LOADING:"Nahrávám...",HUB_EMPTY:"Vaše historie se zde zobrazí",HUB_SHOW_EARLIER:"Zobrazit dřívější konverzace",INBOX_NO_CHATS_TITLE:"Zatím zde nejsou žádné konverzace!",INBOX_NO_CHATS_BODY:"Jakmile budete mít jednu nebo více konverzací, objeví se zde.",ENABLE_TRANSLATION:"Přeložit tuto konverzaci do češtiny",DISABLE_TRANSLATION:"Zobrazit původní",SEARCH_PLACEHOLDER_TEXT:"Hledat...",SEARCH_SEARCHING:"Hledání...",SEARCH_NO_RESULTS:"Nenašly se žádné výsledky",SEARCH_NO_MORE_RESULTS:"Žádné další výsledky",SEARCH_RESULTS_CONVERSATIONS:"Konverzace",SEARCH_RESULTS_MESSAGES:"Zprávy",SEARCH_RESULTS_SHOW_MORE:"Zobrazit více",CHAT_NOT_FOUND:"Chat nenalezen",DELETE_MESSAGE:"Smazat zprávu",DELETION_EXPLANATION:"Pokud tuto zprávu smažete, zmizí pro všechny.",EDIT_MESSAGE:"Upravit zprávu",SAVE:"Uložit",EDITED_INDICATOR:"upraveno",REPLY_TO_MESSAGE:"Odpovědět",ADD_REACTION:"Reagovat",AUTH_EXPIRED_OVERLAY_TITLE:"Váš chat byl kvůli nečinnosti odpojen",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Pro pokračování obnovte stránku",VOICE_MESSAGE:"Hlasová zpráva",CONTACT_INFORMATION_HIDDEN:"Skrytá informace",LEAVE_CONVERSATION:"Opustit konverzaci",MARK_CONVERSATION_AS_UNREAD:"Označit jako nepřečtené",STATUS_INDICATOR_ONLINE:"Aktivní",STATUS_INDICATOR_OFFLINE:"Nedostupný",ARIA_LEAVE_SEARCH_MODE:"Opustit režim vyhledávání",ARIA_SEARCH_UP:"Hledat nahoru",ARIA_SEARCH_DOWN:"Hledat dolů",ARIA_CLOSE_CHAT_POPUP:"Zavřít okno chatu",ARIA_SEARCH_INSIDE_CONVERSATION:"Hledat v této konverzaci",ARIA_SEARCH:"Hledat",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"nastavit rychlost přehrávání",ARIA_CANCEL_UPLOAD:"Zrušit nahrávání",ARIA_STOP_RECORDING:"Zastavit nahrávání",ARIA_CANCEL_RECORDING:"Zrušit nahrávání",ARIA_INSERT_EMOJI:"Vložit emoji",ARIA_PLAY_AUDIO:"přehrát audio",ARIA_PAUSE_AUDIO:"pozastavit audio",ARIA_REACTION_COUNT:(t,e)=>`${t} reakcí s ${e}`,ARIA_MORE_ACTIONS:"Další akce",ARIA_REPLYING_TO:(t,e)=>`Odpověď na ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Opustit režim odpovědi",SELECT_CONVERSATION:"Vyberte konverzaci"}},da:{code:"da-DK",name:"Danish",emojiPickerTranslationUrl:null,emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/da/emojibase/data.json",translation:{YESTERDAY:"I går",TODAY:"I dag",DAYS:"d",HOURS:"t",MINUTES:"m",JUST_NOW:"lige nu",LOCATION:"Placering",CANCEL:"Annuller",INBOX:"Indbakke",DESKTOP_NOTIFICATIONS:"Browsermeddelelser",DESKTOP_NOTIFICATIONS_ERROR:"Kan ikke aktivere Browsermeddelelser, fordi din browser aktivt blokerer dem. Prøv at kigge i indstillingerne eller benyt en anden browser.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} demomeddelelse`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Hvis du holder dit browser-faneblad åben, vil du se det her komme op, når nogen taler til dig.",SEND_BUTTON_TEXT:"Send",ENTRYBOX_TEXT_LIMIT:"Kun 10.000 tegn er tilladt.",ENTRYBOX_PLACEHOLDER:"Sig noget...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Denne samtale er ikke længere aktiv.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Du kan læse, men ikke sende beskeder.",MESSAGELIST_LOADING_OLDER:"Indlæser ældre beskeder...",MESSAGELIST_SHOW_OLDER:"Vis ældre beskeder",MESSAGELIST_NEW_MARKER:"Ny",MESSAGE_SENT_VIA_EMAIL:"Denne besked blev sendt via e-mail",YOU_MARKER:"dig",UPLOAD_IN_PROGRESS:"Overfører...",UPLOAD_SEND_FILE:"Send fil",UPLOAD_SHARE_LOCATION:"Del placering",UPLOAD_ERROR:"Der er sket noget forkert ved upload. Filen kan ikke understøttes eller filen er for stor.",SHARE_LOCATION_ERROR:"Kan ikke dele placering: ",LOADING:"Indlæser...",HUB_EMPTY:"Dine samtaler vises her",HUB_SHOW_EARLIER:"Vis tidligere chats",INBOX_NO_CHATS_TITLE:"Ingen chats endnu!",INBOX_NO_CHATS_BODY:"Når du har haft en eller flere samtaler, vises de her.",ENABLE_TRANSLATION:"Oversæt denne konversation til dansk",DISABLE_TRANSLATION:"Vis den oprindelige",SEARCH_PLACEHOLDER_TEXT:"Søg...",SEARCH_SEARCHING:"Søger...",SEARCH_NO_RESULTS:"Ingen resultater fundet",SEARCH_NO_MORE_RESULTS:"Ikke flere resultater",SEARCH_RESULTS_CONVERSATIONS:"Samtaler",SEARCH_RESULTS_MESSAGES:"Beskeder",SEARCH_RESULTS_SHOW_MORE:"Vis mere",CHAT_NOT_FOUND:"Chat ikke fundet",DELETE_MESSAGE:"Slet besked",DELETION_EXPLANATION:"Hvis du sletter denne besked, vil ingen kunne se den.",EDIT_MESSAGE:"Rediger besked",SAVE:"Gem",EDITED_INDICATOR:"redigeret",REPLY_TO_MESSAGE:"Svar",ADD_REACTION:"Tilføj reaktion",AUTH_EXPIRED_OVERLAY_TITLE:"Din chatsession er udløbet",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Opdater siden for at fortsætte",VOICE_MESSAGE:"Talebesked",CONTACT_INFORMATION_HIDDEN:"Skjulte oplysninger",LEAVE_CONVERSATION:"Forlad samtale",MARK_CONVERSATION_AS_UNREAD:"Marker som ulæst",STATUS_INDICATOR_ONLINE:"Online",STATUS_INDICATOR_OFFLINE:"Offline",ARIA_LEAVE_SEARCH_MODE:"Forlad søgemodus",ARIA_SEARCH_UP:"Søg opad",ARIA_SEARCH_DOWN:"Søg nedad",ARIA_CLOSE_CHAT_POPUP:"Luk chatvindue",ARIA_SEARCH_INSIDE_CONVERSATION:"Søg i denne samtale",ARIA_SEARCH:"Søg",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"Indstil afspilningshastighed",ARIA_CANCEL_UPLOAD:"Annuller upload",ARIA_STOP_RECORDING:"Stop optagelse",ARIA_CANCEL_RECORDING:"Annuller optagelse",ARIA_INSERT_EMOJI:"Indsæt en emoji",ARIA_PLAY_AUDIO:"Afspil lyd",ARIA_PAUSE_AUDIO:"Pauser lyd",ARIA_REACTION_COUNT:(t,e)=>`${t} Reaktioner med ${e}`,ARIA_MORE_ACTIONS:"Flere handlinger",ARIA_REPLYING_TO:(t,e)=>`Svarer til ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Forlad svarstilstand",SELECT_CONVERSATION:"Vælg en samtale"}},de:{code:"de-DE",name:"German",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/de.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/de/cldr/data.json",translation:{YESTERDAY:"Gestern",TODAY:"Heute",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"gerade jetzt",LOCATION:"Standort",CANCEL:"Abbrechen",INBOX:"Inbox",DESKTOP_NOTIFICATIONS:"Browser-Benachrichtigungen",DESKTOP_NOTIFICATIONS_ERROR:"Browser-Benachrichtigungen können nicht aktiviert werden, da Ihr Browser sie aktiv blockiert. Versuchen Sie, in den Einstellungen nachzuschlagen oder einen anderen Browser zu verwenden.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} Demo-Benachrichtigung`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Wenn Sie Ihre Browser-Registerkarte geöffnet lassen, wird dies angezeigt, wenn jemand mit Ihnen spricht.",SEND_BUTTON_TEXT:"Senden",ENTRYBOX_TEXT_LIMIT:"Nur 10.000 Zeichen sind erlaubt.",ENTRYBOX_PLACEHOLDER:"Sag etwas...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Diese Konversation ist nicht mehr aktiv.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Sie können Nachrichten lesen, aber nicht senden.",MESSAGELIST_LOADING_OLDER:"Ältere Nachrichten werden geladen...",MESSAGELIST_SHOW_OLDER:"Zeige ältere Nachrichten",MESSAGELIST_NEW_MARKER:"Neu",MESSAGE_SENT_VIA_EMAIL:"Diese Nachricht wurde per E-Mail gesendet",YOU_MARKER:"du",UPLOAD_IN_PROGRESS:"Hochladen...",UPLOAD_SEND_FILE:"Datei senden",UPLOAD_SHARE_LOCATION:"Standort teilen",UPLOAD_ERROR:"Beim Hochladen ist ein Fehler aufgetreten. Die Datei ist möglicherweise nicht unterstützt oder zu groß.",SHARE_LOCATION_ERROR:"Standort kann nicht freigegeben werden: ",LOADING:"Laden...",HUB_EMPTY:"Ihr Chat-Verlauf wird hier angezeigt",HUB_SHOW_EARLIER:"Zeige frühere Chats",INBOX_NO_CHATS_TITLE:"Noch keine Chats!",INBOX_NO_CHATS_BODY:"Sobald Sie eine oder mehrere Unterhaltungen geführt haben, werden sie hier angezeigt.",ENABLE_TRANSLATION:"Dieses Gespräch auf Deutsch übersetzen",DISABLE_TRANSLATION:"Originaltext anzeigen",SEARCH_PLACEHOLDER_TEXT:"Suche...",SEARCH_SEARCHING:"Suchen...",SEARCH_NO_RESULTS:"Keine Suchergebnisse gefunden",SEARCH_NO_MORE_RESULTS:"Keine weiteren Suchergebnisse",SEARCH_RESULTS_CONVERSATIONS:"Unterhaltungen",SEARCH_RESULTS_MESSAGES:"Nachrichten",SEARCH_RESULTS_SHOW_MORE:"Mehr anzeigen",CHAT_NOT_FOUND:"Chat nicht gefunden",DELETE_MESSAGE:"Nachricht löschen",DELETION_EXPLANATION:"Wenn Sie diese Nachricht löschen, wird sie für alle verschwinden.",EDIT_MESSAGE:"Nachricht bearbeiten",SAVE:"Speichern",EDITED_INDICATOR:"bearbeitet",REPLY_TO_MESSAGE:"Antworten",ADD_REACTION:"Reaktion hinzufügen",AUTH_EXPIRED_OVERLAY_TITLE:"Ihre Chatsitzung ist abgelaufen",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Laden Sie zum Fortfahren die Seite neu",VOICE_MESSAGE:"Sprachnachricht",CONTACT_INFORMATION_HIDDEN:"Geschützte Angaben",LEAVE_CONVERSATION:"Unterhaltung verlassen",MARK_CONVERSATION_AS_UNREAD:"als ungelesen markieren",STATUS_INDICATOR_ONLINE:"Aktiv",STATUS_INDICATOR_OFFLINE:"Abwesend",ARIA_LEAVE_SEARCH_MODE:"Suchmodus verlassen",ARIA_SEARCH_UP:"Nach oben suchen",ARIA_SEARCH_DOWN:"Nach unten suchen",ARIA_CLOSE_CHAT_POPUP:"Chat-Popup schließen",ARIA_SEARCH_INSIDE_CONVERSATION:"In dieser Unterhaltung suchen",ARIA_SEARCH:"Suchen",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"Wiedergabegeschwindigkeit einstellen",ARIA_CANCEL_UPLOAD:"Upload abbrechen",ARIA_STOP_RECORDING:"Aufnahme stoppen",ARIA_CANCEL_RECORDING:"Aufnahme abbrechen",ARIA_INSERT_EMOJI:"Emoji einfügen",ARIA_PLAY_AUDIO:"Audio abspielen",ARIA_PAUSE_AUDIO:"Audio pausieren",ARIA_REACTION_COUNT:(t,e)=>`${t} Reaktionen mit ${e}`,ARIA_MORE_ACTIONS:"Weitere Aktionen",ARIA_REPLYING_TO:(t,e)=>`Antworten an ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Antwortmodus verlassen",SELECT_CONVERSATION:"Unterhaltung auswählen"}},el:{code:"el-GR",name:"Greek (Greece)",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Χθές",TODAY:"Σήμερα",DAYS:"Ημέρες",HOURS:"'Ωρες",MINUTES:"Λεπτά",JUST_NOW:"Μόλις τώρα",LOCATION:"Τοποθεσία",CANCEL:"Ακύρωση",INBOX:"Εισερχόμενα",DESKTOP_NOTIFICATIONS:"Ειδοποιήσεις περιηγητή",DESKTOP_NOTIFICATIONS_ERROR:"Δεν είναι δυνατή η ενεργοποίηση των ειδοποιήσεων του προγράμματος περιήγησης, επειδή το πρόγραμμα περιήγησης τις αποκλείει ενεργά. Δοκιμάστε να τσεκάρετε τις ρυθμίσεις ή να χρησιμοποιήσετε διαφορετικό πρόγραμμα περιήγησης.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} Δοκιμαστική επίδειξη`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Αν διατηρήσετε ανοιχτή τη σελίδα του προγράμματος περιήγησης, θα δείτε αυτό το pop up (παράθυρο) όταν κάποιος σας μιλάει.",SEND_BUTTON_TEXT:"Αποστολή",ENTRYBOX_TEXT_LIMIT:"Επιτρέπονται μόνο 10.000 χαρακτήρες.",ENTRYBOX_PLACEHOLDER:"Πείτε κάτι...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Αυτή η συζήτηση δεν είναι πλέον ενεργή.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Μπορείτε να διαβάσετε αλλά δεν μπορείτε να στείλετε μηνύματα.",MESSAGELIST_LOADING_OLDER:"Φόρτωση παλαιοτέρων μηνυμάτων...",MESSAGELIST_SHOW_OLDER:"Εμφάνιση παλαιότερων μηνυμάτων",MESSAGELIST_NEW_MARKER:"Νέο",MESSAGE_SENT_VIA_EMAIL:"Αυτό το μήνυμα εστάλη μέσω ηλεκτρονικού ταχυδρομείου",YOU_MARKER:"Εσείς",UPLOAD_IN_PROGRESS:"Ανέβασμα...",UPLOAD_SEND_FILE:"Αποστολή αρχείου",UPLOAD_SHARE_LOCATION:"Κοινή χρήση τοποθεσίας",UPLOAD_ERROR:"Κάτι πήγε στραβά κατά τη φόρτωση. Το αρχείο ενδέχεται να μην υποστηρίζεται ή να είναι υπερβολικά μεγάλο.",SHARE_LOCATION_ERROR:"Δεν είναι δυνατή η χρήση κοινής τοποθεσίας: ",LOADING:"Φόρτωση...",HUB_EMPTY:"Το ιστορικό των συνομιλιών σας θα εμφανιστεί εδώ",HUB_SHOW_EARLIER:"Εμφάνιση προηγούμενων συνομιλιών",INBOX_NO_CHATS_TITLE:"Δεν υπάρχουν ακόμα συζητήσεις!",INBOX_NO_CHATS_BODY:"Μόλις έχετε μία ή περισσότερες συνομιλίες, θα εμφανιστούν εδώ.",ENABLE_TRANSLATION:"Μετάφραση αυτής της συνομιλίας στα ελληνικά",DISABLE_TRANSLATION:"Προβολή πρωτοτύπου",SEARCH_PLACEHOLDER_TEXT:"Αναζήτηση...",SEARCH_SEARCHING:"Αναζήτηση...",SEARCH_NO_RESULTS:"Δεν βρέθηκαν αποτελέσματα",SEARCH_NO_MORE_RESULTS:"Δεν υπάρχουν περισσότερα αποτελέσματα",SEARCH_RESULTS_CONVERSATIONS:"Συνομιλίες",SEARCH_RESULTS_MESSAGES:"Μηνύματα",SEARCH_RESULTS_SHOW_MORE:"Εμφάνιση περισσότερων",CHAT_NOT_FOUND:"Η συνομιλία δεν βρέθηκε",DELETE_MESSAGE:"Διαγραφή μηνύματος",DELETION_EXPLANATION:"Εάν διαγράψετε αυτό το μήνυμα, θα εξαφανιστεί για όλους.",EDIT_MESSAGE:"Επεξεργασία μηνύματος",SAVE:"Αποθήκευση",EDITED_INDICATOR:"επεξεργασμένο",REPLY_TO_MESSAGE:"Απάντηση",ADD_REACTION:"Προσθήκη αντίδρασης",AUTH_EXPIRED_OVERLAY_TITLE:"Η συνεδρία της συνομιλίας σας έχει λήξει",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Ανανεώστε τη σελίδα για να συνεχίσετε",VOICE_MESSAGE:"Ηχητικό μήνυμα",CONTACT_INFORMATION_HIDDEN:"Κρυμμένες πληροφορίες",LEAVE_CONVERSATION:"Αποσυρθείτε από τη συζήτηση",MARK_CONVERSATION_AS_UNREAD:"Επισήμανση ως μη αναγνωσμένα",STATUS_INDICATOR_ONLINE:"Ενεργός",STATUS_INDICATOR_OFFLINE:"Ανενεργός",ARIA_LEAVE_SEARCH_MODE:"Αποχώρηση από τη λειτουργία αναζήτησης",ARIA_SEARCH_UP:"Αναζήτηση προς τα πάνω",ARIA_SEARCH_DOWN:"Αναζήτηση προς τα κάτω",ARIA_CLOSE_CHAT_POPUP:"Κλείσιμο παραθύρου συνομιλίας",ARIA_SEARCH_INSIDE_CONVERSATION:"Αναζήτηση σε αυτή τη συνομιλία",ARIA_SEARCH:"Αναζήτηση",ARIA_CHAT:"Συνομιλία",ARIA_SET_PLAYBACK_SPEED:"ορισμός ταχύτητας αναπαραγωγής",ARIA_CANCEL_UPLOAD:"Ακύρωση φόρτωσης",ARIA_STOP_RECORDING:"Διακοπή εγγραφής",ARIA_CANCEL_RECORDING:"Ακύρωση εγγραφής",ARIA_INSERT_EMOJI:"Εισαγωγή emoji",ARIA_PLAY_AUDIO:"αναπαραγωγή ήχου",ARIA_PAUSE_AUDIO:"παύση ήχου",ARIA_REACTION_COUNT:(t,e)=>`${t} αντιδράσεις με ${e}`,ARIA_MORE_ACTIONS:"Περισσότερες ενέργειες",ARIA_REPLYING_TO:(t,e)=>`Απάντηση στον ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Έξοδος από τη λειτουργία απάντησης",SELECT_CONVERSATION:"Επιλέξτε μια συζήτηση"}},en:XA,es:{code:"es-ES",name:"Spanish",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/es.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/es/cldr/data.json",translation:{YESTERDAY:"Ayer",TODAY:"Hoy",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"justo ahora",LOCATION:"Ubicación",CANCEL:"Cancelar",INBOX:"Inbox",DESKTOP_NOTIFICATIONS:"Notificaciones del navigator",DESKTOP_NOTIFICATIONS_ERROR:"No se logró habilitar las notificaciones del navigador, comprueba que tu navegador no las esté bloqueando o intenta con otro navegador.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} notificación de prueba`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Si dejas esta pestaña abierta, verás este pop up cuando alguien te hable.",SEND_BUTTON_TEXT:"Enviar",ENTRYBOX_TEXT_LIMIT:"Sólo 10.000 caracteres permitidos.",ENTRYBOX_PLACEHOLDER:"Escribe algo...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Esta conversación ya no está activa.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Puedes leer pero no enviar mensajes.",MESSAGELIST_LOADING_OLDER:"Cargando mensajes pasados...",MESSAGELIST_SHOW_OLDER:"Ver mensajes pasados",MESSAGELIST_NEW_MARKER:"Nuevo",MESSAGE_SENT_VIA_EMAIL:"Este mensaje ha sido enviado vía email",YOU_MARKER:"tú",UPLOAD_IN_PROGRESS:"Subir...",UPLOAD_SEND_FILE:"Enviar archivo",UPLOAD_SHARE_LOCATION:"Compartir ubicación",UPLOAD_ERROR:"Ocurrió un problema subiendo el archivo. Puede que el archivo esté en un formato no soportado o que sea demasiado grande.",SHARE_LOCATION_ERROR:"No se logró compartir la ubicación: ",LOADING:"Cargando...",HUB_EMPTY:"Tu historial de conversaciones se mostrará aquí",HUB_SHOW_EARLIER:"Ver conversaciones pasadas",INBOX_NO_CHATS_TITLE:"¡Aún sin conversaciones!",INBOX_NO_CHATS_BODY:"Una vez que tengas una o más conversaciones, se mostrarán aquí.",ENABLE_TRANSLATION:"Traducir esta conversación al español",DISABLE_TRANSLATION:"Mostrar la conversación original",SEARCH_PLACEHOLDER_TEXT:"Buscar...",SEARCH_SEARCHING:"Buscando...",SEARCH_NO_RESULTS:"No se encontraron resultados",SEARCH_NO_MORE_RESULTS:"No hay más resultados",SEARCH_RESULTS_CONVERSATIONS:"Conversaciones",SEARCH_RESULTS_MESSAGES:"Mensajes",SEARCH_RESULTS_SHOW_MORE:"Mostrar más",CHAT_NOT_FOUND:"Chat no encontrado",DELETE_MESSAGE:"Eliminar mensaje",DELETION_EXPLANATION:"Este mensaje desaparecerá para todos si lo borras.",EDIT_MESSAGE:"Editar mensaje",SAVE:"Guardar",EDITED_INDICATOR:"editado",REPLY_TO_MESSAGE:"Responder",ADD_REACTION:"Añadir reacción",AUTH_EXPIRED_OVERLAY_TITLE:"Su sesión de chat ha expirado",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Actualice la página para continuar",VOICE_MESSAGE:"Mensaje de voz",CONTACT_INFORMATION_HIDDEN:"Información oculta",LEAVE_CONVERSATION:"Abandonar conversación",MARK_CONVERSATION_AS_UNREAD:"Marcar como no leída",STATUS_INDICATOR_ONLINE:"Activo",STATUS_INDICATOR_OFFLINE:"Ausente",ARIA_LEAVE_SEARCH_MODE:"Salir del modo búsqueda",ARIA_SEARCH_UP:"Buscar hacia arriba",ARIA_SEARCH_DOWN:"Buscar hacia abajo",ARIA_CLOSE_CHAT_POPUP:"Cerrar la ventana de chat",ARIA_SEARCH_INSIDE_CONVERSATION:"Buscar en esta conversación",ARIA_SEARCH:"Buscar",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"establecer velocidad de reproducción",ARIA_CANCEL_UPLOAD:"Cancelar envío",ARIA_STOP_RECORDING:"Detener grabación",ARIA_CANCEL_RECORDING:"Cancelar grabación",ARIA_INSERT_EMOJI:"Insertar un emoji",ARIA_PLAY_AUDIO:"reproducir audio",ARIA_PAUSE_AUDIO:"pausar audio",ARIA_REACTION_COUNT:(t,e)=>`${t} reacciones con ${e}`,ARIA_MORE_ACTIONS:"Más acciones",ARIA_REPLYING_TO:(t,e)=>`Respondiendo a ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Salir del modo respuesta",SELECT_CONVERSATION:"Selecciona una conversación"}},et:{code:"et-EE",name:"Estonian",emojiPickerTranslationUrl:null,emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/et/cldr/data.json",translation:{YESTERDAY:"Eile",TODAY:"Täna",DAYS:"p",HOURS:"t",MINUTES:"m",JUST_NOW:"Just nüüd",LOCATION:"Asukoht",CANCEL:"Katkesta",INBOX:"Postkast",DESKTOP_NOTIFICATIONS:"Veebibrauseri teated",DESKTOP_NOTIFICATIONS_ERROR:"Töölaua teatisi ei saa lubada, kuna Teie brauser blokeerib need aktiivselt. Proovige muuta seadeid või kasutada mõnda muud brauserit.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} demo teavitus`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Kui hoiate oma brauseri vahekaardi lahti ja näete seda hüpikakent, siis keegi soovib Teiega rääkida.",SEND_BUTTON_TEXT:"Saada",ENTRYBOX_TEXT_LIMIT:"Ainult kuni 10.000 tähemärki on lubatud.",ENTRYBOX_PLACEHOLDER:"Kirjuta midagi...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"See vestlus ei ole enam aktiivne.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Sa saad lugeda teateid, aga mitte kirjutada.",MESSAGELIST_LOADING_OLDER:"Laen vanemaid teateid...",MESSAGELIST_SHOW_OLDER:"Näita vanemaid teateid",MESSAGELIST_NEW_MARKER:"Uus",MESSAGE_SENT_VIA_EMAIL:"See teade on saadetud e-postiga",YOU_MARKER:"Sina",UPLOAD_IN_PROGRESS:"Laen...",UPLOAD_SEND_FILE:"Saada fail",UPLOAD_SHARE_LOCATION:"Jaga faili asukohta",UPLOAD_ERROR:"Nüüd läks midagi nihu, seoses faili ülesse laadimisega. Tundmatu fail või liiga suur.",SHARE_LOCATION_ERROR:"Ei suuda jagada faili asukohta: ",LOADING:"Laen...",HUB_EMPTY:"Siin on Sinu vestluste ajalugu",HUB_SHOW_EARLIER:"Näita vanemaid vestlusi",INBOX_NO_CHATS_TITLE:"Pole ühtegi vestlust!",INBOX_NO_CHATS_BODY:"Kui Sul tekib üks või rohkem vestlust, siis on need kuvatakse siin.",ENABLE_TRANSLATION:"Tõlgi see vestlus eesti keelde",DISABLE_TRANSLATION:"Näita algteksti",SEARCH_PLACEHOLDER_TEXT:"Otsi...",SEARCH_SEARCHING:"Otsin...",SEARCH_NO_RESULTS:"Otsingu tulemused puuduvad",SEARCH_NO_MORE_RESULTS:"Rohkem tulemusi ei ole ",SEARCH_RESULTS_CONVERSATIONS:"Vestlused",SEARCH_RESULTS_MESSAGES:"Sõnumid",SEARCH_RESULTS_SHOW_MORE:"Näita rohkem",CHAT_NOT_FOUND:"Vestlust ei leitud",DELETE_MESSAGE:"Kustuta sõnum",DELETION_EXPLANATION:"Kui kustutate selle sõnumi, kaob see kõigi jaoks.",EDIT_MESSAGE:"Redigeeri sõnumit",SAVE:"Salvesta",EDITED_INDICATOR:"muudetud",REPLY_TO_MESSAGE:"Vasta",ADD_REACTION:"Lisa reaktsioon",AUTH_EXPIRED_OVERLAY_TITLE:"Teie vestlussessioon on lõppenud",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Jätkamiseks värskendage lehte",VOICE_MESSAGE:"Häälsõnum",CONTACT_INFORMATION_HIDDEN:"Varjatud informatsioon",LEAVE_CONVERSATION:"Lahku vestlusest",MARK_CONVERSATION_AS_UNREAD:"Märgi mitteloetuks",STATUS_INDICATOR_ONLINE:"Aktiivne",STATUS_INDICATOR_OFFLINE:"Eemal",ARIA_LEAVE_SEARCH_MODE:"Välju otsingurežiimist",ARIA_SEARCH_UP:"Otsi üles",ARIA_SEARCH_DOWN:"Otsi alla",ARIA_CLOSE_CHAT_POPUP:"Sulge vestluse aken",ARIA_SEARCH_INSIDE_CONVERSATION:"Otsi sellest vestlusest",ARIA_SEARCH:"Otsi",ARIA_CHAT:"Vestlus",ARIA_SET_PLAYBACK_SPEED:"määra taasesituse kiirus",ARIA_CANCEL_UPLOAD:"Tühista üleslaadimine",ARIA_STOP_RECORDING:"Peata salvestamine",ARIA_CANCEL_RECORDING:"Tühista salvestamine",ARIA_INSERT_EMOJI:"Sisesta emoji",ARIA_PLAY_AUDIO:"esita heli",ARIA_PAUSE_AUDIO:"pausi heli",ARIA_REACTION_COUNT:(t,e)=>`${t} reaktsiooni (${e})`,ARIA_MORE_ACTIONS:"Rohkem toiminguid",ARIA_REPLYING_TO:(t,e)=>`Vastamine kasutajale ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Välju vastamisrežiimist",SELECT_CONVERSATION:"Vali vestlus"}},fa:{code:"fa",name:"Persian (Farsi)",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/fa.js",emojiDataUrl:null,translation:{YESTERDAY:"دیروز",TODAY:"امروز",DAYS:"روز",HOURS:"ساعت",MINUTES:"دقیقه",JUST_NOW:"هم اکنون",LOCATION:"مکان",CANCEL:"لغو",INBOX:"صندوق",DESKTOP_NOTIFICATIONS:"اطلاعیههای مرورگر",DESKTOP_NOTIFICATIONS_ERROR:"خطا در فعال سازی اعلان های مرورگر، مرورگر شما آنها را مسدود می کند سعی کنید تنظیمات مرورگر را تغییر دهید یا از یک مرورگر دیگر استفاده کنید.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`نوتیفیکیشن دمو ${t}`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"اگر صفحه ی مرورگر را باز نگهدارید این را موقعه ای که کسی با شما صحبت کند خواهید دید",SEND_BUTTON_TEXT:"بفرست",ENTRYBOX_TEXT_LIMIT:"فقط ۱۰،۰۰۰ حروف مجاز می باشد.",ENTRYBOX_PLACEHOLDER:"...چیزی بنویسید",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:".این مکالمه دیگر فعال نمی باشد",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"شما می توانید بخوانید اما نمی توانید پیام بفرستید",MESSAGELIST_LOADING_OLDER:"...در حال بارگذاری پیام های قدیمی تر",MESSAGELIST_SHOW_OLDER:"نشان دادن پیام های قدیمی",MESSAGELIST_NEW_MARKER:"جدید",MESSAGE_SENT_VIA_EMAIL:"پیام توسط ایمل ارسال شد",YOU_MARKER:"شما",UPLOAD_IN_PROGRESS:"...در حال بارگذاری",UPLOAD_SEND_FILE:"فرستادن پوشه",UPLOAD_SHARE_LOCATION:"اشتراک گذاری مکان",UPLOAD_ERROR:"متاسفانه بارگذاری با مشکل روبه رو شد. ممکن است فایل حجیم باشد یا ساپورت نشده باشد.",SHARE_LOCATION_ERROR:"خطا در اشتراک گذاری مکان: ",LOADING:"...بارگذاری",HUB_EMPTY:"تاریخچه گفتگو اینجا نمایان می شود",HUB_SHOW_EARLIER:"دیدن گفتگو های قبلی",INBOX_NO_CHATS_TITLE:"هنوز گفتگویی وجود ندارد",INBOX_NO_CHATS_BODY:"بعد از داشتن یک مکالمه یا بیشتر، آنها اینجا نمایان می شوند.",ENABLE_TRANSLATION:"این مکالمه را به فارسی ترجمه کن",DISABLE_TRANSLATION:"زبان اصلی را نشان بده",SEARCH_PLACEHOLDER_TEXT:"...جستجو",SEARCH_SEARCHING:"...در حال جستجو",SEARCH_NO_RESULTS:"نتیجه ای یافت نشد",SEARCH_NO_MORE_RESULTS:"نتیجه بیشتری وجود ندارد",SEARCH_RESULTS_CONVERSATIONS:"گفتگوها",SEARCH_RESULTS_MESSAGES:"پیامها",SEARCH_RESULTS_SHOW_MORE:"نمایش بیشتر",CHAT_NOT_FOUND:"مکالمه پیدا نشد",DELETE_MESSAGE:"حذف پیام ",DELETION_EXPLANATION:"اگر این پیام را حذف کنید، برای همه ناپدید می شود.",EDIT_MESSAGE:"ویرایش پیام",SAVE:"ذخیره",EDITED_INDICATOR:"ویرایششده",REPLY_TO_MESSAGE:"پاسخ دادن",ADD_REACTION:"واکنش را اضافه کنید",AUTH_EXPIRED_OVERLAY_TITLE:"جلسه چت شما منقضی شده است",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"برای ادامه صفحه را بازخوانی کنید",VOICE_MESSAGE:"پیام صوتی",CONTACT_INFORMATION_HIDDEN:"اطلاعات پنهان",LEAVE_CONVERSATION:"خروج از گفتگو",MARK_CONVERSATION_AS_UNREAD:"به عنوان خوانده نشده علامت گذاری کن",STATUS_INDICATOR_ONLINE:"فعال",STATUS_INDICATOR_OFFLINE:"غایب",ARIA_LEAVE_SEARCH_MODE:"خروج از حالت جستجو",ARIA_SEARCH_UP:"جستجوی بالا",ARIA_SEARCH_DOWN:"جستجوی پایین",ARIA_CLOSE_CHAT_POPUP:"بستن پنجره چت",ARIA_SEARCH_INSIDE_CONVERSATION:"جستجو در این گفتگو",ARIA_SEARCH:"جستجو",ARIA_CHAT:"چت",ARIA_SET_PLAYBACK_SPEED:"تنظیم سرعت پخش",ARIA_CANCEL_UPLOAD:"لغو آپلود",ARIA_STOP_RECORDING:"توقف ضبط",ARIA_CANCEL_RECORDING:"لغو ضبط",ARIA_INSERT_EMOJI:"درج ایموجی",ARIA_PLAY_AUDIO:"پخش صدا",ARIA_PAUSE_AUDIO:"مکث صدا",ARIA_REACTION_COUNT:(t,e)=>`${t} واکنش با ${e}`,ARIA_MORE_ACTIONS:"اقدامات بیشتر",ARIA_REPLYING_TO:(t,e)=>`در حال پاسخ به ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"خروج از حالت پاسخ",SELECT_CONVERSATION:"یک گفتگو را انتخاب کنید"}},fi:{code:"fi-FI",name:"Finnish",emojiPickerTranslationUrl:null,emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/fi/cldr/data.json",translation:{YESTERDAY:"Eilen",TODAY:"Tänään",DAYS:"p",HOURS:"t",MINUTES:"m",JUST_NOW:"juuri nyt",LOCATION:"Sijainti",CANCEL:"Peruuta",INBOX:"Saapuneet",DESKTOP_NOTIFICATIONS:"Selaimen ilmoitukset",DESKTOP_NOTIFICATIONS_ERROR:"Työpöydän ilmoituksia ei voitu kytkeä päälle, koska selaimesi estää ne aktiivisesti. Koeta tutkia sen asetuksia tai vaihda selainta.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} demo ilmoitus`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Jos pidät tämän sivun auki, näet vastaavan ilmoituksen kun joku puhuu sinulle.",SEND_BUTTON_TEXT:"Lähetä",ENTRYBOX_TEXT_LIMIT:"Maksimissaan 10000 merkkiä.",ENTRYBOX_PLACEHOLDER:"Sano jotain...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Tämä keskustelu ei ole enää aktiivinen.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Voit lukea, mutta et lähettää viestejä.",MESSAGELIST_LOADING_OLDER:"Ladataan vanhoja viestejä..",MESSAGELIST_SHOW_OLDER:"Näytä vanhat viestit",MESSAGELIST_NEW_MARKER:"Uusi",MESSAGE_SENT_VIA_EMAIL:"Tämä viesti on lähetetty sähköpostin välityksellä",YOU_MARKER:"sinä",UPLOAD_IN_PROGRESS:"Ladataan...",UPLOAD_SEND_FILE:"Lähetä tiedosto",UPLOAD_SHARE_LOCATION:"Jaa sijainti",UPLOAD_ERROR:"Valitettavasti jokin meni vikaan. Tiedostotyyppiä ei ehkä tueta tai se saattaa olla liian suuri.",SHARE_LOCATION_ERROR:"Sijaintia ei pystytty jakamaan: ",LOADING:"Ladataan...",HUB_EMPTY:"Keskusteluhistoriasi näkyy tässä",HUB_SHOW_EARLIER:"Näytä aiemmat keskustelut",INBOX_NO_CHATS_TITLE:"Ei keskusteluja, vielä!",INBOX_NO_CHATS_BODY:"Kun olet käynyt yhden tai useamman keskustelun, ne näkyvät täällä.",ENABLE_TRANSLATION:"Käännä keskustelu kielelle suomi",DISABLE_TRANSLATION:"Näytä alkuperäinen",SEARCH_PLACEHOLDER_TEXT:"Etsi...",SEARCH_SEARCHING:"Etsiminen...",SEARCH_NO_RESULTS:"Tuloksia ei löytynyt",SEARCH_NO_MORE_RESULTS:"Ei enempää tuloksia",SEARCH_RESULTS_CONVERSATIONS:"Keskustelut",SEARCH_RESULTS_MESSAGES:"Viestit",SEARCH_RESULTS_SHOW_MORE:"Näytä enemmän",CHAT_NOT_FOUND:"Keskustelua ei löytynyt",DELETE_MESSAGE:"Poista viesti",DELETION_EXPLANATION:"Jos poistat tämän viestin, se häviää kaikilta.",EDIT_MESSAGE:"Muokkaa viestiä",SAVE:"Tallenna",EDITED_INDICATOR:"muokattu",REPLY_TO_MESSAGE:"Vastaa",ADD_REACTION:"Lisää reaktio",AUTH_EXPIRED_OVERLAY_TITLE:"Istuntosi on vanhentunut",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Päivitä sivu jatkaaksesi",VOICE_MESSAGE:"Ääniviesti",CONTACT_INFORMATION_HIDDEN:"Piilotetut tiedot",LEAVE_CONVERSATION:"Poistu keskustelusta",MARK_CONVERSATION_AS_UNREAD:"Merkitse lukemattomaksi",STATUS_INDICATOR_ONLINE:"Aktiivinen",STATUS_INDICATOR_OFFLINE:"Poissa",ARIA_LEAVE_SEARCH_MODE:"Poistu hakutilasta",ARIA_SEARCH_UP:"Hae ylöspäin",ARIA_SEARCH_DOWN:"Hae alaspäin",ARIA_CLOSE_CHAT_POPUP:"Sulje chat-ikkuna",ARIA_SEARCH_INSIDE_CONVERSATION:"Hae tästä keskustelusta",ARIA_SEARCH:"Hae",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"aseta toistonopeus",ARIA_CANCEL_UPLOAD:"Peruuta lähetys",ARIA_STOP_RECORDING:"Lopeta tallennus",ARIA_CANCEL_RECORDING:"Peruuta tallennus",ARIA_INSERT_EMOJI:"Lisää emoji",ARIA_PLAY_AUDIO:"toista ääni",ARIA_PAUSE_AUDIO:"keskeytä ääni",ARIA_REACTION_COUNT:(t,e)=>`${t} reaktiota (${e})`,ARIA_MORE_ACTIONS:"Lisää toimintoja",ARIA_REPLYING_TO:(t,e)=>`Vastataan käyttäjälle ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Poistu vastaustilasta",SELECT_CONVERSATION:"Valitse keskustelu"}},fr:{code:"fr-FR",name:"French",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/fr.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/fr/emojibase/data.json",translation:{YESTERDAY:"Hier",TODAY:"Aujourd'hui",DAYS:"j",HOURS:"h",MINUTES:"m",JUST_NOW:"maintenant",LOCATION:"Emplacement",CANCEL:"Annuler",INBOX:"Boîte de réception",DESKTOP_NOTIFICATIONS:"Notifications du navigateur",DESKTOP_NOTIFICATIONS_ERROR:"Impossible d'activer les notifications du navigateur car votre navigateur les bloque. Essayez de changer ses paramètres ou de changer de navigateur.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`Notification de démonstration ${t}`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Si vous maintenez l'onglet ouvert dans votre navigateur vous verrez apparaître une alerte lorsque quelqu'un vous parlera.",SEND_BUTTON_TEXT:"Envoyer",ENTRYBOX_TEXT_LIMIT:"Seuls 10.000 caractères sont autorisés.",ENTRYBOX_PLACEHOLDER:"Écrivez un message...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Cette conversation n'est plus active.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Vous pouvez lire, mais pas envoyer de messages.",MESSAGELIST_LOADING_OLDER:"Chargement des anciens messages ...",MESSAGELIST_SHOW_OLDER:"Afficher les anciens messages",MESSAGELIST_NEW_MARKER:"Nouveau",MESSAGE_SENT_VIA_EMAIL:"Ce message a été envoyé par e-mail",YOU_MARKER:"vous",UPLOAD_IN_PROGRESS:"Envoi en cours...",UPLOAD_SEND_FILE:"Envoyer un fichier",UPLOAD_SHARE_LOCATION:"Partager mon emplacement",UPLOAD_ERROR:"Un problème est survenu lors de l'envoi: le fichier est peut-être non pris en charge ou trop volumineux.",SHARE_LOCATION_ERROR:"Impossible de partager votre emplacement: ",LOADING:"Chargement en cours...",HUB_EMPTY:"Votre historique de discussion apparaîtra ici",HUB_SHOW_EARLIER:"Afficher les conversations précédentes",INBOX_NO_CHATS_TITLE:"Aucune conversation pour l'instant!",INBOX_NO_CHATS_BODY:"Une fois que vous aurez eu une ou plusieurs conversations, elles apparaîtront ici.",ENABLE_TRANSLATION:"Traduire cette conversation en français",DISABLE_TRANSLATION:"Remontrer la conversation originale",SEARCH_PLACEHOLDER_TEXT:"Rechercher...",SEARCH_SEARCHING:"Recherche...",SEARCH_NO_RESULTS:"Aucun résultat trouvé",SEARCH_NO_MORE_RESULTS:"Il n’y a plus de résultats",SEARCH_RESULTS_CONVERSATIONS:"Conversations",SEARCH_RESULTS_MESSAGES:"Messages",SEARCH_RESULTS_SHOW_MORE:"Afficher plus",CHAT_NOT_FOUND:"Conversation introuvable",DELETE_MESSAGE:"Supprimer le message",DELETION_EXPLANATION:"Si vous supprimez ce message, il disparaîtra pour tout le monde.",EDIT_MESSAGE:"Modifier le message",SAVE:"Enregistrer",EDITED_INDICATOR:"modifié",REPLY_TO_MESSAGE:"Répondre",ADD_REACTION:"Ajouter une réaction",AUTH_EXPIRED_OVERLAY_TITLE:"Votre session de chat a expiré",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Actualisez la page pour continuer",VOICE_MESSAGE:"Message vocal",CONTACT_INFORMATION_HIDDEN:"Informations masquées",LEAVE_CONVERSATION:"Quitter la conversation",MARK_CONVERSATION_AS_UNREAD:"Marquer comme non lu",STATUS_INDICATOR_ONLINE:"Actif",STATUS_INDICATOR_OFFLINE:"Absent",ARIA_LEAVE_SEARCH_MODE:"Quitter le mode recherche",ARIA_SEARCH_UP:"Rechercher vers le haut",ARIA_SEARCH_DOWN:"Rechercher vers le bas",ARIA_CLOSE_CHAT_POPUP:"Fermer la fenêtre de chat",ARIA_SEARCH_INSIDE_CONVERSATION:"Rechercher dans cette conversation",ARIA_SEARCH:"Rechercher",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"définir la vitesse de lecture",ARIA_CANCEL_UPLOAD:"Annuler l'envoi",ARIA_STOP_RECORDING:"Arrêter l'enregistrement",ARIA_CANCEL_RECORDING:"Annuler l'enregistrement",ARIA_INSERT_EMOJI:"Insérer un emoji",ARIA_PLAY_AUDIO:"lire l'audio",ARIA_PAUSE_AUDIO:"mettre en pause l'audio",ARIA_REACTION_COUNT:(t,e)=>`${t} réactions avec ${e}`,ARIA_MORE_ACTIONS:"Plus d'actions",ARIA_REPLYING_TO:(t,e)=>`Répondre à ${t} : ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Quitter le mode réponse",SELECT_CONVERSATION:"Sélectionnez une conversation"}},he:{code:"he-IL",name:"Hebrew",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"אתמול",TODAY:"היום",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"עכשיו",LOCATION:"מיקום",CANCEL:"בטל",INBOX:"דואר נכנס",DESKTOP_NOTIFICATIONS:"התראות דפדפן",DESKTOP_NOTIFICATIONS_ERROR:"לא ניתן להפעיל התראות במרועה דפדפן מכיוון שהדפדפן שלך חוסם אותן באופן פעיל. נסה להסתכל בהגדרות או להשתמש בדפדפן אחר.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} הודעה על הדגמה`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"אם אתה שומר על כרטיסיית הדפדפן שלך פתוחה, תראה את זה צץ כשמישהו ידבר איתך.",SEND_BUTTON_TEXT:"שלח",ENTRYBOX_TEXT_LIMIT:"רק 10.000 תווים",ENTRYBOX_PLACEHOLDER:"תגיד משהו...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"שיחה זו אינה פעילה עוד.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"אתה יכול לקרוא, אך לא לשלוח הודעות.",MESSAGELIST_LOADING_OLDER:"טוען הודעות ישנות...",MESSAGELIST_SHOW_OLDER:"הצג הודעות ישנות",MESSAGELIST_NEW_MARKER:"חדש",MESSAGE_SENT_VIA_EMAIL:"הודעה זאת נשלחה דרך אימייל",YOU_MARKER:"אתה",UPLOAD_IN_PROGRESS:"מעלה ...",UPLOAD_SEND_FILE:"שלח קובץ",UPLOAD_SHARE_LOCATION:"שתף מיקום",UPLOAD_ERROR:"לרוע המזל משהו השתבש בהעלאה. ייתכן שהקובץ אינו נתמך או גדול מדי.",SHARE_LOCATION_ERROR:"לא ניתן לשתף מיקום: ",LOADING:"טוען...",HUB_EMPTY:"היסטוריית הצ'אט שלך תופיע כאן",HUB_SHOW_EARLIER:"הצג צ'אטים קודמים",INBOX_NO_CHATS_TITLE:"אין עדיין צ'אטים!",INBOX_NO_CHATS_BODY:"לאחר שניהלת שיחה אחת או יותר, הם יופיעו כאן.",ENABLE_TRANSLATION:"תרגם שיחה זו לעברית",DISABLE_TRANSLATION:"הצג מקור",SEARCH_PLACEHOLDER_TEXT:"...חפש",SEARCH_SEARCHING:"...מחפש",SEARCH_NO_RESULTS:"לא נמצאו תוצאות",SEARCH_NO_MORE_RESULTS:"אין תוצאות נוספות",SEARCH_RESULTS_CONVERSATIONS:"שיחות",SEARCH_RESULTS_MESSAGES:"הודעות",SEARCH_RESULTS_SHOW_MORE:"הצג עוד",CHAT_NOT_FOUND:"הצ'אט לא נמצא",DELETE_MESSAGE:"מחיקת הודעה",DELETION_EXPLANATION:"אם תמחק הודעה זו, היא תיעלם עבור כולם.",EDIT_MESSAGE:"עריכת הודעה",SAVE:"שמור",EDITED_INDICATOR:"ערוך",REPLY_TO_MESSAGE:"השב",ADD_REACTION:"הוספת תגובה",AUTH_EXPIRED_OVERLAY_TITLE:"הפעלת הצ׳אט שלכם פגה",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"רעננו את העמוד כדי להמשיך",VOICE_MESSAGE:"הודעה קולית",CONTACT_INFORMATION_HIDDEN:"מידע מוסתר",LEAVE_CONVERSATION:"צא מהשיחה",MARK_CONVERSATION_AS_UNREAD:"סמן כלא נקרא",STATUS_INDICATOR_ONLINE:"פעיל",STATUS_INDICATOR_OFFLINE:"לא פעיל",ARIA_LEAVE_SEARCH_MODE:"צא ממצב חיפוש",ARIA_SEARCH_UP:"חפש למעלה",ARIA_SEARCH_DOWN:"חפש למטה",ARIA_CLOSE_CHAT_POPUP:"סגור חלון צ'אט",ARIA_SEARCH_INSIDE_CONVERSATION:"חפש בתוך השיחה הזו",ARIA_SEARCH:"חפש",ARIA_CHAT:"צ'אט",ARIA_SET_PLAYBACK_SPEED:"הגדר מהירות השמעה",ARIA_CANCEL_UPLOAD:"בטל העלאה",ARIA_STOP_RECORDING:"עצור הקלטה",ARIA_CANCEL_RECORDING:"בטל הקלטה",ARIA_INSERT_EMOJI:"הוסף אמוג'י",ARIA_PLAY_AUDIO:"נגן אודיו",ARIA_PAUSE_AUDIO:"השהה אודיו",ARIA_REACTION_COUNT:(t,e)=>`${t} תגובות עם ${e}`,ARIA_MORE_ACTIONS:"פעולות נוספות",ARIA_REPLYING_TO:(t,e)=>`משיב ל-${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"צא ממצב תשובה",SELECT_CONVERSATION:"בחר שיחה"}},hi:{code:"hi-IN",name:"Hindi (IN)",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/hi.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/hi/cldr/data.json",translation:{YESTERDAY:"कल",TODAY:"आज",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"अभी",LOCATION:"जगह",CANCEL:"रद्द करें",INBOX:"इनबॉक्स",DESKTOP_NOTIFICATIONS:"ब्राउज़र सूचनाएं",DESKTOP_NOTIFICATIONS_ERROR:"ब्राउज़र सूचनाएं सक्षम नहीं कर सकता क्योंकि आपका ब्राउज़र सक्रिय रूप से उन्हें ब्लॉक करता है। सेटिंग्स में देखने या एक अलग ब्राउज़र का उपयोग करने का प्रयास करें।",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} डेमो अधिसूचना`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"यदि आप अपना ब्राउज़र टैब खुला रखते हैं, तो यह पॉप अप आपको तब दिखाई देगा जब कोई आपसे बात करेगा।",SEND_BUTTON_TEXT:"भेजें",ENTRYBOX_TEXT_LIMIT:"केवल 10,000 वर्णों की अनुमति है।",ENTRYBOX_PLACEHOLDER:"कुछ कहिए...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"यह चैट अब सक्रिय नहीं है।",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"आप पढ़ सकते हैं, लेकिन संदेश नहीं भेज सकते।",MESSAGELIST_LOADING_OLDER:"पुराने संदेश लोड हो रहे हैं ...",MESSAGELIST_SHOW_OLDER:"पुराने संदेश दिखाएं",MESSAGELIST_NEW_MARKER:"नया",MESSAGE_SENT_VIA_EMAIL:"यह संदेश ईमेल के माध्यम से भेजा गया था",YOU_MARKER:"आप",UPLOAD_IN_PROGRESS:"अपलोड हो रहा है...",UPLOAD_SEND_FILE:"फाइल भेजें",UPLOAD_SHARE_LOCATION:"जगह शेयर करें",UPLOAD_ERROR:"दुर्भाग्य से, अपलोड करते समय कुछ गलत हो गया। फ़ाइल असमर्थित या बहुत बड़ी हो सकती है।",SHARE_LOCATION_ERROR:"जगह शेयर नहीं हो पाया: ",LOADING:"लोड हो रहा है...",HUB_EMPTY:"आपका चैट इतिहास यहां दिखाई देगा",HUB_SHOW_EARLIER:"पहले की चैट दिखाओ",INBOX_NO_CHATS_TITLE:"अभी तक कोई चैट नहीं!",INBOX_NO_CHATS_BODY:"एक बार जब आप एक या अधिक चैट कर लेते हैं, तो वे यहां दिखाई देंगे।",ENABLE_TRANSLATION:"इस बातचीत का हिंदी में अनुवाद कीजिए",DISABLE_TRANSLATION:"मूल दिखाएँ",SEARCH_PLACEHOLDER_TEXT:"खोजें...",SEARCH_SEARCHING:"खोज जारी है...",SEARCH_NO_RESULTS:"कोई परिणाम नहीं मिला",SEARCH_NO_MORE_RESULTS:"और कोई परिणाम नहीं",SEARCH_RESULTS_CONVERSATIONS:"बातचीत",SEARCH_RESULTS_MESSAGES:"संदेश",SEARCH_RESULTS_SHOW_MORE:"और दिखाएं",CHAT_NOT_FOUND:"चैट नहीं मिली",DELETE_MESSAGE:"संदेश डिलीट करें",DELETION_EXPLANATION:"यदि आप इस संदेश को हटाते हैं, तो यह सभी के लिए गायब हो जाएगा.",EDIT_MESSAGE:"संदेश में बदलाव करें",SAVE:"सहेजें",EDITED_INDICATOR:"संपादित किया गया",REPLY_TO_MESSAGE:"जवाब दीजिए ।",ADD_REACTION:"प्रतिक्रिया जोड़ें",AUTH_EXPIRED_OVERLAY_TITLE:"आपका चैट सेशन समाप्त हो चुका है",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"आगे बढ़ने के लिए रिफ्रेश करें",VOICE_MESSAGE:"वॉयस मैसेज",CONTACT_INFORMATION_HIDDEN:"छुपी हुई जानकारी",LEAVE_CONVERSATION:"बातचीत को ख़त्म करें",MARK_CONVERSATION_AS_UNREAD:"अपठित के रूप में चिह्नित करें",STATUS_INDICATOR_ONLINE:"सक्रिय",STATUS_INDICATOR_OFFLINE:"अनुपस्थित",ARIA_LEAVE_SEARCH_MODE:"खोज मोड से बाहर निकलें",ARIA_SEARCH_UP:"ऊपर खोजें",ARIA_SEARCH_DOWN:"नीचे खोजें",ARIA_CLOSE_CHAT_POPUP:"चैट विंडो बंद करें",ARIA_SEARCH_INSIDE_CONVERSATION:"इस बातचीत में खोजें",ARIA_SEARCH:"खोजें",ARIA_CHAT:"चैट",ARIA_SET_PLAYBACK_SPEED:"प्लेबैक गति सेट करें",ARIA_CANCEL_UPLOAD:"अपलोड रद्द करें",ARIA_STOP_RECORDING:"रिकॉर्डिंग रोकें",ARIA_CANCEL_RECORDING:"रिकॉर्डिंग रद्द करें",ARIA_INSERT_EMOJI:"इमोजी डालें",ARIA_PLAY_AUDIO:"ऑडियो चलाएं",ARIA_PAUSE_AUDIO:"ऑडियो रोकें",ARIA_REACTION_COUNT:(t,e)=>`${t} प्रतिक्रियाएं (${e})`,ARIA_MORE_ACTIONS:"अधिक कार्य",ARIA_REPLYING_TO:(t,e)=>`${t} को उत्तर दे रहे हैं: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"उत्तर मोड से बाहर निकलें",SELECT_CONVERSATION:"एक बातचीत चुनें"}},hr:{code:"hr-HR",name:"Croatian",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Jučer",TODAY:"Danas",DAYS:"d",HOURS:"s",MINUTES:"m",JUST_NOW:"Upravo sad",LOCATION:"Lokacija",CANCEL:"Otkaži",INBOX:"Pretinac",DESKTOP_NOTIFICATIONS:"Obavijesti preglednika",DESKTOP_NOTIFICATIONS_ERROR:"Notifikacije preglednika nisu omogućene jer ih vaš preglednik aktivno blokira. Pokušajte pogledati postavke ili koristiti neki drugi preglednik.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} demo notifikacija`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Ako karticu preglednika ostavite otvorenu, pojavit će se ovaj pop-up kada netko razgovara s vama.",SEND_BUTTON_TEXT:"Pošalji",ENTRYBOX_TEXT_LIMIT:"Dozvoljeno je samo 10.000 znakova.",ENTRYBOX_PLACEHOLDER:"Reci nešto...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Ovaj razgovor više nije aktivan.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Možeš čitati, ali ne i slati poruke.",MESSAGELIST_LOADING_OLDER:"Učitavam starije poruke...",MESSAGELIST_SHOW_OLDER:"Prikaži starije poruke",MESSAGELIST_NEW_MARKER:"Novo",MESSAGE_SENT_VIA_EMAIL:"Ova poruka je poslana e-poštom",YOU_MARKER:"ti",UPLOAD_IN_PROGRESS:"Učitavam...",UPLOAD_SEND_FILE:"Pošalji datoteku",UPLOAD_SHARE_LOCATION:"Podijeli lokaciju",UPLOAD_ERROR:"Nažalost, nešto je pošlo krivo. Datoteka možda nije podržana ili je prevelika.",SHARE_LOCATION_ERROR:"Nije moguće podijeliti lokaciju: ",LOADING:"Učitavam...",HUB_EMPTY:"Ovdje će se prikazati vaša povijest razgovora",HUB_SHOW_EARLIER:"Prikaži ranije razgovore",INBOX_NO_CHATS_TITLE:"Nema razgovora!",INBOX_NO_CHATS_BODY:"Nakon što vodite jedan ili više razgovora, oni će se pojaviti ovdje.",ENABLE_TRANSLATION:"Prevedi ovaj razgovor na hrvatski jezik",DISABLE_TRANSLATION:"Prikaži original",SEARCH_PLACEHOLDER_TEXT:"Pretraži...",SEARCH_SEARCHING:"Pretraživanje...",SEARCH_NO_RESULTS:"Nema rezultata",SEARCH_NO_MORE_RESULTS:"Nema više rezultata",SEARCH_RESULTS_CONVERSATIONS:"Razgovori",SEARCH_RESULTS_MESSAGES:"Poruke",SEARCH_RESULTS_SHOW_MORE:"Prikaži više",CHAT_NOT_FOUND:"Razgovor nije pronađen",DELETE_MESSAGE:"Obriši poruku",DELETION_EXPLANATION:"Ako izbrišete ovu poruku, nestat će za sve.",EDIT_MESSAGE:"Uredi poruku",SAVE:"Spremi",EDITED_INDICATOR:"uređivao",REPLY_TO_MESSAGE:"Odgovorite",ADD_REACTION:"Dodajte reakciju",AUTH_EXPIRED_OVERLAY_TITLE:"Vaša sesija razgovora je istekla",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Osvježite stranicu za nastavak",VOICE_MESSAGE:"Glasovna poruka",CONTACT_INFORMATION_HIDDEN:"Skrivene informacije",LEAVE_CONVERSATION:"Napustiti razgovor",MARK_CONVERSATION_AS_UNREAD:"Označi kao nepročitano",STATUS_INDICATOR_ONLINE:"Aktivan",STATUS_INDICATOR_OFFLINE:"Odsutan",ARIA_LEAVE_SEARCH_MODE:"Napusti način pretraživanja",ARIA_SEARCH_UP:"Traži gore",ARIA_SEARCH_DOWN:"Traži dolje",ARIA_CLOSE_CHAT_POPUP:"Zatvori prozor za chat",ARIA_SEARCH_INSIDE_CONVERSATION:"Traži u ovom razgovoru",ARIA_SEARCH:"Traži",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"postavi brzinu reprodukcije",ARIA_CANCEL_UPLOAD:"Otkaži učitavanje",ARIA_STOP_RECORDING:"Zaustavi snimanje",ARIA_CANCEL_RECORDING:"Otkaži snimanje",ARIA_INSERT_EMOJI:"Umetni emoji",ARIA_PLAY_AUDIO:"reproduciraj audio",ARIA_PAUSE_AUDIO:"pauziraj audio",ARIA_REACTION_COUNT:(t,e)=>`${t} reakcija s ${e}`,ARIA_MORE_ACTIONS:"Više radnji",ARIA_REPLYING_TO:(t,e)=>`Odgovaranje korisniku ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Izađi iz moda odgovaranja",SELECT_CONVERSATION:"Odaberite razgovor"}},hu:{code:"hu-HU",name:"Hungarian",emojiPickerTranslationUrl:null,emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/hu/cldr/data.json",translation:{YESTERDAY:"Tegnap",TODAY:"Ma",DAYS:"n",HOURS:"ó",MINUTES:"p",JUST_NOW:"éppen most",LOCATION:"Helyszín",CANCEL:"Visszavonás",INBOX:"Postaláda",DESKTOP_NOTIFICATIONS:"Böngésző értesítések",DESKTOP_NOTIFICATIONS_ERROR:"Azért nem tudja bekapcsolni a böngésző értesítések funkciót, mert böngészője aktívan blokkolja azt. Tekintse meg a beállításokat vagy használjon másik böngészőt.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} demo értesítés`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Ha nyitva hagyja böngészőjét, felugró ablak fog megjelenni, ha valaki beszélni szeretne Önnel.",SEND_BUTTON_TEXT:"Küldés",ENTRYBOX_TEXT_LIMIT:"Mindőssze 10.000 karakter megengedett.",ENTRYBOX_PLACEHOLDER:"Mondjon valamit...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Ez a beszélgetés már nem aktív.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Elolvashatja az üzeneteket, de nem küldhet újat.",MESSAGELIST_LOADING_OLDER:"Korábbi üzenetek betöltése...",MESSAGELIST_SHOW_OLDER:"Korábbi üzenetek megjelenítése",MESSAGELIST_NEW_MARKER:"Új",MESSAGE_SENT_VIA_EMAIL:"Ez az üzenet e-mailben került elküldésre",YOU_MARKER:"Ön",UPLOAD_IN_PROGRESS:"Feltöltés...",UPLOAD_SEND_FILE:"Fájl küldése",UPLOAD_SHARE_LOCATION:"Helyszín megosztása",UPLOAD_ERROR:"Sajnos hiba történt a feltöltés során. A fájl nem támogatott vagy túl nagy.",SHARE_LOCATION_ERROR:"Helyszín megosztása nem lehetséges: ",LOADING:"Betöltés...",HUB_EMPTY:"A beszélgetések előzményei itt láthatók",HUB_SHOW_EARLIER:"Korábbi beszélgetések megjelenítése",INBOX_NO_CHATS_TITLE:"Még nincs megjeleníthető beszélgetés!",INBOX_NO_CHATS_BODY:"Amint egy vagy több beszélgetéssel rendelkezik, azok itt fognak megjelenni.",ENABLE_TRANSLATION:"A beszélgetés lefordítása erre a nyelvre: magyar",DISABLE_TRANSLATION:"Eredeti megjelenítése",SEARCH_PLACEHOLDER_TEXT:"Keresés...",SEARCH_SEARCHING:"Keresés...",SEARCH_NO_RESULTS:"Nincs találat",SEARCH_NO_MORE_RESULTS:"Nincs több találat",SEARCH_RESULTS_CONVERSATIONS:"Beszélgetések",SEARCH_RESULTS_MESSAGES:"Üzenetek",SEARCH_RESULTS_SHOW_MORE:"Több megjelenítése",CHAT_NOT_FOUND:"A csevegés nem található",DELETE_MESSAGE:"Üzenet törlése",DELETION_EXPLANATION:"Ha törlöd ezt az üzenetet, az mindenki számára eltűnik.",EDIT_MESSAGE:"Üzenet szerkesztése",SAVE:"Mentés",EDITED_INDICATOR:"szerkesztve",REPLY_TO_MESSAGE:"Válaszadás",ADD_REACTION:"Reagálás erre",AUTH_EXPIRED_OVERLAY_TITLE:"Chat munkamenete lejárt",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Folytatáshoz frissítse az oldalt",VOICE_MESSAGE:"Hangüzenet",CONTACT_INFORMATION_HIDDEN:"Rejtett információ",LEAVE_CONVERSATION:"Kilépés a beszélgetésből",MARK_CONVERSATION_AS_UNREAD:"Megjelölés olvasatlanként",STATUS_INDICATOR_ONLINE:"Aktív",STATUS_INDICATOR_OFFLINE:"Távol",ARIA_LEAVE_SEARCH_MODE:"Keresési mód elhagyása",ARIA_SEARCH_UP:"Keresés felfelé",ARIA_SEARCH_DOWN:"Keresés lefelé",ARIA_CLOSE_CHAT_POPUP:"Csevegő ablak bezárása",ARIA_SEARCH_INSIDE_CONVERSATION:"Keresés ebben a beszélgetésben",ARIA_SEARCH:"Keresés",ARIA_CHAT:"Csevegés",ARIA_SET_PLAYBACK_SPEED:"lejátszási sebesség beállítása",ARIA_CANCEL_UPLOAD:"Feltöltés megszakítása",ARIA_STOP_RECORDING:"Felvétel leállítása",ARIA_CANCEL_RECORDING:"Felvétel megszakítása",ARIA_INSERT_EMOJI:"Emoji beszúrása",ARIA_PLAY_AUDIO:"hang lejátszása",ARIA_PAUSE_AUDIO:"hang szüneteltetése",ARIA_REACTION_COUNT:(t,e)=>`${t} reakció (${e})`,ARIA_MORE_ACTIONS:"További műveletek",ARIA_REPLYING_TO:(t,e)=>`Válaszolás ${t} részére: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Kilépés a válasz módóból",SELECT_CONVERSATION:"Válasszon egy beszélgetést"}},id:{code:"id-ID",name:"Bahasa Indonesia",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/id.js",emojiDataUrl:null,translation:{YESTERDAY:"Kemarin",TODAY:"Hari ini",DAYS:"h",HOURS:"j",MINUTES:"m",JUST_NOW:"sekarang",LOCATION:"Lokasi",CANCEL:"Batal",INBOX:"Kotak Masuk",DESKTOP_NOTIFICATIONS:"Notifikasi peramban",DESKTOP_NOTIFICATIONS_ERROR:"Tidak dapat mengaktifkan pemberitahuan browser karena browser Anda secara aktif memblokir mereka. Coba cari di pengaturan atau menggunakan browser yang berbeda.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`pemberitahuan demo ${t}`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Jika Anda membiarkan tab browser tetap terbuka, Anda akan melihat ini muncul ketika seseorang berbicara kepada Anda.",SEND_BUTTON_TEXT:"Kirim",ENTRYBOX_TEXT_LIMIT:"Hanya 10.000 karakter yang diizinkan.",ENTRYBOX_PLACEHOLDER:"Katakan sesuatu...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Percakapan ini tidak lagi aktif.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Anda dapat membaca, tetapi tidak mengirim pesan.",MESSAGELIST_LOADING_OLDER:"Memuat pesan lama...",MESSAGELIST_SHOW_OLDER:"Tampilkan pesan yang lebih lama",MESSAGELIST_NEW_MARKER:"Baru",MESSAGE_SENT_VIA_EMAIL:"Pesan ini dikirim melalui email",YOU_MARKER:"Anda",UPLOAD_IN_PROGRESS:"Mengunggah...",UPLOAD_SEND_FILE:"Kirim mengajukan",UPLOAD_SHARE_LOCATION:"Bagikan lokasi",UPLOAD_ERROR:"Ada yang salah diunggah. File mungkin tidak didukung atau terlalu besar.",SHARE_LOCATION_ERROR:"Tidak dapat membagikan lokasi: ",LOADING:"Memuat...",HUB_EMPTY:"Riwayat obrolan Anda akan muncul di sini",HUB_SHOW_EARLIER:"Tampilkan obrolan sebelumnya",INBOX_NO_CHATS_TITLE:"Belum ada obrolan!",INBOX_NO_CHATS_BODY:"Setelah Anda melakukan satu atau lebih percakapan, mereka akan muncul di sini.",ENABLE_TRANSLATION:"Terjemahkan percakapan ini ke Indonesia",DISABLE_TRANSLATION:"Perlihatkan asli",SEARCH_PLACEHOLDER_TEXT:"Cari...",SEARCH_SEARCHING:"Mencari...",SEARCH_NO_RESULTS:"Tidak ditemukan hasil",SEARCH_NO_MORE_RESULTS:"Tidak ada hasil lainnya",SEARCH_RESULTS_CONVERSATIONS:"Percakapan",SEARCH_RESULTS_MESSAGES:"Pesan",SEARCH_RESULTS_SHOW_MORE:"Tampilkan lebih banyak",CHAT_NOT_FOUND:"Obrolan tidak ditemukan",DELETE_MESSAGE:"Hapus pesan",DELETION_EXPLANATION:"Jika pesan ini Anda hapus, pesan ini akan tidak terlihat bagi siapa pun.",EDIT_MESSAGE:"Sunting pesan",SAVE:"Mentés",EDITED_INDICATOR:"diedit",REPLY_TO_MESSAGE:"Balas",ADD_REACTION:"Tambah reaksi",AUTH_EXPIRED_OVERLAY_TITLE:"Sesi obrolan Anda sudah lewat batas waktu",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Muat ulang halaman untuk melanjutkan",VOICE_MESSAGE:"Pesan suara",CONTACT_INFORMATION_HIDDEN:"Informasi tersembunyi",LEAVE_CONVERSATION:"Tinggalkan percakapan",MARK_CONVERSATION_AS_UNREAD:"Tandai sebagai Belum dibaca",STATUS_INDICATOR_ONLINE:"Aktif",STATUS_INDICATOR_OFFLINE:"Tidak aktif",ARIA_LEAVE_SEARCH_MODE:"Keluar dari mode pencarian",ARIA_SEARCH_UP:"Cari ke atas",ARIA_SEARCH_DOWN:"Cari ke bawah",ARIA_CLOSE_CHAT_POPUP:"Tutup jendela obrolan",ARIA_SEARCH_INSIDE_CONVERSATION:"Cari dalam percakapan ini",ARIA_SEARCH:"Cari",ARIA_CHAT:"Obrolan",ARIA_SET_PLAYBACK_SPEED:"atur kecepatan pemutaran",ARIA_CANCEL_UPLOAD:"Batalkan unggah",ARIA_STOP_RECORDING:"Hentikan perekaman",ARIA_CANCEL_RECORDING:"Batalkan perekaman",ARIA_INSERT_EMOJI:"Sisipkan emoji",ARIA_PLAY_AUDIO:"putar audio",ARIA_PAUSE_AUDIO:"jeda audio",ARIA_REACTION_COUNT:(t,e)=>`${t} reaksi dengan ${e}`,ARIA_MORE_ACTIONS:"Tindakan lainnya",ARIA_REPLYING_TO:(t,e)=>`Membalas ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Keluar dari mode balasan",SELECT_CONVERSATION:"Pilih percakapan"}},is:{code:"is-IS",name:"Íslenska",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Í gær",TODAY:"Í dag",DAYS:"dagar",HOURS:"klst.",MINUTES:"mín.",JUST_NOW:"núna",LOCATION:"Staðsetning",CANCEL:"Hætta við",INBOX:"Pósthólf",DESKTOP_NOTIFICATIONS:"Tilkynningar í vafra",DESKTOP_NOTIFICATIONS_ERROR:"Ekki er hægt að birta tilkynningar í vafra vegna þess að vafrinn sem þú notar hindrar það. Reyndu að leita að stillingum eða að nota annan vafra.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} prufutilkynning`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Ef flipinn í vafranum er opinn muntu sjá þessa tilkynningu birtast þegar einhver sendir þér skilaboð.",SEND_BUTTON_TEXT:"Senda",ENTRYBOX_TEXT_LIMIT:"Aðeins 10.000 stafir komast fyrir.",ENTRYBOX_PLACEHOLDER:"Segðu eitthvað...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Þessar samræður eru ekki lengar virkar.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Þú getur lesið, en ekki sent skilaboð.",MESSAGELIST_LOADING_OLDER:"Sæki eldri skilaboð...",MESSAGELIST_SHOW_OLDER:"Sýna eldri skilaboð",MESSAGELIST_NEW_MARKER:"Ný",MESSAGE_SENT_VIA_EMAIL:"Þessi skilaboð voru send með tölvupósti",YOU_MARKER:"þú",UPLOAD_IN_PROGRESS:"Hleð upp...",UPLOAD_SEND_FILE:"Senda skrá",UPLOAD_SHARE_LOCATION:"Deila staðsetningu",UPLOAD_ERROR:"Því miður fór eitthvað úrskeiðis við að hlaða upp. Skráin gæti verið af rangri tegund eð of stór.",SHARE_LOCATION_ERROR:"Ekki er hægt að deila staðsetningu: ",LOADING:"Hleð...",HUB_EMPTY:"Fyrri samtöl munu birtast hér",HUB_SHOW_EARLIER:"Sýna fyrri samtöl",INBOX_NO_CHATS_TITLE:"Engin samtöl enn!",INBOX_NO_CHATS_BODY:"Þegar þú hefur átt eitt eða fleiri samtöl, munu þau birtast hér.",ENABLE_TRANSLATION:"Þýða þetta samtal á ensku",DISABLE_TRANSLATION:"Sýna upprunalegt",SEARCH_PLACEHOLDER_TEXT:"Leita...",SEARCH_SEARCHING:"Leita...",SEARCH_NO_RESULTS:"Ekkert fannst",SEARCH_NO_MORE_RESULTS:"Engar fleiri niðurstöður",SEARCH_RESULTS_CONVERSATIONS:"Samtöl",SEARCH_RESULTS_MESSAGES:"Skilaboð",SEARCH_RESULTS_SHOW_MORE:"Sýna meira",CHAT_NOT_FOUND:"Samtal fannst ekki",DELETE_MESSAGE:"Eyða skilaboðum",DELETION_EXPLANATION:"Ef þú eyðir þessum skilaboðum munu þau hverfa hjá öllum.",EDIT_MESSAGE:"Breyta skilaboðum",SAVE:"Vista",EDITED_INDICATOR:"breytt",REPLY_TO_MESSAGE:"Svara",ADD_REACTION:"Setja inn viðbrögð",AUTH_EXPIRED_OVERLAY_TITLE:"Spjallið hefur runnið út",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Endurnýjaðu síðuna til að halda áfram",VOICE_MESSAGE:"Raddskilaboð",LEAVE_CONVERSATION:"Skilja eftir skilaboð",MARK_CONVERSATION_AS_UNREAD:"Merkja sem ólesið",STATUS_INDICATOR_ONLINE:"Virk",STATUS_INDICATOR_OFFLINE:"Ekki við",CONTACT_INFORMATION_HIDDEN:"faldar upplýsingar",ARIA_LEAVE_SEARCH_MODE:"Hætta í leitastillingu",ARIA_SEARCH_UP:"Leita upp",ARIA_SEARCH_DOWN:"Leita niður",ARIA_CLOSE_CHAT_POPUP:"Loka spjallglugga",ARIA_SEARCH_INSIDE_CONVERSATION:"Leita í þessari samtal",ARIA_SEARCH:"Leita",ARIA_CHAT:"Spjall",ARIA_SET_PLAYBACK_SPEED:"stilla afspilunarhraða",ARIA_CANCEL_UPLOAD:"Hætta við upphleðslu",ARIA_STOP_RECORDING:"Stöðva upptöku",ARIA_CANCEL_RECORDING:"Hætta við upptöku",ARIA_INSERT_EMOJI:"Setja inn emoji",ARIA_PLAY_AUDIO:"spila hljóð",ARIA_PAUSE_AUDIO:"gera hlé á hljóði",ARIA_REACTION_COUNT:(t,e)=>`${t} viðbrögð með ${e}`,ARIA_MORE_ACTIONS:"Fleiri aðgerðir",ARIA_REPLYING_TO:(t,e)=>`Svara ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Hætta í svarmód",SELECT_CONVERSATION:"Veldu samtal"}},it:{code:"it-IT",name:"Italian",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/it.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/it/cldr/data.json",translation:{YESTERDAY:"Ieri",TODAY:"Oggi",DAYS:"g",HOURS:"o",MINUTES:"m",JUST_NOW:"adesso",LOCATION:"Posizione",CANCEL:"Annulla",INBOX:"Posta in arrivo",DESKTOP_NOTIFICATIONS:"Notifiche browser",DESKTOP_NOTIFICATIONS_ERROR:"Impossibile abilitare le notifiche browser perché il browser le blocca attivamente. Prova a cercare le impostazioni o utilizzare un browser diverso.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} demo notification`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Se si mantiene aperta la scheda del browser, questo verrà visualizzato quando qualcuno ti parla.",SEND_BUTTON_TEXT:"Invia",ENTRYBOX_TEXT_LIMIT:"Sono consentiti solo 10.000 caratteri.",ENTRYBOX_PLACEHOLDER:"Dì qualcosa...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Questa conversazione non è più attiva.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Puoi leggere, ma non inviare messaggi.",MESSAGELIST_LOADING_OLDER:"Caricamento dei messaggi precedenti...",MESSAGELIST_SHOW_OLDER:"Mostra messaggi precedenti",MESSAGELIST_NEW_MARKER:"Nuovo",MESSAGE_SENT_VIA_EMAIL:"Questo messaggio è stato inviato via email",YOU_MARKER:"tu",UPLOAD_IN_PROGRESS:"Caricamento in corso...",UPLOAD_SEND_FILE:"Invia file",UPLOAD_SHARE_LOCATION:"Condividi posizione",UPLOAD_ERROR:"Qualcosa è andato storto durante il caricamento. Il file potrebbe non essere supportato o troppo grande.",SHARE_LOCATION_ERROR:"Impossibile condividere la posizione: ",LOADING:"Caricamento in corso...",HUB_EMPTY:"La cronologia della tua chat verrà mostrata qui",HUB_SHOW_EARLIER:"Mostra chat precedenti",INBOX_NO_CHATS_TITLE:"Non ci sono ancora chat!",INBOX_NO_CHATS_BODY:"Una volta che hai avuto una o più conversazioni, verranno visualizzate qui.",ENABLE_TRANSLATION:"Traduci questa conversazione in italiano",DISABLE_TRANSLATION:"Mostra l'originale",SEARCH_PLACEHOLDER_TEXT:"Cerca...",SEARCH_SEARCHING:"Cercando...",SEARCH_NO_RESULTS:"Nessun risultato trovato",SEARCH_NO_MORE_RESULTS:"Non ci sono più risultati",SEARCH_RESULTS_CONVERSATIONS:"Conversazioni",SEARCH_RESULTS_MESSAGES:"Messaggi",SEARCH_RESULTS_SHOW_MORE:"Mostra altro",CHAT_NOT_FOUND:"Chat non trovata",DELETE_MESSAGE:"Elimina messaggio",DELETION_EXPLANATION:"Se elimini il messaggio, questo scomparirà per tutti.",EDIT_MESSAGE:"Modifica messaggio",SAVE:"Salva",EDITED_INDICATOR:"modificato",REPLY_TO_MESSAGE:"Rispondi",ADD_REACTION:"Aggiungi reazione",AUTH_EXPIRED_OVERLAY_TITLE:"La sessione di chat è scaduta",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Aggiorna la pagina per continuare",VOICE_MESSAGE:"Messaggio vocale",LEAVE_CONVERSATION:"Abbandona la conversazione",MARK_CONVERSATION_AS_UNREAD:"Segna come non letto",STATUS_INDICATOR_ONLINE:"Online",STATUS_INDICATOR_OFFLINE:"Offline",CONTACT_INFORMATION_HIDDEN:"Informazioni nascoste",ARIA_LEAVE_SEARCH_MODE:"Esci dalla modalità ricerca",ARIA_SEARCH_UP:"Cerca in alto",ARIA_SEARCH_DOWN:"Cerca in basso",ARIA_CLOSE_CHAT_POPUP:"Chiudi la finestra di chat",ARIA_SEARCH_INSIDE_CONVERSATION:"Cerca in questa conversazione",ARIA_SEARCH:"Cerca",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"imposta velocità di riproduzione",ARIA_CANCEL_UPLOAD:"Annulla caricamento",ARIA_STOP_RECORDING:"Interrompi registrazione",ARIA_CANCEL_RECORDING:"Annulla registrazione",ARIA_INSERT_EMOJI:"Inserisci un'emoji",ARIA_PLAY_AUDIO:"riproduci audio",ARIA_PAUSE_AUDIO:"metti in pausa audio",ARIA_REACTION_COUNT:(t,e)=>`${t} reazioni con ${e}`,ARIA_MORE_ACTIONS:"Altre azioni",ARIA_REPLYING_TO:(t,e)=>`Rispondendo a ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Esci dalla modalità risposta",SELECT_CONVERSATION:"Seleziona una conversazione"}},ja:{code:"ja-JP",name:"Japanese",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/ja.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/ja/emojibase/data.json",translation:{YESTERDAY:"昨日",TODAY:"今日",DAYS:"日前",HOURS:"時間前",MINUTES:"分前",JUST_NOW:"たった今",LOCATION:"場所",CANCEL:"キャンセル",INBOX:"受信箱",DESKTOP_NOTIFICATIONS:"ブラウザの通知",DESKTOP_NOTIFICATIONS_ERROR:"ブラウザの通知はブロックされているため、ブラウザの通知を有効にできません。設定を確認するか、別のブラウザを使用してください。",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} デモ通知`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"ブラウザのタブを開いたままにしておくと、誰かがあなたに話しかけたときにこのポップアップが表示されます。",SEND_BUTTON_TEXT:"送信",ENTRYBOX_TEXT_LIMIT:"許可されているのは10.000文字までです。",ENTRYBOX_PLACEHOLDER:"メッセージを入力してください",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"この会話はもうアクティブではありません。",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"あなたは読むことはできますが、メッセージを送ることはできません。",MESSAGELIST_LOADING_OLDER:"古いメッセージを読み込んでいます...",MESSAGELIST_SHOW_OLDER:"古いメッセージを表示",MESSAGELIST_NEW_MARKER:"新着",MESSAGE_SENT_VIA_EMAIL:"このメッセージはメールで送信されました",YOU_MARKER:"あなたは",UPLOAD_IN_PROGRESS:"アップロード中...",UPLOAD_SEND_FILE:"ファイル送信",UPLOAD_SHARE_LOCATION:"共有場所",UPLOAD_ERROR:"アップロード中に問題が発生しました。ファイルがサポートされていないか、大きすぎる可能性があります。",SHARE_LOCATION_ERROR:"場所を共有できません: ",LOADING:"読み込み中...",HUB_EMPTY:"あなたのチャット履歴がここに表示されます",HUB_SHOW_EARLIER:"以前のチャットを表示",INBOX_NO_CHATS_TITLE:"まだチャットがありません!",INBOX_NO_CHATS_BODY:"会話が1つ以上あると、ここに表示されます",ENABLE_TRANSLATION:"この会話を日本語に翻訳する",DISABLE_TRANSLATION:"オリジナルを表示",SEARCH_PLACEHOLDER_TEXT:"検索...",SEARCH_SEARCHING:"検索中...",SEARCH_NO_RESULTS:"結果が見つかりません",SEARCH_NO_MORE_RESULTS:"これ以上結果はありません",SEARCH_RESULTS_CONVERSATIONS:"会話",SEARCH_RESULTS_MESSAGES:"メッセージ",SEARCH_RESULTS_SHOW_MORE:"もっと見る",CHAT_NOT_FOUND:"チャットが見つかりませんでした",DELETE_MESSAGE:"メッセージを削除する",DELETION_EXPLANATION:"このメッセージを削除すると、全ての人に表示されなくなります。",EDIT_MESSAGE:"メッセージを編集する",SAVE:"上書き保存",EDITED_INDICATOR:"編集",REPLY_TO_MESSAGE:"返信する",ADD_REACTION:"リアクションを追加",AUTH_EXPIRED_OVERLAY_TITLE:"チャットセッションの有効期限が切れました",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"続けるにはページを更新してください",VOICE_MESSAGE:"ボイスメッセージ",CONTACT_INFORMATION_HIDDEN:"機密情報",LEAVE_CONVERSATION:"会話をやめる",MARK_CONVERSATION_AS_UNREAD:"未読としてマーク",STATUS_INDICATOR_ONLINE:"アクティブ",STATUS_INDICATOR_OFFLINE:"退席中",ARIA_LEAVE_SEARCH_MODE:"検索モードを終了",ARIA_SEARCH_UP:"上に検索",ARIA_SEARCH_DOWN:"下に検索",ARIA_CLOSE_CHAT_POPUP:"チャットポップアップを閉じる",ARIA_SEARCH_INSIDE_CONVERSATION:"この会話内を検索",ARIA_SEARCH:"検索",ARIA_CHAT:"チャット",ARIA_SET_PLAYBACK_SPEED:"再生速度を設定",ARIA_CANCEL_UPLOAD:"アップロードをキャンセル",ARIA_STOP_RECORDING:"録音を停止",ARIA_CANCEL_RECORDING:"録音をキャンセル",ARIA_INSERT_EMOJI:"絵文字を挿入",ARIA_PLAY_AUDIO:"音声を再生",ARIA_PAUSE_AUDIO:"音声を一時停止",ARIA_REACTION_COUNT:(t,e)=>`${t}件のリアクション(${e})`,ARIA_MORE_ACTIONS:"その他の操作",ARIA_REPLYING_TO:(t,e)=>`${t}に返信: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"返信モードを終了",SELECT_CONVERSATION:"会話を選択"}},ka:{code:"ka-GE",name:"Georgian",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"გუშინ",TODAY:"დღეს",DAYS:"დღ",HOURS:"სთ",MINUTES:"წთ",JUST_NOW:"ახლა",LOCATION:"ადგილმდებარეობა",CANCEL:"გაუქმება",INBOX:"მიღებული შეტყობინება",DESKTOP_NOTIFICATIONS:"ბრაუზერის შეტყობინებები",DESKTOP_NOTIFICATIONS_ERROR:"შეუძლებელია ბრაუზერის შეტკობინებების ჩართვა. ეს ბრაუზერი ბლოკავს მათ. სცადე ცვლილება ოპციებიდან ან გამოიყენე სხვა ბრაუზერი.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} შეტყობინებების დემო ვერსია`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"თუ დატოვებ ბრაუზერის ფანჯარას გახსნილს, როცა ვიღაც მოგწერს საუბარი ამოვარდება დესკტოპზე.",SEND_BUTTON_TEXT:"გაგზავნა",ENTRYBOX_TEXT_LIMIT:"დაშვებულია მხოლოდ 10.000 სიმბოლო.",ENTRYBOX_PLACEHOLDER:"დაწერე რაღაც...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"ეს დიალოგი აღარ არის ხელმისაწვდომი.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"შეგიძლია წაიკითხო, მაგრამ ვერ გააგზავნი შეტყობინებას.",MESSAGELIST_LOADING_OLDER:"იტვირთება ძველი შეტყობინებები...",MESSAGELIST_SHOW_OLDER:"ძველი შეტყობინებების ჩვენება",MESSAGELIST_NEW_MARKER:"ახალი",MESSAGE_SENT_VIA_EMAIL:"ეს შეტყობინება გამოგზავნილია იმეილით",YOU_MARKER:"you",UPLOAD_IN_PROGRESS:"იტვირთება...",UPLOAD_SEND_FILE:"ფაილის გაგზავნა",UPLOAD_SHARE_LOCATION:"ადგილმდებარეობის გაზიარება",UPLOAD_ERROR:"პრობლემაა ატვირთვისას. ფაილის შესაძლოა არის არათავსებადი ან ძალიან დიდი.",SHARE_LOCATION_ERROR:"შეუძლებელია ადგილმდებარეობის გაზიარება: ",LOADING:"იტვირთება...",HUB_EMPTY:"საუბრების ისტორია გამოჩნდება აქ",HUB_SHOW_EARLIER:"წინა საუბრების ნახვა",INBOX_NO_CHATS_TITLE:"ჯერ-ჯერობით არ არის საუბრები!",INBOX_NO_CHATS_BODY:"უკვე დასრულებული საუბარები გამოჩნდება აქ",ENABLE_TRANSLATION:"თარგმნეთ ეს საუბარი ინგლისურად",DISABLE_TRANSLATION:"ორიგინალის ჩვენება",SEARCH_PLACEHOLDER_TEXT:"ძიება...",SEARCH_SEARCHING:"მიმდინარეობს ძიება...",SEARCH_NO_RESULTS:"შედეგები ვერ ქართველი",SEARCH_NO_MORE_RESULTS:"სხვა შედეგი ვერ მოიძებნა",SEARCH_RESULTS_CONVERSATIONS:"საუბრები",SEARCH_RESULTS_MESSAGES:"შეტყობინებები",SEARCH_RESULTS_SHOW_MORE:"მეტის ჩვენება",CHAT_NOT_FOUND:"ჩატი ვერ მოიძებნა",DELETE_MESSAGE:"შეტყობინების წაშლა ",DELETION_EXPLANATION:"თუ ამ შეტყობინებას წაშლით, ის ყველასთვის გაქრება.",EDIT_MESSAGE:"შეტყობინების რედაქტირება",SAVE:"შენახვა",EDITED_INDICATOR:"რედაქტირებულია",REPLY_TO_MESSAGE:"პასუხის გაცემა",ADD_REACTION:"დაამატეთ რეაქცია",AUTH_EXPIRED_OVERLAY_TITLE:"თქვენი ჩეთის სესიის ვადა ამოიწურა",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"განაახლეთ გვერდი გასაგრძელებლად",VOICE_MESSAGE:"ხმოვანი შეტყობინება",LEAVE_CONVERSATION:"საუბრის დატოვება",MARK_CONVERSATION_AS_UNREAD:"წაუკითხავად მონიშვნა",STATUS_INDICATOR_ONLINE:"აქტიური",STATUS_INDICATOR_OFFLINE:"გამორთული",CONTACT_INFORMATION_HIDDEN:"ფარული ინფორმაცია",ARIA_LEAVE_SEARCH_MODE:"ძიების რეჟიმიდან გასვლა",ARIA_SEARCH_UP:"ძიება ზემოთ",ARIA_SEARCH_DOWN:"ძიება ქვემოთ",ARIA_CLOSE_CHAT_POPUP:"ჩეთის ფანჯრის დახურვა",ARIA_SEARCH_INSIDE_CONVERSATION:"ძიება ამ საუბარში",ARIA_SEARCH:"ძიება",ARIA_CHAT:"ჩეთი",ARIA_SET_PLAYBACK_SPEED:"გადახვევის სიჩქარის დაყენება",ARIA_CANCEL_UPLOAD:"ატვირთვის გაუქმება",ARIA_STOP_RECORDING:"ჩაწერის შეჩერება",ARIA_CANCEL_RECORDING:"ჩაწერის გაუქმება",ARIA_INSERT_EMOJI:"ემოჯის ჩასმა",ARIA_PLAY_AUDIO:"აუდიოს დაკვრა",ARIA_PAUSE_AUDIO:"აუდიოს შეჩერება",ARIA_REACTION_COUNT:(t,e)=>`${t} რეაქცია (${e})`,ARIA_MORE_ACTIONS:"მეტი ქმედება",ARIA_REPLYING_TO:(t,e)=>`პასუხი ${t}-ს: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"პასუხის რეჟიმიდან გასვლა",SELECT_CONVERSATION:"აირჩიეთ საუბარი"}},ko:{code:"ko-KR",name:"Korean (South Korea)",emojiPickerTranslationUrl:null,emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/ko/cldr/data.json",translation:{YESTERDAY:"어제",TODAY:"오늘",DAYS:"일 전",HOURS:"시간 전",MINUTES:"분 전",JUST_NOW:"방금",LOCATION:"위치",CANCEL:"취소",INBOX:"대화 목록",DESKTOP_NOTIFICATIONS:"브라우저 알림",DESKTOP_NOTIFICATIONS_ERROR:"브라우저 알림을 표시할 수 없습니다. 브라우저 설정을 확인하거나 다른 브라우저를 사용해주세요.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} 데모 알림`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"브라우저 탭을 열어 둔 상태에서 누군가 대화 할 때 이 팝업이 표시됩니다.",SEND_BUTTON_TEXT:"전송",ENTRYBOX_TEXT_LIMIT:"최대 10,000자까지 입력할 수 있습니다.",ENTRYBOX_PLACEHOLDER:"메세지를 입력하세요...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"채팅이 종료되었습니다.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"읽기만 가능하며 메시지를 보낼 수 없습니다.",MESSAGELIST_LOADING_OLDER:"이전 메시지 로드 중...",MESSAGELIST_SHOW_OLDER:"이전 메시지 표시",MESSAGELIST_NEW_MARKER:"새 메시지",MESSAGE_SENT_VIA_EMAIL:"이 메시지는 이메일을 통해 전송되었습니다.",YOU_MARKER:"나",UPLOAD_IN_PROGRESS:"업로드 중...",UPLOAD_SEND_FILE:"파일 전송",UPLOAD_SHARE_LOCATION:"위치 공유",UPLOAD_ERROR:"업로드가 실패했습니다. 파일이 지원되지 않거나 너무 클 수 있습니다.",SHARE_LOCATION_ERROR:"위치를 공유 할 수 없습니다: ",LOADING:"로드 중...",HUB_EMPTY:"채팅 기록이 여기에 표시됩니다",HUB_SHOW_EARLIER:"이전 채팅보기",INBOX_NO_CHATS_TITLE:"아직 채팅이 없습니다!",INBOX_NO_CHATS_BODY:"대화가 하나 이상 있으면 여기에 표시됩니다.",ENABLE_TRANSLATION:"이 대화를 한국어로 번역",DISABLE_TRANSLATION:"원본 표시",SEARCH_PLACEHOLDER_TEXT:"검색...",SEARCH_SEARCHING:"검색 중...",SEARCH_NO_RESULTS:"검색 결과 없음",SEARCH_NO_MORE_RESULTS:"추가 검색 결과 없음",SEARCH_RESULTS_CONVERSATIONS:"대화",SEARCH_RESULTS_MESSAGES:"메시지",SEARCH_RESULTS_SHOW_MORE:"더 보기",CHAT_NOT_FOUND:"대화를 찾지 못했습니다",DELETE_MESSAGE:"메시지 삭제",DELETION_EXPLANATION:"이 메시지를 삭제하면 모든 사람이 볼 수 없게 됩니다.",EDIT_MESSAGE:"메시지 편집하기",SAVE:"저장",EDITED_INDICATOR:"편집",REPLY_TO_MESSAGE:"회신",ADD_REACTION:"반응 추가",AUTH_EXPIRED_OVERLAY_TITLE:"채팅 세션이 만료되었습니다",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"계속하려면 페이지를 새로고침하세요",VOICE_MESSAGE:"음성 메시지",CONTACT_INFORMATION_HIDDEN:"숨겨진 정보",LEAVE_CONVERSATION:"대화 떠나기",MARK_CONVERSATION_AS_UNREAD:"읽지 않은 상태로 표시",STATUS_INDICATOR_ONLINE:"활성",STATUS_INDICATOR_OFFLINE:"부재중",ARIA_LEAVE_SEARCH_MODE:"검색 모드 종료",ARIA_SEARCH_UP:"위로 검색",ARIA_SEARCH_DOWN:"아래로 검색",ARIA_CLOSE_CHAT_POPUP:"채팅 팝업 닫기",ARIA_SEARCH_INSIDE_CONVERSATION:"이 대화 내 검색",ARIA_SEARCH:"검색",ARIA_CHAT:"채팅",ARIA_SET_PLAYBACK_SPEED:"재생 속도 설정",ARIA_CANCEL_UPLOAD:"업로드 취소",ARIA_STOP_RECORDING:"녹음 중지",ARIA_CANCEL_RECORDING:"녹음 취소",ARIA_INSERT_EMOJI:"이모지 삽입",ARIA_PLAY_AUDIO:"오디오 재생",ARIA_PAUSE_AUDIO:"오디오 일시 정지",ARIA_REACTION_COUNT:(t,e)=>`${t}개 반응 (${e})`,ARIA_MORE_ACTIONS:"추가 작업",ARIA_REPLYING_TO:(t,e)=>`${t}에게 답장: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"답장 모드 종료",SELECT_CONVERSATION:"대화 선택"}},nb:{code:"nb-NO",name:"Norwegian (Bokmål)",emojiPickerTranslationUrl:null,emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/nb/cldr/data.json",translation:{YESTERDAY:"I går",TODAY:"I dag",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"Nå",LOCATION:"Plassering",CANCEL:"Avbryt",INBOX:"Innboks",DESKTOP_NOTIFICATIONS:"Nettleservarsler",DESKTOP_NOTIFICATIONS_ERROR:"Kan ikke aktivere Nettleservarsler fordi nettleseren din aktivt blokkerer dem. Prøv å se i innstillingene eller bruke en annen nettleser.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} demo varslinger`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Hvis du holder nettleservinduet åpent, vil du se dette varsel når noen snakker til deg.",SEND_BUTTON_TEXT:"Send",ENTRYBOX_TEXT_LIMIT:"Kun 10.000 tegn er tillatt.",ENTRYBOX_PLACEHOLDER:"Si noe...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Denne samtale er ikke lengre aktiv.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Du kan lese, men ikke sende meldinger.",MESSAGELIST_LOADING_OLDER:"Laster eldre meldinger...",MESSAGELIST_SHOW_OLDER:"Vis eldre meldinger",MESSAGELIST_NEW_MARKER:"Ny",MESSAGE_SENT_VIA_EMAIL:"Denne meldingen er sendt via e-post",YOU_MARKER:"deg",UPLOAD_IN_PROGRESS:"Laster opp...",UPLOAD_SEND_FILE:"Send fil",UPLOAD_SHARE_LOCATION:"Del din plassering",UPLOAD_ERROR:"Noe gikk galt i uplastingen. Det kan være filen ikke støttes eller for stor.",SHARE_LOCATION_ERROR:"Kan ikke dele plasseringen: ",LOADING:"Laster...",HUB_EMPTY:"Din chats historikk vil vises her",HUB_SHOW_EARLIER:"Vis tidligere chats",INBOX_NO_CHATS_TITLE:"Ingen chats enda!",INBOX_NO_CHATS_BODY:"Så snart du får en eller flere samtaler, vil de vises her.",ENABLE_TRANSLATION:"Oversett denne samtalen til norsk",DISABLE_TRANSLATION:"Vis original",SEARCH_PLACEHOLDER_TEXT:"Søk...",SEARCH_SEARCHING:"Søker...",SEARCH_NO_RESULTS:"Finner ingen resultater",SEARCH_NO_MORE_RESULTS:"Ingen flere resultater",SEARCH_RESULTS_CONVERSATIONS:"Samtaler",SEARCH_RESULTS_MESSAGES:"Meldinger",SEARCH_RESULTS_SHOW_MORE:"Vis mer",CHAT_NOT_FOUND:"Chat ikke funnet",DELETE_MESSAGE:"Slett melding",DELETION_EXPLANATION:"Hvis du sletter denne meldingen, forsvinner den for alle.",EDIT_MESSAGE:"Rediger melding",SAVE:"Lagre",EDITED_INDICATOR:"redigert",REPLY_TO_MESSAGE:"Svar",ADD_REACTION:"Legg til reaksjon",AUTH_EXPIRED_OVERLAY_TITLE:"Chatøkten er utløpt",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Oppdater siden for å fortsette",VOICE_MESSAGE:"Lydmelding",CONTACT_INFORMATION_HIDDEN:"Skjult informasjon",LEAVE_CONVERSATION:"Forlat samtalen",MARK_CONVERSATION_AS_UNREAD:"Merk som ulest",STATUS_INDICATOR_ONLINE:"Aktiv",STATUS_INDICATOR_OFFLINE:"Borte",ARIA_LEAVE_SEARCH_MODE:"Forlat søkemodus",ARIA_SEARCH_UP:"Søk oppover",ARIA_SEARCH_DOWN:"Søk nedover",ARIA_CLOSE_CHAT_POPUP:"Lukk chatvindu",ARIA_SEARCH_INSIDE_CONVERSATION:"Søk i denne samtalen",ARIA_SEARCH:"Søk",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"angi avspillingshastighet",ARIA_CANCEL_UPLOAD:"Avbryt opplasting",ARIA_STOP_RECORDING:"Stopp opptak",ARIA_CANCEL_RECORDING:"Avbryt opptak",ARIA_INSERT_EMOJI:"Sett inn en emoji",ARIA_PLAY_AUDIO:"spill av lyd",ARIA_PAUSE_AUDIO:"pause lyd",ARIA_REACTION_COUNT:(t,e)=>`${t} reaksjoner med ${e}`,ARIA_MORE_ACTIONS:"Flere handlinger",ARIA_REPLYING_TO:(t,e)=>`Svarer til ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Avslutt svarmodus",SELECT_CONVERSATION:"Velg en samtale"}},nl:{code:"nl-NL",name:"Dutch",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/nl.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/nl/cldr/data.json",translation:{YESTERDAY:"Gisteren",TODAY:"Vandaag",DAYS:"d",HOURS:"u",MINUTES:"m",JUST_NOW:"zojuist",LOCATION:"Locatie",CANCEL:"Annuleren",INBOX:"Inbox",DESKTOP_NOTIFICATIONS:"Browsermeldingen",DESKTOP_NOTIFICATIONS_ERROR:"Browsermeldingen kunnen niet geactiveerd worden omdat de browser het blokkeert. Check de instellingen van je browser of probeer een andere browser.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} demo notificatie`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Als je je browser open houdt, zie je deze popup als iemand tegen je praat.",SEND_BUTTON_TEXT:"Verzenden",ENTRYBOX_TEXT_LIMIT:"Maximaal 10.000 tekens toegestaan.",ENTRYBOX_PLACEHOLDER:"Typ een bericht...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Dit gesprek is niet actief meer.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Je kunt geen berichten sturen.",MESSAGELIST_LOADING_OLDER:"Eerdere berichten laden...",MESSAGELIST_SHOW_OLDER:"Laad eerdere berichten",MESSAGELIST_NEW_MARKER:"Nieuw",MESSAGE_SENT_VIA_EMAIL:"Dit bericht is verstuurd via e-mail",YOU_MARKER:"jij",UPLOAD_IN_PROGRESS:"Uploaden...",UPLOAD_SEND_FILE:"Verzend bestand",UPLOAD_SHARE_LOCATION:"Deel locatie",UPLOAD_ERROR:"Er ging iets mis. Het bestand wordt niet ondersteund of is te groot.",SHARE_LOCATION_ERROR:"Locatie delen mislukt: ",LOADING:"Bezig met laden...",HUB_EMPTY:"Berichtengeschiedenis wordt hier weergegeven",HUB_SHOW_EARLIER:"Laat eerdere berichten zien",INBOX_NO_CHATS_TITLE:"Nog geen chats!",INBOX_NO_CHATS_BODY:"Zodra je een of meerdere conversaties hebt gehad, worden deze hier weergegeven.",ENABLE_TRANSLATION:"Vertaal dit gesprek naar het Nederlands",DISABLE_TRANSLATION:"Toon oorspronkelijk gesprek",SEARCH_PLACEHOLDER_TEXT:"Zoek...",SEARCH_SEARCHING:"Zoeken...",SEARCH_NO_RESULTS:"Geen resultaten gevonden",SEARCH_NO_MORE_RESULTS:"Niet meer resultaten",SEARCH_RESULTS_CONVERSATIONS:"Gesprekken",SEARCH_RESULTS_MESSAGES:"Berichten",SEARCH_RESULTS_SHOW_MORE:"Toon meer",CHAT_NOT_FOUND:"Chat niet gevonden",DELETE_MESSAGE:"Bericht verwijderen",DELETION_EXPLANATION:"Als je dit bericht verwijdert, zal het voor iedereen verdwijnen.",EDIT_MESSAGE:"Bericht bewerken",SAVE:"Opslaan",EDITED_INDICATOR:"bewerkt",REPLY_TO_MESSAGE:"Beantwoorden",ADD_REACTION:"Reactie toevoegen",AUTH_EXPIRED_OVERLAY_TITLE:"Je chatsessie is verlopen",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Ververs de pagina om door te gaan",VOICE_MESSAGE:"Spraakbericht",LEAVE_CONVERSATION:"Gesprek verlaten",MARK_CONVERSATION_AS_UNREAD:"Markeren als ongelezen",STATUS_INDICATOR_ONLINE:"Online",STATUS_INDICATOR_OFFLINE:"Offline",CONTACT_INFORMATION_HIDDEN:"verborgen informatie",ARIA_LEAVE_SEARCH_MODE:"Zoekmodus verlaten",ARIA_SEARCH_UP:"Omhoog zoeken",ARIA_SEARCH_DOWN:"Omlaag zoeken",ARIA_CLOSE_CHAT_POPUP:"Chatvenster sluiten",ARIA_SEARCH_INSIDE_CONVERSATION:"Zoeken in dit gesprek",ARIA_SEARCH:"Zoeken",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"Afspeelsnelheid instellen",ARIA_CANCEL_UPLOAD:"Upload annuleren",ARIA_STOP_RECORDING:"Opname stoppen",ARIA_CANCEL_RECORDING:"Opname annuleren",ARIA_INSERT_EMOJI:"Een emoji invoegen",ARIA_PLAY_AUDIO:"Audio afspelen",ARIA_PAUSE_AUDIO:"Audio pauzeren",ARIA_REACTION_COUNT:(t,e)=>`${t} Reacties met ${e}`,ARIA_MORE_ACTIONS:"Meer acties",ARIA_REPLYING_TO:(t,e)=>`Beantwoorden aan ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Verlaat antwoordmodus",SELECT_CONVERSATION:"Selecteer een gesprek"}},pl:{code:"pl-PL",name:"Polish",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/pl.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/pl/cldr/data.json",translation:{YESTERDAY:"Wczoraj",TODAY:"Dzisiaj",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"teraz",LOCATION:"Lokalizacja",CANCEL:"Anuluj",INBOX:"Skrzynka odbiorcza",DESKTOP_NOTIFICATIONS:"Powiadomienia",DESKTOP_NOTIFICATIONS_ERROR:"Nie można aktywować powiadomień, ponieważ twoja przeglądarka je blokuje. Proszę zmienić ustawienie lub spróbować innej przeglądarki.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} przykładowe powiadomienie`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Jeśli zostawisz tę kartę otwartą, zobaczysz takie powiadomienie, gdy ktoś napisze do Ciebie.",SEND_BUTTON_TEXT:"Wyślij",ENTRYBOX_TEXT_LIMIT:"Nie można wysyłać więcej niż 10000 znaków.",ENTRYBOX_PLACEHOLDER:"Napisz coś...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Ten czat nie jest aktywny.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Możesz czytać wiadomości, ale nie możesz ich wysyłać.",MESSAGELIST_LOADING_OLDER:"Wczytuję starsze wiadomości...",MESSAGELIST_SHOW_OLDER:"Zobacz starsze wiadomości",MESSAGELIST_NEW_MARKER:"Nowe",MESSAGE_SENT_VIA_EMAIL:"Ta wiadomość została wysłana przez email.",YOU_MARKER:"ty",UPLOAD_IN_PROGRESS:"Przesyłanie...",UPLOAD_SEND_FILE:"Prześlij plik",UPLOAD_SHARE_LOCATION:"Udostępnij lokalizację",UPLOAD_ERROR:"Coś poszło nie tak. Plik może być zbyt duży lub jest nieobsługiwany.",SHARE_LOCATION_ERROR:"Nie da się udostępnić lokalizacji: ",LOADING:"Ładowanie...",HUB_EMPTY:"Twoje czaty pojawią się tutaj",HUB_SHOW_EARLIER:"Zobacz starsze czaty",INBOX_NO_CHATS_TITLE:"Brak czatów!",INBOX_NO_CHATS_BODY:"Rozpoczęte konwersacje pojawią się tutaj.",ENABLE_TRANSLATION:"Przetłumacz tę konwersację na język polski",DISABLE_TRANSLATION:"Pokaż oryginał",SEARCH_PLACEHOLDER_TEXT:"Wyszukaj...",SEARCH_SEARCHING:"Wyszukiwanie...",SEARCH_NO_RESULTS:"Nie znaleziono wyników",SEARCH_NO_MORE_RESULTS:"Nie ma innych wyników",SEARCH_RESULTS_CONVERSATIONS:"Konwersacje",SEARCH_RESULTS_MESSAGES:"Wiadomości",SEARCH_RESULTS_SHOW_MORE:"Pokaż więcej",CHAT_NOT_FOUND:"Nie znaleziono konwersacji",DELETE_MESSAGE:"Usuń wiadomość",DELETION_EXPLANATION:"Jeśli usuniesz tę wiadomość, przestanie być widoczna dla wszystkich.",EDIT_MESSAGE:"Edytuj wiadomość",SAVE:"Zapisz",EDITED_INDICATOR:"edytowano",REPLY_TO_MESSAGE:"Odpowiedz",ADD_REACTION:"Dodaj reakcję",AUTH_EXPIRED_OVERLAY_TITLE:"Twoja sesja wygasła",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Odśwież stronę, aby kontynuować",VOICE_MESSAGE:"Wiadomość głosowa",CONTACT_INFORMATION_HIDDEN:"Ukryte informacje",LEAVE_CONVERSATION:"Opuść konwersację",MARK_CONVERSATION_AS_UNREAD:"Oznacz jako nieprzeczytane",STATUS_INDICATOR_ONLINE:"Aktywny",STATUS_INDICATOR_OFFLINE:"Nieobecny",ARIA_LEAVE_SEARCH_MODE:"Wyjdź z trybu wyszukiwania",ARIA_SEARCH_UP:"Szukaj w górę",ARIA_SEARCH_DOWN:"Szukaj w dół",ARIA_CLOSE_CHAT_POPUP:"Zamknij okno czatu",ARIA_SEARCH_INSIDE_CONVERSATION:"Szukaj w tej konwersacji",ARIA_SEARCH:"Szukaj",ARIA_CHAT:"Czat",ARIA_SET_PLAYBACK_SPEED:"ustaw prędkość odtwarzania",ARIA_CANCEL_UPLOAD:"Anuluj przesyłanie",ARIA_STOP_RECORDING:"Zatrzymaj nagrywanie",ARIA_CANCEL_RECORDING:"Anuluj nagrywanie",ARIA_INSERT_EMOJI:"Wstaw emoji",ARIA_PLAY_AUDIO:"odtwórz audio",ARIA_PAUSE_AUDIO:"wstrzymaj audio",ARIA_REACTION_COUNT:(t,e)=>`${t} reakcji z ${e}`,ARIA_MORE_ACTIONS:"Więcej akcji",ARIA_REPLYING_TO:(t,e)=>`Odpowiadanie na ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Wyjdź z trybu odpowiedzi",SELECT_CONVERSATION:"Wybierz konwersację"}},pt:{code:"pt-BR",name:"Portuguese (Brazil)",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/pt_BR.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/pt/cldr/data.json",translation:{YESTERDAY:"Ontem",TODAY:"Hoje",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"agora mesmo",LOCATION:"Localização",CANCEL:"Cancelar",INBOX:"Caixa de entrada",DESKTOP_NOTIFICATIONS:"Notificações do navegador",DESKTOP_NOTIFICATIONS_ERROR:"Não é possível ativar as notificações da navegador porque seu navegador as bloqueia. Tente procurar nas configurações ou usar um navegador diferente.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} notificação de demonstração`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Se você mantiver a guia do navegador aberta, verá essa mensagem quando alguém falar com você.",SEND_BUTTON_TEXT:"Enviar",ENTRYBOX_TEXT_LIMIT:"Apenas 10.000 caracteres são permitidos.",ENTRYBOX_PLACEHOLDER:"Diga algo...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Esta conversa não está mais ativa.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Você pode ler, mas não enviar mensagens.",MESSAGELIST_LOADING_OLDER:"Carregando mensagens antigas...",MESSAGELIST_SHOW_OLDER:"Mostrar mensagens mais antigas",MESSAGELIST_NEW_MARKER:"Novo",MESSAGE_SENT_VIA_EMAIL:"Esta mensagem foi enviada via email.",YOU_MARKER:"Você",UPLOAD_IN_PROGRESS:"Carregando...",UPLOAD_SEND_FILE:"Enviar arquivo",UPLOAD_SHARE_LOCATION:"Compartilhar localização",UPLOAD_ERROR:"Algo deu errado ao fazer o upload. O arquivo pode não ter suporte ou ser muito grande.",SHARE_LOCATION_ERROR:"Não é possível compartilhar o local: ",LOADING:"Carregando...",HUB_EMPTY:"Seu histórico de conversas será exibido aqui",HUB_SHOW_EARLIER:"Mostrar conversas anteriores",INBOX_NO_CHATS_TITLE:"Ainda não há chats!",INBOX_NO_CHATS_BODY:"Depois de ter uma ou mais conversas, elas serão exibidas aqui.",ENABLE_TRANSLATION:"Traduzir esta conversa para português",DISABLE_TRANSLATION:"Ver a conversa não traduzida",SEARCH_PLACEHOLDER_TEXT:"Busca...",SEARCH_SEARCHING:"Consultando...",SEARCH_NO_RESULTS:"Resultados nao encontrados",SEARCH_NO_MORE_RESULTS:"Não há mais resultados",SEARCH_RESULTS_CONVERSATIONS:"Conversas",SEARCH_RESULTS_MESSAGES:"Mensagens",SEARCH_RESULTS_SHOW_MORE:"Mostrar mais",CHAT_NOT_FOUND:"Conversa não encontrada",DELETE_MESSAGE:"Excluir mensagem",DELETION_EXPLANATION:"Se você excluir esta mensagem, ela desaparecerá para todos.",EDIT_MESSAGE:"Editar mensagem",SAVE:"Salvar",EDITED_INDICATOR:"editada",REPLY_TO_MESSAGE:"Responder",ADD_REACTION:"Adicionar reação",AUTH_EXPIRED_OVERLAY_TITLE:"Sua sessão de chat expirou",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Atualize a página para continuar",VOICE_MESSAGE:"Mensagem de voz",LEAVE_CONVERSATION:"Sair da conversa",MARK_CONVERSATION_AS_UNREAD:"Marcar como não lida",STATUS_INDICATOR_ONLINE:"Online",STATUS_INDICATOR_OFFLINE:"Offline",CONTACT_INFORMATION_HIDDEN:"Informação oculta",ARIA_LEAVE_SEARCH_MODE:"Sair do modo de pesquisa",ARIA_SEARCH_UP:"Pesquisar para cima",ARIA_SEARCH_DOWN:"Pesquisar para baixo",ARIA_CLOSE_CHAT_POPUP:"Fechar janela de chat",ARIA_SEARCH_INSIDE_CONVERSATION:"Pesquisar nesta conversa",ARIA_SEARCH:"Pesquisar",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"definir velocidade de reprodução",ARIA_CANCEL_UPLOAD:"Cancelar envio",ARIA_STOP_RECORDING:"Parar gravação",ARIA_CANCEL_RECORDING:"Cancelar gravação",ARIA_INSERT_EMOJI:"Inserir um emoji",ARIA_PLAY_AUDIO:"reproduzir áudio",ARIA_PAUSE_AUDIO:"pausar áudio",ARIA_REACTION_COUNT:(t,e)=>`${t} reações com ${e}`,ARIA_MORE_ACTIONS:"Mais ações",ARIA_REPLYING_TO:(t,e)=>`Respondendo a ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Sair do modo de resposta",SELECT_CONVERSATION:"Selecione uma conversa"}},ro:{code:"ro-RO",name:"Romanian (Romania)",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Ieri",TODAY:"Astăzi",DAYS:"z",HOURS:"o",MINUTES:"m",JUST_NOW:"chiar acum",LOCATION:"Locație",CANCEL:"Anulare",INBOX:"Inbox",DESKTOP_NOTIFICATIONS:"Notificări browser",DESKTOP_NOTIFICATIONS_ERROR:"Nu se pot activa notificări browser deoarece browserul dvs. le blochează în mod activ. Încercați să căutați în setări sau utilizând un alt browser.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`Notificare de debit ${t}`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Dacă țineți fișa browserului deschis, veți vedea acest pop-up atunci când cineva vorbește cu dvs.",SEND_BUTTON_TEXT:"Trimiteți",ENTRYBOX_TEXT_LIMIT:"Sunt permise numai 10.000 de caractere.",ENTRYBOX_PLACEHOLDER:"Spune ceva...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Această conversație nu mai este activă.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Puteți citi, dar nu puteți trimite mesaje.",MESSAGELIST_LOADING_OLDER:"Încărcarea mesajelor mai vechi...",MESSAGELIST_SHOW_OLDER:"Afișați mesaje mai vechi",MESSAGELIST_NEW_MARKER:"Nou",MESSAGE_SENT_VIA_EMAIL:"Acest mesaj a fost trimis prin e-mail",YOU_MARKER:"voi",UPLOAD_IN_PROGRESS:"Încărcarea...",UPLOAD_SEND_FILE:"Trimiteți fișierul",UPLOAD_SHARE_LOCATION:"Distribuiți locația",UPLOAD_ERROR:"Sa încărcat ceva în mod greșit. Fișierul ar putea fi neacceptat sau prea mare.",SHARE_LOCATION_ERROR:"Nu se poate partaja locația: ",LOADING:"Încărcare...",HUB_EMPTY:"Istoricul chat-ului dvs. va apărea aici",HUB_SHOW_EARLIER:"Afișați discuțiile anterioare",INBOX_NO_CHATS_TITLE:"Încă nu vorbești!",INBOX_NO_CHATS_BODY:"După ce ați avut una sau mai multe conversații, acestea vor apărea aici.",ENABLE_TRANSLATION:"Traduceți această conversație în română",DISABLE_TRANSLATION:"Arată originalul",SEARCH_PLACEHOLDER_TEXT:"Căutare...",SEARCH_SEARCHING:"Se caută...",SEARCH_NO_RESULTS:"Nu s-au găsit rezultate",SEARCH_NO_MORE_RESULTS:"Nu mai există rezultate",SEARCH_RESULTS_CONVERSATIONS:"Conversații",SEARCH_RESULTS_MESSAGES:"Mesaje",SEARCH_RESULTS_SHOW_MORE:"Arată mai mult",CHAT_NOT_FOUND:"Conversația nu a fost găsită",DELETE_MESSAGE:"Șterge mesajul",DELETION_EXPLANATION:"Dacă ștergi acest mesaj, acesta va dispărea pentru toată lumea.",EDIT_MESSAGE:"Redactează mesajul",SAVE:"Salvare",EDITED_INDICATOR:"editat",REPLY_TO_MESSAGE:"Răspundeți",ADD_REACTION:"Adaugă o reacție",AUTH_EXPIRED_OVERLAY_TITLE:"Sesiunea dumneavoastră de chat a expirat",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Reîmprospătați pagina pentru a continua",VOICE_MESSAGE:"Mesaj vocal",CONTACT_INFORMATION_HIDDEN:"Informații ascunse",LEAVE_CONVERSATION:"Părăsește conversația",MARK_CONVERSATION_AS_UNREAD:"Marcheaza ca necitit",STATUS_INDICATOR_ONLINE:"Activ",STATUS_INDICATOR_OFFLINE:"Plecat",ARIA_LEAVE_SEARCH_MODE:"Părăsește modul de căutare",ARIA_SEARCH_UP:"Caută în sus",ARIA_SEARCH_DOWN:"Caută în jos",ARIA_CLOSE_CHAT_POPUP:"Închide fereastra de chat",ARIA_SEARCH_INSIDE_CONVERSATION:"Caută în această conversație",ARIA_SEARCH:"Caută",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"setează viteza de redare",ARIA_CANCEL_UPLOAD:"Anulează încărcarea",ARIA_STOP_RECORDING:"Oprește înregistrarea",ARIA_CANCEL_RECORDING:"Anulează înregistrarea",ARIA_INSERT_EMOJI:"Inserează un emoji",ARIA_PLAY_AUDIO:"redă audio",ARIA_PAUSE_AUDIO:"pauză audio",ARIA_REACTION_COUNT:(t,e)=>`${t} reacții cu ${e}`,ARIA_MORE_ACTIONS:"Mai multe acțiuni",ARIA_REPLYING_TO:(t,e)=>`Răspuns la ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Părăsește modul de răspuns",SELECT_CONVERSATION:"Selectați o conversație"}},ru:{code:"ru-RU",name:"Russian",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/ru_RU.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/ru/emojibase/data.json",translation:{YESTERDAY:"Вчера",TODAY:"Сегодня",DAYS:"д",HOURS:"ч",MINUTES:"м",JUST_NOW:"только что",LOCATION:"Местоположение",CANCEL:"Отмена",INBOX:"Входящие",DESKTOP_NOTIFICATIONS:"Оповещения",DESKTOP_NOTIFICATIONS_ERROR:"Невозможно включить оповещения, потому что ваш браузер активно блокирует их. Проверьте ваши настройки или попробуйте другой браузер.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} демо-оповещение`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Если вкладка вашего браузера открыта, вы увидите всплывающее окошко оповещения когда кто-то отправит вам сообщение.",SEND_BUTTON_TEXT:"Отправить",ENTRYBOX_TEXT_LIMIT:"Разрешено использовать только 10 тысяч символов.",ENTRYBOX_PLACEHOLDER:"Напишите что-нибудь...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Этот разговор больше неактивен.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Вы можете читать, но не отправлять сообщения.",MESSAGELIST_LOADING_OLDER:"Загрузка старых сообщения...",MESSAGELIST_SHOW_OLDER:"Показать старые сообщения",MESSAGELIST_NEW_MARKER:"Новые",MESSAGE_SENT_VIA_EMAIL:"Это сообщение было отправлено по электронной почте",YOU_MARKER:"вы",UPLOAD_IN_PROGRESS:"Загрузка...",UPLOAD_SEND_FILE:"Отправить файл",UPLOAD_SHARE_LOCATION:"Поделиться местоположением",UPLOAD_ERROR:"Что-то пошло не так: такой файл не поддерживается или он слишком большой.",SHARE_LOCATION_ERROR:"Не удается поделиться местоположением: ",LOADING:"Загрузка...",HUB_EMPTY:"Здесь появится ваша история чата",HUB_SHOW_EARLIER:"Показать предыдущие чаты",INBOX_NO_CHATS_TITLE:"Пока нет чатов!",INBOX_NO_CHATS_BODY:"Как только у вас будет один или несколько разговоров, они появятся здесь.",ENABLE_TRANSLATION:"Переведите этот разговор на русский",DISABLE_TRANSLATION:"Show source",SEARCH_PLACEHOLDER_TEXT:"поиск...",SEARCH_SEARCHING:"Поиск...",SEARCH_NO_RESULTS:"Результаты не найдены",SEARCH_NO_MORE_RESULTS:"Больше результатов нет",SEARCH_RESULTS_CONVERSATIONS:"Разговоры",SEARCH_RESULTS_MESSAGES:"Сообщения",SEARCH_RESULTS_SHOW_MORE:"Показать ещё",CHAT_NOT_FOUND:"Чат не найден",DELETE_MESSAGE:"Удалить сообщение",DELETION_EXPLANATION:"Если вы удалите это сообщение, оно исчезнет для всех.",EDIT_MESSAGE:"Изменить сообщение",SAVE:"сохранить",EDITED_INDICATOR:"изменено",REPLY_TO_MESSAGE:"Ответить",ADD_REACTION:"Добавить реакцию",AUTH_EXPIRED_OVERLAY_TITLE:"Срок действия вашего сеанса чата истек",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Обновите страницу, чтобы продолжить",VOICE_MESSAGE:"Голосовое сообщение",CONTACT_INFORMATION_HIDDEN:"Информация скрыта",LEAVE_CONVERSATION:"Выйти из беседы",MARK_CONVERSATION_AS_UNREAD:"Отметить как непрочитанное",STATUS_INDICATOR_ONLINE:"Активен",STATUS_INDICATOR_OFFLINE:"Не в сети",ARIA_LEAVE_SEARCH_MODE:"Выйти из режима поиска",ARIA_SEARCH_UP:"Искать вверх",ARIA_SEARCH_DOWN:"Искать вниз",ARIA_CLOSE_CHAT_POPUP:"Закрыть окно чата",ARIA_SEARCH_INSIDE_CONVERSATION:"Искать в этом разговоре",ARIA_SEARCH:"Поиск",ARIA_CHAT:"Чат",ARIA_SET_PLAYBACK_SPEED:"установить скорость воспроизведения",ARIA_CANCEL_UPLOAD:"Отменить загрузку",ARIA_STOP_RECORDING:"Остановить запись",ARIA_CANCEL_RECORDING:"Отменить запись",ARIA_INSERT_EMOJI:"Вставить эмодзи",ARIA_PLAY_AUDIO:"воспроизвести аудио",ARIA_PAUSE_AUDIO:"приостановить аудио",ARIA_REACTION_COUNT:(t,e)=>`${t} реакций с ${e}`,ARIA_MORE_ACTIONS:"Дополнительные действия",ARIA_REPLYING_TO:(t,e)=>`Ответ на ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Выйти из режима ответа",SELECT_CONVERSATION:"Выберите беседу"}},sq:{code:"sq-AL",name:"Albanian",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Dje",TODAY:"Sot",DAYS:"d",HOURS:"o",MINUTES:"m",JUST_NOW:"Tani",LOCATION:"Pozicion",CANCEL:"Anulo",INBOX:"Inbox",DESKTOP_NOTIFICATIONS:"Njoftimet e shfletuesit",DESKTOP_NOTIFICATIONS_ERROR:"Nuk mund të aktivizohen njoftimet në shfletues sepse shfletuesi juaj i bllokon ato në mënyrë aktive. Provoni të shikoni cilësimet ose përdorni një shfletues të ndryshëm.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} njoftime në desktop`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Lënia e skedës së shfletuesit tuaj të hapur do të pop-up kur dikush flet me ju.",SEND_BUTTON_TEXT:"Dërgo",ENTRYBOX_TEXT_LIMIT:"Lejohen vetëm 10,000 karaktere",ENTRYBOX_PLACEHOLDER:"Thuaj diçka...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Kjo bisedë nuk është më aktive.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Mund të lexoni por jo të dërgoni mesazhe.",MESSAGELIST_LOADING_OLDER:"Duke ngarkuar mesazhe më të vjetra...",MESSAGELIST_SHOW_OLDER:"Trego mesazhe më të vjetra",MESSAGELIST_NEW_MARKER:"E ri",MESSAGE_SENT_VIA_EMAIL:"Ky mesazh u dërgua si email",YOU_MARKER:"ti",UPLOAD_IN_PROGRESS:"Ngarkim...",UPLOAD_SEND_FILE:"Dërgo datotekën",UPLOAD_SHARE_LOCATION:"Ndani lokacionin",UPLOAD_ERROR:"Na vjen keq, diçka nuk shkoi si duhet. Dosja mund të mos ket mbështetje ose mund të jetë shumë e madhe.",SHARE_LOCATION_ERROR:"Nuk mund të ndahet lokacioni: ",LOADING:"Ngarkim...",HUB_EMPTY:"Këtu do të paraqitet/ shfaqet historia e bisedës tuaj",HUB_SHOW_EARLIER:"Shfaqi bisedat e mëparshme",INBOX_NO_CHATS_TITLE:"Nuk ka biseda!",INBOX_NO_CHATS_BODY:"Pasi të keni një ose më shumë biseda, ato do të paraqiten/shfaqen këtu.",ENABLE_TRANSLATION:"Përkthejeni këtë bisedë në shqiptare",DISABLE_TRANSLATION:"Shikoni origjinalin",SEARCH_PLACEHOLDER_TEXT:"Kërko...",SEARCH_SEARCHING:"Kërko...",SEARCH_NO_RESULTS:"Nuk ka rezultate",SEARCH_NO_MORE_RESULTS:"Nuk ka më rezultate",SEARCH_RESULTS_CONVERSATIONS:"Bisedat",SEARCH_RESULTS_MESSAGES:"Mesazhe",SEARCH_RESULTS_SHOW_MORE:"Shfaq më shumë",CHAT_NOT_FOUND:"Biseda nuk u gjet",DELETE_MESSAGE:"Fshi mesazhin",DELETION_EXPLANATION:"Nëse e fshini këtë mesazh, ai do të zhduket për të gjithë.",EDIT_MESSAGE:"Redakto mesazhin",SAVE:"Ruaj",EDITED_INDICATOR:"redaktuar",REPLY_TO_MESSAGE:"Përgjigj",ADD_REACTION:"Shtoni reagimin",AUTH_EXPIRED_OVERLAY_TITLE:"Sesioni juaj i bisedës ka skaduar",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Rifresko faqen për të vazhduar",VOICE_MESSAGE:"Mesazh zanor",CONTACT_INFORMATION_HIDDEN:"informacione të fshehura",LEAVE_CONVERSATION:"Largohu nga bashkëbisedimi",MARK_CONVERSATION_AS_UNREAD:"Shëno si të palexuar",STATUS_INDICATOR_ONLINE:"Aktiv",STATUS_INDICATOR_OFFLINE:"Larg",ARIA_LEAVE_SEARCH_MODE:"Dil nga mënyra e kërkimit",ARIA_SEARCH_UP:"Kërko lart",ARIA_SEARCH_DOWN:"Kërko poshtë",ARIA_CLOSE_CHAT_POPUP:"Mbyll dritaren e bisedës",ARIA_SEARCH_INSIDE_CONVERSATION:"Kërko në këtë bisedë",ARIA_SEARCH:"Kërko",ARIA_CHAT:"Bisedë",ARIA_SET_PLAYBACK_SPEED:"vendos shpejtësinë e luajtjes",ARIA_CANCEL_UPLOAD:"Anulo ngarkimin",ARIA_STOP_RECORDING:"Ndalo regjistrimin",ARIA_CANCEL_RECORDING:"Anulo regjistrimin",ARIA_INSERT_EMOJI:"Fut një emoji",ARIA_PLAY_AUDIO:"luaj audio",ARIA_PAUSE_AUDIO:"pauzë audio",ARIA_REACTION_COUNT:(t,e)=>`${t} reagime me ${e}`,ARIA_MORE_ACTIONS:"Më shumë veprime",ARIA_REPLYING_TO:(t,e)=>`Duke u përgjigjur ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Dil nga mënyra e përgjigjes",SELECT_CONVERSATION:"Zgjidhni një bashkëbisedim"}},sr:{code:"sr-SP",name:"Serbian",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Juče",TODAY:"Danas",DAYS:"d",HOURS:"s",MINUTES:"m",JUST_NOW:"Upravo sad",LOCATION:"Lokacija",CANCEL:"Otkaži",INBOX:"Pretinac",DESKTOP_NOTIFICATIONS:"Browser Notifikacija",DESKTOP_NOTIFICATIONS_ERROR:"Browser notifikacije nisu omogućene jer ih vaš pregledač aktivno blokira. Pokušajte pogledati postavke ili koristiti neki drugi pregledač.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} demo notifikacija`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Ako karticu pregledača ostavite otvorenu, pojaviće se ovaj pop-up kada neko razgovara s vama.",SEND_BUTTON_TEXT:"Pošalji",ENTRYBOX_TEXT_LIMIT:"Dozvoljeno je samo 10.000 znakova.",ENTRYBOX_PLACEHOLDER:"Kaži nešto...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Ovaj razgovor više nije aktivan.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Možete da čitate, ali ne i da šaljete poruke.",MESSAGELIST_LOADING_OLDER:"Učitavam starije poruke...",MESSAGELIST_SHOW_OLDER:"Prikaži starije poruke",MESSAGELIST_NEW_MARKER:"Novo",MESSAGE_SENT_VIA_EMAIL:"Ova poruka je poslana imejlom",YOU_MARKER:"ti",UPLOAD_IN_PROGRESS:"Učitavam...",UPLOAD_SEND_FILE:"Pošalji datoteku",UPLOAD_SHARE_LOCATION:"Podeli lokaciju",UPLOAD_ERROR:"Nažalost, nešto je pošlo krivo. Datoteka možda nije podržana ili je prevelika.",SHARE_LOCATION_ERROR:"Nije moguće podeliti lokaciju: ",LOADING:"Učitavam...",HUB_EMPTY:"Ovde će biti prikazana istorija razgovora",HUB_SHOW_EARLIER:"Prikaži ranije razgovore",INBOX_NO_CHATS_TITLE:"Nema razgovora!",INBOX_NO_CHATS_BODY:"Nakon što vodite jedan ili više razgovora, oni će se pojaviti ovde.",ENABLE_TRANSLATION:"Prevedi ovaj razgovor na srpski jezik",DISABLE_TRANSLATION:"Prikaži original",SEARCH_PLACEHOLDER_TEXT:"Pretraži...",SEARCH_SEARCHING:"Pretraživanje...",SEARCH_NO_RESULTS:"Nema rezultata",SEARCH_NO_MORE_RESULTS:"Nema više rezultata",SEARCH_RESULTS_CONVERSATIONS:"Razgovori",SEARCH_RESULTS_MESSAGES:"Poruke",SEARCH_RESULTS_SHOW_MORE:"Prikaži više",CHAT_NOT_FOUND:"Ćaskanje nije pronađeno",DELETE_MESSAGE:"Izbriši poruku",DELETION_EXPLANATION:"Ako obrišete ovu poruku, ona neće biti vidljiva ni za koga.",EDIT_MESSAGE:"Ispravi poruku",SAVE:"Sačuvaj",EDITED_INDICATOR:"ispravljeno",REPLY_TO_MESSAGE:"Odgovorite",ADD_REACTION:"Dodaj reakciju",AUTH_EXPIRED_OVERLAY_TITLE:"Vaša sesija ćaskanja je istekla",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Osvežite stranicu da biste nastavili",VOICE_MESSAGE:"Glasovna poruka",CONTACT_INFORMATION_HIDDEN:"Sakrivene informacije",LEAVE_CONVERSATION:"Napusti razgovor",MARK_CONVERSATION_AS_UNREAD:"Označi kao nepročitanu",STATUS_INDICATOR_ONLINE:"Aktivan",STATUS_INDICATOR_OFFLINE:"Neaktivan",ARIA_LEAVE_SEARCH_MODE:"Напусти режим претраге",ARIA_SEARCH_UP:"Тражи горе",ARIA_SEARCH_DOWN:"Тражи доле",ARIA_CLOSE_CHAT_POPUP:"Затвори прозор ћаскања",ARIA_SEARCH_INSIDE_CONVERSATION:"Тражи у овом разговору",ARIA_SEARCH:"Тражи",ARIA_CHAT:"Ћаскање",ARIA_SET_PLAYBACK_SPEED:"постави брзину репродукције",ARIA_CANCEL_UPLOAD:"Откажи отпремање",ARIA_STOP_RECORDING:"Заустави снимање",ARIA_CANCEL_RECORDING:"Откажи снимање",ARIA_INSERT_EMOJI:"Уметни емоџи",ARIA_PLAY_AUDIO:"репродукуј аудио",ARIA_PAUSE_AUDIO:"паузирај аудио",ARIA_REACTION_COUNT:(t,e)=>`${t} реакција са ${e}`,ARIA_MORE_ACTIONS:"Више радњи",ARIA_REPLYING_TO:(t,e)=>`Одговарање кориснику ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Izađi iz moda odgovaranja",SELECT_CONVERSATION:"Izaberite razgovor"}},sv:{code:"sv-SE",name:"Swedish (Sweden)",emojiPickerTranslationUrl:null,emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/sv/emojibase/data.json",translation:{YESTERDAY:"Igår",TODAY:"Idag",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"just nu",LOCATION:"Plats",CANCEL:"Avbryt",INBOX:"Inkorg",DESKTOP_NOTIFICATIONS:"Webbläsarnotiser",DESKTOP_NOTIFICATIONS_ERROR:"Kan inte aktivera webbläsarnotiser eftersom din webbläsare aktivt blockerar dem. Se över inställningarna eller använd en annan webbläsare.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} demonotis`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Om du har fliken i webbläsaren öppen så kommer den här notisen visas när någon pratar med dig.",SEND_BUTTON_TEXT:"Skicka",ENTRYBOX_TEXT_LIMIT:"Max 10 000 tecken är tillåtet.",ENTRYBOX_PLACEHOLDER:"Skriv ett meddelande...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Den här konversationen är inte längre aktiv.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Du kan läsa men inte skicka meddelanden.",MESSAGELIST_LOADING_OLDER:"Läser in tidigare meddelanden...",MESSAGELIST_SHOW_OLDER:"Visa tidigare meddelanden",MESSAGELIST_NEW_MARKER:"Nytt",MESSAGE_SENT_VIA_EMAIL:"Detta meddelande skickades via e-post",YOU_MARKER:"du",UPLOAD_IN_PROGRESS:"Laddar upp...",UPLOAD_SEND_FILE:"Skicka fil",UPLOAD_SHARE_LOCATION:"Dela plats",UPLOAD_ERROR:"Något gick fel vid uppladdningen. Filen kan vara av en typ som inte stöds eller är för stor.",SHARE_LOCATION_ERROR:"Kan inte dela plats: ",LOADING:"Laddar...",HUB_EMPTY:"Din chatthistorik kommer att visas här",HUB_SHOW_EARLIER:"Visa tidigare chattar",INBOX_NO_CHATS_TITLE:"Inga chattar ännu!",INBOX_NO_CHATS_BODY:"När du har haft en eller flera konversationer kommer de att visas här.",ENABLE_TRANSLATION:"Översätt den här konversationen till svenska",DISABLE_TRANSLATION:"Visa original",SEARCH_PLACEHOLDER_TEXT:"Sök...",SEARCH_SEARCHING:"Söker...",SEARCH_NO_RESULTS:"Inga resultat hittades",SEARCH_NO_MORE_RESULTS:"Inga fler resultat",SEARCH_RESULTS_CONVERSATIONS:"Konversationer",SEARCH_RESULTS_MESSAGES:"Meddelanden",SEARCH_RESULTS_SHOW_MORE:"Visa mer",CHAT_NOT_FOUND:"Chatten hittades inte",DELETE_MESSAGE:"Radera meddelandet",DELETION_EXPLANATION:"Om du raderar det här meddelandet försvinner det för alla.",EDIT_MESSAGE:"Redigera meddelandet",SAVE:"Spara",EDITED_INDICATOR:"redigerad",REPLY_TO_MESSAGE:"Svara",ADD_REACTION:"Lägg till reaktion",AUTH_EXPIRED_OVERLAY_TITLE:"Din chatsession har gått ut",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Uppdatera sidan för att fortsätta",VOICE_MESSAGE:"Röstmeddelande",CONTACT_INFORMATION_HIDDEN:"Dold information",LEAVE_CONVERSATION:"Lämna konversationen",MARK_CONVERSATION_AS_UNREAD:"Markera som oläst",STATUS_INDICATOR_ONLINE:"Online",STATUS_INDICATOR_OFFLINE:"Offline",ARIA_LEAVE_SEARCH_MODE:"Avsluta sökläge",ARIA_SEARCH_UP:"Sök uppåt",ARIA_SEARCH_DOWN:"Sök nedåt",ARIA_CLOSE_CHAT_POPUP:"Stäng chattfönstret",ARIA_SEARCH_INSIDE_CONVERSATION:"Sök i denna konversation",ARIA_SEARCH:"Sök",ARIA_CHAT:"Chatt",ARIA_SET_PLAYBACK_SPEED:"Ställ in uppspelningshastighet",ARIA_CANCEL_UPLOAD:"Avbryt uppladdning",ARIA_STOP_RECORDING:"Stoppa inspelning",ARIA_CANCEL_RECORDING:"Avbryt inspelning",ARIA_INSERT_EMOJI:"Infoga en emoji",ARIA_PLAY_AUDIO:"Spela upp ljud",ARIA_PAUSE_AUDIO:"Pausa ljud",ARIA_REACTION_COUNT:(t,e)=>`${t} Reaktioner med ${e}`,ARIA_MORE_ACTIONS:"Fler åtgärder",ARIA_REPLYING_TO:(t,e)=>`Svarar på ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Avsluta svarsläge",SELECT_CONVERSATION:"Välj en konversation"}},th:{code:"th-TH",name:"Thai",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"เมื่อวาน",TODAY:"วันนี้",DAYS:"วัน",HOURS:"ชม.",MINUTES:"น.",JUST_NOW:"เมื่อสักครู่",LOCATION:"ตำแหน่งที่ตั้ง",CANCEL:"ยกเลิก",INBOX:"กล่องข้อความ",DESKTOP_NOTIFICATIONS:"การแจ้งเตือนในเบราว์เซอร์",DESKTOP_NOTIFICATIONS_ERROR:"ไม่สามารถเปิดใช้งานการแจ้งเตือนในเบราว์เซอร์ได้ เนื่องจากเบราว์เซอร์ของคุณกำลังบล็อกการแจ้งเตือนอยู่ ลองตรวจสอบการตั้งค่าหรือใช้เบราว์เซอร์อื่น",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`การแจ้งเตือนตัวอย่างของ ${t}`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"หากคุณเปิดแท็บเบราว์เซอร์นี้ไว้ คุณจะเห็นการแจ้งเตือนนี้เมื่อมีคนส่งข้อความถึงคุณ",SEND_BUTTON_TEXT:"ส่ง",ENTRYBOX_TEXT_LIMIT:"อนุญาตให้พิมพ์ได้สูงสุด 10,000 ตัวอักษร",ENTRYBOX_PLACEHOLDER:"พิมพ์ข้อความ...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"การสนทนานี้ไม่เปิดใช้งานอีกต่อไป",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"คุณสามารถอ่านข้อความได้ แต่ไม่สามารถส่งข้อความได้",MESSAGELIST_LOADING_OLDER:"กำลังโหลดข้อความเก่า...",MESSAGELIST_SHOW_OLDER:"แสดงข้อความเก่า",MESSAGELIST_NEW_MARKER:"ใหม่",MESSAGE_SENT_VIA_EMAIL:"ข้อความนี้ถูกส่งผ่านอีเมล",YOU_MARKER:"คุณ",UPLOAD_IN_PROGRESS:"กำลังอัปโหลด...",UPLOAD_SEND_FILE:"ส่งไฟล์",UPLOAD_SHARE_LOCATION:"แชร์ตำแหน่งที่ตั้ง",UPLOAD_ERROR:"ขออภัย เกิดข้อผิดพลาดระหว่างการอัปโหลด ไฟล์อาจไม่รองรับหรือมีขนาดใหญ่เกินไป",SHARE_LOCATION_ERROR:"ไม่สามารถแชร์ตำแหน่งที่ตั้งได้: ",LOADING:"กำลังโหลด...",HUB_EMPTY:"ประวัติการสนทนาของคุณจะแสดงที่นี่",HUB_SHOW_EARLIER:"แสดงการสนทนาก่อนหน้า",INBOX_NO_CHATS_TITLE:"ยังไม่มีการสนทนา!",INBOX_NO_CHATS_BODY:"เมื่อคุณมีการสนทนาอย่างน้อยหนึ่งรายการ การสนทนาเหล่านั้นจะแสดงที่นี่",ENABLE_TRANSLATION:"แปลการสนทนานี้เป็นภาษาไทย",DISABLE_TRANSLATION:"แสดงต้นฉบับ",SEARCH_PLACEHOLDER_TEXT:"ค้นหา...",SEARCH_SEARCHING:"กำลังค้นหา...",SEARCH_NO_RESULTS:"ไม่พบผลลัพธ์",SEARCH_NO_MORE_RESULTS:"ไม่มีผลลัพธ์เพิ่มเติม",SEARCH_RESULTS_CONVERSATIONS:"การสนทนา",SEARCH_RESULTS_MESSAGES:"ข้อความ",SEARCH_RESULTS_SHOW_MORE:"แสดงเพิ่มเติม",CHAT_NOT_FOUND:"ไม่พบการสนทนา",DELETE_MESSAGE:"ลบข้อความ",DELETION_EXPLANATION:"หากคุณลบข้อความนี้ ข้อความจะหายไปสำหรับทุกคน",EDIT_MESSAGE:"แก้ไขข้อความ",SAVE:"บันทึก",EDITED_INDICATOR:"แก้ไขแล้ว",REPLY_TO_MESSAGE:"ตอบกลับ",ADD_REACTION:"เพิ่มปฏิกิริยา",AUTH_EXPIRED_OVERLAY_TITLE:"เซสชันแชทของคุณหมดอายุแล้ว",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"รีเฟรชหน้าเพื่อดำเนินการต่อ",VOICE_MESSAGE:"ข้อความเสียง",LEAVE_CONVERSATION:"ออกจากการสนทนา",MARK_CONVERSATION_AS_UNREAD:"ทำเครื่องหมายว่ายังไม่ได้อ่าน",STATUS_INDICATOR_ONLINE:"ออนไลน์",STATUS_INDICATOR_OFFLINE:"ออฟไลน์",CONTACT_INFORMATION_HIDDEN:"ข้อมูลถูกซ่อน",ARIA_LEAVE_SEARCH_MODE:"ออกจากโหมดค้นหา",ARIA_SEARCH_UP:"ค้นหาขึ้น",ARIA_SEARCH_DOWN:"ค้นหาลง",ARIA_CLOSE_CHAT_POPUP:"ปิดหน้าต่างแชท",ARIA_SEARCH_INSIDE_CONVERSATION:"ค้นหาภายในการสนทนานี้",ARIA_SEARCH:"ค้นหา",ARIA_CHAT:"แชท",ARIA_SET_PLAYBACK_SPEED:"ตั้งค่าความเร็วการเล่น",ARIA_CANCEL_UPLOAD:"ยกเลิกการอัปโหลด",ARIA_STOP_RECORDING:"หยุดการบันทึก",ARIA_CANCEL_RECORDING:"ยกเลิกการบันทึก",ARIA_INSERT_EMOJI:"แทรกอีโมจิ",ARIA_PLAY_AUDIO:"เล่นเสียง",ARIA_PAUSE_AUDIO:"หยุดเสียงชั่วคราว",ARIA_REACTION_COUNT:(t,e)=>`${t} ปฏิกิริยาด้วย ${e}`,ARIA_MORE_ACTIONS:"การดำเนินการเพิ่มเติม",ARIA_REPLYING_TO:(t,e)=>`กำลังตอบกลับ ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"ออกจากโหมดตอบกลับ",SELECT_CONVERSATION:"เลือกการสนทนา"}},tr:{code:"tr-TR",name:"Turkish",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/tr.js",emojiDataUrl:null,translation:{YESTERDAY:"Dün",TODAY:"Bugün",DAYS:"g",HOURS:"s",MINUTES:"d",JUST_NOW:"az önce",LOCATION:"Konum",CANCEL:"İptal",INBOX:"Gelen Kutusu",SEND_BUTTON_TEXT:"Gönder",ENTRYBOX_TEXT_LIMIT:"En fazla 10.000 karaktere izin veriliyor.",ENTRYBOX_PLACEHOLDER:"Bir şeyler söyle...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Bu konuşma artık aktif değil.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Mesajları okuyabilirsiniz ancak mesaj gönderemezsiniz.",MESSAGELIST_LOADING_OLDER:"Eski mesajlar yükleniyor...",MESSAGELIST_SHOW_OLDER:"Eski mesajları göster",MESSAGELIST_NEW_MARKER:"Yeni",DESKTOP_NOTIFICATIONS:"Tarayıcı bildirimleri",DESKTOP_NOTIFICATIONS_ERROR:"Tarayıcınız aktif olarak engellediğinden tarayıcı bildirimlerini etkinleştiremiyoruz. Ayarları kontrol etmeyi veya farklı bir tarayıcı kullanmayı deneyebilirsiniz.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} test bildirimi`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Eğer tarayıcınızın penceresini açık tutarsanız biri mesaj yazdığında bu bildirimi göreceksiniz.",MESSAGE_SENT_VIA_EMAIL:"Bu mesaj e-posta ile gönderilmiştir.",YOU_MARKER:"siz",UPLOAD_IN_PROGRESS:"Yükleniyor...",UPLOAD_SEND_FILE:"Dosya gönder",UPLOAD_SHARE_LOCATION:"Konum paylaş",UPLOAD_ERROR:"Yükleme sırasında bir şeyler yanlış gitti. Dosya desteklenmiyor veya izin verilenden büyük olabilir.",SHARE_LOCATION_ERROR:"Konum paylaşılamadı: ",LOADING:"Yükleniyor...",HUB_EMPTY:"Konuşma geçmişiniz burada görünecek",HUB_SHOW_EARLIER:"Önceki konuşmaları göster",INBOX_NO_CHATS_TITLE:"Henüz konuşma yok!",INBOX_NO_CHATS_BODY:"Bir veya daha fazla konuşma başlattığınız konuşmalar burada belirecek.",ENABLE_TRANSLATION:"Bu konuşmayı Türkçe'ye çevir",DISABLE_TRANSLATION:"Orijinali göster",SEARCH_PLACEHOLDER_TEXT:"Ara...",SEARCH_SEARCHING:"Arıyor...",SEARCH_NO_RESULTS:"Sonuç bulunamadı",SEARCH_NO_MORE_RESULTS:"Başka sonuç bulunamadı.",SEARCH_RESULTS_CONVERSATIONS:"Konuşmalar",SEARCH_RESULTS_MESSAGES:"Mesajlar",SEARCH_RESULTS_SHOW_MORE:"Daha fazla göster",CHAT_NOT_FOUND:"Sohbet bulunamadı",DELETE_MESSAGE:"Mesajı sil",DELETION_EXPLANATION:"Bu mesajı silerseniz herkes için görünmez olacaktır.",EDIT_MESSAGE:"Mesajı düzenle",SAVE:"Kaydet",EDITED_INDICATOR:"düzenlenmiş",REPLY_TO_MESSAGE:"Yanıtla",ADD_REACTION:"Tepki ekle",AUTH_EXPIRED_OVERLAY_TITLE:"Sohbet oturumunuz sona erdi",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Devam etmek için sayfayı yenileyin",VOICE_MESSAGE:"Sesli mesaj",CONTACT_INFORMATION_HIDDEN:"Gizli bilgi",LEAVE_CONVERSATION:"Konuşmadan ayrıl",MARK_CONVERSATION_AS_UNREAD:"Okunmamış olarak işaretle",STATUS_INDICATOR_ONLINE:"Aktif",STATUS_INDICATOR_OFFLINE:"Uzakta",ARIA_LEAVE_SEARCH_MODE:"Arama modundan çık",ARIA_SEARCH_UP:"Yukarı ara",ARIA_SEARCH_DOWN:"Aşağı ara",ARIA_CLOSE_CHAT_POPUP:"Sohbet penceresini kapat",ARIA_SEARCH_INSIDE_CONVERSATION:"Bu konuşmada ara",ARIA_SEARCH:"Ara",ARIA_CHAT:"Sohbet",ARIA_SET_PLAYBACK_SPEED:"oynatma hızını ayarla",ARIA_CANCEL_UPLOAD:"Yüklemeyi iptal et",ARIA_STOP_RECORDING:"Kaydı durdur",ARIA_CANCEL_RECORDING:"Kaydı iptal et",ARIA_INSERT_EMOJI:"Emoji ekle",ARIA_PLAY_AUDIO:"sesi oynat",ARIA_PAUSE_AUDIO:"sesi duraklat",ARIA_REACTION_COUNT:(t,e)=>`${t} tepki (${e})`,ARIA_MORE_ACTIONS:"Daha fazla işlem",ARIA_REPLYING_TO:(t,e)=>`${t}'a yanıtlama: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Yanıt modundan çık",SELECT_CONVERSATION:"Bir konuşma seçin"}},uk:{code:"uk-UA",name:"Ukrainian (Ukraine)",emojiPickerTranslationUrl:null,emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/uk/cldr/data.json",translation:{YESTERDAY:"Вчора",TODAY:"Сьогодні",DAYS:"d",HOURS:"h",MINUTES:"м",JUST_NOW:"просто зараз",LOCATION:"Місцезнаходження",CANCEL:"Скасувати",INBOX:"Вхідні",DESKTOP_NOTIFICATIONS:"Сповіщення в браузері",DESKTOP_NOTIFICATIONS_ERROR:"Неможливо ввімкнути сповіщення в браузері, оскільки ваш веб-переглядач активно їх блокує. Спробуйте переглянути налаштування або використовувати інший браузер.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`Демо-повідомлення про ${t}`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Якщо ви відкриєте вкладку веб-переглядача відкритою, ви побачите це спливаюче вікно, коли хтось спілкується з вами.",SEND_BUTTON_TEXT:"Надіслати",ENTRYBOX_TEXT_LIMIT:"Дозволено лише 10 000 символів.",ENTRYBOX_PLACEHOLDER:"Скажи щось...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Ця розмова більше не активна.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Ви можете читати, але не надсилати повідомлення.",MESSAGELIST_LOADING_OLDER:"Завантаження старих повідомлень...",MESSAGELIST_SHOW_OLDER:"Показати старіші повідомлення",MESSAGELIST_NEW_MARKER:"Нові",MESSAGE_SENT_VIA_EMAIL:"Це повідомлення надіслано електронною поштою",YOU_MARKER:"ти",UPLOAD_IN_PROGRESS:"Завантаження...",UPLOAD_SEND_FILE:"Надіслати файл",UPLOAD_SHARE_LOCATION:"Поділитися місцезнаходженням",UPLOAD_ERROR:"На жаль, під час завантаження щось не вдалось. Файл може бути непідтримуваним або занадто великим.",SHARE_LOCATION_ERROR:"Неможливо поділити місцезнаходження: ",LOADING:"Завантаження...",HUB_EMPTY:"Тут відобразиться ваша історія чатів",HUB_SHOW_EARLIER:"Показати попередні чати",INBOX_NO_CHATS_TITLE:"Чатів ще немає!",INBOX_NO_CHATS_BODY:"Після того, як ви проведете одну чи кілька бесід, вони з’являться тут.",ENABLE_TRANSLATION:"Перекласти цю розмову англійською",DISABLE_TRANSLATION:"Показати оригінал",SEARCH_PLACEHOLDER_TEXT:"Пошук...",SEARCH_SEARCHING:"Пошук...",SEARCH_NO_RESULTS:"Не знайдено результатів",SEARCH_NO_MORE_RESULTS:"Більше немає результатів",SEARCH_RESULTS_CONVERSATIONS:"Розмови",SEARCH_RESULTS_MESSAGES:"Повідомлення",SEARCH_RESULTS_SHOW_MORE:"Показати більше",CHAT_NOT_FOUND:"Чат не знайдено",DELETE_MESSAGE:"Видалити повідомлення",DELETION_EXPLANATION:"Якщо ви видалите це повідомлення, воно зникне для всіх.",EDIT_MESSAGE:"Редагувати повідомлення",SAVE:"Зберегти",EDITED_INDICATOR:"відредаговано",REPLY_TO_MESSAGE:"Відповісти",ADD_REACTION:"Додати реакцію",AUTH_EXPIRED_OVERLAY_TITLE:"Ваша сесія в чаті закінчилась",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Оновіть сторінку, щоб продовжити",VOICE_MESSAGE:"Голосове повідомлення",CONTACT_INFORMATION_HIDDEN:"Прихована інформація",LEAVE_CONVERSATION:"Залишити розмову",MARK_CONVERSATION_AS_UNREAD:"Відзначити як непрочитане",STATUS_INDICATOR_ONLINE:"Активний",STATUS_INDICATOR_OFFLINE:"Відсутній",ARIA_LEAVE_SEARCH_MODE:"Вийти з режиму пошуку",ARIA_SEARCH_UP:"Шукати вгору",ARIA_SEARCH_DOWN:"Шукати вниз",ARIA_CLOSE_CHAT_POPUP:"Закрити вікно чату",ARIA_SEARCH_INSIDE_CONVERSATION:"Шукати в цій розмові",ARIA_SEARCH:"Пошук",ARIA_CHAT:"Чат",ARIA_SET_PLAYBACK_SPEED:"встановити швидкість відтворення",ARIA_CANCEL_UPLOAD:"Скасувати завантаження",ARIA_STOP_RECORDING:"Зупинити запис",ARIA_CANCEL_RECORDING:"Скасувати запис",ARIA_INSERT_EMOJI:"Вставити емодзі",ARIA_PLAY_AUDIO:"відтворити аудіо",ARIA_PAUSE_AUDIO:"призупинити аудіо",ARIA_REACTION_COUNT:(t,e)=>`${t} реакцій з ${e}`,ARIA_MORE_ACTIONS:"Більше дій",ARIA_REPLYING_TO:(t,e)=>`Відповідь на ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Вийти з режиму відповіді",SELECT_CONVERSATION:"Виберіть розмову"}},vi:{code:"vi-VN",name:"Vietnamese",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/vi.js",emojiDataUrl:null,translation:{YESTERDAY:"Hôm qua",TODAY:"Hôm nay",DAYS:"ngày",HOURS:"giờ",MINUTES:"phút",JUST_NOW:"vừa xong",LOCATION:"Địa điểm",CANCEL:"Hủy",INBOX:"Hộp thư đến",DESKTOP_NOTIFICATIONS:"Thông báo trình duyệt",DESKTOP_NOTIFICATIONS_ERROR:"Không thể bật thông báo trên trình duyệt vì trình duyệt của bạn đang tắt chức năng này. Hãy thử tìm trong cài đặt trình duyệt hoặc sử dụng một trình duyệt khác.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} thông báo thử nghiệm`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Nếu bạn giữ tab trình duyệt của bạn mở, bạn sẽ thấy cửa sổ bật lên khi ai đó nói chuyện với bạn.",SEND_BUTTON_TEXT:"Gửi",ENTRYBOX_TEXT_LIMIT:"Tối đa 10.000 ký tự.",ENTRYBOX_PLACEHOLDER:"Nói gì đó...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Cuộc hội thoại này không còn hoạt động.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Bạn có thể đọc, nhưng không thể gửi tin nhắn.",MESSAGELIST_LOADING_OLDER:"Đang tải tin nhắn cũ...",MESSAGELIST_SHOW_OLDER:"Hiển thị tin nhắn trước đó",MESSAGELIST_NEW_MARKER:"Mới",MESSAGE_SENT_VIA_EMAIL:"Tin nhắn này đã được gửi qua email",YOU_MARKER:"bạn",UPLOAD_IN_PROGRESS:"Đang tải lên...",UPLOAD_SEND_FILE:"Gửi tệp",UPLOAD_SHARE_LOCATION:"Chia sẻ vị trí",UPLOAD_ERROR:"Thật không may, quá trình tải lên không thành công. Tệp không được hỗ trợ hoặc quá lớn.",SHARE_LOCATION_ERROR:"Không thể chia sẻ vị trí: ",LOADING:"Đang tải...",HUB_EMPTY:"Lịch sử trò chuyện của bạn sẽ hiển thị ở đây",HUB_SHOW_EARLIER:"Hiển thị các cuộc trò chuyện trước đó",INBOX_NO_CHATS_TITLE:"Chưa có cuộc trò chuyện nào!",INBOX_NO_CHATS_BODY:"Khi bạn đã có một hoặc nhiều cuộc trò chuyện, chúng sẽ hiển thị ở đây.",ENABLE_TRANSLATION:"Dịch cuộc hội thoại sang Tiếng Việt",DISABLE_TRANSLATION:"Hiển thị nội dung gốc",SEARCH_PLACEHOLDER_TEXT:"TÌm kiếm...",SEARCH_SEARCHING:"Đang tìm kiếm...",SEARCH_NO_RESULTS:"Không tìm thấy kết quả nào",SEARCH_NO_MORE_RESULTS:"Không có kết quả nào khác",SEARCH_RESULTS_CONVERSATIONS:"Cuộc trò chuyện",SEARCH_RESULTS_MESSAGES:"Tin nhắn",SEARCH_RESULTS_SHOW_MORE:"Hiển thị thêm",CHAT_NOT_FOUND:"Không tìm thấy cuộc trò chuyện",DELETE_MESSAGE:"Xóa tin nhắn",DELETION_EXPLANATION:"Nếu bạn xóa tin nhắn này, tất cả mọi người sẽ không còn thấy nó.",EDIT_MESSAGE:"Chỉnh sửa tin nhắn",SAVE:"lưu",EDITED_INDICATOR:"đã chỉnh sửa",REPLY_TO_MESSAGE:"đáp lại",ADD_REACTION:"Thêm biểu tượng cảm xúc",AUTH_EXPIRED_OVERLAY_TITLE:"Phiên trò chuyện của bạn đã hết hạn",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Hãy làm mới trang để tiếp tục",VOICE_MESSAGE:"Tin nhắn thoại",CONTACT_INFORMATION_HIDDEN:"Thông tin ẩn",LEAVE_CONVERSATION:"Thoát khỏi cuộc trò chuyện",MARK_CONVERSATION_AS_UNREAD:"Đánh dấu là chưa đọc",STATUS_INDICATOR_ONLINE:"Hoạt động",STATUS_INDICATOR_OFFLINE:"Vắng mặt",ARIA_LEAVE_SEARCH_MODE:"Thoát chế độ tìm kiếm",ARIA_SEARCH_UP:"Tìm kiếm lên trên",ARIA_SEARCH_DOWN:"Tìm kiếm xuống dưới",ARIA_CLOSE_CHAT_POPUP:"Đóng cửa sổ trò chuyện",ARIA_SEARCH_INSIDE_CONVERSATION:"Tìm kiếm trong cuộc trò chuyện này",ARIA_SEARCH:"Tìm kiếm",ARIA_CHAT:"Trò chuyện",ARIA_SET_PLAYBACK_SPEED:"đặt tốc độ phát",ARIA_CANCEL_UPLOAD:"Hủy tải lên",ARIA_STOP_RECORDING:"Dừng ghi âm",ARIA_CANCEL_RECORDING:"Hủy ghi âm",ARIA_INSERT_EMOJI:"Chèn biểu tượng cảm xúc",ARIA_PLAY_AUDIO:"phát âm thanh",ARIA_PAUSE_AUDIO:"tạm dừng âm thanh",ARIA_REACTION_COUNT:(t,e)=>`${t} phản ứng với ${e}`,ARIA_MORE_ACTIONS:"Thêm hành động",ARIA_REPLYING_TO:(t,e)=>`Đang trả lời ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Thoát chế độ trả lời",SELECT_CONVERSATION:"Chọn một cuộc trò chuyện"}},zh:{code:"zh-CN",name:"Chinese (Simplified)",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/zh_CN.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/zh/emojibase/data.json",translation:{YESTERDAY:"昨天",TODAY:"今天",DAYS:"天",HOURS:"小时",MINUTES:"分钟",JUST_NOW:"刚才",LOCATION:"地点",CANCEL:"取消",INBOX:"收件箱",DESKTOP_NOTIFICATIONS:"浏览器通知",DESKTOP_NOTIFICATIONS_ERROR:"因浏览器设置为阻止,所以无法激活浏览器提醒。请去设置里查看或者尝试其他的浏览器。",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} 演示提醒`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"只要保持浏览器开着,如果有人和你对话,将会自动弹出对话窗口。",SEND_BUTTON_TEXT:"发送",ENTRYBOX_TEXT_LIMIT:"不超过10,000个字符。",ENTRYBOX_PLACEHOLDER:"写点什么吧……",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"该对话已结束。",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"你只能阅读信息,不能发送信息。",MESSAGELIST_LOADING_OLDER:"载入之前的信息……",MESSAGELIST_SHOW_OLDER:"显示之前的信息",MESSAGELIST_NEW_MARKER:"新消息",MESSAGE_SENT_VIA_EMAIL:"该信息已通过邮件发送。",YOU_MARKER:"你",UPLOAD_IN_PROGRESS:"上传中……",UPLOAD_SEND_FILE:"发送文件",UPLOAD_SHARE_LOCATION:"分享地址",UPLOAD_ERROR:"上传出错。文件格式不支持或者太大。",SHARE_LOCATION_ERROR:"无法分享地址: ",LOADING:"正在载入……",HUB_EMPTY:"你的聊天记录将在此显示。",HUB_SHOW_EARLIER:"显示之前的聊天记录。",INBOX_NO_CHATS_TITLE:"暂无任何聊天记录!",INBOX_NO_CHATS_BODY:"如果你有一个或多个对话窗口进行中,将显示在这里。",ENABLE_TRANSLATION:"翻译至简体中文",DISABLE_TRANSLATION:"查看原文",SEARCH_PLACEHOLDER_TEXT:"搜索...",SEARCH_SEARCHING:"正在搜索...",SEARCH_NO_RESULTS:"未找到结果",SEARCH_NO_MORE_RESULTS:"无更多结果",SEARCH_RESULTS_CONVERSATIONS:"对话",SEARCH_RESULTS_MESSAGES:"消息",SEARCH_RESULTS_SHOW_MORE:"显示更多",CHAT_NOT_FOUND:"未找到“聊天”",DELETE_MESSAGE:"删除消息",DELETION_EXPLANATION:"如果您删除此消息,那么所有人都将无法再看到它。",EDIT_MESSAGE:"编辑消息",SAVE:"保存",EDITED_INDICATOR:"本消息有改动",REPLY_TO_MESSAGE:"回复",ADD_REACTION:"添加反应",AUTH_EXPIRED_OVERLAY_TITLE:"您的聊天会话已过期",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"刷新页面以继续",VOICE_MESSAGE:"语音消息",CONTACT_INFORMATION_HIDDEN:"隐藏信息",LEAVE_CONVERSATION:"离开对话",MARK_CONVERSATION_AS_UNREAD:"标记为未读",STATUS_INDICATOR_ONLINE:"活跃",STATUS_INDICATOR_OFFLINE:"离开",ARIA_LEAVE_SEARCH_MODE:"退出搜索模式",ARIA_SEARCH_UP:"向上搜索",ARIA_SEARCH_DOWN:"向下搜索",ARIA_CLOSE_CHAT_POPUP:"关闭聊天弹窗",ARIA_SEARCH_INSIDE_CONVERSATION:"在此对话中搜索",ARIA_SEARCH:"搜索",ARIA_CHAT:"聊天",ARIA_SET_PLAYBACK_SPEED:"设置播放速度",ARIA_CANCEL_UPLOAD:"取消上传",ARIA_STOP_RECORDING:"停止录音",ARIA_CANCEL_RECORDING:"取消录音",ARIA_INSERT_EMOJI:"插入表情符号",ARIA_PLAY_AUDIO:"播放音频",ARIA_PAUSE_AUDIO:"暂停音频",ARIA_REACTION_COUNT:(t,e)=>`${t}个反应(${e})`,ARIA_MORE_ACTIONS:"更多操作",ARIA_REPLYING_TO:(t,e)=>`正在回复 ${t}:${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"退出回复模式",SELECT_CONVERSATION:"选择对话"}},zhTw:{code:"zh-TW",name:"Chinese (Traditional)",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/zh_CN.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/zh-hant/cldr/data.json",translation:{YESTERDAY:"昨天",TODAY:"昨天",DAYS:"天",HOURS:"小時",MINUTES:"分",JUST_NOW:"現在",LOCATION:"地點",CANCEL:"取消",INBOX:"收件箱",DESKTOP_NOTIFICATIONS:"瀏覽器通知",DESKTOP_NOTIFICATIONS_ERROR:"無法啟用瀏覽器通知,因為您的瀏覽器主動阻止它們。 嘗試查看設置或使用其他瀏覽器。",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} 演示通知`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"如果您持續打開瀏覽器標籤頁,當有人與您通話時,您會看到此彈出窗口。",SEND_BUTTON_TEXT:"發送",ENTRYBOX_TEXT_LIMIT:"只允許10.000個字符。",ENTRYBOX_PLACEHOLDER:"說些什麼...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"此對話不再有效。",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"您可以閱讀,但不能發送消息。",MESSAGELIST_LOADING_OLDER:"加載舊訊息...",MESSAGELIST_SHOW_OLDER:"顯示較舊的訊息",MESSAGELIST_NEW_MARKER:"新的",MESSAGE_SENT_VIA_EMAIL:"此訊息是通過電郵發送的",YOU_MARKER:"您",UPLOAD_IN_PROGRESS:"上傳中...",UPLOAD_SEND_FILE:"發送文件",UPLOAD_SHARE_LOCATION:"共享位置",UPLOAD_ERROR:"不幸的是,上傳出了問題。 該文件可能不受支持或太大。",SHARE_LOCATION_ERROR:"無法分享位置:",LOADING:"載入中...",HUB_EMPTY:"您的聊天記錄將顯示在此處",HUB_SHOW_EARLIER:"顯示早先的聊天記錄",INBOX_NO_CHATS_TITLE:"還沒聊天!",INBOX_NO_CHATS_BODY:"一旦您進行了一次或多次對話,他們就會顯示在此處。",ENABLE_TRANSLATION:"翻譯此對話至繁體中文",DISABLE_TRANSLATION:"顯示原文",SEARCH_PLACEHOLDER_TEXT:"搜尋...",SEARCH_SEARCHING:"正在搜尋...",SEARCH_NO_RESULTS:"找不到任何結果",SEARCH_NO_MORE_RESULTS:"沒有其他結果",SEARCH_RESULTS_CONVERSATIONS:"對話",SEARCH_RESULTS_MESSAGES:"訊息",SEARCH_RESULTS_SHOW_MORE:"顯示更多",CHAT_NOT_FOUND:"查無對話",DELETE_MESSAGE:"刪除訊息",DELETION_EXPLANATION:"您如果刪除這條訊息,所有人都將看不到它。",EDIT_MESSAGE:"編輯訊息",SAVE:"儲存",EDITED_INDICATOR:"已編輯",REPLY_TO_MESSAGE:"回覆",ADD_REACTION:"加入表情回應",AUTH_EXPIRED_OVERLAY_TITLE:"您的會話過程已過期",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"請刷新頁面以繼續",VOICE_MESSAGE:"語音訊息",CONTACT_INFORMATION_HIDDEN:"隱藏訊息",LEAVE_CONVERSATION:"離開對話",MARK_CONVERSATION_AS_UNREAD:"標記為未讀",STATUS_INDICATOR_ONLINE:"活躍",STATUS_INDICATOR_OFFLINE:"離開",ARIA_LEAVE_SEARCH_MODE:"離開搜尋模式",ARIA_SEARCH_UP:"向上搜尋",ARIA_SEARCH_DOWN:"向下搜尋",ARIA_CLOSE_CHAT_POPUP:"關閉聊天彈窗",ARIA_SEARCH_INSIDE_CONVERSATION:"在此對話中搜尋",ARIA_SEARCH:"搜尋",ARIA_CHAT:"聊天",ARIA_SET_PLAYBACK_SPEED:"設定播放速度",ARIA_CANCEL_UPLOAD:"取消上傳",ARIA_STOP_RECORDING:"停止錄音",ARIA_CANCEL_RECORDING:"取消錄音",ARIA_INSERT_EMOJI:"插入表情符號",ARIA_PLAY_AUDIO:"播放音訊",ARIA_PAUSE_AUDIO:"暫停音訊",ARIA_REACTION_COUNT:(t,e)=>`${t}個反應(${e})`,ARIA_MORE_ACTIONS:"更多操作",ARIA_REPLYING_TO:(t,e)=>`正在回覆 ${t}:${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"退出回覆模式",SELECT_CONVERSATION:"選擇對話"}}};var pR=class{constructor(t,e){this.currentUser$=Ao(null),this.app$=Ao(null),this.appId$=Ao(null),this.extUserId$=Ao(null),this.hasTokenFetcher$=Ao(!1),this.authTokenState$=Ao("idle"),this.themeCustom$=Ao(Fr({value:void 0})),this.highlightedStrings$=Ao([]),this.device$=Ao({supportsEmojiPicker:!!Ng,isMobile:"undefined"!=typeof window&&/Mobi/i.test(window.navigator.userAgent)}),this.errors$=Ao({unknownUser:!1,wrongAppId:!1,serverError:!1}),this.conversationSearch=null,this.messageSearch=null,this.locale$=Ao(()=>{var t,e;const n=this.extUserId$.get(),r=this.app$.appMetadata.defaultLocale.get(),i=this.currentUser$.locale.get();return null!==(t=null!==(e=n&&i)&&void 0!==e?e:r)&&void 0!==t?t:"en-US"}),this.translationData$=Ao(()=>function(t){const e=t.replace(/_/g,"-").toLowerCase(),n=hR[e];if(n)return{strings:{...n.translation,locale:e},emojiPickerTranslationUrl:n.emojiPickerTranslationUrl,emojiDataUrl:n.emojiDataUrl};const r=e.slice(0,2),i=hR[r];return i?{strings:{...i.translation,locale:r},emojiPickerTranslationUrl:i.emojiPickerTranslationUrl,emojiDataUrl:i.emojiDataUrl}:(WA.warn(`User locale '${t}' not supported; falling back to English.`),{strings:{...XA.translation,locale:"en-US"},emojiPickerTranslationUrl:XA.emojiPickerTranslationUrl,emojiDataUrl:XA.emojiDataUrl})}(this.locale$.get())),this.t$=Ao(()=>this.translationData$.strings.get()),si(()=>{this.appId$.set(t),this.extUserId$.set(e)})}updateThemeCustom(t){this.themeCustom$.set(Fr({value:t}))}};const fR={canReplyToMessage:!1,canEditMessage:!1,canDeleteMessage:!1,canAddReaction:!1};var mR=class extends pR{constructor(t,e){super(t,e),this.type="ChatboxStore",this.messageSubscriptions={},this.readyForNewMessagesPromise=Promise.resolve(),this.fileUploads={},this.renderedConversationId$=Ao(void 0),this.focusedMessage$=Ao(null),this.chatSearchState$=Ao("hidden"),this.searchQuery$=Ao(""),this.newMessageMarker$=Ao(void 0),this.state$=Ao({loadingConversationId:null,currentConversationId:null,editor:{isEmpty:!0,atTextLimit:!1,sendBlocked:!1,characterCount:0,showEmojiPicker:!1,suggestEmojiQuery:void 0,suggestMentionQuery:void 0},enterSendsMessage:!0,referencedMessageId:null,editingMessageId:null,unknownConversations:{},conversations:{},messages:{},participants:{},typing:{},isUserConnected:{},ephemeralMessages:{},ephemeralMessageIdMapping:{},localFileBlobUrls:{},currentConversation:()=>{const t=this.state$.currentConversationId.get();return t&&this.state$.conversations.child(t).get()},userPermissions:()=>{var t;const e=(null!==(t=this.app$.features.get())&&void 0!==t?t:[]).includes("search_in_conv"),n=this.app$.role.general.get(),r=this.app$.role.permissions.get();return En.defined(n),En.defined(r),{canSearch:e,showTypingIndicator:n.showTypingIndicators,canShareFile:n.enableFileTransfers,canShareLocation:n.enableLocation,canMention:n.enableMentions,showOnlineStatus:!1!==n.enablePresence,canSendVoiceMessage:n.enableVoiceRecording,canLeaveConversation:"all"===r.conversations.leave,canMarkConversationAsUnread:"all"===r.conversations.markAsUnread}},messagePermissions:()=>{const t=this.app$.role.permissions.get();En.defined(t);const e=this.state$.userPermissions.get(),n={...fR,...e},r={canReplyToMessage:ER(t.messages.reply,!0),canEditMessage:ER(t.messages.edit,!0),canDeleteMessage:ER(t.messages.delete,!0),canAddReaction:ER(t.messages.emojiReactions,!0),...e},i={...r,canEditMessage:!1},o={canReplyToMessage:ER(t.messages.reply,!1),canEditMessage:ER(t.messages.edit,!1),canDeleteMessage:ER(t.messages.delete,!1),canAddReaction:ER(t.messages.emojiReactions,!1),...e};return{system:n,own:r,ownWithoutEditing:i,other:o,otherWithoutEditing:{...o,canEditMessage:!1}}}}),this.referencedMessage$=Ao(()=>{const t=this.state$.currentConversationId.get(),e=this.state$.referencedMessageId.get();return t&&e?this.state$.messages.child(t).lookup.child(e).get():null}),this.chatItems$=Ao(()=>{var t,e,n;const r=this.state$.currentConversationId.get();if(!r)return[];const i=null!==(t=this.newMessageMarker$.get())&&void 0!==t?t:1/0,o=null!==(e=this.state$.messages.child(r).state.get())&&void 0!==e?e:[],s=Object.values(null!==(n=this.state$.ephemeralMessages.child(r).get())&&void 0!==n?n:{}),a=(0===s.length?o:s.sort((t,e)=>e.createdAt-t.createdAt).concat(o)).map(t=>{const e=t.content[0],n=null==e?void 0:e.type;if(!e||"file"!==n)return t;const i=e.size+","+e.filename,o=this.state$.localFileBlobUrls.child(r).child(i).url.get();return o?{...t,content:[{...e,url:o}]}:t});let l=null,c=0,d=!1;const h=[];for(const t of a){const e=new Date(t.createdAt),n=new Date(e).setHours(0,0,0,0),r=c&&n!==c,o=e.getTime()>i,s=!(!d||o||null!=l&&l.id.startsWith("ephemeral"));(s||r)&&h.push(new _R({id:"border-before-"+t.id,isDayMarker:!!r,isReadMarker:!!s,timestamp:r?c:void 0})),h.push(t),d=o,c=n,l=t}const p=this.extUserId$.peek();return function(t,e){const n=[];let r=[],i=null;for(const o of t)null===i||e(i,o)?r.push(o):(n.push(r),r=[o]),i=o;return 0!==r.length&&n.push(r),n}(h,(t,e)=>{return t instanceof _R&&e instanceof _R?t.id===e.id:!(t instanceof _R||e instanceof _R)&&(Math.abs(t.createdAt-e.createdAt)<=6e4&&(null===(n=t.sender)||void 0===n?void 0:n.id)===(null===(r=e.sender)||void 0===r?void 0:r.id));var n,r}).map(t=>{var e;const n=t[t.length-1];return{items:t,id:n.id,type:n instanceof _R?"divider":n.sender?(null===(e=n.sender)||void 0===e?void 0:e.id)===p?"own":"other":"system"}})})}storeTyping(t,e){this.state$.typing.child(t).set(e)}setSearchQuery(t){const e=t.trim().split(/\s+/).map(t=>t.trim()).filter(Boolean);si(()=>{this.searchQuery$.set(t),this.highlightedStrings$.set(e)})}messagePermissions$(t){const e=this.currentUser$.get();if(!e)throw new Error("Unreachable");const n=t.content[0];return t.sender?e.id===t.sender.id?"text"===n.type?this.state$.messagePermissions.own:this.state$.messagePermissions.ownWithoutEditing:"text"===n.type?this.state$.messagePermissions.other:this.state$.messagePermissions.otherWithoutEditing:this.state$.messagePermissions.system}canRenderUi(t){const e=this.app$.get(),n=this.currentUser$.get();if(null===t)return!(!e||!n);const r=this.state$.conversations.child(t).get(),i=this.state$.participants.child(t).get();return!!(e&&n&&r&&i)}storeMessages(t,e,n){si(()=>{const r=e.reduce((t,e)=>(t[e.id]=e,t),{});En(this.extUserId$.peek()),this.state$.messages.child(t).set({state:e,lookup:r,loadedAll:n});const i=this.state$.ephemeralMessages.child(t);for(const n of e){const e=this.state$.ephemeralMessageIdMapping.child(t).child(n.id).peek();if(!e)continue;i.child(e).delete();const r=n.content[0];if("file"!==r.type)continue;const o=r.size+","+r.filename,s=this.state$.localFileBlobUrls.child(t).child(o);if(!1!==s.fetching.peek())continue;const a=()=>{URL.revokeObjectURL(s.url.peek()),s.delete()};if("image"===r.subtype){s.fetching.set(!0);const t=document.createElement("img");t.addEventListener("load",a,{once:!0}),t.src=r.url}else if("video"===r.subtype){s.fetching.set(!0);const t=document.createElement("video");t.addEventListener("loadeddata",a,{once:!0}),t.src=r.url}else if("audio"===r.subtype||"voice"===r.subtype){s.fetching.set(!0);const t=document.createElement("audio");t.addEventListener("loadeddata",a,{once:!0}),t.src=r.url}}})}};function ER(t,e){return"all"===t||"own"===t&&e||"other"===t&&!e}var _R=class{constructor({id:t,isDayMarker:e,isReadMarker:n,timestamp:r}){this.id=t,this.isDayMarker=e,this.isReadMarker=n,this.timestamp=e?r:void 0}};function AR(t,e=!1){return function(t,e=!1){return t.map(t=>{if("string"==typeof t)return t;switch(t.type){case"bold":return"*"+AR(t.children)+"*";case"italic":return"_"+AR(t.children)+"_";case"strikethrough":return"~"+AR(t.children)+"~";case"blockquote":return AR(t.children).split("\n").map(t=>"> "+t).join("\n")+"\n";case"autolink":case"autoLink":case"suppressed":case"emoji":return t.text;case"codeblock":case"codeBlock":return"```"+t.language+"\n"+t.text+"```";case"codespan":case"codeSpan":return"```"+t.text+"```";case"mention":return e?`<!!mention:${t.id}|${t.text}>`:`@${t.text}`;case"customemoji":case"customEmoji":return e?`<!!customemoji:${t.text}>`:t.text;case"link":return`<${t.url}|${AR(t.children)}>`;case"actionlink":case"actionLink":case"actionbutton":case"actionButton":return function(t){const e=new URLSearchParams(t.params).toString(),n=e?t.action+"?"+e:t.action;return`<${t.type}:${n}|${AR(t.children)}>`}(t);case"bulletlist":case"bulletList":return"\n"+AR(t.children);case"bulletpoint":case"bulletPoint":return"- "+AR(t.children)+"\n"}}).join("")}(t,e).trim()}var gR=class{constructor(t,e,n,r,i,o){this.send=e,this.attachFile=n,this.shareLocation=r,this.toggleEmojiPicker=i,this.recordVoiceMessage=o,this.isEmpty=t.isEmpty,this.sendBlocked=t.sendBlocked,this.atTextLimit=t.atTextLimit,this.characterCount=t.characterCount,this.showEmojiPicker=t.showEmojiPicker}};function SR(t,e){let n=0;return(...r)=>{n&&(clearTimeout(n),n=0),n=setTimeout(()=>{t(...r)},e)}}function vR(t){return new Promise(e=>setTimeout(e,t))}function OR(t,e){const n=Ao(t);return Hi(t=>{const r=n.peek();let i=!0;const o=e(r);!function(t){return!!t&&"object"==typeof t&&"function"==typeof t.then}(o)?n.set(o):o.then(t=>{i&&n.set(t)}),t.onCleanup=()=>{i=!1}}),n}var DR=class{constructor(t,e,n){this.state$=t,this.device$=e,this.userPermissions$=n,this.currentDoc=tA.EMPTY,this.maxLength=1e4,this.sendBlockedSemaphore=0,this.markAsTyping=function(t,e){let n=!1;return(...r)=>{if(!n)return n=!0,setTimeout(()=>{n=!1},e),t(...r)}}(()=>{var t;null===(t=this.controller)||void 0===t||t.markAsTyping()},5e3),this._suggesterKeydownHandlers={emoji:void 0,mention:void 0},this.toggleEmojiPicker=t=>{var e;const n=this.state$.showEmojiPicker;null!==(e=t)&&void 0!==e||(t=!n.peek()),n.set(t),!1===t&&this.focus()},this.spellcheck$=Ao(),this.placeholder$=Ao()}async blockSend(t){this.sendBlockedSemaphore++,this.state$.sendBlocked.set(!0);try{await t()}finally{this.sendBlockedSemaphore--,this.state$.sendBlocked.set(this.sendBlockedSemaphore>0)}}setEditorView(t){if(this.editorView=t,t&&this.pendingFocusOptions){const t=this.pendingFocusOptions;this.pendingFocusOptions=void 0,this.focus(t)}}emojiSuggesterPlugin(){if(this.device$.peek().supportsEmojiPicker)return G_({debug:!1,matcher:W_(X_,Np),onEnter:t=>this.suggestEmoji(t.text,t.range),onChange:t=>this.suggestEmoji(t.text,t.range),onExit:()=>this.onExitSuggester(),onKeyDown:({event:t})=>{var e,n,r;return null!==(e=null===(n=(r=this._suggesterKeydownHandlers).emoji)||void 0===n?void 0:n.call(r,t.key))&&void 0!==e&&e}})}mentionsPlugin(){const t=this.userPermissions$.peek();if(En.defined(t),t.canMention)return G_({debug:!1,matcher:W_(K_,Np),onEnter:t=>this.suggestMention(t.text,t.range),onChange:t=>this.suggestMention(t.text,t.range),onExit:()=>this.onExitSuggester(),onKeyDown:({event:t})=>{var e,n,r;return null!==(e=null===(n=(r=this._suggesterKeydownHandlers).mention)||void 0===n?void 0:n.call(r,t.key))&&void 0!==e&&e}})}closeSuggester(){En.defined(this._suggestionRange),function(t,e){const{from:n,to:r}=e,i=t.state.tr.addMark(n,r,Np.marks.literal.create());t.dispatch(i)}(this.editorView,this._suggestionRange)}listenKeydown(t,e){this._suggesterKeydownHandlers[t]=e}onExitSuggester(){this._suggestionRange=void 0,this.state$.suggestEmojiQuery.set(void 0),this.state$.suggestMentionQuery.set(void 0)}suggestEmoji(t,e){t.length<2||(this._suggestionRange=e,this.state$.suggestEmojiQuery.set(t))}suggestMention(t,e){t.length<1||(this._suggestionRange=e,this.state$.suggestMentionQuery.set(t))}onPasteImage(t){En.defined(this.uploadFile),this.uploadFile(t)}onChange(t){var e;this.currentDoc=t;const n=t.size>this.maxLength&&t.asText().length>this.maxLength;t.hasContent&&this.markAsTyping(),this.state$.assign({atTextLimit:n,isEmpty:!t.hasNonWhitespaceContent(),characterCount:0===t.size?0:t.size-2}),null===(e=this.controller)||void 0===e||e.storeDraft(()=>t.asText())}setMaxLength(t){this.maxLength=t}focus(t={}){if(!this.editorView)return void(this.pendingFocusOptions=t);const{skipProseMirrorStuff:e=!1}=t;e?this.editorView.dom.focus():this.editorView.focus()}setText(t){this.editorView&&function(t,e){const n=t.state.doc.content.size,r=e.split(/(<!!(?:mention|customemoji):.*?>)/g).filter(t=>t||t.length).map(t=>{const[e,n,r]=t.match(/<!!mention:(.*)\|(.*)>/)||[null];if(e&&n&&r)return Q_(n,r);const[i,o]=t.match(/<!!customemoji:(.*?)>/)||[null];return i&&o?Z_(o):Np.text(t)}),i=t.state.tr.replaceWith(0,n,r);t.dispatch(i)}(this.editorView,t)}typeText(t){this.editorView&&function(t,e,n="replace"){const r=t.state.doc.content.size,i="insert"==n?t.state.tr.insertText(e):t.state.tr.insertText(e,0,r);t.dispatch(i)}(this.editorView,t,"insert")}getText(){return this.currentDoc.asText().trim()}clearText(){this.editorView&&function(t){const e=t.state.doc.content.size,n=t.state.tr.insertText("",0,e);t.dispatch(n)}(this.editorView)}selectEmoji(t){En.defined(this.editorView),function(t,e,n){const r=Z_(e);if(n){const{from:e,to:r}=n,i=t.state.tr.deleteRange(e,r);t.dispatch(i)}const i=t.state.tr.replaceSelectionWith(r,!1);t.dispatch(i)}(this.editorView,t,this._suggestionRange),this.focus()}selectMention(t){En.defined(this.editorView),function(t,e,n){const r=Q_(e.id,e.name);let i=t.state.tr;if(n){const{from:t,to:e}=n;i=i.replaceRangeWith(t,e,r)}else i=i.replaceSelectionWith(r,!1);i=i.insertText(" "),t.dispatch(i)}(this.editorView,t,this._suggestionRange),this.focus()}};const TR=(()=>{if("undefined"!=typeof window){let t;try{t=window.localStorage;const e="__storage_test__";return t.setItem(e,e),t.removeItem(e),!0}catch(e){return e instanceof DOMException&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&t&&0!==t.length}}return!1})(),RR={};TR?(RR.setItem=window.localStorage.setItem.bind(window.localStorage),RR.getItem=window.localStorage.getItem.bind(window.localStorage),RR.removeItem=window.localStorage.removeItem.bind(window.localStorage),RR.isSupported=!0):(RR.setItem=function(){},RR.getItem=function(){return null},RR.removeItem=function(){},RR.isSupported=!1),RR.set=(t,e)=>RR.setItem(t,JSON.stringify(e)),RR.get=t=>JSON.parse(RR.getItem(t)||"null");const yR=function(t,e){let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>e(...r),t)}}(200,(t,e,n,r)=>{const i=IR(t,e,n),o=JSON.parse(RR.getItem("talkjs_drafts")||"{}"),s=r();s.match(/^\s*$/)?delete o[i]:o[i]=s,RR.setItem("talkjs_drafts",JSON.stringify(o))}),IR=(t,e,n)=>`draft_${t}_${e}_${n}`;function CR(t,e,n,r){return new(n||(n=Promise))(function(i,o){function s(t){try{l(r.next(t))}catch(t){o(t)}}function a(t){try{l(r.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(s,a)}l((r=r.apply(t,e||[])).next())})}Xe();var NR=class{constructor(){this.listeners={}}on(t,e,n){if(this.listeners[t]||(this.listeners[t]=new Set),null==n?void 0:n.once){const n=(...r)=>{this.un(t,n),e(...r)};return this.listeners[t].add(n),()=>this.un(t,n)}return this.listeners[t].add(e),()=>this.un(t,e)}un(t,e){var n;null===(n=this.listeners[t])||void 0===n||n.delete(e)}once(t,e){return this.on(t,e,{once:!0})}unAll(){this.listeners={}}emit(t,...e){this.listeners[t]&&this.listeners[t].forEach(t=>t(...e))}},bR=class extends NR{constructor(t){super(),this.subscriptions=[],this.isDestroyed=!1,this.options=t}onInit(){}_init(t){this.isDestroyed&&(this.subscriptions=[],this.isDestroyed=!1),this.wavesurfer=t,this.onInit()}destroy(){this.emit("destroy"),this.subscriptions.forEach(t=>t()),this.subscriptions=[],this.isDestroyed=!0,this.wavesurfer=void 0}},wR=class extends NR{constructor(){super(...arguments),this.animationFrameId=null,this.isRunning=!1}start(){if(this.isRunning)return;this.isRunning=!0;const t=()=>{this.isRunning&&(this.emit("tick"),this.animationFrameId=requestAnimationFrame(t))};t()}stop(){this.isRunning=!1,null!==this.animationFrameId&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=null)}destroy(){this.stop()}};const kR=["audio/webm","audio/wav","audio/mpeg","audio/mp4","audio/mp3"];var LR=class tS extends bR{constructor(t){var e,n,r,i,o,s;super(Object.assign(Object.assign({},t),{audioBitsPerSecond:null!==(e=t.audioBitsPerSecond)&&void 0!==e?e:128e3,scrollingWaveform:null!==(n=t.scrollingWaveform)&&void 0!==n&&n,scrollingWaveformWindow:null!==(r=t.scrollingWaveformWindow)&&void 0!==r?r:5,continuousWaveform:null!==(i=t.continuousWaveform)&&void 0!==i&&i,renderRecordedAudio:null===(o=t.renderRecordedAudio)||void 0===o||o,mediaRecorderTimeslice:null!==(s=t.mediaRecorderTimeslice)&&void 0!==s?s:void 0})),this.stream=null,this.mediaRecorder=null,this.dataWindow=null,this.isWaveformPaused=!1,this.lastStartTime=0,this.lastDuration=0,this.duration=0,this.micStream=null,this.recordedBlobUrl=null,this.timer=new wR,this.subscriptions.push(this.timer.on("tick",()=>{const t=performance.now()-this.lastStartTime;this.duration=this.isPaused()?this.duration:this.lastDuration+t,this.emit("record-progress",this.duration)}))}static create(t){return new tS(t||{})}renderMicStream(t){var e;const n=new AudioContext,r=n.createMediaStreamSource(t),i=n.createAnalyser();r.connect(i),(this.options.continuousWaveform||this.options.scrollingWaveform)&&(i.fftSize=32);const o=i.frequencyBinCount,s=new Float32Array(o);let a=0;this.wavesurfer&&(null!==(e=this.originalOptions)&&void 0!==e||(this.originalOptions=Object.assign({},this.wavesurfer.options)),this.wavesurfer.options.interact=!1,this.options.scrollingWaveform&&(this.wavesurfer.options.cursorWidth=0,this.wavesurfer.options.normalize=!0,this.wavesurfer.options.maxPeak=1));const l=setInterval(()=>{var t,e,n,r;if(!this.isWaveformPaused){if(i.getFloatTimeDomainData(s),this.options.scrollingWaveform){const t=Math.floor(100*(this.options.scrollingWaveformWindow||0));let e=0;for(let t=0;t<o;t++){const n=Math.abs(s[t]);n>e&&(e=n)}this.dataWindow||(this.dataWindow=new Float32Array(t));const n=new Float32Array(t);if(this.dataWindow&&this.dataWindow.length>0){const e=t-1,r=this.dataWindow.slice(-e);n.set(r,0)}n[t-1]=e,this.dataWindow=n}else if(this.options.continuousWaveform){if(!this.dataWindow){const n=this.options.continuousWaveformDuration?Math.round(100*this.options.continuousWaveformDuration):(null!==(e=null===(t=this.wavesurfer)||void 0===t?void 0:t.getWidth())&&void 0!==e?e:0)*window.devicePixelRatio;this.dataWindow=new Float32Array(n)}let n=0;for(let t=0;t<o;t++){const e=Math.abs(s[t]);e>n&&(n=e)}if(a+1>this.dataWindow.length){const t=new Float32Array(2*this.dataWindow.length);t.set(this.dataWindow,0),this.dataWindow=t}this.dataWindow[a]=n,a++}else this.dataWindow=s;if(this.wavesurfer){const t=(null!==(r=null===(n=this.dataWindow)||void 0===n?void 0:n.length)&&void 0!==r?r:0)/100;this.wavesurfer.load("",[this.dataWindow],this.options.scrollingWaveform?this.options.scrollingWaveformWindow:t).then(()=>{this.wavesurfer&&this.options.continuousWaveform&&(this.wavesurfer.setTime(this.getDuration()/1e3),this.wavesurfer.options.minPxPerSec||this.wavesurfer.setOptions({minPxPerSec:this.wavesurfer.getWidth()/this.wavesurfer.getDuration()}))}).catch(t=>{console.error("Error rendering real-time recording data:",t)})}}},10);return{onDestroy:()=>{clearInterval(l),null==r||r.disconnect(),null==n||n.close()},onEnd:()=>{this.isWaveformPaused=!0,this.stopMic()}}}startMic(t){return CR(this,void 0,void 0,function*(){let e;this.micStream&&this.stopMic();try{e=yield navigator.mediaDevices.getUserMedia({audio:null==t||t})}catch(t){throw new Error("Error accessing the microphone: "+t.message)}const n=this.renderMicStream(e);return this.micStream=n,this.unsubscribeDestroy=this.once("destroy",n.onDestroy),this.unsubscribeRecordEnd=this.once("record-end",n.onEnd),this.stream=e,e})}stopMic(){var t,e,n;null===(t=this.micStream)||void 0===t||t.onDestroy(),null===(e=this.unsubscribeDestroy)||void 0===e||e.call(this),null===(n=this.unsubscribeRecordEnd)||void 0===n||n.call(this),this.micStream=null,this.unsubscribeDestroy=void 0,this.unsubscribeRecordEnd=void 0,this.stream&&(this.stream.getTracks().forEach(t=>t.stop()),this.stream=null,this.mediaRecorder=null)}startRecording(t){return CR(this,void 0,void 0,function*(){const e=this.stream||(yield this.startMic(t));this.dataWindow=null;const n=this.mediaRecorder||new MediaRecorder(e,{mimeType:this.options.mimeType||kR.find(t=>MediaRecorder.isTypeSupported(t)),audioBitsPerSecond:this.options.audioBitsPerSecond});this.mediaRecorder=n,this.stopRecording();const r=[];n.ondataavailable=t=>{t.data.size>0&&r.push(t.data),this.emit("record-data-available",t.data)};const i=t=>{var e;const i=new Blob(r,{type:n.mimeType});this.emit(t,i),this.options.renderRecordedAudio&&(this.applyOriginalOptionsIfNeeded(),this.recordedBlobUrl&&URL.revokeObjectURL(this.recordedBlobUrl),this.recordedBlobUrl=URL.createObjectURL(i),null===(e=this.wavesurfer)||void 0===e||e.load(this.recordedBlobUrl))};n.onpause=()=>i("record-pause"),n.onstop=()=>i("record-end"),n.start(this.options.mediaRecorderTimeslice),this.lastStartTime=performance.now(),this.lastDuration=0,this.duration=0,this.isWaveformPaused=!1,this.timer.start(),this.emit("record-start")})}getDuration(){return this.duration}isRecording(){var t;return"recording"===(null===(t=this.mediaRecorder)||void 0===t?void 0:t.state)}isPaused(){var t;return"paused"===(null===(t=this.mediaRecorder)||void 0===t?void 0:t.state)}isActive(){var t;return"inactive"!==(null===(t=this.mediaRecorder)||void 0===t?void 0:t.state)}stopRecording(){var t;this.isActive()&&(null===(t=this.mediaRecorder)||void 0===t||t.stop(),this.timer.stop())}pauseRecording(){var t,e;this.isRecording()&&(this.isWaveformPaused=!0,null===(t=this.mediaRecorder)||void 0===t||t.requestData(),null===(e=this.mediaRecorder)||void 0===e||e.pause(),this.timer.stop(),this.lastDuration=this.duration)}resumeRecording(){var t;this.isPaused()&&(this.isWaveformPaused=!1,null===(t=this.mediaRecorder)||void 0===t||t.resume(),this.timer.start(),this.lastStartTime=performance.now(),this.emit("record-resume"))}static getAvailableAudioDevices(){return CR(this,void 0,void 0,function*(){return navigator.mediaDevices.enumerateDevices().then(t=>t.filter(t=>"audioinput"===t.kind))})}destroy(){this.applyOriginalOptionsIfNeeded(),super.destroy(),this.stopRecording(),this.stopMic(),this.recordedBlobUrl&&(URL.revokeObjectURL(this.recordedBlobUrl),this.recordedBlobUrl=null)}applyOriginalOptionsIfNeeded(){this.wavesurfer&&this.originalOptions&&(this.wavesurfer.setOptions(this.originalOptions),delete this.originalOptions)}},MR=l((t,e)=>{var n,r;n="undefined"!=typeof self?self:t,r=function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e||4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){(function(e){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function a(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}();return function(){var n,i=l(t);if(e){var o=l(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return function(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}(this,n)}}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var c,d=n(2),h=d.EventTarget,p=d.defineEventAttribute,f=(0,n(3).detect)(),m=e.AudioContext||e.webkitAudioContext,E=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(d,t);var n,r,l,c=a(d);function d(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,d);var i=n.mimeType,o=n.audioBitsPerSecond,s=(n.videoBitsPerSecond,n.bitsPerSecond),a=r.encoderWorkerFactory,l=r.OggOpusEncoderWasmPath,h=r.WebMOpusEncoderWasmPath;if((e=c.call(this))._stream=t,e._state="inactive",e._mimeType=i||"",e._audioBitsPerSecond=o||s,e.workerState="inactive",!d.isTypeSupported(e._mimeType))throw new TypeError("invalid arguments, a MIME Type is not supported");switch(d._parseType(e._mimeType).subtype){case"wave":case"wav":e._mimeType="audio/wave";break;case"webm":e._mimeType="audio/webm";break;case"ogg":e._mimeType="audio/ogg";break;default:switch(f&&f.name){case"chrome":case"edge":default:e._mimeType="audio/webm";break;case"firefox":e._mimeType="audio/ogg";break;case"ios":case"safari":e._mimeType="audio/wave"}}switch(e._mimeType){case"audio/wave":e._wasmPath="";break;case"audio/webm":e._wasmPath=h||"";break;case"audio/ogg":e._wasmPath=l||"";break;default:throw new Error("Internal Error: Unexpected MIME Type: ".concat(e._mimeType))}var p="";return document.currentScript?p=document.currentScript.src:self.location&&(p=self.location.href),p=p.substr(0,p.lastIndexOf("/"))+"/encoderWorker.umd.js","function"==typeof d.encoderWorker&&(p=URL.createObjectURL(new Blob(["(".concat(d.encoderWorker,")()")]))),e._workerFactory="function"==typeof a?a:function(t){return new Worker(p)},e._spawnWorker(),e}return n=d,l=[{key:"isTypeSupported",value:function(t){if("string"==typeof t&&!t)return!0;try{var e=d._parseType(t),n=e.type,r=e.subtype,i=e.codec}catch(t){return!1}if("audio"!==n||"ogg"!==r&&"webm"!==r&&"wave"!==r&&"wav"!==r)return!1;switch(r){case"ogg":case"webm":if("opus"!==i&&i)return!1;break;case"wave":case"wav":if(i)return!1}return!0}},{key:"_parseType",value:function(t){try{var e=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==a.return||a.return()}finally{if(i)throw o}}return n}}(t,e)||function(t,e){if(t){if("string"==typeof t)return i(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(t,e)}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t.match(/^(\w+)\/(\w+)(;\s*codecs=(\w+))?$/),5),n=e[1],r=e[2],o=e[4]}catch(e){return"string"!=typeof t||t?null:{type:"",subtype:"",codec:""}}return{type:n,subtype:r,codec:o}}}],(r=[{key:"_spawnWorker",value:function(){var t=this;this.worker=this._workerFactory(),this.worker.onmessage=function(e){return t._onmessageFromWorker(e)},this.worker.onerror=function(e){return t._onerrorFromWorker(e)},this._postMessageToWorker("loadEncoder",{mimeType:this._mimeType,wasmPath:this._wasmPath})}},{key:"_postMessageToWorker",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};switch(t){case"loadEncoder":var r=n.mimeType,i=n.wasmPath;this.worker.postMessage({command:t,mimeType:r,wasmPath:i});break;case"init":var o=n.sampleRate,s=n.channelCount,a=n.bitsPerSecond;this.worker.postMessage({command:t,sampleRate:o,channelCount:s,bitsPerSecond:a}),this.workerState="encoding",this.source.connect(this.processor),this.processor.connect(this.context.destination);var l=new e.Event("start");this.dispatchEvent(l);break;case"pushInputData":var c=n.channelBuffers,d=n.length,h=n.duration;this.worker.postMessage({command:t,channelBuffers:c,length:d,duration:h});break;case"getEncodedData":case"done":this.worker.postMessage({command:t});break;default:throw new Error("Internal Error: Incorrect postMessage requested.")}}},{key:"_onmessageFromWorker",value:function(t){var n,r=t.data,i=r.command,o=r.buffers;switch(i){case"readyToInit":var s=this.sampleRate,a=this.channelCount;this.workerState="readyToInit","recording"===this.state&&this._postMessageToWorker("init",{sampleRate:s,channelCount:a,bitsPerSecond:this.audioBitsPerSecond});break;case"encodedData":case"lastEncodedData":var l=new Blob(o,{type:this._mimeType});(n=new e.Event("dataavailable")).data=l,this.dispatchEvent(n),"lastEncodedData"===i&&(n=new e.Event("stop"),this.dispatchEvent(n),this.workerState="closed")}}},{key:"_onerrorFromWorker",value:function(t){this.source.disconnect(),this.processor.disconnect(),this.worker.terminate(),this.workerState="closed";var n=["FileName: "+t.filename,"LineNumber: "+t.lineno,"Message: "+t.message].join(" - "),r=new e.Event("error");r.name="UnknownError",r.message=n,this.dispatchEvent(r)}},{key:"_enableAudioProcessCallback",value:function(t){var e=this,n=0;this.processor.onaudioprocess=function(r){for(var i=r.inputBuffer,o=(r.playbackTime,i.sampleRate,i.length),s=i.duration,a=i.numberOfChannels,l=new Array(a),c=0;c<a;c++)l[c]=i.getChannelData(c);var d={channelBuffers:l,length:o,duration:s};e._postMessageToWorker("pushInputData",d),(n+=s)>=t&&(e._postMessageToWorker("getEncodedData"),n=0)}}},{key:"start",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Number.MAX_SAFE_INTEGER;if("inactive"!==this.state)throw new Error("DOMException: INVALID_STATE_ERR, state must be inactive.");if(t<0)throw new TypeError("invalid arguments, timeslice should be 0 or higher.");t/=1e3,"closed"===this.workerState&&this._spawnWorker(),this.context=new m;var e=this.stream.getAudioTracks();if(!e[0])throw new Error("DOMException: UnkownError, media track not found.");if(this.channelCount=e[0].getSettings().channelCount||1,this.sampleRate=this.context.sampleRate,this.source=this.context.createMediaStreamSource(this.stream),this.processor=this.context.createScriptProcessor(4096,this.channelCount,this.channelCount),this._state="recording",this._enableAudioProcessCallback(t),"readyToInit"===this.workerState){var n=this.sampleRate,r=this.channelCount;this._postMessageToWorker("init",{sampleRate:n,channelCount:r,bitsPerSecond:this.audioBitsPerSecond})}}},{key:"stop",value:function(){if("inactive"===this.state)throw new Error("DOMException: INVALID_STATE_ERR, state must NOT be inactive.");this.source.disconnect(),this.processor.disconnect(),this.context.close(),this._postMessageToWorker("done"),this._state="inactive"}},{key:"pause",value:function(){if("inactive"===this.state)throw new Error("DOMException: INVALID_STATE_ERR, state must NOT be inactive.");this.source.disconnect(),this.processor.disconnect();var t=new e.Event("pause");this.dispatchEvent(t),this._state="paused"}},{key:"resume",value:function(){if("inactive"===this.state)throw new Error("DOMException: INVALID_STATE_ERR, state must NOT be inactive.");this.source.connect(this.processor),this.processor.connect(this.context.destination);var t=new e.Event("resume");this.dispatchEvent(t),this._state="recording"}},{key:"requestData",value:function(){if("inactive"===this.state)throw new Error("DOMException: INVALID_STATE_ERR, state must NOT be inactive.");this._postMessageToWorker("getEncodedData")}},{key:"stream",get:function(){return this._stream}},{key:"mimeType",get:function(){return this._mimeType}},{key:"state",get:function(){return this._state}},{key:"videoBitsPerSecond",get:function(){}},{key:"audioBitsPerSecond",get:function(){return this._audioBitsPerSecond}}])&&o(n.prototype,r),l&&o(n,l),d}(h);["start","stop","dataavailable","pause","resume","error"].forEach(function(t){return p(E.prototype,t)}),f&&"edge"===f.name&&(c=Worker.prototype.postMessage,Worker.prototype.postMessage=function(t){c.apply(this,[t])}),t.exports=E}).call(this,n(1))},function(t,e){var n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){n.r(e),n.d(e,"defineEventAttribute",function(){return E}),n.d(e,"EventTarget",function(){return A});const r=new WeakMap,i=new WeakMap;function o(t){const e=r.get(t);return console.assert(null!=e,"'this' is expected an Event object, but got",t),e}function s(t,e){r.set(this,{eventTarget:t,event:e,eventPhase:2,currentTarget:t,canceled:!1,stopped:!1,passiveListener:null,timeStamp:e.timeStamp||Date.now()}),Object.defineProperty(this,"isTrusted",{value:!1,enumerable:!0});const n=Object.keys(e);for(let t=0;t<n.length;++t){const e=n[t];e in this||Object.defineProperty(this,e,a(e))}}function a(t){return{get(){return o(this).event[t]},set(e){o(this).event[t]=e},configurable:!0,enumerable:!0}}function l(t){return{value(){const e=o(this).event;return e[t].apply(e,arguments)},configurable:!0,enumerable:!0}}function c(t){if(null==t||t===Object.prototype)return s;let e=i.get(t);return null==e&&(e=function(t,e){const n=Object.keys(e);if(0===n.length)return t;function r(e,n){t.call(this,e,n)}r.prototype=Object.create(t.prototype,{constructor:{value:r,configurable:!0,writable:!0}});for(let i=0;i<n.length;++i){const o=n[i];if(!(o in t.prototype)){const t="function"==typeof Object.getOwnPropertyDescriptor(e,o).value;Object.defineProperty(r.prototype,o,t?l(o):a(o))}}return r}(c(Object.getPrototypeOf(t)),t),i.set(t,e)),e}function d(t){return o(t).stopped}function h(t,e){o(t).passiveListener=e}s.prototype={get type(){return o(this).event.type},get target(){return o(this).eventTarget},get currentTarget(){return o(this).currentTarget},composedPath(){const t=o(this).currentTarget;return null==t?[]:[t]},get NONE(){return 0},get CAPTURING_PHASE(){return 1},get AT_TARGET(){return 2},get BUBBLING_PHASE(){return 3},get eventPhase(){return o(this).eventPhase},stopPropagation(){const t=o(this);"function"==typeof t.event.stopPropagation&&t.event.stopPropagation()},stopImmediatePropagation(){const t=o(this);t.stopped=!0,"function"==typeof t.event.stopImmediatePropagation&&t.event.stopImmediatePropagation()},get bubbles(){return!!o(this).event.bubbles},get cancelable(){return!!o(this).event.cancelable},preventDefault(){const t=o(this);null==t.passiveListener?t.event.cancelable&&(t.canceled=!0,"function"==typeof t.event.preventDefault&&t.event.preventDefault()):console.warn("Event#preventDefault() was called from a passive listener:",t.passiveListener)},get defaultPrevented(){return o(this).canceled},get composed(){return!!o(this).event.composed},get timeStamp(){return o(this).timeStamp}},Object.defineProperty(s.prototype,"constructor",{value:s,configurable:!0,writable:!0}),"undefined"!=typeof window&&void 0!==window.Event&&(Object.setPrototypeOf(s.prototype,window.Event.prototype),i.set(window.Event.prototype,s));const p=new WeakMap;function f(t){return null!==t&&"object"==typeof t}function m(t){const e=p.get(t);if(null==e)throw new TypeError("'this' is expected an EventTarget object, but got another value.");return e}function E(t,e){Object.defineProperty(t,"on"+e,function(t){return{get(){let e=m(this).get(t);for(;null!=e;){if(3===e.listenerType)return e.listener;e=e.next}return null},set(e){"function"==typeof e||f(e)||(e=null);const n=m(this);let r=null,i=n.get(t);for(;null!=i;)3===i.listenerType?null!==r?r.next=i.next:null!==i.next?n.set(t,i.next):n.delete(t):r=i,i=i.next;if(null!==e){const i={listener:e,listenerType:3,passive:!1,once:!1,next:null};null===r?n.set(t,i):r.next=i}},configurable:!0,enumerable:!0}}(e))}function _(t){function e(){A.call(this)}e.prototype=Object.create(A.prototype,{constructor:{value:e,configurable:!0,writable:!0}});for(let n=0;n<t.length;++n)E(e.prototype,t[n]);return e}function A(){if(!(this instanceof A)){if(1===arguments.length&&Array.isArray(arguments[0]))return _(arguments[0]);if(arguments.length>0){const t=new Array(arguments.length);for(let e=0;e<arguments.length;++e)t[e]=arguments[e];return _(t)}throw new TypeError("Cannot call a class as a function")}p.set(this,new Map)}A.prototype={addEventListener(t,e,n){if(null==e)return!1;if("function"!=typeof e&&!f(e))throw new TypeError("'listener' should be a function or an object.");const r=m(this),i=f(n),o=(i?n.capture:n)?1:2,s={listener:e,listenerType:o,passive:i&&!!n.passive,once:i&&!!n.once,next:null};let a=r.get(t);if(void 0===a)return r.set(t,s),!0;let l=null;for(;null!=a;){if(a.listener===e&&a.listenerType===o)return!1;l=a,a=a.next}return l.next=s,!0},removeEventListener(t,e,n){if(null==e)return!1;const r=m(this),i=(f(n)?n.capture:n)?1:2;let o=null,s=r.get(t);for(;null!=s;){if(s.listener===e&&s.listenerType===i)return null!==o?o.next=s.next:null!==s.next?r.set(t,s.next):r.delete(t),!0;o=s,s=s.next}return!1},dispatchEvent(t){if(null==t||"string"!=typeof t.type)throw new TypeError('"event.type" should be a string.');const e=m(this),n=t.type;let r=e.get(n);if(null==r)return!0;const i=(s=this,a=t,new(c(Object.getPrototypeOf(a)))(s,a));var s,a;let l=null;for(;null!=r;){if(r.once?null!==l?l.next=r.next:null!==r.next?e.set(n,r.next):e.delete(n):l=r,h(i,r.passive?r.listener:null),"function"==typeof r.listener)try{r.listener.call(this,i)}catch(s){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(s)}else 3!==r.listenerType&&"function"==typeof r.listener.handleEvent&&r.listener.handleEvent(i);if(d(i))break;r=r.next}return h(i,null),function(t){o(t).eventPhase=0}(i),function(t){o(t).currentTarget=null}(i),!i.defaultPrevented}},Object.defineProperty(A.prototype,"constructor",{value:A,configurable:!0,writable:!0}),"undefined"!=typeof window&&void 0!==window.EventTarget&&Object.setPrototypeOf(A.prototype,window.EventTarget.prototype),e.default=A},function(t,e,n){(function(t){var n=this&&this.__spreadArrays||function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),i=0;for(e=0;e<n;e++)for(var o=arguments[e],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r};Object.defineProperty(e,"__esModule",{value:!0});var r=function(t,e,n){this.name=t,this.version=e,this.os=n};e.BrowserInfo=r;var i=function(e){this.version=e,this.name="node",this.os=t.platform};e.NodeInfo=i;var o=function(){this.bot=!0,this.name="bot",this.version=null,this.os=null};e.BotInfo=o;var s=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["vivaldi",/Vivaldi\/([0-9\.]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/Edg\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FBAV\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],a=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/],["Search Bot",/(nuhk)|(Googlebot)|(Yammybot)|(Openbot)|(Slurp)|(MSNBot)|(Ask Jeeves\/Teoma)|(ia_archiver)/]];function l(t){var e=""!==t&&s.reduce(function(e,n){var r=n[0],i=n[1];if(e)return e;var o=i.exec(t);return!!o&&[r,o]},!1);if(!e)return null;var i=e[0],a=e[1];if("searchbot"===i)return new o;var l=a[1]&&a[1].split(/[._]/).slice(0,3);return l?l.length<3&&(l=n(l,function(t){for(var e=[],n=0;n<t;n++)e.push("0");return e}(3-l.length))):l=[],new r(i,l.join("."),c(t))}function c(t){for(var e=0,n=a.length;e<n;e++){var r=a[e],i=r[0];if(r[1].test(t))return i}return null}function d(){return void 0!==t&&t.version?new i(t.version.slice(1)):null}e.detect=function(t){return t?l(t):"undefined"!=typeof navigator?l(navigator.userAgent):d()},e.parseUserAgent=l,e.detectOS=c,e.getNodeVersion=d}).call(this,n(4))},function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(t){r=s}}();var l,c=[],d=!1,h=-1;function p(){d&&l&&(d=!1,l.length?c=l.concat(c):h=-1,c.length&&f())}function f(){if(!d){var t=a(p);d=!0;for(var e=c.length;e;){for(l=c,c=[];++h<e;)l&&l[h].run();h=-1,e=c.length}l=null,d=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function m(t,e){this.fun=t,this.array=e}function E(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new m(t,e)),1!==c.length||d||a(f)},m.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=E,i.addListener=E,i.once=E,i.off=E,i.removeListener=E,i.removeAllListeners=E,i.emit=E,i.prependListener=E,i.prependOnceListener=E,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}}])},"object"==typeof t&&"object"==typeof e?e.exports=r():"function"==typeof define&&define.amd?define([],r):"object"==typeof t?t.OpusMediaRecorder=r():n.OpusMediaRecorder=r()}),PR=h(MR(),1);const xR='var wn = (lt, pt) => () => (pt || (lt((pt = { exports: {} }).exports, pt), lt = null), pt.exports), Cn = (/* @__PURE__ */ wn(((lt, pt) => {\n\t(function(R, d) {\n\t\ttypeof WorkerGlobalScope != "undefined" && self instanceof WorkerGlobalScope ? d()() : typeof lt == "object" && typeof pt == "object" ? pt.exports = d() : typeof define == "function" && define.amd ? define([], d) : typeof lt == "object" ? lt.encoderWorker = d() : R.encoderWorker = d();\n\t})(typeof OpusMediaRecorder != "undefined" ? OpusMediaRecorder : typeof self != "undefined" ? self : lt, function() {\n\t\treturn function() {\n\t\t\t(function(T) {\n\t\t\t\tvar R = {};\n\t\t\t\tfunction d(v) {\n\t\t\t\t\tif (R[v]) return R[v].exports;\n\t\t\t\t\tvar p = R[v] = {\n\t\t\t\t\t\ti: v,\n\t\t\t\t\t\tl: !1,\n\t\t\t\t\t\texports: {}\n\t\t\t\t\t};\n\t\t\t\t\treturn T[v].call(p.exports, p, p.exports, d), p.l = !0, p.exports;\n\t\t\t\t}\n\t\t\t\td.m = T, d.c = R, d.d = function(v, p, B) {\n\t\t\t\t\td.o(v, p) || Object.defineProperty(v, p, {\n\t\t\t\t\t\tenumerable: !0,\n\t\t\t\t\t\tget: B\n\t\t\t\t\t});\n\t\t\t\t}, d.r = function(v) {\n\t\t\t\t\ttypeof Symbol != "undefined" && Symbol.toStringTag && Object.defineProperty(v, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(v, "__esModule", { value: !0 });\n\t\t\t\t}, d.t = function(v, p) {\n\t\t\t\t\tif (1 & p && (v = d(v)), 8 & p || 4 & p && typeof v == "object" && v && v.__esModule) return v;\n\t\t\t\t\tvar B = /* @__PURE__ */ Object.create(null);\n\t\t\t\t\tif (d.r(B), Object.defineProperty(B, "default", {\n\t\t\t\t\t\tenumerable: !0,\n\t\t\t\t\t\tvalue: v\n\t\t\t\t\t}), 2 & p && typeof v != "string") for (var O in v) d.d(B, O, function(l) {\n\t\t\t\t\t\treturn v[l];\n\t\t\t\t\t}.bind(null, O));\n\t\t\t\t\treturn B;\n\t\t\t\t}, d.n = function(v) {\n\t\t\t\t\tvar p = v && v.__esModule ? function() {\n\t\t\t\t\t\treturn v.default;\n\t\t\t\t\t} : function() {\n\t\t\t\t\t\treturn v;\n\t\t\t\t\t};\n\t\t\t\t\treturn d.d(p, "a", p), p;\n\t\t\t\t}, d.o = function(v, p) {\n\t\t\t\t\treturn Object.prototype.hasOwnProperty.call(v, p);\n\t\t\t\t}, d.p = "", d(d.s = 5);\n\t\t\t})([\n\t\t\t\tfunction(T, R, d) {\n\t\t\t\t\t(function(v) {\n\t\t\t\t\t\tfunction p(l, u) {\n\t\t\t\t\t\t\tfor (var c = 0, a = l.length - 1; a >= 0; a--) {\n\t\t\t\t\t\t\t\tvar b = l[a];\n\t\t\t\t\t\t\t\tb === "." ? l.splice(a, 1) : b === ".." ? (l.splice(a, 1), c++) : c && (l.splice(a, 1), c--);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (u) for (; c--;) l.unshift("..");\n\t\t\t\t\t\t\treturn l;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfunction B(l, u) {\n\t\t\t\t\t\t\tif (l.filter) return l.filter(u);\n\t\t\t\t\t\t\tfor (var c = [], a = 0; a < l.length; a++) u(l[a], a, l) && c.push(l[a]);\n\t\t\t\t\t\t\treturn c;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tR.resolve = function() {\n\t\t\t\t\t\t\tfor (var l = "", u = !1, c = arguments.length - 1; c >= -1 && !u; c--) {\n\t\t\t\t\t\t\t\tvar a = c >= 0 ? arguments[c] : v.cwd();\n\t\t\t\t\t\t\t\tif (typeof a != "string") throw new TypeError("Arguments to path.resolve must be strings");\n\t\t\t\t\t\t\t\ta && (l = a + "/" + l, u = a.charAt(0) === "/");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn (u ? "/" : "") + (l = p(B(l.split("/"), (function(b) {\n\t\t\t\t\t\t\t\treturn !!b;\n\t\t\t\t\t\t\t})), !u).join("/")) || ".";\n\t\t\t\t\t\t}, R.normalize = function(l) {\n\t\t\t\t\t\t\tvar u = R.isAbsolute(l), c = O(l, -1) === "/";\n\t\t\t\t\t\t\treturn (l = p(B(l.split("/"), (function(a) {\n\t\t\t\t\t\t\t\treturn !!a;\n\t\t\t\t\t\t\t})), !u).join("/")) || u || (l = "."), l && c && (l += "/"), (u ? "/" : "") + l;\n\t\t\t\t\t\t}, R.isAbsolute = function(l) {\n\t\t\t\t\t\t\treturn l.charAt(0) === "/";\n\t\t\t\t\t\t}, R.join = function() {\n\t\t\t\t\t\t\tvar l = Array.prototype.slice.call(arguments, 0);\n\t\t\t\t\t\t\treturn R.normalize(B(l, (function(u, c) {\n\t\t\t\t\t\t\t\tif (typeof u != "string") throw new TypeError("Arguments to path.join must be strings");\n\t\t\t\t\t\t\t\treturn u;\n\t\t\t\t\t\t\t})).join("/"));\n\t\t\t\t\t\t}, R.relative = function(l, u) {\n\t\t\t\t\t\t\tfunction c(w) {\n\t\t\t\t\t\t\t\tfor (var i = 0; i < w.length && w[i] === ""; i++);\n\t\t\t\t\t\t\t\tfor (var s = w.length - 1; s >= 0 && w[s] === ""; s--);\n\t\t\t\t\t\t\t\treturn i > s ? [] : w.slice(i, s - i + 1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tl = R.resolve(l).substr(1), u = R.resolve(u).substr(1);\n\t\t\t\t\t\t\tfor (var a = c(l.split("/")), b = c(u.split("/")), y = Math.min(a.length, b.length), x = y, t = 0; t < y; t++) if (a[t] !== b[t]) {\n\t\t\t\t\t\t\t\tx = t;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tvar _ = [];\n\t\t\t\t\t\t\tfor (t = x; t < a.length; t++) _.push("..");\n\t\t\t\t\t\t\treturn (_ = _.concat(b.slice(x))).join("/");\n\t\t\t\t\t\t}, R.sep = "/", R.delimiter = ":", R.dirname = function(l) {\n\t\t\t\t\t\t\tif (typeof l != "string" && (l += ""), l.length === 0) return ".";\n\t\t\t\t\t\t\tfor (var u = l.charCodeAt(0), c = u === 47, a = -1, b = !0, y = l.length - 1; y >= 1; --y) if ((u = l.charCodeAt(y)) === 47) {\n\t\t\t\t\t\t\t\tif (!b) {\n\t\t\t\t\t\t\t\t\ta = y;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else b = !1;\n\t\t\t\t\t\t\treturn a === -1 ? c ? "/" : "." : c && a === 1 ? "/" : l.slice(0, a);\n\t\t\t\t\t\t}, R.basename = function(l, u) {\n\t\t\t\t\t\t\tvar c = (function(a) {\n\t\t\t\t\t\t\t\ttypeof a != "string" && (a += "");\n\t\t\t\t\t\t\t\tvar b, y = 0, x = -1, t = !0;\n\t\t\t\t\t\t\t\tfor (b = a.length - 1; b >= 0; --b) if (a.charCodeAt(b) === 47) {\n\t\t\t\t\t\t\t\t\tif (!t) {\n\t\t\t\t\t\t\t\t\t\ty = b + 1;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else x === -1 && (t = !1, x = b + 1);\n\t\t\t\t\t\t\t\treturn x === -1 ? "" : a.slice(y, x);\n\t\t\t\t\t\t\t})(l);\n\t\t\t\t\t\t\treturn u && c.substr(-1 * u.length) === u && (c = c.substr(0, c.length - u.length)), c;\n\t\t\t\t\t\t}, R.extname = function(l) {\n\t\t\t\t\t\t\ttypeof l != "string" && (l += "");\n\t\t\t\t\t\t\tfor (var u = -1, c = 0, a = -1, b = !0, y = 0, x = l.length - 1; x >= 0; --x) {\n\t\t\t\t\t\t\t\tvar t = l.charCodeAt(x);\n\t\t\t\t\t\t\t\tif (t !== 47) a === -1 && (b = !1, a = x + 1), t === 46 ? u === -1 ? u = x : y !== 1 && (y = 1) : u !== -1 && (y = -1);\n\t\t\t\t\t\t\t\telse if (!b) {\n\t\t\t\t\t\t\t\t\tc = x + 1;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn u === -1 || a === -1 || y === 0 || y === 1 && u === a - 1 && u === c + 1 ? "" : l.slice(u, a);\n\t\t\t\t\t\t};\n\t\t\t\t\t\tvar O = "ab".substr(-1) === "b" ? function(l, u, c) {\n\t\t\t\t\t\t\treturn l.substr(u, c);\n\t\t\t\t\t\t} : function(l, u, c) {\n\t\t\t\t\t\t\treturn u < 0 && (u = l.length + u), l.substr(u, c);\n\t\t\t\t\t\t};\n\t\t\t\t\t}).call(this, d(2));\n\t\t\t\t},\n\t\t\t\tfunction(T, R) {\n\t\t\t\t\tfunction d(i) {\n\t\t\t\t\t\treturn (d = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(s) {\n\t\t\t\t\t\t\treturn typeof s;\n\t\t\t\t\t\t} : function(s) {\n\t\t\t\t\t\t\treturn s && typeof Symbol == "function" && s.constructor === Symbol && s !== Symbol.prototype ? "symbol" : typeof s;\n\t\t\t\t\t\t})(i);\n\t\t\t\t\t}\n\t\t\t\t\tfunction v(i, s) {\n\t\t\t\t\t\tif (typeof s != "function" && s !== null) throw new TypeError("Super expression must either be null or a function");\n\t\t\t\t\t\ti.prototype = Object.create(s && s.prototype, { constructor: {\n\t\t\t\t\t\t\tvalue: i,\n\t\t\t\t\t\t\twritable: !0,\n\t\t\t\t\t\t\tconfigurable: !0\n\t\t\t\t\t\t} }), s && p(i, s);\n\t\t\t\t\t}\n\t\t\t\t\tfunction p(i, s) {\n\t\t\t\t\t\treturn (p = Object.setPrototypeOf || function(h, C) {\n\t\t\t\t\t\t\treturn h.__proto__ = C, h;\n\t\t\t\t\t\t})(i, s);\n\t\t\t\t\t}\n\t\t\t\t\tfunction B(i) {\n\t\t\t\t\t\tvar s = (function() {\n\t\t\t\t\t\t\tif (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1;\n\t\t\t\t\t\t\tif (typeof Proxy == "function") return !0;\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\treturn Date.prototype.toString.call(Reflect.construct(Date, [], (function() {}))), !0;\n\t\t\t\t\t\t\t} catch (h) {\n\t\t\t\t\t\t\t\treturn !1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})();\n\t\t\t\t\t\treturn function() {\n\t\t\t\t\t\t\tvar h, C = l(i);\n\t\t\t\t\t\t\tif (s) {\n\t\t\t\t\t\t\t\tvar E = l(this).constructor;\n\t\t\t\t\t\t\t\th = Reflect.construct(C, arguments, E);\n\t\t\t\t\t\t\t} else h = C.apply(this, arguments);\n\t\t\t\t\t\t\treturn O(this, h);\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t\tfunction O(i, s) {\n\t\t\t\t\t\treturn !s || d(s) !== "object" && typeof s != "function" ? (function(h) {\n\t\t\t\t\t\t\tif (h === void 0) throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");\n\t\t\t\t\t\t\treturn h;\n\t\t\t\t\t\t})(i) : s;\n\t\t\t\t\t}\n\t\t\t\t\tfunction l(i) {\n\t\t\t\t\t\treturn (l = Object.setPrototypeOf ? Object.getPrototypeOf : function(s) {\n\t\t\t\t\t\t\treturn s.__proto__ || Object.getPrototypeOf(s);\n\t\t\t\t\t\t})(i);\n\t\t\t\t\t}\n\t\t\t\t\tfunction u(i, s) {\n\t\t\t\t\t\tif (!(i instanceof s)) throw new TypeError("Cannot call a class as a function");\n\t\t\t\t\t}\n\t\t\t\t\tfunction c(i, s) {\n\t\t\t\t\t\tfor (var h = 0; h < s.length; h++) {\n\t\t\t\t\t\t\tvar C = s[h];\n\t\t\t\t\t\t\tC.enumerable = C.enumerable || !1, C.configurable = !0, "value" in C && (C.writable = !0), Object.defineProperty(i, C.key, C);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tfunction a(i, s, h) {\n\t\t\t\t\t\treturn s && c(i.prototype, s), h && c(i, h), i;\n\t\t\t\t\t}\n\t\t\t\t\tvar b = (function() {\n\t\t\t\t\t\tfunction i(s, h, C, E) {\n\t\t\t\t\t\t\tswitch (u(this, i), this._size = h, this._module = s, this._size) {\n\t\t\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t\t\tthis._heapArray = C ? this._module.HEAP8 : this._module.HEAPU8;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\t\tthis._heapArray = C ? this._module.HEAP16 : this._module.HEAPU16;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 4:\n\t\t\t\t\t\t\t\t\tthis._heapArray = C ? this._module.HEAP32 : this._module.HEAPU32;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tdefault: this._heapArray = this._module.HEAPU8;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tE && (this._size = 4, this._heapArray = this._module.HEAPF32), this._pointer = this._module._malloc(h);\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn a(i, [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tkey: "free",\n\t\t\t\t\t\t\t\tvalue: function() {\n\t\t\t\t\t\t\t\t\tthis._module._free(this.pointer);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tkey: "pointer",\n\t\t\t\t\t\t\t\tget: function() {\n\t\t\t\t\t\t\t\t\treturn this._pointer;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tkey: "value",\n\t\t\t\t\t\t\t\tget: function() {\n\t\t\t\t\t\t\t\t\tvar s = 0;\n\t\t\t\t\t\t\t\t\tswitch (this._size) {\n\t\t\t\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\t\t\t\ts = 1;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase 4:\n\t\t\t\t\t\t\t\t\t\t\ts = 2;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tdefault: throw new Error("Pointer can be only deferenced as integer-sized");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\treturn this._heapArray[this.pointer >> s];\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tset: function(s) {\n\t\t\t\t\t\t\t\t\tvar h = 0;\n\t\t\t\t\t\t\t\t\tswitch (this._size) {\n\t\t\t\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\t\t\t\th = 1;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase 4:\n\t\t\t\t\t\t\t\t\t\t\th = 2;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tdefault: throw new Error("Pointer can be only deferenced as integer-sized");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tthis._heapArray[this.pointer >> h] = s;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t]), i;\n\t\t\t\t\t})(), y = (function(i) {\n\t\t\t\t\t\tv(h, i);\n\t\t\t\t\t\tvar s = B(h);\n\t\t\t\t\t\tfunction h(C, E) {\n\t\t\t\t\t\t\tvar M;\n\t\t\t\t\t\t\treturn u(this, h), M = s.call(this, C, 4, !0, !1), E !== void 0 && (M.value = E), M;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn h;\n\t\t\t\t\t})(b), x = (function(i) {\n\t\t\t\t\t\tv(h, i);\n\t\t\t\t\t\tvar s = B(h);\n\t\t\t\t\t\tfunction h(C, E) {\n\t\t\t\t\t\t\tvar M;\n\t\t\t\t\t\t\treturn u(this, h), M = s.call(this, C, 4, !1, !1), E !== void 0 && (M.value = E), M;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn h;\n\t\t\t\t\t})(b), t = (function(i) {\n\t\t\t\t\t\tv(h, i);\n\t\t\t\t\t\tvar s = B(h);\n\t\t\t\t\t\tfunction h(C, E, M, J, Y) {\n\t\t\t\t\t\t\tvar j;\n\t\t\t\t\t\t\tu(this, h), j = s.call(this, C, E * M, J, Y);\n\t\t\t\t\t\t\tvar k = 0;\n\t\t\t\t\t\t\tswitch (M) {\n\t\t\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t\t\tj._heapArray = J ? j._module.HEAP8 : j._module.HEAPU8, k = 0;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\t\tj._heapArray = J ? j._module.HEAP16 : j._module.HEAPU16, k = 1;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 4:\n\t\t\t\t\t\t\t\t\tj._heapArray = J ? j._module.HEAP32 : j._module.HEAPU32, k = 2;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tdefault: throw new Error("Unit size must be an integer-size");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tY && (j._heapArray = j._module.HEAPF32, k = 2);\n\t\t\t\t\t\t\tvar N = j._pointer >> k;\n\t\t\t\t\t\t\treturn j._buffer = j._heapArray.subarray(N, N + E), j._length = E, j;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn a(h, [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tkey: "set",\n\t\t\t\t\t\t\t\tvalue: function(C, E) {\n\t\t\t\t\t\t\t\t\tthis._buffer.set(C, E);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tkey: "subarray",\n\t\t\t\t\t\t\t\tvalue: function(C, E) {\n\t\t\t\t\t\t\t\t\treturn this._buffer.subarray(C, E);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tkey: "length",\n\t\t\t\t\t\t\t\tget: function() {\n\t\t\t\t\t\t\t\t\treturn this._length;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t]), h;\n\t\t\t\t\t})(b), _ = (function(i) {\n\t\t\t\t\t\tv(h, i);\n\t\t\t\t\t\tvar s = B(h);\n\t\t\t\t\t\tfunction h(C, E) {\n\t\t\t\t\t\t\treturn u(this, h), s.call(this, C, E, 4, !0, !0);\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn h;\n\t\t\t\t\t})(t), w = (function(i) {\n\t\t\t\t\t\tv(h, i);\n\t\t\t\t\t\tvar s = B(h);\n\t\t\t\t\t\tfunction h(C, E) {\n\t\t\t\t\t\t\treturn u(this, h), s.call(this, C, E, 1, !1, !1);\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn h;\n\t\t\t\t\t})(t);\n\t\t\t\t\tT.exports = {\n\t\t\t\t\t\twriteString: function(i, s, h) {\n\t\t\t\t\t\t\tfor (var C = 0; C < h.length; C++) i.setUint8(s + C, h.charCodeAt(C));\n\t\t\t\t\t\t},\n\t\t\t\t\t\tEmscriptenMemoryAllocator: (function() {\n\t\t\t\t\t\t\tfunction i(s) {\n\t\t\t\t\t\t\t\tu(this, i), this._module = s;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn a(i, [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tkey: "mallocInt32",\n\t\t\t\t\t\t\t\t\tvalue: function(s) {\n\t\t\t\t\t\t\t\t\t\treturn new y(this._module, s);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tkey: "mallocUint32",\n\t\t\t\t\t\t\t\t\tvalue: function(s) {\n\t\t\t\t\t\t\t\t\t\treturn new x(this._module, s);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tkey: "mallocUint8Buffer",\n\t\t\t\t\t\t\t\t\tvalue: function(s) {\n\t\t\t\t\t\t\t\t\t\treturn new w(this._module, s);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tkey: "mallocFloat32Buffer",\n\t\t\t\t\t\t\t\t\tvalue: function(s) {\n\t\t\t\t\t\t\t\t\t\treturn new _(this._module, s);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t]), i;\n\t\t\t\t\t\t})()\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\tfunction(T, R) {\n\t\t\t\t\tvar d, v, p = T.exports = {};\n\t\t\t\t\tfunction B() {\n\t\t\t\t\t\tthrow new Error("setTimeout has not been defined");\n\t\t\t\t\t}\n\t\t\t\t\tfunction O() {\n\t\t\t\t\t\tthrow new Error("clearTimeout has not been defined");\n\t\t\t\t\t}\n\t\t\t\t\tfunction l(w) {\n\t\t\t\t\t\tif (d === setTimeout) return setTimeout(w, 0);\n\t\t\t\t\t\tif ((d === B || !d) && setTimeout) return d = setTimeout, setTimeout(w, 0);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\treturn d(w, 0);\n\t\t\t\t\t\t} catch (i) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\treturn d.call(null, w, 0);\n\t\t\t\t\t\t\t} catch (s) {\n\t\t\t\t\t\t\t\treturn d.call(this, w, 0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t(function() {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\td = typeof setTimeout == "function" ? setTimeout : B;\n\t\t\t\t\t\t} catch (w) {\n\t\t\t\t\t\t\td = B;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tv = typeof clearTimeout == "function" ? clearTimeout : O;\n\t\t\t\t\t\t} catch (w) {\n\t\t\t\t\t\t\tv = O;\n\t\t\t\t\t\t}\n\t\t\t\t\t})();\n\t\t\t\t\tvar u, c = [], a = !1, b = -1;\n\t\t\t\t\tfunction y() {\n\t\t\t\t\t\ta && u && (a = !1, u.length ? c = u.concat(c) : b = -1, c.length && x());\n\t\t\t\t\t}\n\t\t\t\t\tfunction x() {\n\t\t\t\t\t\tif (!a) {\n\t\t\t\t\t\t\tvar w = l(y);\n\t\t\t\t\t\t\ta = !0;\n\t\t\t\t\t\t\tfor (var i = c.length; i;) {\n\t\t\t\t\t\t\t\tfor (u = c, c = []; ++b < i;) u && u[b].run();\n\t\t\t\t\t\t\t\tb = -1, i = c.length;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tu = null, a = !1, (function(s) {\n\t\t\t\t\t\t\t\tif (v === clearTimeout) return clearTimeout(s);\n\t\t\t\t\t\t\t\tif ((v === O || !v) && clearTimeout) return v = clearTimeout, clearTimeout(s);\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tv(s);\n\t\t\t\t\t\t\t\t} catch (h) {\n\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\treturn v.call(null, s);\n\t\t\t\t\t\t\t\t\t} catch (C) {\n\t\t\t\t\t\t\t\t\t\treturn v.call(this, s);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})(w);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tfunction t(w, i) {\n\t\t\t\t\t\tthis.fun = w, this.array = i;\n\t\t\t\t\t}\n\t\t\t\t\tfunction _() {}\n\t\t\t\t\tp.nextTick = function(w) {\n\t\t\t\t\t\tvar i = new Array(arguments.length - 1);\n\t\t\t\t\t\tif (arguments.length > 1) for (var s = 1; s < arguments.length; s++) i[s - 1] = arguments[s];\n\t\t\t\t\t\tc.push(new t(w, i)), c.length !== 1 || a || l(x);\n\t\t\t\t\t}, t.prototype.run = function() {\n\t\t\t\t\t\tthis.fun.apply(null, this.array);\n\t\t\t\t\t}, p.title = "browser", p.browser = !0, p.env = {}, p.argv = [], p.version = "", p.versions = {}, p.on = _, p.addListener = _, p.once = _, p.off = _, p.removeListener = _, p.removeAllListeners = _, p.emit = _, p.prependListener = _, p.prependOnceListener = _, p.listeners = function(w) {\n\t\t\t\t\t\treturn [];\n\t\t\t\t\t}, p.binding = function(w) {\n\t\t\t\t\t\tthrow new Error("process.binding is not supported");\n\t\t\t\t\t}, p.cwd = function() {\n\t\t\t\t\t\treturn "/";\n\t\t\t\t\t}, p.chdir = function(w) {\n\t\t\t\t\t\tthrow new Error("process.chdir is not supported");\n\t\t\t\t\t}, p.umask = function() {\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\tfunction(T, R) {\n\t\t\t\t\tT.exports = function(d) {\n\t\t\t\t\t\treturn d.webpackPolyfill || (d.deprecate = function() {}, d.paths = [], d.children || (d.children = []), Object.defineProperty(d, "loaded", {\n\t\t\t\t\t\t\tenumerable: !0,\n\t\t\t\t\t\t\tget: function() {\n\t\t\t\t\t\t\t\treturn d.l;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}), Object.defineProperty(d, "id", {\n\t\t\t\t\t\t\tenumerable: !0,\n\t\t\t\t\t\t\tget: function() {\n\t\t\t\t\t\t\t\treturn d.i;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}), d.webpackPolyfill = 1), d;\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\tfunction(T, R) {},\n\t\t\t\tfunction(T, R, d) {\n\t\t\t\t\tfunction v(p) {\n\t\t\t\t\t\tvar B, O = d(6), l = d(7), u = d(8);\n\t\t\t\t\t\tp.onmessage = function(c) {\n\t\t\t\t\t\t\tvar a = c.data.command;\n\t\t\t\t\t\t\tswitch (a) {\n\t\t\t\t\t\t\t\tcase "loadEncoder":\n\t\t\t\t\t\t\t\t\tvar b, y = c.data, x = y.mimeType, t = y.wasmPath;\n\t\t\t\t\t\t\t\t\tswitch (x) {\n\t\t\t\t\t\t\t\t\t\tcase "audio/wav":\n\t\t\t\t\t\t\t\t\t\tcase "audio/wave":\n\t\t\t\t\t\t\t\t\t\t\tb = O;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase "audio/webm":\n\t\t\t\t\t\t\t\t\t\t\tb = l;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase "audio/ogg": b = u;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tvar _ = {};\n\t\t\t\t\t\t\t\t\tt && (_.locateFile = function(Y, j) {\n\t\t\t\t\t\t\t\t\t\treturn Y.match(/.wasm/) ? t : j + Y;\n\t\t\t\t\t\t\t\t\t}), b(_).then((function(Y) {\n\t\t\t\t\t\t\t\t\t\tB = Y, self.postMessage({ command: "readyToInit" });\n\t\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase "init":\n\t\t\t\t\t\t\t\t\tvar w = c.data, i = w.sampleRate, s = w.channelCount, h = w.bitsPerSecond;\n\t\t\t\t\t\t\t\t\tB.init(i, s, h);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase "pushInputData":\n\t\t\t\t\t\t\t\t\tfor (var C = c.data, E = C.channelBuffers, M = (C.length, C.duration, 0); M < E.length; M++) E[M] = new Float32Array(E[M].buffer);\n\t\t\t\t\t\t\t\t\tB.encode(E);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase "getEncodedData":\n\t\t\t\t\t\t\t\tcase "done":\n\t\t\t\t\t\t\t\t\ta === "done" && B.close();\n\t\t\t\t\t\t\t\t\tvar J = B.flush();\n\t\t\t\t\t\t\t\t\tself.postMessage({\n\t\t\t\t\t\t\t\t\t\tcommand: a === "done" ? "lastEncodedData" : "encodedData",\n\t\t\t\t\t\t\t\t\t\tbuffers: J\n\t\t\t\t\t\t\t\t\t}, J), a === "done" && self.close();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t\ttypeof WorkerGlobalScope != "undefined" && self instanceof WorkerGlobalScope && v(self), T.exports = v;\n\t\t\t\t},\n\t\t\t\tfunction(T, R, d) {\n\t\t\t\t\tfunction v(c) {\n\t\t\t\t\t\treturn (function(a) {\n\t\t\t\t\t\t\tif (Array.isArray(a)) return p(a);\n\t\t\t\t\t\t})(c) || (function(a) {\n\t\t\t\t\t\t\tif (typeof Symbol != "undefined" && Symbol.iterator in Object(a)) return Array.from(a);\n\t\t\t\t\t\t})(c) || (function(a, b) {\n\t\t\t\t\t\t\tif (a) {\n\t\t\t\t\t\t\t\tif (typeof a == "string") return p(a, b);\n\t\t\t\t\t\t\t\tvar y = Object.prototype.toString.call(a).slice(8, -1);\n\t\t\t\t\t\t\t\tif (y === "Object" && a.constructor && (y = a.constructor.name), y === "Map" || y === "Set") return Array.from(a);\n\t\t\t\t\t\t\t\tif (y === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(y)) return p(a, b);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})(c) || (function() {\n\t\t\t\t\t\t\tthrow new TypeError(`Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);\n\t\t\t\t\t\t})();\n\t\t\t\t\t}\n\t\t\t\t\tfunction p(c, a) {\n\t\t\t\t\t\t(a == null || a > c.length) && (a = c.length);\n\t\t\t\t\t\tfor (var b = 0, y = new Array(a); b < a; b++) y[b] = c[b];\n\t\t\t\t\t\treturn y;\n\t\t\t\t\t}\n\t\t\t\t\tfunction B(c, a) {\n\t\t\t\t\t\tfor (var b = 0; b < a.length; b++) {\n\t\t\t\t\t\t\tvar y = a[b];\n\t\t\t\t\t\t\ty.enumerable = y.enumerable || !1, y.configurable = !0, "value" in y && (y.writable = !0), Object.defineProperty(c, y.key, y);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tvar O = d(1).writeString, l = Int16Array.BYTES_PER_ELEMENT, u = (function() {\n\t\t\t\t\t\tfunction c(x, t, _) {\n\t\t\t\t\t\t\t(function(w, i) {\n\t\t\t\t\t\t\t\tif (!(w instanceof i)) throw new TypeError("Cannot call a class as a function");\n\t\t\t\t\t\t\t})(this, c), this.config = {\n\t\t\t\t\t\t\t\tinputSampleRate: x,\n\t\t\t\t\t\t\t\tchannelCount: t\n\t\t\t\t\t\t\t}, this.encodedBuffers = [];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvar a, b, y;\n\t\t\t\t\t\treturn a = c, (b = [{\n\t\t\t\t\t\t\tkey: "encode",\n\t\t\t\t\t\t\tvalue: function(x) {\n\t\t\t\t\t\t\t\tfor (var t = x[0].length, _ = new ArrayBuffer(t * l * this.config.channelCount), w = new DataView(_), i = 0; i < this.config.channelCount; i++) for (var s = x[i], h = 0; h < t; h++) {\n\t\t\t\t\t\t\t\t\tvar C = 32767 * s[h] | 0;\n\t\t\t\t\t\t\t\t\tC > 32767 ? C = 32767 : C < -32768 && (C = -32768);\n\t\t\t\t\t\t\t\t\tvar E = (h * this.config.channelCount + i) * l;\n\t\t\t\t\t\t\t\t\tw.setInt16(E, 0 | C, !0);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tthis.encodedBuffers.push(_);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, {\n\t\t\t\t\t\t\tkey: "getHeader",\n\t\t\t\t\t\t\tvalue: function() {\n\t\t\t\t\t\t\t\tvar x = this.encodedBuffers.reduce((function(w, i) {\n\t\t\t\t\t\t\t\t\treturn w + i.byteLength;\n\t\t\t\t\t\t\t\t}), 0), t = /* @__PURE__ */ new ArrayBuffer(44), _ = new DataView(t);\n\t\t\t\t\t\t\t\treturn O(_, 0, "RIFF"), _.setUint32(4, 36 + x, !0), O(_, 8, "WAVE"), O(_, 12, "fmt "), _.setUint32(16, 16, !0), _.setUint16(20, 1, !0), _.setUint16(22, this.config.channelCount, !0), _.setUint32(24, this.config.inputSampleRate, !0), _.setUint32(28, this.config.inputSampleRate * l * this.config.channelCount, !0), _.setUint16(32, l * this.config.channelCount, !0), _.setUint16(34, 8 * l, !0), O(_, 36, "data"), _.setUint32(40, x, !0), t;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}]) && B(a.prototype, b), y && B(a, y), c;\n\t\t\t\t\t})();\n\t\t\t\t\tT.exports = function(c) {\n\t\t\t\t\t\treturn new Promise((function(a, b) {\n\t\t\t\t\t\t\t(c = c !== void 0 && c || {}).init = function(y, x, t) {\n\t\t\t\t\t\t\t\tc.encoder = new u(y, x, t);\n\t\t\t\t\t\t\t}, c.encode = function(y) {\n\t\t\t\t\t\t\t\tc.encoder.encode(y);\n\t\t\t\t\t\t\t}, c.flush = function() {\n\t\t\t\t\t\t\t\tvar y = c.encoder.getHeader(), x = c.encoder.encodedBuffers.splice(0, c.encoder.encodedBuffers.length);\n\t\t\t\t\t\t\t\treturn [y].concat(v(x));\n\t\t\t\t\t\t\t}, c.close = function() {}, a(c);\n\t\t\t\t\t\t}));\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\tfunction(T, R, d) {\n\t\t\t\t\t(function(v, p, B, O) {\n\t\t\t\t\t\tvar l;\n\t\t\t\t\t\tfunction u(t) {\n\t\t\t\t\t\t\treturn (u = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(_) {\n\t\t\t\t\t\t\t\treturn typeof _;\n\t\t\t\t\t\t\t} : function(_) {\n\t\t\t\t\t\t\t\treturn _ && typeof Symbol == "function" && _.constructor === Symbol && _ !== Symbol.prototype ? "symbol" : typeof _;\n\t\t\t\t\t\t\t})(t);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfunction c(t, _) {\n\t\t\t\t\t\t\tif (!(t instanceof _)) throw new TypeError("Cannot call a class as a function");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfunction a(t, _) {\n\t\t\t\t\t\t\tfor (var w = 0; w < _.length; w++) {\n\t\t\t\t\t\t\t\tvar i = _[w];\n\t\t\t\t\t\t\t\ti.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(t, i.key, i);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfunction b(t, _, w) {\n\t\t\t\t\t\t\treturn _ && a(t.prototype, _), w && a(t, w), t;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvar y, x = (y = (y = typeof document != "undefined" && document.currentScript ? document.currentScript.src : void 0) || v, function(t) {\n\t\t\t\t\t\t\tt = (t = t || {}) !== void 0 ? t : {};\n\t\t\t\t\t\t\tvar _ = d(1).EmscriptenMemoryAllocator, w = 2049, i = 48e3, s = 4e3, h = 20, C = 6, E = 4096, M = 0, J = 4002, Y = 0, j = (function() {\n\t\t\t\t\t\t\t\tfunction n(r, f) {\n\t\t\t\t\t\t\t\t\tvar g = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : void 0;\n\t\t\t\t\t\t\t\t\tc(this, n), this.config = {\n\t\t\t\t\t\t\t\t\t\tinputSampleRate: r,\n\t\t\t\t\t\t\t\t\t\tchannelCount: f\n\t\t\t\t\t\t\t\t\t}, this.memory = new _(t), this._opus_encoder_create = t._opus_encoder_create, this._opus_encoder_ctl = t._opus_encoder_ctl, this._opus_encode_float = t._opus_encode_float, this._opus_encoder_destroy = t._opus_encoder_destroy, this._speex_resampler_init = t._speex_resampler_init, this._speex_resampler_process_interleaved_float = t._speex_resampler_process_interleaved_float, this._speex_resampler_destroy = t._speex_resampler_destroy, this._container = new t.Container(), this._container.init(i, f, Math.floor(4294967295 * Math.random())), this.OpusInitCodec(i, f, g), this.SpeexInitResampler(r, i, f), this.inputSamplesPerChannel = r * h / 1e3, this.outputSamplePerChannel = i * h / 1e3, this.inputBufferIndex = 0, this.mInputBuffer = this.memory.mallocFloat32Buffer(this.inputSamplesPerChannel * f), this.mResampledBuffer = this.memory.mallocFloat32Buffer(this.outputSamplePerChannel * f), this.mOutputBuffer = this.memory.mallocUint8Buffer(s), this.interleavedBuffers = f !== 1 ? new Float32Array(E * f) : void 0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn b(n, [\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tkey: "encode",\n\t\t\t\t\t\t\t\t\t\tvalue: function(r) {\n\t\t\t\t\t\t\t\t\t\t\tfor (var f = this.interleave(r), g = 0; g < f.length;) {\n\t\t\t\t\t\t\t\t\t\t\t\tvar P = Math.min(this.mInputBuffer.length - this.inputBufferIndex, f.length - g);\n\t\t\t\t\t\t\t\t\t\t\t\tif (this.mInputBuffer.set(f.subarray(g, g + P), this.inputBufferIndex), this.inputBufferIndex += P, this.inputBufferIndex >= this.mInputBuffer.length) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tvar I = this.memory.mallocUint32(this.inputSamplesPerChannel), W = this.memory.mallocUint32(this.outputSamplePerChannel), ft = this._speex_resampler_process_interleaved_float(this.resampler, this.mInputBuffer.pointer, I.pointer, this.mResampledBuffer.pointer, W.pointer);\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (I.free(), W.free(), ft !== Y) throw new Error("Resampling error.");\n\t\t\t\t\t\t\t\t\t\t\t\t\tvar st = this._opus_encode_float(this.encoder, this.mResampledBuffer.pointer, this.outputSamplePerChannel, this.mOutputBuffer.pointer, this.mOutputBuffer.length);\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (st < 0) throw new Error("Opus encoding error.");\n\t\t\t\t\t\t\t\t\t\t\t\t\tthis._container.writeFrame(this.mOutputBuffer.pointer, st, this.outputSamplePerChannel), this.inputBufferIndex = 0;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tg += P;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tkey: "close",\n\t\t\t\t\t\t\t\t\t\tvalue: function() {\n\t\t\t\t\t\t\t\t\t\t\tfor (var r = this.config.channelCount, f = [], g = 0; g < r; ++g) f.push(new Float32Array(E - this.inputBufferIndex / r));\n\t\t\t\t\t\t\t\t\t\t\tthis.encode(f), t.destroy(this._container), this.mInputBuffer.free(), this.mResampledBuffer.free(), this.mOutputBuffer.free(), this._opus_encoder_destroy(this.encoder), this._speex_resampler_destroy(this.resampler);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tkey: "interleave",\n\t\t\t\t\t\t\t\t\t\tvalue: function(r) {\n\t\t\t\t\t\t\t\t\t\t\tvar f = r.length;\n\t\t\t\t\t\t\t\t\t\t\tif (f === 1) return r[0];\n\t\t\t\t\t\t\t\t\t\t\tfor (var g = 0; g < f; g++) for (var P = r[g], I = 0; I < P.length; I++) this.interleavedBuffers[I * f + g] = P[I];\n\t\t\t\t\t\t\t\t\t\t\treturn this.interleavedBuffers;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tkey: "OpusInitCodec",\n\t\t\t\t\t\t\t\t\t\tvalue: function(r, f) {\n\t\t\t\t\t\t\t\t\t\t\tvar g = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : void 0, P = this.memory.mallocUint32(void 0);\n\t\t\t\t\t\t\t\t\t\t\tthis.encoder = this._opus_encoder_create(r, f, w, P.pointer);\n\t\t\t\t\t\t\t\t\t\t\tvar I = P.value;\n\t\t\t\t\t\t\t\t\t\t\tif (P.free(), I !== M) throw new Error("Opus encodor initialization failed.");\n\t\t\t\t\t\t\t\t\t\t\tg && this.OpusSetOpusControl(J, g);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tkey: "OpusSetOpusControl",\n\t\t\t\t\t\t\t\t\t\tvalue: function(r, f) {\n\t\t\t\t\t\t\t\t\t\t\tvar g = this.memory.mallocInt32(f);\n\t\t\t\t\t\t\t\t\t\t\tthis._opus_encoder_ctl(this.encoder, r, g.pointer), g.free();\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tkey: "SpeexInitResampler",\n\t\t\t\t\t\t\t\t\t\tvalue: function(r, f, g) {\n\t\t\t\t\t\t\t\t\t\t\tvar P = this.memory.mallocUint32(void 0);\n\t\t\t\t\t\t\t\t\t\t\tthis.resampler = this._speex_resampler_init(g, r, f, C, P.pointer);\n\t\t\t\t\t\t\t\t\t\t\tvar I = P.value;\n\t\t\t\t\t\t\t\t\t\t\tif (P.free(), I !== Y) throw new Error("Initializing resampler failed.");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t]), n;\n\t\t\t\t\t\t\t})();\n\t\t\t\t\t\t\tt.init = function(n, r, f) {\n\t\t\t\t\t\t\t\tt.encodedBuffers = [], t.encoder = new j(n, r, f);\n\t\t\t\t\t\t\t}, t.encode = function(n) {\n\t\t\t\t\t\t\t\tt.encoder.encode(n);\n\t\t\t\t\t\t\t}, t.flush = function() {\n\t\t\t\t\t\t\t\treturn t.encodedBuffers.splice(0, t.encodedBuffers.length);\n\t\t\t\t\t\t\t}, t.close = function() {\n\t\t\t\t\t\t\t\tt.encoder.close();\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tvar k, N = {};\n\t\t\t\t\t\t\tfor (k in t) t.hasOwnProperty(k) && (N[k] = t[k]);\n\t\t\t\t\t\t\tvar $ = [], et = !1, D = !1, _t = !1, xt = !1;\n\t\t\t\t\t\t\tet = (typeof window == "undefined" ? "undefined" : u(window)) === "object", D = typeof importScripts == "function", _t = (p === void 0 ? "undefined" : u(p)) === "object" && u(p.versions) === "object" && typeof p.versions.node == "string", xt = !et && !_t && !D;\n\t\t\t\t\t\t\tvar rt, K, dt, mt, U = "";\n\t\t\t\t\t\t\tfunction Xt(n) {\n\t\t\t\t\t\t\t\treturn t.locateFile ? t.locateFile(n, U) : U + n;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t_t ? (U = D ? d(0).dirname(U) + "/" : B + "/", rt = function(n, r) {\n\t\t\t\t\t\t\t\treturn dt || (dt = d(4)), mt || (mt = d(0)), n = mt.normalize(n), dt.readFileSync(n, r ? null : "utf8");\n\t\t\t\t\t\t\t}, K = function(n) {\n\t\t\t\t\t\t\t\tvar r = rt(n, !0);\n\t\t\t\t\t\t\t\treturn r.buffer || (r = new Uint8Array(r)), Rt(r.buffer), r;\n\t\t\t\t\t\t\t}, p.argv.length > 1 && p.argv[1].replace(/\\\\/g, "/"), $ = p.argv.slice(2), p.on("uncaughtException", (function(n) {\n\t\t\t\t\t\t\t\tif (!(n instanceof bn)) throw n;\n\t\t\t\t\t\t\t})), p.on("unhandledRejection", V), t.inspect = function() {\n\t\t\t\t\t\t\t\treturn "[Emscripten Module object]";\n\t\t\t\t\t\t\t}) : xt ? (typeof read != "undefined" && (rt = function(n) {\n\t\t\t\t\t\t\t\treturn read(n);\n\t\t\t\t\t\t\t}), K = function(n) {\n\t\t\t\t\t\t\t\tvar r;\n\t\t\t\t\t\t\t\treturn typeof readbuffer == "function" ? new Uint8Array(readbuffer(n)) : (Rt(u(r = read(n, "binary")) === "object"), r);\n\t\t\t\t\t\t\t}, typeof scriptArgs != "undefined" ? $ = scriptArgs : arguments !== void 0 && ($ = arguments), typeof print != "undefined" && (typeof console == "undefined" && (console = {}), console.log = print, console.warn = console.error = typeof printErr != "undefined" ? printErr : print)) : (et || D) && (D ? U = self.location.href : document.currentScript && (U = document.currentScript.src), y && (U = y), U = U.indexOf("blob:") !== 0 ? U.substr(0, U.lastIndexOf("/") + 1) : "", rt = function(n) {\n\t\t\t\t\t\t\t\tvar r = new XMLHttpRequest();\n\t\t\t\t\t\t\t\treturn r.open("GET", n, !1), r.send(null), r.responseText;\n\t\t\t\t\t\t\t}, D && (K = function(n) {\n\t\t\t\t\t\t\t\tvar r = new XMLHttpRequest();\n\t\t\t\t\t\t\t\treturn r.open("GET", n, !1), r.responseType = "arraybuffer", r.send(null), new Uint8Array(r.response);\n\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\tvar Q, ht, Pt = t.print || console.log.bind(console), z = t.printErr || console.warn.bind(console);\n\t\t\t\t\t\t\tfor (k in N) N.hasOwnProperty(k) && (t[k] = N[k]);\n\t\t\t\t\t\t\tN = null, t.arguments && ($ = t.arguments), t.thisProgram && t.thisProgram, t.quit && t.quit, t.wasmBinary && (Q = t.wasmBinary), t.noExitRuntime && t.noExitRuntime, (typeof WebAssembly == "undefined" ? "undefined" : u(WebAssembly)) !== "object" && z("no native wasm support detected");\n\t\t\t\t\t\t\tvar Yt = new WebAssembly.Table({\n\t\t\t\t\t\t\t\tinitial: 60,\n\t\t\t\t\t\t\t\tmaximum: 60,\n\t\t\t\t\t\t\t\telement: "anyfunc"\n\t\t\t\t\t\t\t}), Et = !1;\n\t\t\t\t\t\t\tfunction Rt(n, r) {\n\t\t\t\t\t\t\t\tn || V("Assertion failed: " + r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tvar Bt = typeof TextDecoder != "undefined" ? new TextDecoder("utf8") : void 0;\n\t\t\t\t\t\t\tfunction It(n, r, f) {\n\t\t\t\t\t\t\t\tfor (var g = r + f, P = r; n[P] && !(P >= g);) ++P;\n\t\t\t\t\t\t\t\tif (P - r > 16 && n.subarray && Bt) return Bt.decode(n.subarray(r, P));\n\t\t\t\t\t\t\t\tfor (var I = ""; r < P;) {\n\t\t\t\t\t\t\t\t\tvar W = n[r++];\n\t\t\t\t\t\t\t\t\tif (128 & W) {\n\t\t\t\t\t\t\t\t\t\tvar ft = 63 & n[r++];\n\t\t\t\t\t\t\t\t\t\tif ((224 & W) != 192) {\n\t\t\t\t\t\t\t\t\t\t\tvar st = 63 & n[r++];\n\t\t\t\t\t\t\t\t\t\t\tif ((W = (240 & W) == 224 ? (15 & W) << 12 | ft << 6 | st : (7 & W) << 18 | ft << 12 | st << 6 | 63 & n[r++]) < 65536) I += String.fromCharCode(W);\n\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\tvar gn = W - 65536;\n\t\t\t\t\t\t\t\t\t\t\t\tI += String.fromCharCode(55296 | gn >> 10, 56320 | 1023 & gn);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else I += String.fromCharCode((31 & W) << 6 | ft);\n\t\t\t\t\t\t\t\t\t} else I += String.fromCharCode(W);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn I;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction ot(n, r) {\n\t\t\t\t\t\t\t\treturn n ? It(ut, n, r) : "";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttypeof TextDecoder != "undefined" && new TextDecoder("utf-16le");\n\t\t\t\t\t\t\tvar it, ut, L, Ot = 65536;\n\t\t\t\t\t\t\tfunction Jt(n) {\n\t\t\t\t\t\t\t\tit = n, t.HEAP8 = new Int8Array(n), t.HEAP16 = new Int16Array(n), t.HEAP32 = L = new Int32Array(n), t.HEAPU8 = ut = new Uint8Array(n), t.HEAPU16 = new Uint16Array(n), t.HEAPU32 = new Uint32Array(n), t.HEAPF32 = new Float32Array(n), t.HEAPF64 = new Float64Array(n);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tvar $t = 5289024, Kt = 45984, yt = t.INITIAL_MEMORY || 16777216;\n\t\t\t\t\t\t\tfunction at(n) {\n\t\t\t\t\t\t\t\tfor (; n.length > 0;) {\n\t\t\t\t\t\t\t\t\tvar r = n.shift();\n\t\t\t\t\t\t\t\t\tif (typeof r != "function") {\n\t\t\t\t\t\t\t\t\t\tvar f = r.func;\n\t\t\t\t\t\t\t\t\t\ttypeof f == "number" ? r.arg === void 0 ? t.dynCall_v(f) : t.dynCall_vi(f, r.arg) : f(r.arg === void 0 ? null : r.arg);\n\t\t\t\t\t\t\t\t\t} else r();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t(ht = t.wasmMemory ? t.wasmMemory : new WebAssembly.Memory({\n\t\t\t\t\t\t\t\tinitial: yt / Ot,\n\t\t\t\t\t\t\t\tmaximum: yt / Ot\n\t\t\t\t\t\t\t})) && (it = ht.buffer), yt = it.byteLength, Jt(it), L[Kt >> 2] = $t;\n\t\t\t\t\t\t\tvar jt = [], kt = [], Qt = [], Ut = [];\n\t\t\t\t\t\t\tfunction Zt() {\n\t\t\t\t\t\t\t\tif (t.preRun) for (typeof t.preRun == "function" && (t.preRun = [t.preRun]); t.preRun.length;) rn(t.preRun.shift());\n\t\t\t\t\t\t\t\tat(jt);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction tn() {\n\t\t\t\t\t\t\t\tat(kt);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction nn() {\n\t\t\t\t\t\t\t\tat(Qt);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction en() {\n\t\t\t\t\t\t\t\tif (t.postRun) for (typeof t.postRun == "function" && (t.postRun = [t.postRun]); t.postRun.length;) on(t.postRun.shift());\n\t\t\t\t\t\t\t\tat(Ut);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction rn(n) {\n\t\t\t\t\t\t\t\tjt.unshift(n);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction on(n) {\n\t\t\t\t\t\t\t\tUt.unshift(n);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tvar q = 0, vt = null, Z = null;\n\t\t\t\t\t\t\tfunction un(n) {\n\t\t\t\t\t\t\t\tq++, t.monitorRunDependencies && t.monitorRunDependencies(q);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction an(n) {\n\t\t\t\t\t\t\t\tif (q--, t.monitorRunDependencies && t.monitorRunDependencies(q), q == 0 && (vt !== null && (clearInterval(vt), vt = null), Z)) {\n\t\t\t\t\t\t\t\t\tvar r = Z;\n\t\t\t\t\t\t\t\t\tZ = null, r();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction V(n) {\n\t\t\t\t\t\t\t\tthrow t.onAbort && t.onAbort(n), Pt(n += ""), z(n), Et = !0, n = "abort(" + n + "). Build with -s ASSERTIONS=1 for more info.", new WebAssembly.RuntimeError(n);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tt.preloadedImages = {}, t.preloadedAudios = {};\n\t\t\t\t\t\t\tvar Tt = "data:application/octet-stream;base64,";\n\t\t\t\t\t\t\tfunction Mt(n) {\n\t\t\t\t\t\t\t\treturn String.prototype.startsWith ? n.startsWith(Tt) : n.indexOf(Tt) === 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tvar F = "WebMOpusEncoder.wasm";\n\t\t\t\t\t\t\tfunction Ft() {\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tif (Q) return new Uint8Array(Q);\n\t\t\t\t\t\t\t\t\tif (K) return K(F);\n\t\t\t\t\t\t\t\t\tthrow "both async and sync fetching of the wasm failed";\n\t\t\t\t\t\t\t\t} catch (n) {\n\t\t\t\t\t\t\t\t\tV(n);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction sn() {\n\t\t\t\t\t\t\t\treturn Q || !et && !D || typeof fetch != "function" ? new Promise((function(n, r) {\n\t\t\t\t\t\t\t\t\tn(Ft());\n\t\t\t\t\t\t\t\t})) : fetch(F, { credentials: "same-origin" }).then((function(n) {\n\t\t\t\t\t\t\t\t\tif (!n.ok) throw "failed to load wasm binary file at \'" + F + "\'";\n\t\t\t\t\t\t\t\t\treturn n.arrayBuffer();\n\t\t\t\t\t\t\t\t})).catch((function() {\n\t\t\t\t\t\t\t\t\treturn Ft();\n\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction cn() {\n\t\t\t\t\t\t\t\tvar n = { a: Gt };\n\t\t\t\t\t\t\t\tfunction r(P, I) {\n\t\t\t\t\t\t\t\t\tvar W = P.exports;\n\t\t\t\t\t\t\t\t\tt.asm = W, an();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfunction f(P) {\n\t\t\t\t\t\t\t\t\tr(P.instance);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfunction g(P) {\n\t\t\t\t\t\t\t\t\treturn sn().then((function(I) {\n\t\t\t\t\t\t\t\t\t\treturn WebAssembly.instantiate(I, n);\n\t\t\t\t\t\t\t\t\t})).then(P, (function(I) {\n\t\t\t\t\t\t\t\t\t\tz("failed to asynchronously prepare wasm: " + I), V(I);\n\t\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (un(), t.instantiateWasm) try {\n\t\t\t\t\t\t\t\t\treturn t.instantiateWasm(n, r);\n\t\t\t\t\t\t\t\t} catch (P) {\n\t\t\t\t\t\t\t\t\treturn z("Module.instantiateWasm callback failed with error: " + P), !1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn (function() {\n\t\t\t\t\t\t\t\t\tif (Q || typeof WebAssembly.instantiateStreaming != "function" || Mt(F) || typeof fetch != "function") return g(f);\n\t\t\t\t\t\t\t\t\tfetch(F, { credentials: "same-origin" }).then((function(P) {\n\t\t\t\t\t\t\t\t\t\treturn WebAssembly.instantiateStreaming(P, n).then(f, (function(I) {\n\t\t\t\t\t\t\t\t\t\t\tz("wasm streaming compile failed: " + I), z("falling back to ArrayBuffer instantiation"), g(f);\n\t\t\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\t})(), {};\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction fn(n, r) {\n\t\t\t\t\t\t\t\tvar f = new Uint8Array(t.HEAPU8.buffer, n, r);\n\t\t\t\t\t\t\t\tt.encodedBuffers.push(new Uint8Array(f).buffer);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction ln(n, r, f, g) {\n\t\t\t\t\t\t\t\tV("Assertion failed: " + ot(n) + ", at: " + [\n\t\t\t\t\t\t\t\t\tr ? ot(r) : "unknown filename",\n\t\t\t\t\t\t\t\t\tf,\n\t\t\t\t\t\t\t\t\tg ? ot(g) : "unknown function"\n\t\t\t\t\t\t\t\t]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tMt(F) || (F = Xt(F)), kt.push({ func: function() {\n\t\t\t\t\t\t\t\tHt();\n\t\t\t\t\t\t\t} });\n\t\t\t\t\t\t\tvar tt = {\n\t\t\t\t\t\t\t\tmappings: {},\n\t\t\t\t\t\t\t\tbuffers: [\n\t\t\t\t\t\t\t\t\tnull,\n\t\t\t\t\t\t\t\t\t[],\n\t\t\t\t\t\t\t\t\t[]\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\tprintChar: function(n, r) {\n\t\t\t\t\t\t\t\t\tvar f = tt.buffers[n];\n\t\t\t\t\t\t\t\t\tr === 0 || r === 10 ? ((n === 1 ? Pt : z)(It(f, 0)), f.length = 0) : f.push(r);\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tvarargs: void 0,\n\t\t\t\t\t\t\t\tget: function() {\n\t\t\t\t\t\t\t\t\treturn tt.varargs += 4, L[tt.varargs - 4 >> 2];\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tgetStr: function(n) {\n\t\t\t\t\t\t\t\t\treturn ot(n);\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tget64: function(n, r) {\n\t\t\t\t\t\t\t\t\treturn n;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tfunction pn(n, r, f) {\n\t\t\t\t\t\t\t\treturn tt.varargs = f, 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction _n(n, r, f) {\n\t\t\t\t\t\t\t\ttt.varargs = f;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction dn(n, r, f) {\n\t\t\t\t\t\t\t\treturn tt.varargs = f, 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction wt() {\n\t\t\t\t\t\t\t\tV();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction mn(n, r, f) {\n\t\t\t\t\t\t\t\tut.copyWithin(n, r, r + f);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction hn(n) {\n\t\t\t\t\t\t\t\tV("OOM");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction yn(n) {\n\t\t\t\t\t\t\t\thn();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction vn(n) {\n\t\t\t\t\t\t\t\treturn 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction Lt(n, r, f, g) {\n\t\t\t\t\t\t\t\tvar P = tt.getStreamFromFD(n), I = tt.doReadv(P, r, f);\n\t\t\t\t\t\t\t\treturn L[g >> 2] = I, 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction bt(n, r, f, g, P) {}\n\t\t\t\t\t\t\tfunction qt(n, r, f, g) {\n\t\t\t\t\t\t\t\tfor (var P = 0, I = 0; I < f; I++) {\n\t\t\t\t\t\t\t\t\tfor (var W = L[r + 8 * I >> 2], ft = L[r + (8 * I + 4) >> 2], st = 0; st < ft; st++) tt.printChar(n, ut[W + st]);\n\t\t\t\t\t\t\t\t\tP += ft;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn L[g >> 2] = P, 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction Vt(n) {\n\t\t\t\t\t\t\t\tvar r = Date.now() / 1e3 | 0;\n\t\t\t\t\t\t\t\treturn n && (L[n >> 2] = r), r;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tvar Gt = {\n\t\t\t\t\t\t\t\ta: ln,\n\t\t\t\t\t\t\t\te: pn,\n\t\t\t\t\t\t\t\th: _n,\n\t\t\t\t\t\t\t\tg: dn,\n\t\t\t\t\t\t\t\tb: wt,\n\t\t\t\t\t\t\t\tm: fn,\n\t\t\t\t\t\t\t\tk: mn,\n\t\t\t\t\t\t\t\tl: yn,\n\t\t\t\t\t\t\t\tc: vn,\n\t\t\t\t\t\t\t\tf: Lt,\n\t\t\t\t\t\t\t\tj: bt,\n\t\t\t\t\t\t\t\td: qt,\n\t\t\t\t\t\t\t\tmemory: ht,\n\t\t\t\t\t\t\t\ttable: Yt,\n\t\t\t\t\t\t\t\ti: Vt\n\t\t\t\t\t\t\t}, Wt = cn();\n\t\t\t\t\t\t\tt.asm = Wt;\n\t\t\t\t\t\t\tvar ct, Ht = t.___wasm_call_ctors = function() {\n\t\t\t\t\t\t\t\treturn (Ht = t.___wasm_call_ctors = t.asm.n).apply(null, arguments);\n\t\t\t\t\t\t\t}, Nt = (t.___em_js__emscriptenPushBuffer = function() {\n\t\t\t\t\t\t\t\treturn (t.___em_js__emscriptenPushBuffer = t.asm.o).apply(null, arguments);\n\t\t\t\t\t\t\t}, t._emscripten_bind_VoidPtr___destroy___0 = function() {\n\t\t\t\t\t\t\t\treturn (Nt = t._emscripten_bind_VoidPtr___destroy___0 = t.asm.p).apply(null, arguments);\n\t\t\t\t\t\t\t}), At = t._emscripten_bind_Container_Container_0 = function() {\n\t\t\t\t\t\t\t\treturn (At = t._emscripten_bind_Container_Container_0 = t.asm.q).apply(null, arguments);\n\t\t\t\t\t\t\t}, G = t._emscripten_bind_Container_init_3 = function() {\n\t\t\t\t\t\t\t\treturn (G = t._emscripten_bind_Container_init_3 = t.asm.r).apply(null, arguments);\n\t\t\t\t\t\t\t}, gt = t._emscripten_bind_Container_writeFrame_3 = function() {\n\t\t\t\t\t\t\t\treturn (gt = t._emscripten_bind_Container_writeFrame_3 = t.asm.s).apply(null, arguments);\n\t\t\t\t\t\t\t}, Ct = t._emscripten_bind_Container___destroy___0 = function() {\n\t\t\t\t\t\t\t\treturn (Ct = t._emscripten_bind_Container___destroy___0 = t.asm.t).apply(null, arguments);\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tfunction bn(n) {\n\t\t\t\t\t\t\t\tthis.name = "ExitStatus", this.message = "Program terminated with exit(" + n + ")", this.status = n;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction Dt(n) {\n\t\t\t\t\t\t\t\tfunction r() {\n\t\t\t\t\t\t\t\t\tct || (ct = !0, t.calledRun = !0, Et || (tn(), nn(), t.onRuntimeInitialized && t.onRuntimeInitialized(), en()));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tn = n || $, q > 0 || (Zt(), q > 0 || (t.setStatus ? (t.setStatus("Running..."), setTimeout((function() {\n\t\t\t\t\t\t\t\t\tsetTimeout((function() {\n\t\t\t\t\t\t\t\t\t\tt.setStatus("");\n\t\t\t\t\t\t\t\t\t}), 1), r();\n\t\t\t\t\t\t\t\t}), 1)) : r()));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (t._opus_encoder_create = function() {\n\t\t\t\t\t\t\t\treturn (t._opus_encoder_create = t.asm.u).apply(null, arguments);\n\t\t\t\t\t\t\t}, t._opus_encode_float = function() {\n\t\t\t\t\t\t\t\treturn (t._opus_encode_float = t.asm.v).apply(null, arguments);\n\t\t\t\t\t\t\t}, t._opus_encoder_ctl = function() {\n\t\t\t\t\t\t\t\treturn (t._opus_encoder_ctl = t.asm.w).apply(null, arguments);\n\t\t\t\t\t\t\t}, t._opus_encoder_destroy = function() {\n\t\t\t\t\t\t\t\treturn (t._opus_encoder_destroy = t.asm.x).apply(null, arguments);\n\t\t\t\t\t\t\t}, t._speex_resampler_init = function() {\n\t\t\t\t\t\t\t\treturn (t._speex_resampler_init = t.asm.y).apply(null, arguments);\n\t\t\t\t\t\t\t}, t._speex_resampler_destroy = function() {\n\t\t\t\t\t\t\t\treturn (t._speex_resampler_destroy = t.asm.z).apply(null, arguments);\n\t\t\t\t\t\t\t}, t._speex_resampler_process_interleaved_float = function() {\n\t\t\t\t\t\t\t\treturn (t._speex_resampler_process_interleaved_float = t.asm.A).apply(null, arguments);\n\t\t\t\t\t\t\t}, t._free = function() {\n\t\t\t\t\t\t\t\treturn (t._free = t.asm.B).apply(null, arguments);\n\t\t\t\t\t\t\t}, t._malloc = function() {\n\t\t\t\t\t\t\t\treturn (t._malloc = t.asm.C).apply(null, arguments);\n\t\t\t\t\t\t\t}, t.dynCall_vi = function() {\n\t\t\t\t\t\t\t\treturn (t.dynCall_vi = t.asm.D).apply(null, arguments);\n\t\t\t\t\t\t\t}, t.dynCall_v = function() {\n\t\t\t\t\t\t\t\treturn (t.dynCall_v = t.asm.E).apply(null, arguments);\n\t\t\t\t\t\t\t}, t.asm = Wt, t.then = function(n) {\n\t\t\t\t\t\t\t\tif (ct) n(t);\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tvar r = t.onRuntimeInitialized;\n\t\t\t\t\t\t\t\t\tt.onRuntimeInitialized = function() {\n\t\t\t\t\t\t\t\t\t\tr && r(), n(t);\n\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn t;\n\t\t\t\t\t\t\t}, Z = function n() {\n\t\t\t\t\t\t\t\tct || Dt(), ct || (Z = n);\n\t\t\t\t\t\t\t}, t.run = Dt, t.preInit) for (typeof t.preInit == "function" && (t.preInit = [t.preInit]); t.preInit.length > 0;) t.preInit.pop()();\n\t\t\t\t\t\t\tfunction X() {}\n\t\t\t\t\t\t\tfunction St(n) {\n\t\t\t\t\t\t\t\treturn (n || X).__cache__;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction zt(n, r) {\n\t\t\t\t\t\t\t\tvar f = St(r), g = f[n];\n\t\t\t\t\t\t\t\treturn g || ((g = Object.create((r || X).prototype)).ptr = n, f[n] = g);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction nt(n, r) {\n\t\t\t\t\t\t\t\treturn zt(n.ptr, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction H(n) {\n\t\t\t\t\t\t\t\tif (!n.__destroy__) throw "Error: Cannot destroy object. (Did you create it yourself?)";\n\t\t\t\t\t\t\t\tn.__destroy__(), delete St(n.__class__)[n.ptr];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction e(n, r) {\n\t\t\t\t\t\t\t\treturn n.ptr === r.ptr;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction o(n) {\n\t\t\t\t\t\t\t\treturn n.ptr;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction m(n) {\n\t\t\t\t\t\t\t\treturn n.__class__;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction A() {\n\t\t\t\t\t\t\t\tthrow "cannot construct a VoidPtr, no constructor in IDL";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction S() {\n\t\t\t\t\t\t\t\tthis.ptr = At(), St(S)[this.ptr] = this;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn Dt(), X.prototype = Object.create(X.prototype), X.prototype.constructor = X, X.prototype.__class__ = X, X.__cache__ = {}, t.WrapperObject = X, t.getCache = St, t.wrapPointer = zt, t.castObject = nt, t.NULL = zt(0), t.destroy = H, t.compare = e, t.getPointer = o, t.getClass = m, A.prototype = Object.create(X.prototype), A.prototype.constructor = A, A.prototype.__class__ = A, A.__cache__ = {}, t.VoidPtr = A, A.prototype.__destroy__ = A.prototype.__destroy__ = function() {\n\t\t\t\t\t\t\t\tvar n = this.ptr;\n\t\t\t\t\t\t\t\tNt(n);\n\t\t\t\t\t\t\t}, S.prototype = Object.create(X.prototype), S.prototype.constructor = S, S.prototype.__class__ = S, S.__cache__ = {}, t.Container = S, S.prototype.init = S.prototype.init = function(n, r, f) {\n\t\t\t\t\t\t\t\tvar g = this.ptr;\n\t\t\t\t\t\t\t\tn && u(n) === "object" && (n = n.ptr), r && u(r) === "object" && (r = r.ptr), f && u(f) === "object" && (f = f.ptr), G(g, n, r, f);\n\t\t\t\t\t\t\t}, S.prototype.writeFrame = S.prototype.writeFrame = function(n, r, f) {\n\t\t\t\t\t\t\t\tvar g = this.ptr;\n\t\t\t\t\t\t\t\tn && u(n) === "object" && (n = n.ptr), r && u(r) === "object" && (r = r.ptr), f && u(f) === "object" && (f = f.ptr), gt(g, n, r, f);\n\t\t\t\t\t\t\t}, S.prototype.__destroy__ = S.prototype.__destroy__ = function() {\n\t\t\t\t\t\t\t\tvar n = this.ptr;\n\t\t\t\t\t\t\t\tCt(n);\n\t\t\t\t\t\t\t}, t;\n\t\t\t\t\t\t});\n\t\t\t\t\t\tu(R) === "object" && u(O) === "object" ? O.exports = x : (l = function() {\n\t\t\t\t\t\t\treturn x;\n\t\t\t\t\t\t}.apply(R, [])) === void 0 || (O.exports = l);\n\t\t\t\t\t}).call(this, "/index.js", d(2), "/", d(3)(T));\n\t\t\t\t},\n\t\t\t\tfunction(T, R, d) {\n\t\t\t\t\t(function(v, p, B, O) {\n\t\t\t\t\t\tvar l;\n\t\t\t\t\t\tfunction u(t) {\n\t\t\t\t\t\t\treturn (u = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(_) {\n\t\t\t\t\t\t\t\treturn typeof _;\n\t\t\t\t\t\t\t} : function(_) {\n\t\t\t\t\t\t\t\treturn _ && typeof Symbol == "function" && _.constructor === Symbol && _ !== Symbol.prototype ? "symbol" : typeof _;\n\t\t\t\t\t\t\t})(t);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfunction c(t, _) {\n\t\t\t\t\t\t\tif (!(t instanceof _)) throw new TypeError("Cannot call a class as a function");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfunction a(t, _) {\n\t\t\t\t\t\t\tfor (var w = 0; w < _.length; w++) {\n\t\t\t\t\t\t\t\tvar i = _[w];\n\t\t\t\t\t\t\t\ti.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(t, i.key, i);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfunction b(t, _, w) {\n\t\t\t\t\t\t\treturn _ && a(t.prototype, _), w && a(t, w), t;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvar y, x = (y = (y = typeof document != "undefined" && document.currentScript ? document.currentScript.src : void 0) || v, function(t) {\n\t\t\t\t\t\t\tt = (t = t || {}) !== void 0 ? t : {};\n\t\t\t\t\t\t\tvar _ = d(1).EmscriptenMemoryAllocator, w = 2049, i = 48e3, s = 4e3, h = 20, C = 6, E = 4096, M = 0, J = 4002, Y = 0, j = (function() {\n\t\t\t\t\t\t\t\tfunction e(o, m) {\n\t\t\t\t\t\t\t\t\tvar A = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : void 0;\n\t\t\t\t\t\t\t\t\tc(this, e), this.config = {\n\t\t\t\t\t\t\t\t\t\tinputSampleRate: o,\n\t\t\t\t\t\t\t\t\t\tchannelCount: m\n\t\t\t\t\t\t\t\t\t}, this.memory = new _(t), this._opus_encoder_create = t._opus_encoder_create, this._opus_encoder_ctl = t._opus_encoder_ctl, this._opus_encode_float = t._opus_encode_float, this._opus_encoder_destroy = t._opus_encoder_destroy, this._speex_resampler_init = t._speex_resampler_init, this._speex_resampler_process_interleaved_float = t._speex_resampler_process_interleaved_float, this._speex_resampler_destroy = t._speex_resampler_destroy, this._container = new t.Container(), this._container.init(i, m, Math.floor(4294967295 * Math.random())), this.OpusInitCodec(i, m, A), this.SpeexInitResampler(o, i, m), this.inputSamplesPerChannel = o * h / 1e3, this.outputSamplePerChannel = i * h / 1e3, this.inputBufferIndex = 0, this.mInputBuffer = this.memory.mallocFloat32Buffer(this.inputSamplesPerChannel * m), this.mResampledBuffer = this.memory.mallocFloat32Buffer(this.outputSamplePerChannel * m), this.mOutputBuffer = this.memory.mallocUint8Buffer(s), this.interleavedBuffers = m !== 1 ? new Float32Array(E * m) : void 0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn b(e, [\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tkey: "encode",\n\t\t\t\t\t\t\t\t\t\tvalue: function(o) {\n\t\t\t\t\t\t\t\t\t\t\tfor (var m = this.interleave(o), A = 0; A < m.length;) {\n\t\t\t\t\t\t\t\t\t\t\t\tvar S = Math.min(this.mInputBuffer.length - this.inputBufferIndex, m.length - A);\n\t\t\t\t\t\t\t\t\t\t\t\tif (this.mInputBuffer.set(m.subarray(A, A + S), this.inputBufferIndex), this.inputBufferIndex += S, this.inputBufferIndex >= this.mInputBuffer.length) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tvar n = this.memory.mallocUint32(this.inputSamplesPerChannel), r = this.memory.mallocUint32(this.outputSamplePerChannel), f = this._speex_resampler_process_interleaved_float(this.resampler, this.mInputBuffer.pointer, n.pointer, this.mResampledBuffer.pointer, r.pointer);\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (n.free(), r.free(), f !== Y) throw new Error("Resampling error.");\n\t\t\t\t\t\t\t\t\t\t\t\t\tvar g = this._opus_encode_float(this.encoder, this.mResampledBuffer.pointer, this.outputSamplePerChannel, this.mOutputBuffer.pointer, this.mOutputBuffer.length);\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (g < 0) throw new Error("Opus encoding error.");\n\t\t\t\t\t\t\t\t\t\t\t\t\tthis._container.writeFrame(this.mOutputBuffer.pointer, g, this.outputSamplePerChannel), this.inputBufferIndex = 0;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tA += S;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tkey: "close",\n\t\t\t\t\t\t\t\t\t\tvalue: function() {\n\t\t\t\t\t\t\t\t\t\t\tfor (var o = this.config.channelCount, m = [], A = 0; A < o; ++A) m.push(new Float32Array(E - this.inputBufferIndex / o));\n\t\t\t\t\t\t\t\t\t\t\tthis.encode(m), t.destroy(this._container), this.mInputBuffer.free(), this.mResampledBuffer.free(), this.mOutputBuffer.free(), this._opus_encoder_destroy(this.encoder), this._speex_resampler_destroy(this.resampler);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tkey: "interleave",\n\t\t\t\t\t\t\t\t\t\tvalue: function(o) {\n\t\t\t\t\t\t\t\t\t\t\tvar m = o.length;\n\t\t\t\t\t\t\t\t\t\t\tif (m === 1) return o[0];\n\t\t\t\t\t\t\t\t\t\t\tfor (var A = 0; A < m; A++) for (var S = o[A], n = 0; n < S.length; n++) this.interleavedBuffers[n * m + A] = S[n];\n\t\t\t\t\t\t\t\t\t\t\treturn this.interleavedBuffers;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tkey: "OpusInitCodec",\n\t\t\t\t\t\t\t\t\t\tvalue: function(o, m) {\n\t\t\t\t\t\t\t\t\t\t\tvar A = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : void 0, S = this.memory.mallocUint32(void 0);\n\t\t\t\t\t\t\t\t\t\t\tthis.encoder = this._opus_encoder_create(o, m, w, S.pointer);\n\t\t\t\t\t\t\t\t\t\t\tvar n = S.value;\n\t\t\t\t\t\t\t\t\t\t\tif (S.free(), n !== M) throw new Error("Opus encodor initialization failed.");\n\t\t\t\t\t\t\t\t\t\t\tA && this.OpusSetOpusControl(J, A);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tkey: "OpusSetOpusControl",\n\t\t\t\t\t\t\t\t\t\tvalue: function(o, m) {\n\t\t\t\t\t\t\t\t\t\t\tvar A = this.memory.mallocInt32(m);\n\t\t\t\t\t\t\t\t\t\t\tthis._opus_encoder_ctl(this.encoder, o, A.pointer), A.free();\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tkey: "SpeexInitResampler",\n\t\t\t\t\t\t\t\t\t\tvalue: function(o, m, A) {\n\t\t\t\t\t\t\t\t\t\t\tvar S = this.memory.mallocUint32(void 0);\n\t\t\t\t\t\t\t\t\t\t\tthis.resampler = this._speex_resampler_init(A, o, m, C, S.pointer);\n\t\t\t\t\t\t\t\t\t\t\tvar n = S.value;\n\t\t\t\t\t\t\t\t\t\t\tif (S.free(), n !== Y) throw new Error("Initializing resampler failed.");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t]), e;\n\t\t\t\t\t\t\t})();\n\t\t\t\t\t\t\tt.init = function(e, o, m) {\n\t\t\t\t\t\t\t\tt.encodedBuffers = [], t.encoder = new j(e, o, m);\n\t\t\t\t\t\t\t}, t.encode = function(e) {\n\t\t\t\t\t\t\t\tt.encoder.encode(e);\n\t\t\t\t\t\t\t}, t.flush = function() {\n\t\t\t\t\t\t\t\treturn t.encodedBuffers.splice(0, t.encodedBuffers.length);\n\t\t\t\t\t\t\t}, t.close = function() {\n\t\t\t\t\t\t\t\tt.encoder.close();\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tvar k, N = {};\n\t\t\t\t\t\t\tfor (k in t) t.hasOwnProperty(k) && (N[k] = t[k]);\n\t\t\t\t\t\t\tvar $ = [], et = !1, D = !1, _t = !1, xt = !1;\n\t\t\t\t\t\t\tet = (typeof window == "undefined" ? "undefined" : u(window)) === "object", D = typeof importScripts == "function", _t = (p === void 0 ? "undefined" : u(p)) === "object" && u(p.versions) === "object" && typeof p.versions.node == "string", xt = !et && !_t && !D;\n\t\t\t\t\t\t\tvar rt, K, dt, mt, U = "";\n\t\t\t\t\t\t\tfunction Xt(e) {\n\t\t\t\t\t\t\t\treturn t.locateFile ? t.locateFile(e, U) : U + e;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t_t ? (U = D ? d(0).dirname(U) + "/" : B + "/", rt = function(e, o) {\n\t\t\t\t\t\t\t\treturn dt || (dt = d(4)), mt || (mt = d(0)), e = mt.normalize(e), dt.readFileSync(e, o ? null : "utf8");\n\t\t\t\t\t\t\t}, K = function(e) {\n\t\t\t\t\t\t\t\tvar o = rt(e, !0);\n\t\t\t\t\t\t\t\treturn o.buffer || (o = new Uint8Array(o)), Rt(o.buffer), o;\n\t\t\t\t\t\t\t}, p.argv.length > 1 && p.argv[1].replace(/\\\\/g, "/"), $ = p.argv.slice(2), p.on("uncaughtException", (function(e) {\n\t\t\t\t\t\t\t\tif (!(e instanceof Nt)) throw e;\n\t\t\t\t\t\t\t})), p.on("unhandledRejection", V), t.inspect = function() {\n\t\t\t\t\t\t\t\treturn "[Emscripten Module object]";\n\t\t\t\t\t\t\t}) : xt ? (typeof read != "undefined" && (rt = function(e) {\n\t\t\t\t\t\t\t\treturn read(e);\n\t\t\t\t\t\t\t}), K = function(e) {\n\t\t\t\t\t\t\t\tvar o;\n\t\t\t\t\t\t\t\treturn typeof readbuffer == "function" ? new Uint8Array(readbuffer(e)) : (Rt(u(o = read(e, "binary")) === "object"), o);\n\t\t\t\t\t\t\t}, typeof scriptArgs != "undefined" ? $ = scriptArgs : arguments !== void 0 && ($ = arguments), typeof print != "undefined" && (typeof console == "undefined" && (console = {}), console.log = print, console.warn = console.error = typeof printErr != "undefined" ? printErr : print)) : (et || D) && (D ? U = self.location.href : document.currentScript && (U = document.currentScript.src), y && (U = y), U = U.indexOf("blob:") !== 0 ? U.substr(0, U.lastIndexOf("/") + 1) : "", rt = function(e) {\n\t\t\t\t\t\t\t\tvar o = new XMLHttpRequest();\n\t\t\t\t\t\t\t\treturn o.open("GET", e, !1), o.send(null), o.responseText;\n\t\t\t\t\t\t\t}, D && (K = function(e) {\n\t\t\t\t\t\t\t\tvar o = new XMLHttpRequest();\n\t\t\t\t\t\t\t\treturn o.open("GET", e, !1), o.responseType = "arraybuffer", o.send(null), new Uint8Array(o.response);\n\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\tvar Q, ht, Pt = t.print || console.log.bind(console), z = t.printErr || console.warn.bind(console);\n\t\t\t\t\t\t\tfor (k in N) N.hasOwnProperty(k) && (t[k] = N[k]);\n\t\t\t\t\t\t\tN = null, t.arguments && ($ = t.arguments), t.thisProgram && t.thisProgram, t.quit && t.quit, t.wasmBinary && (Q = t.wasmBinary), t.noExitRuntime && t.noExitRuntime, (typeof WebAssembly == "undefined" ? "undefined" : u(WebAssembly)) !== "object" && z("no native wasm support detected");\n\t\t\t\t\t\t\tvar Yt = new WebAssembly.Table({\n\t\t\t\t\t\t\t\tinitial: 36,\n\t\t\t\t\t\t\t\tmaximum: 36,\n\t\t\t\t\t\t\t\telement: "anyfunc"\n\t\t\t\t\t\t\t}), Et = !1;\n\t\t\t\t\t\t\tfunction Rt(e, o) {\n\t\t\t\t\t\t\t\te || V("Assertion failed: " + o);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tvar Bt = typeof TextDecoder != "undefined" ? new TextDecoder("utf8") : void 0;\n\t\t\t\t\t\t\tfunction It(e, o, m) {\n\t\t\t\t\t\t\t\tfor (var A = o + m, S = o; e[S] && !(S >= A);) ++S;\n\t\t\t\t\t\t\t\tif (S - o > 16 && e.subarray && Bt) return Bt.decode(e.subarray(o, S));\n\t\t\t\t\t\t\t\tfor (var n = ""; o < S;) {\n\t\t\t\t\t\t\t\t\tvar r = e[o++];\n\t\t\t\t\t\t\t\t\tif (128 & r) {\n\t\t\t\t\t\t\t\t\t\tvar f = 63 & e[o++];\n\t\t\t\t\t\t\t\t\t\tif ((224 & r) != 192) {\n\t\t\t\t\t\t\t\t\t\t\tvar g = 63 & e[o++];\n\t\t\t\t\t\t\t\t\t\t\tif ((r = (240 & r) == 224 ? (15 & r) << 12 | f << 6 | g : (7 & r) << 18 | f << 12 | g << 6 | 63 & e[o++]) < 65536) n += String.fromCharCode(r);\n\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\tvar P = r - 65536;\n\t\t\t\t\t\t\t\t\t\t\t\tn += String.fromCharCode(55296 | P >> 10, 56320 | 1023 & P);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else n += String.fromCharCode((31 & r) << 6 | f);\n\t\t\t\t\t\t\t\t\t} else n += String.fromCharCode(r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn n;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction ot(e, o) {\n\t\t\t\t\t\t\t\treturn e ? It(ut, e, o) : "";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttypeof TextDecoder != "undefined" && new TextDecoder("utf-16le");\n\t\t\t\t\t\t\tvar it, ut, L, Ot = 65536;\n\t\t\t\t\t\t\tfunction Jt(e) {\n\t\t\t\t\t\t\t\tit = e, t.HEAP8 = new Int8Array(e), t.HEAP16 = new Int16Array(e), t.HEAP32 = L = new Int32Array(e), t.HEAPU8 = ut = new Uint8Array(e), t.HEAPU16 = new Uint16Array(e), t.HEAPU32 = new Uint32Array(e), t.HEAPF32 = new Float32Array(e), t.HEAPF64 = new Float64Array(e);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tvar $t = 5289728, Kt = 46688, yt = t.INITIAL_MEMORY || 16777216;\n\t\t\t\t\t\t\tfunction at(e) {\n\t\t\t\t\t\t\t\tfor (; e.length > 0;) {\n\t\t\t\t\t\t\t\t\tvar o = e.shift();\n\t\t\t\t\t\t\t\t\tif (typeof o != "function") {\n\t\t\t\t\t\t\t\t\t\tvar m = o.func;\n\t\t\t\t\t\t\t\t\t\ttypeof m == "number" ? o.arg === void 0 ? t.dynCall_v(m) : t.dynCall_vi(m, o.arg) : m(o.arg === void 0 ? null : o.arg);\n\t\t\t\t\t\t\t\t\t} else o();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t(ht = t.wasmMemory ? t.wasmMemory : new WebAssembly.Memory({\n\t\t\t\t\t\t\t\tinitial: yt / Ot,\n\t\t\t\t\t\t\t\tmaximum: yt / Ot\n\t\t\t\t\t\t\t})) && (it = ht.buffer), yt = it.byteLength, Jt(it), L[Kt >> 2] = $t;\n\t\t\t\t\t\t\tvar jt = [], kt = [], Qt = [], Ut = [];\n\t\t\t\t\t\t\tfunction Zt() {\n\t\t\t\t\t\t\t\tif (t.preRun) for (typeof t.preRun == "function" && (t.preRun = [t.preRun]); t.preRun.length;) rn(t.preRun.shift());\n\t\t\t\t\t\t\t\tat(jt);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction tn() {\n\t\t\t\t\t\t\t\tat(kt);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction nn() {\n\t\t\t\t\t\t\t\tat(Qt);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction en() {\n\t\t\t\t\t\t\t\tif (t.postRun) for (typeof t.postRun == "function" && (t.postRun = [t.postRun]); t.postRun.length;) on(t.postRun.shift());\n\t\t\t\t\t\t\t\tat(Ut);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction rn(e) {\n\t\t\t\t\t\t\t\tjt.unshift(e);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction on(e) {\n\t\t\t\t\t\t\t\tUt.unshift(e);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tvar q = 0, vt = null, Z = null;\n\t\t\t\t\t\t\tfunction un(e) {\n\t\t\t\t\t\t\t\tq++, t.monitorRunDependencies && t.monitorRunDependencies(q);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction an(e) {\n\t\t\t\t\t\t\t\tif (q--, t.monitorRunDependencies && t.monitorRunDependencies(q), q == 0 && (vt !== null && (clearInterval(vt), vt = null), Z)) {\n\t\t\t\t\t\t\t\t\tvar o = Z;\n\t\t\t\t\t\t\t\t\tZ = null, o();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction V(e) {\n\t\t\t\t\t\t\t\tthrow t.onAbort && t.onAbort(e), Pt(e += ""), z(e), Et = !0, e = "abort(" + e + "). Build with -s ASSERTIONS=1 for more info.", new WebAssembly.RuntimeError(e);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tt.preloadedImages = {}, t.preloadedAudios = {};\n\t\t\t\t\t\t\tvar Tt = "data:application/octet-stream;base64,";\n\t\t\t\t\t\t\tfunction Mt(e) {\n\t\t\t\t\t\t\t\treturn String.prototype.startsWith ? e.startsWith(Tt) : e.indexOf(Tt) === 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tvar F = "OggOpusEncoder.wasm";\n\t\t\t\t\t\t\tfunction Ft() {\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tif (Q) return new Uint8Array(Q);\n\t\t\t\t\t\t\t\t\tif (K) return K(F);\n\t\t\t\t\t\t\t\t\tthrow "both async and sync fetching of the wasm failed";\n\t\t\t\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\t\t\t\tV(e);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction sn() {\n\t\t\t\t\t\t\t\treturn Q || !et && !D || typeof fetch != "function" ? new Promise((function(e, o) {\n\t\t\t\t\t\t\t\t\te(Ft());\n\t\t\t\t\t\t\t\t})) : fetch(F, { credentials: "same-origin" }).then((function(e) {\n\t\t\t\t\t\t\t\t\tif (!e.ok) throw "failed to load wasm binary file at \'" + F + "\'";\n\t\t\t\t\t\t\t\t\treturn e.arrayBuffer();\n\t\t\t\t\t\t\t\t})).catch((function() {\n\t\t\t\t\t\t\t\t\treturn Ft();\n\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction cn() {\n\t\t\t\t\t\t\t\tvar e = { a: vn };\n\t\t\t\t\t\t\t\tfunction o(S, n) {\n\t\t\t\t\t\t\t\t\tvar r = S.exports;\n\t\t\t\t\t\t\t\t\tt.asm = r, an();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfunction m(S) {\n\t\t\t\t\t\t\t\t\to(S.instance);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfunction A(S) {\n\t\t\t\t\t\t\t\t\treturn sn().then((function(n) {\n\t\t\t\t\t\t\t\t\t\treturn WebAssembly.instantiate(n, e);\n\t\t\t\t\t\t\t\t\t})).then(S, (function(n) {\n\t\t\t\t\t\t\t\t\t\tz("failed to asynchronously prepare wasm: " + n), V(n);\n\t\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (un(), t.instantiateWasm) try {\n\t\t\t\t\t\t\t\t\treturn t.instantiateWasm(e, o);\n\t\t\t\t\t\t\t\t} catch (S) {\n\t\t\t\t\t\t\t\t\treturn z("Module.instantiateWasm callback failed with error: " + S), !1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn (function() {\n\t\t\t\t\t\t\t\t\tif (Q || typeof WebAssembly.instantiateStreaming != "function" || Mt(F) || typeof fetch != "function") return A(m);\n\t\t\t\t\t\t\t\t\tfetch(F, { credentials: "same-origin" }).then((function(S) {\n\t\t\t\t\t\t\t\t\t\treturn WebAssembly.instantiateStreaming(S, e).then(m, (function(n) {\n\t\t\t\t\t\t\t\t\t\t\tz("wasm streaming compile failed: " + n), z("falling back to ArrayBuffer instantiation"), A(m);\n\t\t\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\t})(), {};\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction fn(e, o) {\n\t\t\t\t\t\t\t\tvar m = new Uint8Array(t.HEAPU8.buffer, e, o);\n\t\t\t\t\t\t\t\tt.encodedBuffers.push(new Uint8Array(m).buffer);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction ln(e, o, m, A) {\n\t\t\t\t\t\t\t\tV("Assertion failed: " + ot(e) + ", at: " + [\n\t\t\t\t\t\t\t\t\to ? ot(o) : "unknown filename",\n\t\t\t\t\t\t\t\t\tm,\n\t\t\t\t\t\t\t\t\tA ? ot(A) : "unknown function"\n\t\t\t\t\t\t\t\t]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction tt() {\n\t\t\t\t\t\t\t\tV();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction pn(e, o, m) {\n\t\t\t\t\t\t\t\tut.copyWithin(e, o, o + m);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction _n(e) {\n\t\t\t\t\t\t\t\tV("OOM");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction dn(e) {\n\t\t\t\t\t\t\t\t_n();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tMt(F) || (F = Xt(F)), kt.push({ func: function() {\n\t\t\t\t\t\t\t\tqt();\n\t\t\t\t\t\t\t} });\n\t\t\t\t\t\t\tvar wt = {\n\t\t\t\t\t\t\t\tmappings: {},\n\t\t\t\t\t\t\t\tbuffers: [\n\t\t\t\t\t\t\t\t\tnull,\n\t\t\t\t\t\t\t\t\t[],\n\t\t\t\t\t\t\t\t\t[]\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\tprintChar: function(e, o) {\n\t\t\t\t\t\t\t\t\tvar m = wt.buffers[e];\n\t\t\t\t\t\t\t\t\to === 0 || o === 10 ? ((e === 1 ? Pt : z)(It(m, 0)), m.length = 0) : m.push(o);\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tvarargs: void 0,\n\t\t\t\t\t\t\t\tget: function() {\n\t\t\t\t\t\t\t\t\treturn wt.varargs += 4, L[wt.varargs - 4 >> 2];\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tgetStr: function(e) {\n\t\t\t\t\t\t\t\t\treturn ot(e);\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tget64: function(e, o) {\n\t\t\t\t\t\t\t\t\treturn e;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tfunction mn(e) {\n\t\t\t\t\t\t\t\treturn 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction hn(e, o, m, A, S) {}\n\t\t\t\t\t\t\tfunction yn(e, o, m, A) {\n\t\t\t\t\t\t\t\tfor (var S = 0, n = 0; n < m; n++) {\n\t\t\t\t\t\t\t\t\tfor (var r = L[o + 8 * n >> 2], f = L[o + (8 * n + 4) >> 2], g = 0; g < f; g++) wt.printChar(e, ut[r + g]);\n\t\t\t\t\t\t\t\t\tS += f;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn L[A >> 2] = S, 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tvar vn = {\n\t\t\t\t\t\t\t\ta: ln,\n\t\t\t\t\t\t\t\tc: tt,\n\t\t\t\t\t\t\t\td: fn,\n\t\t\t\t\t\t\t\tf: pn,\n\t\t\t\t\t\t\t\tg: dn,\n\t\t\t\t\t\t\t\th: mn,\n\t\t\t\t\t\t\t\te: hn,\n\t\t\t\t\t\t\t\tb: yn,\n\t\t\t\t\t\t\t\tmemory: ht,\n\t\t\t\t\t\t\t\ttable: Yt\n\t\t\t\t\t\t\t}, Lt = cn();\n\t\t\t\t\t\t\tt.asm = Lt;\n\t\t\t\t\t\t\tvar bt, qt = t.___wasm_call_ctors = function() {\n\t\t\t\t\t\t\t\treturn (qt = t.___wasm_call_ctors = t.asm.i).apply(null, arguments);\n\t\t\t\t\t\t\t}, Vt = (t.___em_js__emscriptenPushBuffer = function() {\n\t\t\t\t\t\t\t\treturn (t.___em_js__emscriptenPushBuffer = t.asm.j).apply(null, arguments);\n\t\t\t\t\t\t\t}, t._emscripten_bind_VoidPtr___destroy___0 = function() {\n\t\t\t\t\t\t\t\treturn (Vt = t._emscripten_bind_VoidPtr___destroy___0 = t.asm.k).apply(null, arguments);\n\t\t\t\t\t\t\t}), Gt = t._emscripten_bind_Container_Container_0 = function() {\n\t\t\t\t\t\t\t\treturn (Gt = t._emscripten_bind_Container_Container_0 = t.asm.l).apply(null, arguments);\n\t\t\t\t\t\t\t}, Wt = t._emscripten_bind_Container_init_3 = function() {\n\t\t\t\t\t\t\t\treturn (Wt = t._emscripten_bind_Container_init_3 = t.asm.m).apply(null, arguments);\n\t\t\t\t\t\t\t}, ct = t._emscripten_bind_Container_writeFrame_3 = function() {\n\t\t\t\t\t\t\t\treturn (ct = t._emscripten_bind_Container_writeFrame_3 = t.asm.n).apply(null, arguments);\n\t\t\t\t\t\t\t}, Ht = t._emscripten_bind_Container___destroy___0 = function() {\n\t\t\t\t\t\t\t\treturn (Ht = t._emscripten_bind_Container___destroy___0 = t.asm.o).apply(null, arguments);\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tfunction Nt(e) {\n\t\t\t\t\t\t\t\tthis.name = "ExitStatus", this.message = "Program terminated with exit(" + e + ")", this.status = e;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction At(e) {\n\t\t\t\t\t\t\t\tfunction o() {\n\t\t\t\t\t\t\t\t\tbt || (bt = !0, t.calledRun = !0, Et || (tn(), nn(), t.onRuntimeInitialized && t.onRuntimeInitialized(), en()));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\te = e || $, q > 0 || (Zt(), q > 0 || (t.setStatus ? (t.setStatus("Running..."), setTimeout((function() {\n\t\t\t\t\t\t\t\t\tsetTimeout((function() {\n\t\t\t\t\t\t\t\t\t\tt.setStatus("");\n\t\t\t\t\t\t\t\t\t}), 1), o();\n\t\t\t\t\t\t\t\t}), 1)) : o()));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (t._opus_encoder_create = function() {\n\t\t\t\t\t\t\t\treturn (t._opus_encoder_create = t.asm.p).apply(null, arguments);\n\t\t\t\t\t\t\t}, t._opus_encode_float = function() {\n\t\t\t\t\t\t\t\treturn (t._opus_encode_float = t.asm.q).apply(null, arguments);\n\t\t\t\t\t\t\t}, t._opus_encoder_ctl = function() {\n\t\t\t\t\t\t\t\treturn (t._opus_encoder_ctl = t.asm.r).apply(null, arguments);\n\t\t\t\t\t\t\t}, t._opus_encoder_destroy = function() {\n\t\t\t\t\t\t\t\treturn (t._opus_encoder_destroy = t.asm.s).apply(null, arguments);\n\t\t\t\t\t\t\t}, t._malloc = function() {\n\t\t\t\t\t\t\t\treturn (t._malloc = t.asm.t).apply(null, arguments);\n\t\t\t\t\t\t\t}, t._free = function() {\n\t\t\t\t\t\t\t\treturn (t._free = t.asm.u).apply(null, arguments);\n\t\t\t\t\t\t\t}, t._speex_resampler_init = function() {\n\t\t\t\t\t\t\t\treturn (t._speex_resampler_init = t.asm.v).apply(null, arguments);\n\t\t\t\t\t\t\t}, t._speex_resampler_destroy = function() {\n\t\t\t\t\t\t\t\treturn (t._speex_resampler_destroy = t.asm.w).apply(null, arguments);\n\t\t\t\t\t\t\t}, t._speex_resampler_process_interleaved_float = function() {\n\t\t\t\t\t\t\t\treturn (t._speex_resampler_process_interleaved_float = t.asm.x).apply(null, arguments);\n\t\t\t\t\t\t\t}, t.dynCall_vi = function() {\n\t\t\t\t\t\t\t\treturn (t.dynCall_vi = t.asm.y).apply(null, arguments);\n\t\t\t\t\t\t\t}, t.dynCall_v = function() {\n\t\t\t\t\t\t\t\treturn (t.dynCall_v = t.asm.z).apply(null, arguments);\n\t\t\t\t\t\t\t}, t.asm = Lt, t.then = function(e) {\n\t\t\t\t\t\t\t\tif (bt) e(t);\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tvar o = t.onRuntimeInitialized;\n\t\t\t\t\t\t\t\t\tt.onRuntimeInitialized = function() {\n\t\t\t\t\t\t\t\t\t\to && o(), e(t);\n\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn t;\n\t\t\t\t\t\t\t}, Z = function e() {\n\t\t\t\t\t\t\t\tbt || At(), bt || (Z = e);\n\t\t\t\t\t\t\t}, t.run = At, t.preInit) for (typeof t.preInit == "function" && (t.preInit = [t.preInit]); t.preInit.length > 0;) t.preInit.pop()();\n\t\t\t\t\t\t\tfunction G() {}\n\t\t\t\t\t\t\tfunction gt(e) {\n\t\t\t\t\t\t\t\treturn (e || G).__cache__;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction Ct(e, o) {\n\t\t\t\t\t\t\t\tvar m = gt(o), A = m[e];\n\t\t\t\t\t\t\t\treturn A || ((A = Object.create((o || G).prototype)).ptr = e, m[e] = A);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction bn(e, o) {\n\t\t\t\t\t\t\t\treturn Ct(e.ptr, o);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction Dt(e) {\n\t\t\t\t\t\t\t\tif (!e.__destroy__) throw "Error: Cannot destroy object. (Did you create it yourself?)";\n\t\t\t\t\t\t\t\te.__destroy__(), delete gt(e.__class__)[e.ptr];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction X(e, o) {\n\t\t\t\t\t\t\t\treturn e.ptr === o.ptr;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction St(e) {\n\t\t\t\t\t\t\t\treturn e.ptr;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction zt(e) {\n\t\t\t\t\t\t\t\treturn e.__class__;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction nt() {\n\t\t\t\t\t\t\t\tthrow "cannot construct a VoidPtr, no constructor in IDL";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction H() {\n\t\t\t\t\t\t\t\tthis.ptr = Gt(), gt(H)[this.ptr] = this;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn At(), G.prototype = Object.create(G.prototype), G.prototype.constructor = G, G.prototype.__class__ = G, G.__cache__ = {}, t.WrapperObject = G, t.getCache = gt, t.wrapPointer = Ct, t.castObject = bn, t.NULL = Ct(0), t.destroy = Dt, t.compare = X, t.getPointer = St, t.getClass = zt, nt.prototype = Object.create(G.prototype), nt.prototype.constructor = nt, nt.prototype.__class__ = nt, nt.__cache__ = {}, t.VoidPtr = nt, nt.prototype.__destroy__ = nt.prototype.__destroy__ = function() {\n\t\t\t\t\t\t\t\tvar e = this.ptr;\n\t\t\t\t\t\t\t\tVt(e);\n\t\t\t\t\t\t\t}, H.prototype = Object.create(G.prototype), H.prototype.constructor = H, H.prototype.__class__ = H, H.__cache__ = {}, t.Container = H, H.prototype.init = H.prototype.init = function(e, o, m) {\n\t\t\t\t\t\t\t\tvar A = this.ptr;\n\t\t\t\t\t\t\t\te && u(e) === "object" && (e = e.ptr), o && u(o) === "object" && (o = o.ptr), m && u(m) === "object" && (m = m.ptr), Wt(A, e, o, m);\n\t\t\t\t\t\t\t}, H.prototype.writeFrame = H.prototype.writeFrame = function(e, o, m) {\n\t\t\t\t\t\t\t\tvar A = this.ptr;\n\t\t\t\t\t\t\t\te && u(e) === "object" && (e = e.ptr), o && u(o) === "object" && (o = o.ptr), m && u(m) === "object" && (m = m.ptr), ct(A, e, o, m);\n\t\t\t\t\t\t\t}, H.prototype.__destroy__ = H.prototype.__destroy__ = function() {\n\t\t\t\t\t\t\t\tvar e = this.ptr;\n\t\t\t\t\t\t\t\tHt(e);\n\t\t\t\t\t\t\t}, t;\n\t\t\t\t\t\t});\n\t\t\t\t\t\tu(R) === "object" && u(O) === "object" ? O.exports = x : (l = function() {\n\t\t\t\t\t\t\treturn x;\n\t\t\t\t\t\t}.apply(R, [])) === void 0 || (O.exports = l);\n\t\t\t\t\t}).call(this, "/index.js", d(2), "/", d(3)(T));\n\t\t\t\t}\n\t\t\t]);\n\t\t};\n\t});\n})))();\nexport { Cn as default };\n',FR="undefined"!=typeof self&&self.Blob&&new Blob(["URL.revokeObjectURL(import.meta.url);",xR],{type:"text/javascript;charset=utf-8"});function HR(t){let e;try{if(e=FR&&(self.URL||self.webkitURL).createObjectURL(FR),!e)throw"";const n=new Worker(e,{type:"module",name:null==t?void 0:t.name});return n.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e)}),n}catch(e){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(xR),{type:"module",name:null==t?void 0:t.name})}}Xe();const UR="audio/webm;codecs=opus",BR="undefined"!=typeof MediaRecorder&&"function"==typeof MediaRecorder.isTypeSupported;function jR(t){const e=ft(),n=ft(),r=ft(),i=ft(!1),o=t.mediaRecorder;ht(()=>{"recording"===t.recordingState?s():o.current&&null===t.recordingState&&(i.current=!0,o.current.stop())},[t.recordingState]);const s=async()=>{var s;n.current=LR.create({scrollingWaveform:!0,scrollingWaveformWindow:10}),e.current=wa({...t.wavesurferOptions,interact:!1,barHeight:null!==(s=t.wavesurferOptions.barHeight)&&void 0!==s?s:4,plugins:[n.current],container:t.wavesurferContainer.current});const a=await n.current.startMic();a.getAudioTracks().forEach(e=>{e.onmute=()=>t.onStopRecording()}),BR&&MediaRecorder.isTypeSupported(UR)?o.current=new MediaRecorder(a,{mimeType:UR}):o.current=new PR.default(a,{mimeType:UR},{encoderWorkerFactory:()=>new HR,WebMOpusEncoderWasmPath:qA}),o.current.onerror=t=>{WA.error("[TalkJS] Unexpected error while recording audio: ",t)},o.current.onstart=()=>r.current=Date.now(),o.current.ondataavailable=s=>{if(!i.current){const e=Date.now(),n=Math.floor((e-r.current)/1e3),i=new File([s.data],`talkjs_audio_message_${e}_${n}.webm`,{type:"audio/webm"});t.onSendRecording(i,n)}i.current=!1,(()=>{var t;o.current=void 0,null===(t=n.current)||void 0===t||t.stopMic(),e.current=void 0,n.current=void 0})()},o.current.start()};return null}function VR(t){const e=An(),n=Cn(),r=aD(),i=yo(n.referencedMessage$),o=yo(n.state$.userPermissions),s=Sn(),{sendMessage:a}=yn(),{voiceRecorder:l,recordVoiceMessage:c,voiceRecorderControlsProps:d}=function(){const t=Cn(),e=bn(),n=On(),r=Vo({...nD}),{state:i,duration:o,recordingUrl:s,uploadState:a,fileToken:l}=yo(r),c=ft(void 0),d=ft(null),h=ft(),p=_t(()=>n.runWithPermissionCheck("microphone",async e=>{const n=t.state$.currentConversation.peek();if(n&&"Read"!==n.access){try{(await navigator.mediaDevices.getUserMedia({audio:!0})).getTracks().forEach(t=>t.stop()),e("granted")}catch(t){throw e("denied"),t}r.assign({state:"recording",duration:0}),h.current=setInterval(()=>{r.duration.set(t=>t+1)},1e3)}}),[r,t,n]),f=_t(()=>{var t;h.current&&(clearInterval(h.current),h.current=void 0),null===(t=c.current)||void 0===t||t.stop()},[]),m=_t(()=>{h.current&&(clearInterval(h.current),h.current=void 0),r.assign(nD)},[r]),E=_t((n,i)=>{const o=URL.createObjectURL(new Blob([n])),s=n.size+","+n.name;t.state$.localFileBlobUrls.child(t.state$.currentConversationId.peek()).child(s).set({url:o,fetching:!1});const a={duration:i,filename:n.name};r.assign({state:"previewing",uploadState:"pending",recordingUrl:o+"?name="+n.name}),e.uploadVoice(n,a).then(e=>{t.fileUploads[e]={type:"voice",file:n,metadata:a,temporaryBlobUrl:o,state:"uploaded"},r.assign({uploadState:"done",fileToken:e})})},[e,r,t]),_=_t(()=>{l&&e.sendFileMessage({fileToken:l}),r.assign(nD)},[e,l,r]);return{voiceRecorder:Et(()=>{if(!i)return;const t={state:i,duration:o,recordingUrl:s,uploadState:a,stop:f,cancel:m,send:_};return rD.set(t,d),t},[i,o,s,a,f,m,_]),recordVoiceMessage:p,voiceRecorderControlsProps:Et(()=>({onStopRecording:f,onSendRecording:E,recordingState:i,mediaRecorder:c,wavesurferOptions:eD,wavesurferContainer:d}),[f,E,i])}}(),h=Et(()=>function(t){const e=OR(!1,()=>!!t.sendBlocked.get()&&vR(50).then(()=>!0));return Ao(()=>({...t.get(),sendBlocked:e.get()}))}(s.state$),[s.state$]),p=yo(Vo(()=>{const e=h.get();return void 0===t.editMessageId?new gR(e,a,t.attachFile,t.shareLocation,s.toggleEmojiPicker,c):new gR(e,t.onEditMessage,()=>{},()=>{},()=>{},()=>{})},[h,s.toggleEmojiPicker,t.attachFile,t.editMessageId,t.onEditMessage,t.shareLocation,a])),f=_t(t=>s.setText(t),[s]);return function({appId:t,conversationId:e,meId:n,setText:r,enabled:i}){const o=Et(()=>IR(e,n,t),[t,e,n]);ht(()=>{var t;!o||!i||r(null!==(t=JSON.parse(RR.getItem("talkjs_drafts")||"{}")[o])&&void 0!==t?t:"")},[o,i,r])}({appId:r.app.id,conversationId:r.conversation.id,meId:r.currentUser.id,setText:f,enabled:!t.editMessageId}),Gs(xn.Provider,{value:{onClose:()=>s.toggleEmojiPicker(!1),onEmojiSelected:t=>s.selectEmoji(t)},children:[Gs(jR,{...d}),Gs(e.MessageField,{common:r,referencedMessage:i,permissions:o,editor:p,voiceRecorder:l,editMessageId:t.editMessageId})]})}function zR({message:t}){const e=Cn(),n=bn(),r=yo(e.state$.editingMessageId),i=Et(()=>AR(t.content[0].children),[t]),o=Vo({isEmpty:0===i.length,atTextLimit:!1,sendBlocked:!1,characterCount:i.length,showEmojiPicker:!1,suggestEmojiQuery:void 0,suggestMentionQuery:void 0}),s=Et(()=>new DR(o,e.device$,e.state$.userPermissions),[o,e]),a=_t(async()=>{const r=s.state$;if(r.isEmpty.peek()||r.atTextLimit.peek())return;const i=s.getText();i&&await n.editMessage(t.id,{text:i}),e.state$.editingMessageId.set(null)},[e,n,s,t.id]);return ht(()=>{s.onEnter=a},[s,a]),ht(()=>{s.focus(),s.setText(AR(t.content[0].children,!0))},[s,t]),Gs(gn.Provider,{value:s,children:Gs(VR,{editMessageId:r,onEditMessage:a})})}function $R(t){const e=An(),n=aD();return Gs(e.MessageDivider,{common:n,...t})}function YR({message:t}){const e=An(),n=Cn(),r=yo(()=>n.messagePermissions$(t)),i=aD(),[o,s]=ut("sent");return $o(e=>{if(t.id.startsWith("ephemeral-"))return s("sending");const r=n.state$.currentConversation.everyoneReadUntil.get();return void 0!==r?t.createdAt<=r?s("everyoneRead"):s("sent"):void 0}),Gs(e.Message,{common:i,message:t,messageStatus:o,permissions:r})}function GR(){const t=An(),e=aD();return Gs(t.BeforeMessages,{common:e})}function WR(){const t=An(),e=aD();return Gs(t.AfterMessages,{common:e})}function XR(t){const e=Cn(),n=Tn();ht(()=>function(t,e,n){const r=t.state$.currentConversation;let i=!1;function o(){if(!i){const n=t.state$.currentConversationId.peek();En.defined(n),e.conversation(n).markAsRead()}}function s(){t.newMessageMarker$.peek()||t.newMessageMarker$.set(r.readUntil.peek())}function a(){r.isUnread.get()&&0===r.unreadMessageCount.peek()&&(i=!0,s())}let l=null;function c(){var e;const a=t.state$.currentConversation.lastMessage.id.get(),c=t.state$.currentConversationId.peek(),h=c!==l;l=c,h&&(d.stop(),i=!1,t.newMessageMarker$.set(void 0)),a&&c&&(r.isUnread.peek()&&(n()?(h&&s(),o()):(s(),d.start())),(null===(e=r.lastMessage.sender)||void 0===e?void 0:e.id.peek())===t.extUserId$.peek()&&(t.newMessageMarker$.set(void 0),i=!1))}const d={handle:void 0,start(){this.handle||(this.handle=setInterval(()=>this.tick(),2e3))},tick(){n()&&(o(),this.stop())},stop(){clearInterval(this.handle),this.handle=void 0}};window.__talkjsE2E&&(window.__talkjsE2E.foregroundCheck=()=>{En.defined(d.handle),d.tick()});const h=Hi(a),p=Hi(c);return()=>{t.newMessageMarker$.set(void 0),h(),p(),d.stop()}}(e,n,t),[e,n,t])}function KR({conversationId:t}){const e=Cn(),n=bn(),r=ft(!0),i=ft(null),o=yo(()=>!!e.state$.messages.child(t).loadedAll.get());return ht(()=>n.setScrollableDiv(i),[n]),XR(_t(()=>{if(!i.current)return!1;const t=!document.hidden,e=function(t){if(t.checkVisibility)return t.checkVisibility({contentVisibilityAuto:!0,opacityProperty:!0,visibilityProperty:!0,checkOpacity:!0,checkVisibilityCSS:!0});{const e=window.getComputedStyle(t),n=e.visibility,r=e.opacity;return!(0===t.getClientRects().length||"hidden"===n||"0"===r)}}(i.current),n=i.current.getBoundingClientRect(),r=n.top<window.innerHeight&&n.bottom>0&&n.left<window.innerWidth&&n.right>0;return t&&e&&r},[])),pt(()=>{r.current=i.current.scrollTop>-30}),ht(()=>{r.current&&(i.current.scrollTop=0)}),Gs("div",{className:"t-message-list",ref:i,"t-menu-boundary":"",onScroll:_t(n=>{const r=n.currentTarget,i=r.scrollHeight-r.clientHeight+r.scrollTop,o=e.messageSubscriptions[t];if(i<90&&o){const t=o.state;("pending"===t.type||"active"===t.type&&!t.loadedAll)&&o.loadMore(10)}},[e.messageSubscriptions,t]),children:[Gs(WR,{}),Gs(Lo,{each:e.chatItems$,children:e=>Gs("div",{className:"t-message-group","t-group-type":e.type.get(),children:Gs(Lo,{each:e.items,item:qR,itemProps:{controller:n,conversationId:t}})},e.id.get())}),o&&Gs(GR,{})]})}function qR({item$:t}){const e=Cn(),n=yo(t),r=yo(e.state$.editingMessageId);return n?n instanceof _R?Gs($R,{timestamp:n.timestamp,isReadMarker:n.isReadMarker,isDayMarker:n.isDayMarker}):r===n.id?Gs(zR,{message:n}):Gs(YR,{message:n}):null}Xe(),Xe(),Xe(),Xe(),Xe(),Xe();const JR=new Set(["ByV39eoc","B1FxElnd","aW4c49tW","qGfuGtx","SbERe5ee","ilaVEa15","FOlWOSaH","dao5gGmT","DLUgAhzL","fqXFumr6","FtiWHMYT","66iWOyWt","1375amYi","mWbJgzpt","jO7GqAvL","SkFIKxo5","2z4ILc3y","aDr8oPL1","Hku1c4Pt"]);function ZR({appId:t,chatboxState:e}){const n="t"===t.charAt(0)||JR.has(t);return ht(()=>{switch(e.type){case"auth-failed":WA.error("Could not authenticate user. Check if you are authenticating correctly.");break;case"unknown-user":WA.error(`User \`${e.userId}\` not found. Please verify that you synchronized this user's data with TalkJS, either using the JS SDK or through the REST API.`);break;case"unexpected-error":WA.error(e.error);break;case"wrong-app-id":WA.error(`Could not find given appId: "${e.appId}". You can find your appId on https://talkjs.com/dashboard.`);break;case"server-error":break;default:En.never(e)}},[e]),Gs("div",{className:"t-panel t-error-panel",children:[Gs("span",{className:"t-heading",children:"Something went wrong"}),Gs("p",{children:"Please reload the page and try again."}),n?Gs(O,{children:[Gs("p",{children:"Developer note: check your browser's developer tools console for messages that may help solve the problem."}),Gs("p",{children:"This message only shows up in test mode."})]}):Gs("p",{children:"If things keep not working, do not hesitate to get in touch with us."})]})}function QR(){return Gs("div",{className:"t-panel t-error-panel",children:Gs("span",{className:"t-heading",children:yo(Cn().t$).CHAT_NOT_FOUND})})}function ty(){return Gs("div",{className:"t-panel t-loading-panel",children:Gs($A,{})})}function ey(){const t=yo(Cn().t$);return Gs("div",{className:"t-panel t-error-panel",children:[Gs("span",{className:"t-heading",children:t.AUTH_EXPIRED_OVERLAY_TITLE}),Gs("p",{children:t.AUTH_EXPIRED_OVERLAY_DESCRIPTION})]})}function ny({children:t,className:e,...n}){return Gs("div",{className:"t-attach-overlay "+e,...n,children:t})}function ry(){const t=kn();zA(()=>t.cancelUpload(),".t-upload-preview");const e=yo(t.uploads$),n=e.every(t=>"uploaded"===t.state),r=ft(null);ht(()=>{n&&r.current.focus()},[n]);const i=yo(Cn().t$),[o,s]=ut(0),a=ft(null),[l,c]=ut({left:!1,right:!1}),d=_t(()=>{const t=a.current;if(!t)return;const e=t.scrollWidth-t.clientWidth,n={left:t.scrollLeft>1,right:t.scrollLeft<e-1};c(t=>t.left===n.left&&t.right===n.right?t:n)},[]);ht(()=>{const t=a.current;if(!t)return;d();const e=new ResizeObserver(d);return e.observe(t),t.addEventListener("scroll",d),()=>{e.disconnect(),t.removeEventListener("scroll",d)}},[e.length,d]);const h=_t(t=>{const e=a.current;if(!e||e.scrollWidth<=e.clientWidth)return;const n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),i=n.left+n.width/2,o=r.left+r.width/2,s=e.scrollWidth-e.clientWidth,l=cn(e.scrollLeft+i-o,0,s),c=window.matchMedia("(prefers-reduced-motion: reduce)").matches;e.scrollTo({left:l,behavior:c?"auto":"smooth"}),d()},[d]),p=_t(t=>{let e;if("number"==typeof t){var n;e=t;const r=null===(n=a.current)||void 0===n?void 0:n.querySelector(`button[data-index="${e}"]`);r&&h(r)}else e=+t.currentTarget.dataset.index,h(t.currentTarget);s(e)},[h]),f=_t(t=>{const n={ArrowLeft:-1,ArrowRight:1}[t.key];if(n){const t=e.length-1;p(cn(o+n,0,t))}},[e.length,p,o]);ht(()=>(window.addEventListener("keydown",f,!0),()=>{window.removeEventListener("keydown",f,!0)}),[f]);const m=e[o],E="error"===m.state;return Gs(ny,{className:"t-upload-preview",children:Gs("div",{className:"t-preview",children:[!E&&Gs(iy,{upload:m},o),E&&Gs(O,{children:[Gs("div",{className:"t-error-row",children:i.UPLOAD_ERROR}),"location"!==m.type&&Gs(ly,{upload:m})]}),Gs("div",{className:"t-send-row",children:[e.length>1&&Gs("div",{className:"t-thumbnails-wrap","t-overflow-left":l.left?"":void 0,"t-overflow-right":l.right?"":void 0,children:Gs("div",{className:"t-thumbnails",ref:a,children:e.map((t,e)=>Gs("button",{className:"t-thumbnail","data-index":e,onClick:p,"t-selected":o===e?"":void 0,"t-error":"error"===t.state?"":void 0,children:Gs(dy,{upload:t})},e))})}),Gs("div",{className:"t-actions",children:[Gs("button",{className:"t-cancel",onClick:t.cancelUpload,children:i.CANCEL}),n&&Gs("button",{className:"t-confirm-send",onClick:t.confirmUpload,ref:r,children:i.SEND_BUTTON_TEXT})]})]})]})})}function iy({upload:t}){return"location"!==t.type?Gs(O,{children:[Gs(sy,{upload:t}),Gs(ly,{upload:t})]}):"uploaded"===t.state?Gs(oy,{location:t.location}):Gs("div",{className:"t-loading",children:Gs($A,{})})}function oy({location:t}){const{imageUrl:e,linkUrl:n}=ED(t);return Gs("a",{href:n,target:"_blank",rel:"noreferrer",className:"t-location-upload-preview",style:{background:`url(${JSON.stringify(e)}) center center / cover no-repeat`}})}function sy({upload:t}){const[e,n]=function(t){const e=t.file;switch(t.type){case"video":{const n=/[.]ts/i.test(e.name)?"mpegts":"native";return[Gs(cy,{src:t.temporaryBlobUrl,videoType:n,playsInline:!0,controls:!0,preload:"auto"}),ay(t.metadata)]}case"image":return[Gs("img",{src:t.temporaryBlobUrl}),ay(t.metadata)];case"audio":return[Gs(ka,{src:t.temporaryBlobUrl,filename:e.name})];case"file":return[Gs("img",{src:hy(t.file.name,"error"===t.state)})];case"voice":En.unreachable()}}(t);return Gs("div",{className:"t-preview-container",style:n,children:e})}function ay(t){return{"--img-w":t.width,"--img-h":t.height}}function ly({upload:t}){const e=yo(Cn().t$),n=(()=>{switch(t.state){case"uploaded":case"error":return t.metadata.filename;case"uploading":return e.UPLOAD_IN_PROGRESS;default:En.unreachable()}})();let r="",i="";return"file"===t.type&&(r="is-file","uploaded"===t.state&&(i="file-block")),Gs("div",{className:`t-filename-row ${r}`,children:Gs("div",{className:i,children:n})})}function cy(t){const{videoType:e,...n}=t;return Gs("video",{...n})}Xe();const uy="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==";function dy({upload:t}){var e;const n="error"===t.state,r=Et(()=>"video"===t.type?uy:"image"===t.type?t.temporaryBlobUrl:hy(t.metadata.filename,n),[t,n]),[i,o]=ut(null);return ht(()=>{let e=!0;return"video"===t.type&&async function(t){return new Promise((e,n)=>{const r=document.createElement("video");r.preload="metadata",r.muted=!0,r.playsInline=!0,r.src=t,r.onloadeddata=async()=>{r.currentTime=.1},r.onseeked=()=>{const t=document.createElement("canvas");t.width=r.videoWidth,t.height=r.videoHeight,t.getContext("2d").drawImage(r,0,0,t.width,t.height);const n=t.toDataURL("image/png");r.pause(),r.src="",r.load(),e(n)},r.onerror=()=>n("Error loading video")})}(t.temporaryBlobUrl).then(t=>{e&&o(t)}),()=>{e=!1}},[t]),Gs("img",{src:null!==(e=null!=i?i:r)&&void 0!==e?e:void 0})}function hy(t,e){const n=t.match(/\.([-_a-zA-Z0-9]+)$/),r=(n?n[1].toUpperCase():"?").slice(0,6),i=`\n <svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 64 64">\n <rect width="100%" height="100%" rx="10" fill="${e?"#ffdbdb":"#ececec"}"/>\n <text\n x="50%"\n y="54%"\n text-anchor="middle"\n alignment-baseline="middle"\n font-size="${[22,22,22,22,18,13,10][r.length]}"\n font-family="Inter,Roboto,Arial,sans-serif"\n font-weight="bold"\n fill="${e?"#880000":"#444"}"\n letter-spacing="2"\n dominant-baseline="middle"\n >${r}</text>\n </svg>\n `.replace(/\s+/g," ");return`data:image/svg+xml;utf8,${encodeURIComponent(i)}`}function py(){var t;const e=An(),n=Cn(),r=aD(),i=null!==(t=yo(()=>n.state$.isUserConnected.child(n.state$.currentConversationId.get())))&&void 0!==t?t:{},o=yo(n.state$.userPermissions),s=yo(n.searchQuery$);return Gs(e.ChatHeader,{common:r,isUserConnected:i,permissions:o,searchQuery:s})}function fy(){const t=An(),e=aD();return Gs(t.MessageListHeader,{common:e})}function my(){const t=An(),e=aD();return Gs(t.MessageListFooter,{common:e})}function Ey(){const t=An(),e=aD();return Gs(t.NoConversationSelected,{common:e})}function _y({containerRef:t}){const[e,n]=ut(null),[r,i]=ut(null),[o,s]=ut(!1);ht(()=>{const e=t.current;let r=null;const i=t=>{if("mouse"!==t.pointerType)return;r&&(clearTimeout(r),r=null);const e=t.target.closest("[t-tooltip-text]");e&&(r=setTimeout(()=>{r=null,n(e),s(!1)},500))};return null==e||e.addEventListener("pointerover",i),()=>{null==e||e.removeEventListener("pointerover",i)}},[t]),ht(()=>{const e=t.current;let r,i=!1;function o(t){i=!1,"mouse"!==t.pointerType&&(r=setTimeout(()=>{const e=t.target.closest("[t-tooltip-text]");e&&(i=!0,n(e),s(!0))},300))}function a(){clearTimeout(r)}function l(t){i&&(t.stopPropagation(),t.preventDefault())}return e.addEventListener("pointerdown",o),e.addEventListener("pointerup",a),e.addEventListener("pointerleave",a),e.addEventListener("click",l,!0),e.addEventListener("contextmenu",l,!0),()=>{e.removeEventListener("pointerdown",o),e.removeEventListener("pointerup",a),e.removeEventListener("pointerleave",a),e.removeEventListener("click",l,!0),e.removeEventListener("contextmenu",l,!0)}},[t]);const{refs:a,floatingStyles:l}=mv({placement:"top",middleware:[Av(),o&&Ev(10)],whileElementsMounted:iv});return ht(()=>{if(e){a.setReference(e);const t=()=>{const t=e.getAttribute("t-tooltip-text");null===t?s():i(t.trim())},r=new MutationObserver(t);r.observe(e,{attributes:!0}),t();const s=()=>{o?setTimeout(()=>n(null),1e3):n(null)};return e.addEventListener("pointerleave",s),()=>{e.removeEventListener("pointerleave",s),r.disconnect(),a.setReference(null),i(null)}}},[e,o,a]),r?Gs("div",{className:"t-tooltip",role:"tooltip",style:l,ref:a.setFloating,children:r}):null}function Ay({appId:t,chatHeaderVisible:e,messageFieldVisible:n}){const r=Sn(),i=function(){const t=Cn(),e=Vo(()=>{const e=t.errors$.get(),n=t.authTokenState$.get(),r=t.state$.loadingConversationId.get(),i=t.state$.currentConversationId.get();return e.serverError?"server-error":e.wrongAppId?"wrong-app-id":"loading"===n||"idle"===n?"loading-token":"invalid"===n?"invalid-token":"expired"===n?"expired-token":"valid"===n?e.unknownUser?"unknown-user":r&&t.state$.unknownConversations.child(r).get()?"loading-conv-failed":t.canRenderUi(r)||i!==r&&t.canRenderUi(i)?"loaded":"loading-data":void En.unreachable()}),n=Vo({type:"loading"});$o(r=>{const i=e.get(),o=t.state$.currentConversationId.get(),s=t.extUserId$.get(),a=t.appId$.get();function l(t){n.set({type:"loading"});const e=setTimeout(()=>{n.set(t)},5e3);return()=>clearTimeout(e)}switch(i){case"invalid-token":n.set({type:"auth-failed"});break;case"expired-token":n.set({type:"expired-token"});break;case"wrong-app-id":n.set({type:"wrong-app-id",appId:a});break;case"server-error":n.set({type:"server-error"});break;case"loading-data":case"loading-token":n.set({type:"loading"});break;case"loaded":n.set({type:"loaded",conversationId:o,userId:s});break;case"loading-conv-failed":r.onCleanup=l({type:"inaccessible-conversation",userId:s,conversationId:o});break;case"unknown-user":r.onCleanup=l({type:"unknown-user",userId:s});break;default:En.never(i)}});const r=Vo({type:"loading"});return $o(t=>{if("loading"===n.type.get()){r.set({type:"invisible-loading"});const e=setTimeout(()=>{r.set({type:"loading"})},1e3);t.onCleanup=()=>{clearTimeout(e)}}else r.set(n.get())}),yo(r)}(),o=kn(),s=ft(null);ht(()=>{const t=s.current;return o.setInputElement(t),null==t||t.addEventListener("change",o.onInputChange),null==t||t.addEventListener("cancel",o.onInputCancel),()=>{o.setInputElement(null),null==t||t.removeEventListener("change",o.onInputChange),null==t||t.removeEventListener("cancel",o.onInputCancel)}}),ht(()=>{r.uploadFile=o.startFileUpload,o.onClose=()=>{r.focus()}},[r,o]);const[a,l]=ut(!1),c=Cn(),d=yo(()=>!!c.app$.get()&&c.state$.userPermissions.canShareFile.get()),h=yo(()=>o.uploads$.get().length>0),p=d&&!h;ht(()=>{"loaded"===i.type?c.renderedConversationId$.set(i.conversationId):c.renderedConversationId$.set(void 0)},[i,c]);const f=_t(t=>{o.startFileUpload([...t.dataTransfer.files]),t.preventDefault(),l(!1)},[o]),m=_t(t=>{t.preventDefault(),t.dataTransfer.types.includes("Files")&&l(!0)},[]),E=_t(t=>{t.preventDefault(),l(!1)},[]),_=ft(null);return QA(),"invisible-loading"===i.type?Gs(O,{}):"loading"===i.type?Gs(ty,{}):"inaccessible-conversation"===i.type?Gs(QR,{}):"unknown-user"===i.type||"auth-failed"===i.type||"wrong-app-id"===i.type||"server-error"===i.type||"unexpected-error"===i.type?Gs(ZR,{appId:t,chatboxState:i}):"expired-token"==i.type?Gs(ey,{}):"loaded"===i.type?null===i.conversationId?Gs(Ey,{}):Gs("div",{className:"t-chatbox-content",onDragOver:p?m:void 0,onDragLeave:p?E:void 0,onDrop:p?f:void 0,"t-menu-boundary":"root",ref:_,children:[e&&Gs(py,{}),Gs(fy,{}),Gs(KR,{conversationId:i.conversationId}),Gs(my,{}),n&&Gs(VR,{attachFile:o.startFileUpload,shareLocation:o.startLocationUpload}),h&&Gs(ry,{}),a&&Gs(ny,{className:"t-drop-overlay",children:Gs(Na,{type:"attachment"})}),Gs("input",{ref:s,type:"file",multiple:!0,style:{display:"none"}}),Gs(_y,{containerRef:_})]}):Gs(O,{})}Xe(),Xe();const gy=()=>!0;async function Sy(t,e,{initialDelay:n,maxDelay:r,log:i,shouldRetry:o=gy}){return e().catch(async s=>{if(i&&i(`[TalkJS] Retries left: ${t}. Error: ${JSON.stringify(s)}.`),0===t||!await o(s))throw s;const a=1e3*n*1.2,l=function(t,e){return t*(1-e+2*Math.random()*e)}(r?Math.min(1e3*r,a):a,.05);return function(t){return t<=0?Promise.resolve():new Promise(e=>setTimeout(e,t))}(l).then(()=>Sy(t-1,e,{initialDelay:l/1e3,maxDelay:r,log:i,shouldRetry:o}))})}function vy(){const t={};return t.promise=new Promise(function(e,n){t.resolve=e,t.reject=n}),t}const Oy=new Uint8Array(31);function Dy(){if(void 0!==globalThis.crypto)crypto.getRandomValues(Oy);else for(let t=0;t<Oy.length;t++)Oy[t]=Math.floor(256*Math.random());let t=0;return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,e=>(+e^Oy[t++]&15>>+e/4).toString(16))}var Ty=class{constructor(t,e,n,r,i,o,s,a,l){this.store=t,this.talkSession=e,this.editorInternals=n,this.beforeSendMessageRef=r,this.onSendMessage=i,this.onDeleteMessage=o,this.onMessageAction=s,this.onFocusMessage=a,this.onBackButtonClick=l,this.loadMoreUntil=async t=>{const e=this.store.state$.currentConversationId.peek(),n=this.store.state$.messages.child(e).loadedAll;let r;do{const i=this.store.messageSubscriptions[e];i&&!n.peek()&&await i.loadMore(30),r=t()}while(!n.peek()&&!r);return r}}setScrollableDiv(t){this.scrollable=t}toggleSearchBox(t){if(this.store.state$.userPermissions.canSearch.peek())if(void 0!==t)this.store.chatSearchState$.set(t?"visible":"hidden");else{const t=this.store.chatSearchState$.peek();this.store.chatSearchState$.set("hidden"===t?"visible":"hidden")}else WA.error("In-conversation message search is only available to customers on Growth plan and above.")}async deleteMessage(t){const e=this.store.state$.currentConversation.peek();if(!e||"Read"===e.access)return;const n=e.id,r=this.store.state$.messages.child(n).lookup.child(t).peek(),i=this.talkSession.conversation(n).message(t),[o]=await Promise.all([null!=r?r:i.get(),i.delete()]);if(o){const t={currentUser:this.store.currentUser$.peek(),conversation:this.store.state$.currentConversation.peek(),message:r};this.onDeleteMessage(t)}}setEditing(t){const e=this.store.state$.currentConversation.peek();!e||"Read"===e.access||this.store.state$.editingMessageId.set(t)}async editMessage(t,e){const n=this.store.state$.currentConversation.peek();if(!n||"Read"===n.access)return;const r=n.id;await this.talkSession.conversation(r).message(t).edit(e)}setReferencedMessage(t){const e=this.store.state$.currentConversation.peek();!e||"Read"===e.access||(this.store.state$.referencedMessageId.set(t),setTimeout(()=>this.editorInternals.focus({skipProseMirrorStuff:!0}),100))}async focusMessage(t,e=!0){var n;if(null==t)return this.store.focusedMessage$.set(null),null;if(await ji(()=>this.store.state$.loadingConversationId.get()===this.store.renderedConversationId$.get()),null===this.store.state$.currentConversationId.peek())return WA.error("Cannot focus message because current conversation is `null`."),null;const r=()=>{const e=this.store.state$.currentConversationId.peek();return this.store.state$.messages.child(e).lookup.child(t).peek()||null};let i=r();if(i||(i=await this.loadMoreUntil(r)),!i)return WA.error(`Message with id: \`${t}\` could not be found in this conversation`),i;const o=null===(n=this.scrollable)||void 0===n?void 0:n.current;En.defined(o);const s=o.querySelector(`[t-message-id="${t}"]`);return s?this.scrollToAndHighlight(s,i,e):WA.error(`Could not find HTMLElement with attribute: t-message-id="${t}"`),i}async jumpToHighlight(t){if(!this.store.state$.userPermissions.canSearch.peek())return WA.error("In-conversation message search is only available to customers on Growth plan and above."),null;if(0===this.store.highlightedStrings$.peek().length||"searching"===this.store.chatSearchState$.peek())return null;let e=this.findHighlight(t);return!e&&"up"===t&&(this.store.chatSearchState$.set("searching"),e=await this.loadMoreUntil(()=>this.findHighlight("up"))),e}findHighlight(t){var e;const n=null===(e=this.scrollable)||void 0===e?void 0:e.current;En.defined(n);const r=[],i=Array.from(n.querySelectorAll("[t-message-id]")),o=this.store.state$.currentConversationId.peek(),s=this.store.state$.messages.child(o).state.peek();if(0===i.length&&0!==s.length)return WA.error("Could not find HTMLElements with the attribute: t-message-id. This attribute is required for In-Conversation search to work."),null;let a;if(Array.from(n.getElementsByClassName("t-highlighted-text")).forEach(t=>{const e=i.findIndex(e=>e.contains(t));if(-1===e)return;const n=i.splice(e,1)[0],o=n.getAttribute("t-message-id");r.push([o,n])}),"up"===t){const t=n.getBoundingClientRect().top;a=r.find(([e,n])=>n.getBoundingClientRect().top-t<-5)}else{const t=.05*n.getBoundingClientRect().height,e=n.getBoundingClientRect().bottom;for(let n=r.length-1;n>=0;n--){const i=r[n],[o,s]=i;if(e-s.getBoundingClientRect().top<=t){a=i;break}}}const l=this.store.chatSearchState$;if(a){const[t,e]=a,n=this.store.state$.messages.child(o).lookup.child(t).peek();return this.scrollToAndHighlight(e,n),l.set("visible"),n}return 0===r.length?l.set("noResults"):l.set("noMoreResults"),null}scrollToAndHighlight(t,e,n=!0){const r=this.scrollable.current.getBoundingClientRect(),i=t.getBoundingClientRect();let o="start";-1===Math.sign(r.top-i.top)&&i.height<r.height&&(o="end"),t instanceof HTMLElement&&(t.style.scrollSnapAlign=o),t.scrollIntoView({behavior:"instant"}),t instanceof HTMLElement&&(t.style.scrollSnapAlign="none"),this.store.focusedMessage$.set(e),n&&this.onFocusMessage({message:e})}setHighlightedStrings(t){this.store.state$.userPermissions.canSearch.peek()?this.store.highlightedStrings$.set(t):WA.error("In-conversation message search and by extension highlighting of strings are only available to customers on Growth plan and above.")}setSearchQuery(t){this.store.setSearchQuery(t)}async sendMessage(t){const e=this.store.state$.currentConversationId.peek();if(!e)return;const n=this.beforeSendMessageRef.current;let r=t;if(n&&await this.editorInternals.blockSend(async()=>{r=await async function(t,e,n,r){try{const i=Iy(t,r),o=await n({plaintext:cD(i),content:i,referencedMessage:await yy(t,e,r.referencedMessage)});return null===o?null:o?function(t,e){const n={...t,...e};return e.content&&delete n.text,null===n.referencedMessage&&delete n.referencedMessage,n}(r,o):r}catch(t){return WA.error("Your beforeSendMessage callback threw an error: ",t),null}}(this.store,this.talkSession,n,t)}),!r)return;if(this.store.state$.currentConversationId.peek()!==e)return void WA.warn("The conversation changed while beforeSendMessage was running. The message was not sent.");const i=await async function(t,e,n){var r;const i=await yy(t,e,n.referencedMessage),o=Iy(t,n),s="text"in n?n.text:cD(o),a=Math.max(Date.now(),Ry+1);return Ry=a,{id:"ephemeral-"+Dy(),type:"UserMessage",sender:t.currentUser$.peek(),createdAt:a,editedAt:null,custom:null!==(r=n.custom)&&void 0!==r?r:{},origin:"web",referencedMessage:i,reactions:[],content:o,plaintext:s}}(this.store,this.talkSession,r);this.store.state$.ephemeralMessages.child(e).child(i.id).set(i);const o=vy();this.store.readyForNewMessagesPromise=o.promise;const s=await this.talkSession.conversation(e).send(r);this.store.state$.ephemeralMessageIdMapping.child(e).child(s.id).set(i.id),o.resolve(),this.onSendMessage({message:await s.get(),currentUser:this.store.currentUser$.peek(),conversation:this.store.state$.currentConversation.peek()})}sendFileMessage(t){const e={type:"file",fileToken:t.fileToken};return this.sendMessage({content:[e],custom:t.custom})}async uploadVoice(t,e){return await this.talkSession.uploadVoice(t,e)}sendLocationMessage(t){const e={type:"location",latitude:t.location.latitude,longitude:t.location.longitude};return this.sendMessage({content:[e],custom:t.custom})}markAsTyping(){const t=this.store.state$.currentConversationId.peek();t&&this.talkSession.conversation(t).markAsTyping()}async toggleReaction(t,e,n){"string"!=typeof e&&(e=e.emoji);const r=this.store.state$.currentConversationId.peek();if(!r)return;const i=this.store.state$.messages.child(r).lookup.child(t).peek().reactions.find(t=>t.emoji===e),o=this._getReactionRef(t,e);null!=i&&i.currentUserReacted&&!0!==n?await o.remove():!1!==n&&await o.add()}async addReaction(t,e){this.store.state$.currentConversationId.peek()&&await this._getReactionRef(t,e).add()}triggerMessageAction(t,e,n){const r=this.store.state$.currentConversation.peek();r&&("string"==typeof t&&(t=this.store.state$.messages.child(r.id).lookup.child(t).peek()),this.onMessageAction({action:e,params:n,message:t,conversation:r}))}clickBackButton(){const t=this.store.currentUser$.peek();En.defined(t),this.onBackButtonClick({currentUser:t})}storeDraft(t){const e=this.store.state$.currentConversationId.peek(),n=this.store.currentUser$.peek(),r=this.store.appId$.peek();!e||!n||!r||yR(e,n.id,r,t)}_getReactionRef(t,e){const n=this.store.state$.currentConversationId.peek();return this.talkSession.conversation(n).message(t).reaction(e)}};let Ry=0;async function yy(t,e,n){var r;if(!n)return null;const i=t.state$.currentConversationId.peek(),o=t.state$.messages.child(i),s="string"==typeof n?n:n.id;let a=null!==(r=o.lookup.child(s).peek())&&void 0!==r?r:null;return a||(a=await e.conversation(i).message(s).get()),a?function(t){var e,n;const{referencedMessage:r,type:i,sender:o,...s}=t;return En.defined(o),En("UserMessage"===i),{...s,type:i,sender:o,referencedMessageId:null!==(e=null===(n=t.referencedMessage)||void 0===n?void 0:n.id)&&void 0!==e?e:null}}(a):null}function Iy(t,e){return"content"in e?[Ny(t,e.content[0])]:[Cy(e.text)]}const Cy=t=>({type:"text",children:F_(t)});function Ny(t,e){switch(e.type){case"text":case"location":return e;case"file":return function(t,e){const n=t.fileUploads[e.fileToken];return En.defined(n),{type:"file",subtype:"file"===n.type?void 0:n.type,...n.metadata,size:n.file.size,filename:n.file.name,fileToken:e.fileToken,url:n.temporaryBlobUrl}}(t,e)}}var by=class extends Error{constructor(t,e){const n=function(t){if("string"==typeof t)return t;if(Array.isArray(t))return t.join("\n");try{return JSON.stringify(t)}catch(e){return String(t)}}(t);super(n),this.userMessage=null!=e?e:n,Object.setPrototypeOf&&Object.setPrototypeOf(this,new.target.prototype)}};const wy=console;var ky=class{constructor(t,e,n,r){this.apiUrls=t,this.appId=e,this.sessionId=n,this.authProvider=r,this._lastPutPromise=Promise.resolve()}async get(t,e={}){const n=this.endpointUrl(t,e),r=await My(()=>this.fetchWithReauth(n),{retries:11});return await this.handleResponse(r,n)}async queuedPut(t,e){await this._lastPutPromise;const n=My(()=>this._doPut(t,e));return this._lastPutPromise=n,n}put(t,e,n){const r=()=>this._doPut(t,e);return n?Py(r,n):My(r,{retries:5})}post(t,e,n){const r=()=>this._doPost(t,e);return n?Py(r,n):My(r,{retries:5})}delete(t,e={}){return My(()=>this._doDelete(t,e),{retries:11})}endpointUrl(t,e={}){const n=new URL(this.apiUrls.internalHttpApiUrl);n.pathname+=`/${this.appId}/${t}`,n.searchParams.set("sessionId",this.sessionId);for(const[t,r]of Object.entries(e))n.searchParams.set(t,r);return n}async _doPut(t,e){const n=this.endpointUrl(t),r=await this.fetchWithReauth(n,{method:"PUT",body:JSON.stringify(e)});return await this.handleResponse(r,n)}async _doPost(t,e){const n=this.endpointUrl(t),r=await this.fetchWithReauth(n,{method:"POST",body:JSON.stringify(e)});return await this.handleResponse(r,n)}async _doDelete(t,e){const n=this.endpointUrl(t,e),r=await this.fetchWithReauth(n,{method:"DELETE"});return await this.handleResponse(r,n)}async handleResponse(t,e){if(t.status>=300){if(404===t.status)throw GA.error(`[${this.appId}][BackendRestClient] Couldn't find resource.`),new by("Could not find app.",`Could not find given appId: "${this.appId}". You can find your appId on https://talkjs.com/dashboard.`);if(401===t.status){const t=await this.authProvider.getToken();throw GA.error(`[${this.appId}][BackendRestClient] Couldn't authenticate ${e} with token ${t}.`),new by("User not authenticated.","Could not authenticate user. Check if your signature is calculated correctly.")}if(t.status>=300&&t.status<500){const{error:e}=await t.json();throw new by(e)}{const n=await t.text();throw new Error(`Got non-success response (${n}) from the server for url: ${e}.`)}}return await t.json()}async fetchWithReauth(t,e){function n(n){const r={Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${n}`};return fetch(t,{...e,headers:r})}const r=await this.authProvider.getToken(),i=await n(r);return 401!==i.status?i:(wy.error(`401 error from ${null==e?void 0:e.method} ${t}, ${r}`),this.authProvider.refreshToken(),n(await this.authProvider.getToken()))}};function Ly(t){return!t.userMessage}function My(t,{retries:e=30}={}){return Sy(e,t,{shouldRetry:Ly,log:wy.warn.bind(wy),maxDelay:30,initialDelay:.2})}async function Py(t,e){try{return await t()}catch(t){if(!Ly(t))throw t}let n=!1;return e.then(()=>{n=!0}),Sy(1e3,t,{initialDelay:.2,maxDelay:30,shouldRetry:()=>!n,log:wy.warn.bind(wy)})}var xy=l((t,e)=>{var n="__lodash_hash_undefined__",r=9007199254740991,i="[object Arguments]",o="[object Function]",s="[object Object]",a=/^\[object .+?Constructor\]$/,l=/^(?:0|[1-9]\d*)$/,c={};c["[object Float32Array]"]=c["[object Float64Array]"]=c["[object Int8Array]"]=c["[object Int16Array]"]=c["[object Int32Array]"]=c["[object Uint8Array]"]=c["[object Uint8ClampedArray]"]=c["[object Uint16Array]"]=c["[object Uint32Array]"]=!0,c[i]=c["[object Array]"]=c["[object ArrayBuffer]"]=c["[object Boolean]"]=c["[object DataView]"]=c["[object Date]"]=c["[object Error]"]=c[o]=c["[object Map]"]=c["[object Number]"]=c[s]=c["[object RegExp]"]=c["[object Set]"]=c["[object String]"]=c["[object WeakMap]"]=!1;var d="object"==typeof global&&global&&global.Object===Object&&global,h="object"==typeof self&&self&&self.Object===Object&&self,p=d||h||Function("return this")(),f="object"==typeof t&&t&&!t.nodeType&&t,m=f&&"object"==typeof e&&e&&!e.nodeType&&e,E=m&&m.exports===f,_=E&&d.process,A=function(){try{return m&&m.require&&m.require("util").types||_&&_.binding&&_.binding("util")}catch(t){}}(),g=A&&A.isTypedArray;var S,v=Array.prototype,O=Function.prototype,D=Object.prototype,T=p["__core-js_shared__"],R=O.toString,y=D.hasOwnProperty,I=(S=/[^.]+$/.exec(T&&T.keys&&T.keys.IE_PROTO||""))?"Symbol(src)_1."+S:"",C=D.toString,N=R.call(Object),b=RegExp("^"+R.call(y).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),w=E?p.Buffer:void 0,k=p.Symbol,L=p.Uint8Array,M=w?w.allocUnsafe:void 0,P=function(t,e){return function(n){return t(e(n))}}(Object.getPrototypeOf,Object),x=Object.create,F=D.propertyIsEnumerable,H=v.splice,U=k?k.toStringTag:void 0,B=function(){try{var t=dt(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),j=w?w.isBuffer:void 0,V=Math.max,z=Date.now,$=dt(p,"Map"),Y=dt(Object,"create"),G=function(){function t(){}return function(e){if(!Dt(e))return{};if(x)return x(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function W(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function X(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function K(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function q(t){var e=this.__data__=new X(t);this.size=e.size}function J(t,e){var n=At(t),r=!n&&_t(t),i=!n&&!r&&St(t),o=!n&&!r&&!i&&Rt(t),s=n||r||i||o,a=s?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],l=a.length;for(var c in t)(e||y.call(t,c))&&(!s||!("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||ht(c,l)))&&a.push(c);return a}function Z(t,e,n){(void 0!==n&&!Et(t[e],n)||void 0===n&&!(e in t))&&et(t,e,n)}function Q(t,e,n){var r=t[e];(!y.call(t,e)||!Et(r,n)||void 0===n&&!(e in t))&&et(t,e,n)}function tt(t,e){for(var n=t.length;n--;)if(Et(t[n][0],e))return n;return-1}function et(t,e,n){"__proto__"==e&&B?B(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}W.prototype.clear=function(){this.__data__=Y?Y(null):{},this.size=0},W.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},W.prototype.get=function(t){var e=this.__data__;if(Y){var r=e[t];return r===n?void 0:r}return y.call(e,t)?e[t]:void 0},W.prototype.has=function(t){var e=this.__data__;return Y?void 0!==e[t]:y.call(e,t)},W.prototype.set=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Y&&void 0===e?n:e,this},X.prototype.clear=function(){this.__data__=[],this.size=0},X.prototype.delete=function(t){var e=this.__data__,n=tt(e,t);return!(n<0)&&(n==e.length-1?e.pop():H.call(e,n,1),--this.size,!0)},X.prototype.get=function(t){var e=this.__data__,n=tt(e,t);return n<0?void 0:e[n][1]},X.prototype.has=function(t){return tt(this.__data__,t)>-1},X.prototype.set=function(t,e){var n=this.__data__,r=tt(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},K.prototype.clear=function(){this.size=0,this.__data__={hash:new W,map:new($||X),string:new W}},K.prototype.delete=function(t){var e=ut(this,t).delete(t);return this.size-=e?1:0,e},K.prototype.get=function(t){return ut(this,t).get(t)},K.prototype.has=function(t){return ut(this,t).has(t)},K.prototype.set=function(t,e){var n=ut(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},q.prototype.clear=function(){this.__data__=new X,this.size=0},q.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},q.prototype.get=function(t){return this.__data__.get(t)},q.prototype.has=function(t){return this.__data__.has(t)},q.prototype.set=function(t,e){var n=this.__data__;if(n instanceof X){var r=n.__data__;if(!$||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new K(r)}return n.set(t,e),this.size=n.size,this};var nt=function(t){return function(e,n,r){for(var i=-1,o=Object(e),s=r(e),a=s.length;a--;){var l=s[t?a:++i];if(!1===n(o[l],l,o))break}return e}}();function rt(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":U&&U in Object(t)?function(t){var e=y.call(t,U),n=t[U];try{t[U]=void 0;var r=!0}catch(t){}var i=C.call(t);return r&&(e?t[U]=n:delete t[U]),i}(t):function(t){return C.call(t)}(t)}function it(t){return Tt(t)&&rt(t)==i}function ot(t){return!(!Dt(t)||function(t){return!!I&&I in t}(t))&&(vt(t)?b:a).test(function(t){if(null!=t){try{return R.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t))}function st(t){if(!Dt(t))return function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}(t);var e=pt(t),n=[];for(var r in t)"constructor"==r&&(e||!y.call(t,r))||n.push(r);return n}function at(t,e,n,r,i){t!==e&&nt(e,function(o,a){if(i||(i=new q),Dt(o))!function(t,e,n,r,i,o,a){var l=ft(t,n),c=ft(e,n),d=a.get(c);if(d)return void Z(t,n,d);var h=o?o(l,c,n+"",t,e,a):void 0,p=void 0===h;if(p){var f=At(c),m=!f&&St(c),E=!f&&!m&&Rt(c);h=c,f||m||E?At(l)?h=l:function(t){return Tt(t)&>(t)}(l)?h=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}(l):m?(p=!1,h=function(t,e){if(e)return t.slice();var n=t.length,r=M?M(n):new t.constructor(n);return t.copy(r),r}(c,!0)):E?(p=!1,h=function(t,e){var n=e?function(t){var e=new t.constructor(t.byteLength);return new L(e).set(new L(t)),e}(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}(c,!0)):h=[]:function(t){if(!Tt(t)||rt(t)!=s)return!1;var e=P(t);if(null===e)return!0;var n=y.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&R.call(n)==N}(c)||_t(c)?(h=l,_t(l)?h=function(t){return function(t,e,n,r){var i=!n;n||(n={});for(var o=-1,s=e.length;++o<s;){var a=e[o],l=r?r(n[a],t[a],a,n,t):void 0;void 0===l&&(l=t[a]),i?et(n,a,l):Q(n,a,l)}return n}(t,yt(t))}(l):(!Dt(l)||vt(l))&&(h=function(t){return"function"!=typeof t.constructor||pt(t)?{}:G(P(t))}(c))):p=!1}p&&(a.set(c,h),i(h,c,r,o,a),a.delete(c)),Z(t,n,h)}(t,e,a,n,at,r,i);else{var l=r?r(ft(t,a),o,a+"",t,e,i):void 0;void 0===l&&(l=o),Z(t,a,l)}},yt)}function lt(t,e){return mt(function(t,e,n){return e=V(void 0===e?t.length-1:e,0),function(){for(var r=arguments,i=-1,o=V(r.length-e,0),s=Array(o);++i<o;)s[i]=r[e+i];i=-1;for(var a=Array(e+1);++i<e;)a[i]=r[i];return a[e]=n(s),function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}(t,this,a)}}(t,e,Nt),t+"")}var ct=B?function(t,e){return B(t,"toString",{configurable:!0,enumerable:!1,value:Ct(e),writable:!0})}:Nt;function ut(t,e){var n=t.__data__;return function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}(e)?n["string"==typeof e?"string":"hash"]:n.map}function dt(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return ot(n)?n:void 0}function ht(t,e){var n=typeof t;return!!(e=null==e?r:e)&&("number"==n||"symbol"!=n&&l.test(t))&&t>-1&&t%1==0&&t<e}function pt(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||D)}function ft(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var mt=function(t){var e=0,n=0;return function(){var r=z(),i=16-(r-n);if(n=r,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(ct);function Et(t,e){return t===e||t!=t&&e!=e}var _t=it(function(){return arguments}())?it:function(t){return Tt(t)&&y.call(t,"callee")&&!F.call(t,"callee")},At=Array.isArray;function gt(t){return null!=t&&Ot(t.length)&&!vt(t)}var St=j||function(){return!1};function vt(t){if(!Dt(t))return!1;var e=rt(t);return e==o||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Ot(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=r}function Dt(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Tt(t){return null!=t&&"object"==typeof t}var Rt=g?function(t){return function(e){return t(e)}}(g):function(t){return Tt(t)&&Ot(t.length)&&!!c[rt(t)]};function yt(t){return gt(t)?J(t,!0):st(t)}var It=function(t){return lt(function(e,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(o=t.length>3&&"function"==typeof o?(i--,o):void 0,s&&function(t,e,n){if(!Dt(n))return!1;var r=typeof e;return!!("number"==r?gt(n)&&ht(e,n.length):"string"==r&&e in n)&&Et(n[e],t)}(n[0],n[1],s)&&(o=i<3?void 0:o,i=1),e=Object(e);++r<i;){var a=n[r];a&&t(e,a,r,o)}return e})}(function(t,e,n){at(t,e,n)});function Ct(t){return function(){return t}}function Nt(t){return t}e.exports=It}),Fy=h(xy(),1),Hy=class{constructor(t,e,n,r){this.backendRestClient=new ky(t,e,n,r)}async getApp(t){return function(t){const e=function(t,e){return(0,Fy.default)({general:{enableFileTransfers:e.includes("file_sharing"),enableLocation:e.includes("location_sharing"),enableMentions:!1,showTypingIndicators:!0,enablePresence:!1,enableVoiceRecording:!1},theme:{version:"v2",name:"default"},permissions:{messages:{delete:"own",edit:"own",reply:"all",emojiReactions:"all"},messagesCustom:{},conversations:{leave:"none",markAsUnread:"none"},conversationsCustom:{}},generalNotificationSettings:{timeout:"15"},emailSettings:{enabled:!0,subject:"{{sender.name}} wants to chat with you on {{app.name}}",replySeparator:"--- Write ABOVE THIS LINE to post a reply via email ---",unsubscribeText:"Unsubscribe from all chat emails",senderName:"{{sender.name}} (via {{app.name}})",header:"Hi {{recipient.name}},\n {{sender.name}} wants to chat with you on {{app.name}}:",includeMessages:!0,inboxUrl:"{{app.custom.websiteUrl}}",inboxLinkText:"Join the chat",footer:"On behalf of {{sender.name}},\n The {{app.name}} team",enableReplyToEmail:e.includes("reply_via_email"),emailThemeType:e.includes("email_templates")?"custom":"standard",emailTheme:"default_email",emailAttachmentMode:"enabledExcludingImages",htmlTemplate:'<div>\n Hi {{recipient.name}}, <br/>\n <br/>\n {{sender.name}} wants to chat with you on {{app.name}}:<br/>\n <br/>\n {{messages.all}}\n <br/>\n <a href="{{app.custom.websiteUrl}}">Join the chat</a>\n <br/>\n <br/>\n On behalf of {{sender.name}},<br/>\n The {{app.name}} team<br/>\n <br/>\n</div>',textTemplate:"Hi {{recipient.name}},\n\n{{sender.name}} wants to chat with you on {{app.name}}:\n\n{{messages.all}}\n\n{{app.custom.websiteUrl}} Join the chat\n\nOn behalf of {{sender.name}},\nThe {{app.name}} team"},smsSettings:{enabled:e.includes("sms_notifications"),smsTemplate:'({{app.name}}) {{sender.name}}: "{{messages}}". Reply here: {{app.custom.websiteUrl}}',maximumSegments:"1",enableAutoOptOutText:!1,optOutText:"To stop receiving these messages, reply STOP."},suppressContactInfo:JSON.stringify({mode:"off",suppressLinks:!0,suppressEmailAddresses:!0,suppressPhoneNumbers:!0}),sameTabLinkRules:[]},null!=t?t:{})}(t.configuration,t.features),n=JSON.parse(e.suppressContactInfo),r={...e,suppressContactInfo:new gA(n)};return{appMetadata:{...t.appMetadata,id:t.appMetadata.id},features:t.features,role:r}}(await this.backendRestClient.get("/app",null===t?{}:{role_name:t}))}async checkIfAppExists(){return this.backendRestClient.get("/app").then(()=>!0).catch(t=>{if("Could not find app."===t.message)return!1;throw t})}};var Uy=class Ni{constructor(t,e,n){this.realtimeWsApiUrl=t,this.internalHttpApiUrl=e,this.restApiHttpUrl=n}getBokensUrl(t,e,n){return this.internalHttpApiUrl+`/${t}/bokens/${encodeURIComponent(e)}?signature=${encodeURIComponent(null!=n?n:"")}`}getRealtimeWsUrl(t,e,n,r,i){const o=encodeURIComponent(e);return this.realtimeWsApiUrl+`/${t}/realtime/${o}?talkjs-client-build=${null!=i?i:"standalone"}&talkjs-core=${n}&talkjs-client-id=${r}`}static fromHost(t){const e=new Ni("wss://realtime.talkjs.com/v1","https://app.talkjs.com/api/v0","https://api.talkjs.com/v1");if(!t)return e;if("@currentHost"===t){var n;if("undefined"==typeof location)throw new Error("You can only use @currentHost in a browser.");t=(null!==(n=window.top)&&void 0!==n?n:window).location.host}if(t.endsWith("talkjs.com")){const n=t.match(/^(?:\w+-)?([^.]+)\.talkjs\.com$/);if(n){const t=n[1];return["app","cdn","api","realtime"].includes(t)?e:new Ni(`wss://realtime-${t}.talkjs.com/v1`,`https://app-${t}.talkjs.com/api/v0`,`https://api-${t}.talkjs.com/v1`)}return e}return t.includes("localhost")||t.includes("localtest.me")||/^\d+\.\d+\.\d+\.\d+(:\d+)?$/.test(t)?new Ni(`ws://${t}/public_api/v1`,`http://${t}/api/v0`,`http://${t}/public_api/v1`):new Ni(`wss://${t}/public_api/v1`,`https://${t}/api/v0`,`https://${t}/public_api/v1`)}};function By(t){return Object.values(t)}var jy=class{subscribeToConversationListBaseData(){const t=[this.listenForErrors(),this.listenForAuth(),this.listenForUserAndApp(),this.listenForConversationSearch(),this.listenForMessageSearch()];return()=>t.forEach(t=>t())}subscribeToConversationList(t){var e;const{store:n,session:r}=this;En("ConversationListStore"===n.type),null===(e=n.conversationListSubscription)||void 0===e||e.unsubscribe(),n.conversationListSubscription=null,n.conversationFilter$.set(t);const i=r.subscribeConversations({filter:t},t=>{si(()=>{n.conversationsArray$.set(t);const e={};for(const n of t)e[n.id]=n;n.conversationsMap$.set(e)})});return n.conversationListSubscription=i,()=>{n.conversationListSubscription===i&&(i.unsubscribe(),n.conversationListSubscription=null)}}subscribeToChatboxData(){const t=[this.listenForErrors(),this.listenForAuth(),this.listenForUserAndApp(),()=>this.unsubscribeAllConversations()];return()=>t.forEach(t=>t())}constructor(t,e,n){this.subscribedConversations={},this.store=t,this.session=e,this.restApi=n}listenForErrors(){const{store:t,session:e}=this;t.errors$.assign({unknownUser:!1,wrongAppId:!1,serverError:!1});const n=e.onError(e=>{WA.error(e.message),t.errors$.serverError.set(!0)}),r=e.currentUser.subscribe(e=>{t.errors$.unknownUser.set(null===e)});return()=>{n.unsubscribe(),r.unsubscribe()}}listenForAuth(){const{store:t,session:e}=this;return Hi(n=>{let r=!0;const i=t.hasTokenFetcher$.get();"loading"!==t.authTokenState$.peek()&&t.authTokenState$.set("loading"),e._authProvider.getToken().then(()=>{r&&t.authTokenState$.set("valid")});const o=e._authProvider.onTokenRefreshFailed(()=>{r&&t.authTokenState$.set(i?"invalid":"expired")});n.onCleanup=()=>{r=!1,o()}})}listenForUserAndApp(){const{store:t,session:e,restApi:n}=this;return Hi(r=>{let i=!0;const o=Symbol("ROLE_NOT_LOADED");let s=o;const a=e.currentUser.subscribe(async e=>{if(i&&e){var r;t.currentUser$.set(e);const a=null!==(r=e.role)&&void 0!==r?r:null;if(s===o||a!==s){s=a;try{const e=await n.getApp(a);if(!i)return;t.app$.set(e)}catch(e){if(!i)return;s=o,WA.error(`Failed to load app settings: ${e.message}`),t.errors$.serverError.set(!0)}}}});r.onCleanup=()=>{i=!1,a.unsubscribe()}})}subscribeTypingAndPresence(t){var e;if(null===(e=this.unsubscribeTypingAndPresence)||void 0===e||e.call(this),!t)return;const n=[this.listenForTyping(t),this.listenForPresence(t)];this.unsubscribeTypingAndPresence=()=>{n.forEach(t=>t()),this.unsubscribeTypingAndPresence=void 0}}subscribeConversation(t){if(this.subscribedConversations[t])return void(this.subscribedConversations[t].touchedAt=Date.now());const e=[this.listenForConversation(t),this.listenForMessages(t),this.listenForParticipants(t)];this.subscribedConversations[t]={unsubscribe:()=>{e.forEach(t=>t()),delete this.subscribedConversations[t]},touchedAt:Date.now()};const n=By(this.subscribedConversations);n.length>10&&function(t,e){return t.reduce((t,n)=>n[e]<t[e]?n:t,t[0])}(n,"touchedAt").unsubscribe()}unsubscribeAllConversations(){var t;for(const t of By(this.subscribedConversations))t.unsubscribe();null===(t=this.unsubscribeTypingAndPresence)||void 0===t||t.call(this),this.subscribedConversations={}}listenForMessages(t){const{store:e,session:n}=this;En("ChatboxStore"===e.type);const r=n.conversation(t).subscribeMessages(async(n,r)=>{n&&(await e.readyForNewMessagesPromise,e.storeMessages(t,n,r))});return e.messageSubscriptions[t]=r,()=>null==r?void 0:r.unsubscribe()}listenForParticipants(t){const{store:e,session:n}=this;En("ChatboxStore"===e.type);const r=n.conversation(t).subscribeParticipants(n=>{n&&e.state$.participants.child(t).set(n)});return()=>null==r?void 0:r.unsubscribe()}listenForConversation(t){const{store:e,session:n}=this;En("ChatboxStore"===e.type);const r=n.conversation(t).subscribe(async n=>{si(()=>{n?(e.state$.unknownConversations.child(t).delete(),e.state$.conversations.child(t).set(n)):(e.state$.conversations.child(t).delete(),e.state$.unknownConversations.child(t).set(!0))})});return()=>null==r?void 0:r.unsubscribe()}listenForTyping(t){const{store:e,session:n}=this;En("ChatboxStore"===e.type);const r=n.conversation(t).subscribeTyping(n=>{n&&e.storeTyping(t,n)});return()=>null==r?void 0:r.unsubscribe()}listenForPresence(t){const{store:e,session:n}=this;En("ChatboxStore"===e.type);const r=e.state$.participants.child(t),i=e.state$.isUserConnected.child(t),o=Hi(t=>{var e;const o=(null!==(e=r.get())&&void 0!==e?e:[]).map(({user:t})=>t.id),s=o.map(t=>n.user(t).subscribeOnline(e=>{var n;i.child(t).set(null!==(n=null==e?void 0:e.isConnected)&&void 0!==n&&n)}));si(()=>{var t;const e=new Set(o),n=function(t){return Object.keys(t)}(null!==(t=i.peek())&&void 0!==t?t:{});for(const t of n)e.has(t)||i.child(t).delete()}),t.onCleanup=()=>{s.forEach(t=>t.unsubscribe())}});return()=>{null==o||o(),e.state$.isUserConnected.child(t).delete(),i.delete()}}listenForConversationSearch(){const{store:t,session:e}=this;En("ConversationListStore"===t.type);const n=e.searchConversations((e,n)=>{t.globalSearchState$.assign({conversationResults:e,conversationStatus:n})});t.conversationSearch=n;const r=SR((t,e)=>{const r={conversation:e},i=t.trim();i.length?i.length>=3&&n.setQuery(i,r):n.setQuery("",r)},500),i=Hi(()=>{r(t.globalSearchState$.query.get(),t.conversationFilter$.get())});return()=>{t.conversationSearch=null,i()}}listenForMessageSearch(){const{store:t,session:e}=this;En("ConversationListStore"===t.type);const n=e.searchMessages((e,n)=>{t.globalSearchState$.assign({messageResults:e,messageStatus:n})});t.messageSearch=n;const r=SR((t,e)=>{const r={conversation:e},i=t.trim();i.length?i.length>=3&&n.setQuery(i,r):n.setQuery("",r)},500),i=Hi(()=>{r(t.globalSearchState$.query.get(),t.conversationFilter$.get())});return()=>{t.messageSearch=null,i()}}};function Vy(e,n){const r=n.appId,i=n.userId,o=ft(void 0),s=Et(()=>{const t=o.current,e=typeof t!=typeof n.tokenFetcher?n.tokenFetcher:t;return o.current=e,e},[n.tokenFetcher]);pt(()=>{e.updateThemeCustom(n.themeCustom)},[e,n.themeCustom]);const a=Et(()=>Dy(),[n.appId,n.userId,n.token,s]);ht(()=>{e.hasTokenFetcher$.set(!!s)},[e,s]);const l=t({host:n.host,appId:r,userId:i,token:n.token,tokenFetcher:s}),c=Et(()=>new Hy(Uy.fromHost(n.host),r,a,l._authProvider),[r,a,l,n.host]);return{session:l,restApi:c,fetcher:Et(()=>new jy(e,l,c),[e,l,c])}}Xe();var zy=class{constructor(t,e,n,r){this.state={type:"idle"},this.inputElement=null,this.latestTicketId=0,this.uploads$=Ao([]),this.onClose=null,this.onInputChange=()=>{this.resolveFiles([...this.inputElement.files])},this.onInputCancel=()=>{this.resolveFiles([])},this.startFileUpload=async t=>{const e=this.latestTicketId;let n;if(this.state={type:"uploading",ticketId:e,content:{kind:"file",uploads:[],fileTokens:[]}},n=t?Array.isArray(t)?t:[t]:await new Promise(t=>{var e;this.resolveFiles=t,null===(e=this.inputElement)||void 0===e||e.click()}),!n[0])return void this.cancelUpload();if(n.sort((t,e)=>t.lastModified!==e.lastModified?t.lastModified-e.lastModified:t.name.localeCompare(e.name)),!this.isTicketValid(e))return;const r=await Promise.all(n.map($y));if(!this.isTicketValid(e))return;this.state={type:"uploading",ticketId:e,content:{kind:"file",uploads:r,fileTokens:[]}},si(()=>{this.uploads$.set(r);for(const t of r){const e=t.file.size+","+t.file.name;this.store.state$.localFileBlobUrls.child(this.store.state$.currentConversationId.peek()).child(e).set({url:t.temporaryBlobUrl,fetching:!1})}});const i=await Promise.all(r.map((t,n)=>async function(t,e){switch(t.type){case"video":return e.uploadVideo(t.file,t.metadata);case"audio":return e.uploadAudio(t.file,t.metadata);case"image":return e.uploadImage(t.file,t.metadata);case"file":return e.uploadFile(t.file,t.metadata);case"voice":En.unreachable()}}(t,this.session).then(t=>(this.isTicketValid(e)&&this.uploads$.child(n).state.set("uploaded"),t)).catch(()=>(this.isTicketValid(e)&&this.uploads$.child(n).state.set("error"),null))));this.isTicketValid(e)&&(this.state={type:"waitingForConfirmation",ticketId:e,content:{kind:"file",uploads:r,fileTokens:i}})},this.startLocationUpload=async()=>{const t=this.latestTicketId,e={type:"location",state:"uploading",location:null};this.state={type:"uploading",ticketId:t,content:{kind:"location",upload:e}},this.uploads$.set([e]);const n=await this.browserPermissionController.runWithPermissionCheck("geolocation",async t=>{const{permissionResult:e,location:n}=await new Promise(t=>{navigator.geolocation.getCurrentPosition(e=>{t({permissionResult:"granted",location:{latitude:e.coords.latitude,longitude:e.coords.longitude}})},e=>{e.code===GeolocationPositionError.PERMISSION_DENIED?t({permissionResult:"denied",location:null}):t({permissionResult:"granted",location:null})})});return t(e),{permissionResult:e,location:n}});if(!this.isTicketValid(t))return;if(!n)return void this.cancelUpload();const{permissionResult:r,location:i}=n,o={type:"location",state:"granted"===r&&i?"uploaded":"error",location:i};this.state={type:"waitingForConfirmation",ticketId:t,content:{kind:"location",upload:o}},this.uploads$.set([o])},this.confirmUpload=()=>{if("waitingForConfirmation"===this.state.type&&this.isTicketValid(this.state.ticketId)){if("file"===this.state.content.kind){const t=this.state.content.fileTokens.filter(t=>null!==t);this.state.content.fileTokens.length===t.length&&this.sendFileMessages(this.state.content.uploads,t)}else"location"===this.state.content.kind&&this.state.content.upload.location&&this.sendLocationMessage(this.state.content.upload.location);this.terminate()}},this.cancelUpload=()=>{this.terminate()},this.session=t,this.store=e,this.controller=n,this.browserPermissionController=r}isTicketValid(t){return t===this.latestTicketId}sendFileMessages(t,e){for(const[n,r]of function(t,e){return En(t.length===e.length),t.map((t,n)=>[t,e[n]])}(e,t))this.store.fileUploads[n]=r,this.controller.sendFileMessage({fileToken:n})}sendLocationMessage(t){this.controller.sendLocationMessage({location:t})}setInputElement(t){this.inputElement=t}terminate(){const t="idle"===this.state.type;var e;(this.latestTicketId+=1,this.state={type:"idle"},this.uploads$.set([]),t)||(null===(e=this.onClose)||void 0===e||e.call(this))}};async function $y(t){const e=t.name;if(function(t){return/\.(mp4|ts|mov|webm|ogv)$/i.test(t)}(t.name)){const n=await Yy("video",t,t=>({width:t.videoWidth,height:t.videoHeight,duration:t.duration,filename:e})),r=function(t){switch(t.name.split(".").pop()){case"ts":return"video/MP2T";case"mov":return"video/quicktime";case"webm":return"video/webm";case"ogv":return"video/ogg";default:return"video/mp4"}}(t);return{type:"video",file:t,metadata:n,temporaryBlobUrl:URL.createObjectURL(new Blob([t],{type:r})),state:"uploading"}}const n=URL.createObjectURL(t);return function(t){return/\.(mp3|m4a|ogg|oga|opus|flac|wav)$/i.test(t)}(t.name)?{type:"audio",file:t,metadata:await Yy("audio",t,t=>({duration:t.duration,filename:e})),temporaryBlobUrl:n,state:"uploading"}:function(t){return/(gif|png|jpg|jpeg|svg|bmp|webp)$/i.test(t)}(t.name)?{type:"image",file:t,metadata:await Yy("img",t,t=>({width:t.naturalWidth,height:t.naturalHeight,filename:e})),temporaryBlobUrl:n,state:"uploading"}:{type:"file",file:t,metadata:{filename:e},temporaryBlobUrl:n,state:"uploading"}}async function Yy(t,e,n){const r=document.createElement(t);try{return r.src=URL.createObjectURL(e),await new Promise((e,i)=>{const o="img"===t?"load":"loadedmetadata";r.addEventListener(o,()=>{try{e(n(r))}catch(t){i(t)}},{once:!0})})}finally{URL.revokeObjectURL(r.src)}}var Gy=class{constructor(t){this.init=t}async runWithPermissionCheck(t,e){const{beforeBrowserPermissionPrompt:n,onMissingBrowserPermission:r}=this.init;function i(e){"denied"===e&&r({type:t})}if(!n||!await async function(t){if(!("permissions"in navigator))return!1;try{return"prompt"===(await navigator.permissions.query({name:t})).state}catch(t){return!1}}(t))return e(t=>{i(t)});const o=vy(),s=vy(),a={type:t,showPrompt:async()=>(s.resolve({cancelled:!1}),await o.promise),cancel:()=>{s.resolve({cancelled:!0})}};try{n(a)}catch(t){WA.error("Your beforeBrowserPermissionPrompt callback threw an error: ",t),s.resolve({cancelled:!0})}const{cancelled:l}=await s.promise;return l?null:e(t=>{o.resolve(t),i(t)})}};function Wy(t,e,n){const r=ft(t),i=ft(n);return pt(()=>{r.current=t,i.current=n}),_t(t=>{r.current&&r.current(t),e&&function(t,e,n){for(const r of n){const n=new Event(r);Object.assign(n,e),t.dispatchEvent(n)}}(e,t,i.current)},[e])}function Xy(t){ht(()=>{const e=window,n=t.current;if(e.cordova&&n){const t=t=>{t.target instanceof HTMLAnchorElement&&(t.preventDefault(),function(t){const e=window;e.cordova.InAppBrowser?e.cordova.InAppBrowser.open(t,"_system"):window.open(t,"_system","location=yes")}(t.target.href))};return n.addEventListener("click",t),()=>n.removeEventListener("click",t)}},[t])}function Ky(){const[t,e]=ut(!0);return ht(()=>{e(!1)},[]),t}Xe(),Xe(),Xe(),Xe(),Xe();const qy=Qt(function(t,e){var n,r;const{onSendMessage:i,onDeleteMessage:o,onMessageAction:s,onFocusMessage:a,onBackButtonClick:l,onMissingBrowserPermission:c,beforeSendMessage:d,transformMentions:h,messageFieldPlaceholder:p,messageFieldSpellcheck:f,__hostElement:m}=t;ht(()=>{var e;null===(e=t.__internalOnLoaded)||void 0===e||e.call(t)},[]);const E=Ky(),_=ft(null!=m?m:null);Xy(_);const A=Wy(o,m,["deleteMessage","delete-message","deletemessage","DeleteMessage"]),g=Wy(i,m,["sendMessage","send-message","sendmessage","SendMessage"]),{store:S,controller:v,browserPermissionController:O,uploadController:D,editorInternals:T,session:R}=function(t,e,n,r,i,o,s,a){const l=Et(()=>new mR(t.appId,t.userId),[]),{session:c,fetcher:d}=Vy(l,t);ht(()=>{const t=d.subscribeToChatboxData();return()=>t()},[d]);const h=Et(()=>new DR(l.state$.editor,l.device$,l.state$.userPermissions),[l]),p=Et(()=>new Ty(l,c,h,e,n,r,i,o,s),[c,l,h,e,n,r,o,i,s]);h.controller=p;const f=Et(()=>new Gy({beforeBrowserPermissionPrompt:t.beforeBrowserPermissionPrompt,onMissingBrowserPermission:a}),[t.beforeBrowserPermissionPrompt,a]),m=Et(()=>new zy(c,l,p,f),[c,l,p,f]);return pt(()=>{let e=!0;const n=t.conversationId||null;return l.state$.loadingConversationId.set(n),n&&d.subscribeConversation(n),d.subscribeTypingAndPresence(n),ji(()=>l.canRenderUi(n)).then(()=>{e&&si(()=>{l.state$.currentConversationId.set(n),l.state$.referencedMessageId.set(null),l.chatSearchState$.set("hidden")})}),()=>{e=!1}},[l,d,t.conversationId]),{store:l,controller:p,browserPermissionController:f,uploadController:m,editorInternals:h,session:c}}(t,QO(d),g,A,Wy(s,m,["messageAction","message-action","messageaction","MessageAction"]),Wy(a,m,["focusMessage","focus-message","focusmessage","FocusMessage"]),Wy(l,m,["backButtonClick","back-button-click","backbuttonclick","BackButtonClick"]),Wy(c,m,["browserPermissionDenied","browser-permission-denied","browserpermissiondenied","BrowserPermissionDenied"])),y=_t(async()=>{const t=T.state$;if(t.isEmpty.peek()||t.atTextLimit.peek()||t.sendBlocked.peek())return;const e=T.getText(),n=S.state$.referencedMessageId.peek();n&&v.setReferencedMessage(null),T.clearText(),S.state$.editor.showEmojiPicker.set(!1),await v.sendMessage({text:e,referencedMessage:null!=n?n:void 0})},[v,T,S]);ht(()=>{var e;const n=null===(e=t.enterSendsMessage)||void 0===e||e;S.state$.enterSendsMessage.set(n),T.onEnter=n?y:void 0},[T,t.enterSendsMessage,y,S]);const I=ft(void 0);ht(()=>{var e;const n=null===(e=S.focusedMessage$.peek())||void 0===e?void 0:e.id;t.focusedMessageId!==I.current&&n!==t.focusedMessageId&&(I.current=t.focusedMessageId,v.focusMessage(t.focusedMessageId||null,!1))},[S,v,t.focusedMessageId]),ht(()=>{const e=t.__hostElement;if(e)return S.focusedMessage$.onChange(({value:t})=>{var n;e.focusedMessageId=null!==(n=null==t?void 0:t.id)&&void 0!==n?n:null})},[S,t.__hostElement]),ht(()=>{T.spellcheck$.set(f)},[T,f]),ht(()=>{T.placeholder$.set(p)},[T,p]),mt(e,()=>({controller:v,editorInternals:T}));const C=_t(({error:e})=>Gs(ZR,{appId:t.appId,chatboxState:{type:"unexpected-error",error:e}}),[t.appId]),N=E?null:Gs(dR,{fallbackRender:C,children:Gs(gn.Provider,{value:T,children:Gs(In.Provider,{value:S,children:Gs(_n.Provider,{value:t.theme,children:Gs(vn.Provider,{value:O,children:Gs(Nn.Provider,{value:v,children:Gs(wn.Provider,{value:D,children:Gs(Dn.Provider,{value:R,children:Gs(Rn.Provider,{value:{sendMessage:y,transformMentions:h},children:Gs(Ay,{appId:t.appId,chatHeaderVisible:null===(n=t.chatHeaderVisible)||void 0===n||n,messageFieldVisible:null===(r=t.messageFieldVisible)||void 0===r||r})})})})})})})})})});return m?N:Gs("div",{className:"t-chatbox"+(t.className?` ${t.className}`:""),style:t.style,ref:_,children:N})});function Jy(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Zy(t,e){Jy(t,e),e.add(t)}function Qy(t,e,n){Jy(t,e),e.set(t,n)}function tI(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}function eI(t,e,n){return t.set(tI(t,e),n),n}function nI(t,e){return t.get(tI(t,e))}Xe(),lt(),function(t="Twemoji Country Flags",e="https://cdn.jsdelivr.net/npm/country-flag-emoji-polyfill@0.1/dist/TwemojiCountryFlags.woff2"){if(typeof window<"u"&&lR("😊")&&!lR("🇨🇭")){const n=document.createElement("style");return n.textContent=`@font-face {\n font-family: "${t}";\n unicode-range: U+1F1E6-1F1FF, U+1F3F4, U+E0062-E0063, U+E0065, U+E0067,\n U+E006C, U+E006E, U+E0073-E0074, U+E0077, U+E007F;\n src: url('${e}') format('woff2');\n font-display: swap;\n }`,document.head.appendChild(n),!0}}(),function({observableFunctions:t,observableProperties:e,jsonReplacer:n,jsonReviver:r}){if(t)for(const e in t){const n=t[e];rR.set(e,n),iR.prototype[e]=function(...t){return n.call(this,this._node,...t)}}if(e)for(const t in e){const n=e[t];nR.set(t,n),Object.defineProperty(iR.prototype,t,{configurable:!0,get(){return n.get.call(this,this._node)},set(t){return n.set.call(this,this._node,t)}})}n&&(eR.replacer=n),r&&(eR.reviver=r)}({observableFunctions:{child:(t,e)=>go.getProxy(t,e)}}),WA.registerHandler(({level:t,data:e})=>{console[t]("[TalkJS]",...e)});const rI=Qt(function(t,e){const n=ft(null),r=Et(()=>new sI(n),[]);mt(e,()=>r,[r]);const{theme:i,baseTheme:o,...s}=t,a=Et(()=>sR(o,i,"Chatbox"),[o,i]),l=`chatbox|${t.userId}|${t.appId}`;return Gs(Ln.Provider,{value:r,children:g(qy,{...s,key:l,theme:a,ref:n})})});var iI=new WeakMap,oI=new WeakSet,sI=class{constructor(t){Zy(this,oI),Qy(this,iI,void 0),eI(iI,this,t)}deleteMessage(t){return aI.call(tI(oI,this)).deleteMessage(t)}setEditing(t){aI.call(tI(oI,this)).setEditing(t)}editMessage(t,e){return aI.call(tI(oI,this)).editMessage(t,e)}sendMessage(t){return aI.call(tI(oI,this)).sendMessage(t)}sendFileMessage(t){return aI.call(tI(oI,this)).sendFileMessage(t)}sendLocationMessage(t){return aI.call(tI(oI,this)).sendLocationMessage(t)}setReferencedMessage(t){aI.call(tI(oI,this)).setReferencedMessage(t)}toggleReaction(t,e,n){return aI.call(tI(oI,this)).toggleReaction(t,e,n)}getMessageFieldText(){return lI.call(tI(oI,this)).getText()}setMessageFieldText(t){lI.call(tI(oI,this)).setText(t)}focusMessageField(){lI.call(tI(oI,this)).focus()}toggleSearchBox(t){aI.call(tI(oI,this)).toggleSearchBox(t)}async focusMessage(t){return aI.call(tI(oI,this)).focusMessage(t)}setHighlightedStrings(t){aI.call(tI(oI,this)).setHighlightedStrings(t)}setSearchQuery(t){aI.call(tI(oI,this)).setSearchQuery(t)}async jumpToPreviousHighlight(){return aI.call(tI(oI,this)).jumpToHighlight("up")}async jumpToNextHighlight(){return aI.call(tI(oI,this)).jumpToHighlight("down")}clickBackButton(){aI.call(tI(oI,this)).clickBackButton()}};function aI(){return nI(iI,this).current.controller}function lI(){return nI(iI,this).current.editorInternals}function cI({conversation:t}){const e=Cn(),n=An(),r=lD(),i=yo(e.currentConversationId$),o=jn(i);return Gs("li",{className:"t-conversation-list-item-wrapper",children:Gs(n.ConversationListItem,{common:r,conversation:t,participants:o,isSelected:i===t.id})})}Xe(),tO();const uI="[t-keyboard-nav-list-item]",dI=`${uI}[t-selected]`,hI="t-keyboard-navigation-active";function pI(t){const{as:e="ul",children:n,onKeyDown:r,onPointerDown:i,...o}=t,s=ft(null),a=ft(null);ht(()=>{const t=s.current;fI(t,a,{preferSelectedItem:!0});const e=new MutationObserver(e=>{const n=e.some(t=>"attributes"===t.type&&"t-selected"===t.attributeName);fI(t,a,{preferSelectedItem:n})});return e.observe(t,{attributes:!0,attributeFilter:["t-selected","t-keyboard-nav-list-item"],childList:!0,subtree:!0}),()=>{e.disconnect()}},[]);const l=_t(t=>{null==r||r(t),!t.defaultPrevented&&s.current&&function(t,e,n){let r;switch(t.key){case"ArrowDown":r=1;break;case"ArrowUp":r=-1;break;default:return}const i=EI(e),o=mI(e,n,i),s=document.activeElement;if(!o||!(s instanceof HTMLElement)||s!==o&&!o.contains(s))return;const a=i.indexOf(o),l=i[Math.max(0,Math.min(a+r,i.length-1))];l&&(t.preventDefault(),l!==o&&(n.current=l,_I(i,l),e.setAttribute(hI,""),l.focus()))}(t,s.current,a)},[r]),c=_t(t=>{null==i||i(t),s.current&&s.current.removeAttribute(hI)},[i]);return g(e,{...o,ref:s,onKeyDown:l,onPointerDown:c},n)}function fI(t,e,n){var r,i;const o=EI(t),s=mI(t,e,o),a=t.querySelector(dI);e.current=n.preferSelectedItem&&a?a:null!==(r=null!==(i=null!=s?s:a)&&void 0!==i?i:o[0])&&void 0!==r?r:null,_I(o,e.current)}function mI(t,e,n){const r=e.current;return r&&t.contains(r)&&n.includes(r)?r:null}function EI(t){return Array.from(t.querySelectorAll(uI))}function _I(t,e){for(const n of t){const t=n===e?0:-1;n.tabIndex=t;for(const e of Kv(n))e.tabIndex=t}}Xe();function AI(){const t=Cn(),e=ft(null);return ht(()=>{let n=!0;const r=e.current;return async function(){let e=0;for(;n&&t.conversationListSubscription&&r.scrollHeight===r.clientHeight&&e<2;){var i;await(null===(i=t.conversationListSubscription)||void 0===i?void 0:i.loadMore(20)),e+=1}}(),()=>{n=!1}},[t]),Gs("nav",{className:"t-conversation-list-scrollable",ref:e,"t-menu-boundary":"",onScroll:_t(e=>{const n=e.currentTarget;n.scrollHeight-n.clientHeight-n.scrollTop<15&&t.conversationListSubscription&&t.conversationListSubscription.loadMore(20)},[t]),children:Gs(pI,{children:Gs(Lo,{each:t.conversationsArray$,children:t=>Gs(cI,{conversation:t.get()})})})})}function gI(){const t=Cn(),e=An(),n=lD(),r=yo(t.globalSearchState$.query),i=_t(e=>{t.setGlobalSearchQuery(e)},[t]),o=_t(()=>{t.cancelGlobalSearch()},[t]);return Gs(e.GlobalSearchBox,{common:n,query:r,setQuery:i,cancel:o})}Xe();function SI({appId:t}){const e=Cn(),n=function(){const t=Cn(),e=Vo(()=>{const e=t.currentUser$.get(),n=t.app$.get(),r=t.errors$.get(),i=t.authTokenState$.get();return r.serverError?"server-error":r.wrongAppId?"wrong-app-id":"loading"===i||"idle"===i?"loading-token":"invalid"===i?"invalid-token":"expired"===i?"expired-token":"valid"===i?r.unknownUser?"unknown-user":e&&n?"loaded":"loading-data":void En.unreachable()}),n=Vo({type:"loading"});$o(r=>{const i=e.get(),o=t.extUserId$.peek(),s=t.appId$.peek();switch(i){case"invalid-token":n.set({type:"auth-failed"});break;case"expired-token":n.set({type:"expired-token"});break;case"wrong-app-id":n.set({type:"wrong-app-id",appId:s});break;case"server-error":n.set({type:"server-error"});break;case"loading-data":case"loading-token":n.set({type:"loading"});break;case"loaded":n.set({type:"loaded",currentUser:t.currentUser$.peek()});break;case"unknown-user":r.onCleanup=function(t){n.set({type:"loading"});const e=setTimeout(()=>{n.set(t)},5e3);return()=>clearTimeout(e)}({type:"unknown-user",userId:o});break;default:En.never(i)}});const r=Vo({type:"loading"});return $o(t=>{if("loading"===n.type.get()){r.set({type:"invisible-loading"});const e=setTimeout(()=>{r.set({type:"loading"})},1e3);t.onCleanup=()=>{clearTimeout(e)}}else r.set(n.get())}),yo(r)}(),r=yo(e.globalSearchEnabled$),i=yo(e.globalSearchActive$),o=ft(null);return"invisible-loading"===n.type?Gs(O,{}):"loading"===n.type?Gs(ty,{}):"unknown-user"===n.type||"auth-failed"===n.type||"wrong-app-id"===n.type||"server-error"===n.type||"unexpected-error"===n.type?Gs(ZR,{appId:t,chatboxState:n}):"expired-token"===n.type?Gs(ey,{}):"loaded"===n.type?Gs("div",{className:"t-conversation-list-content","t-menu-boundary":"root",ref:o,children:[r&&Gs(gI,{}),Gs(i?vI:AI,{}),Gs(_y,{containerRef:o})]}):Gs(O,{})}function vI(){const t=Cn(),e=An(),n=lD(),r=yo(t.t$),i=yo(t.globalSearchState$.messageStatus),o=yo(t.globalSearchState$.conversationStatus),s=yo(t.globalSearchStatus$);return Gs("div","searching"===s?{className:"t-global-search-results","t-status":"loading",children:r.SEARCH_SEARCHING}:"noResults"===s?{className:"t-global-search-results","t-status":"empty",children:r.SEARCH_NO_RESULTS}:{className:"t-global-search-results","t-status":"loaded",children:[Gs(xo,{if:()=>t.globalSearchState$.conversationResults.get().length,children:()=>Gs(O,{children:[Gs(e.GlobalSearchResultHeader,{common:n,type:"conversations",canLoadMore:"canLoadMore"===o,loadMore:()=>t.conversationSearch.loadMore()}),Gs(Lo,{each:t.globalSearchState$.conversationResults,children:r=>Gs(e.GlobalSearchResultItem,{common:n,conversation:r.get(),isSelected:r.id.get()===t.globalSearchState$.selectedResultId.get()})})]})}),Gs(xo,{if:()=>t.globalSearchState$.messageResults.get().length,children:()=>Gs(O,{children:[Gs(e.GlobalSearchResultHeader,{common:n,type:"messages",canLoadMore:"canLoadMore"===i,loadMore:()=>t.messageSearch.loadMore()}),Gs(Lo,{each:t.globalSearchState$.messageResults,children:r=>Gs(e.GlobalSearchResultItem,{common:n,conversation:r.conversation.get(),message:r.message.get(),isSelected:r.message.id.get()===t.globalSearchState$.selectedResultId.get()})})]})})]})}Xe();var OI=class extends pR{constructor(...t){super(...t),this.type="ConversationListStore",this.conversationListSubscription=null,this.conversationFilter$=Ao(void 0),this.currentConversationId$=Ao(null),this.conversationsArray$=Ao([]),this.conversationsMap$=Ao({}),this.globalSearchState$=Ao({query:"",selectedResultId:null,conversationResults:[],conversationStatus:"idle",messageResults:[],messageStatus:"idle"}),this.globalSearchStatus$=OR("idle",()=>{const t=this.globalSearchState$.conversationStatus.get(),e=this.globalSearchState$.messageStatus.get(),n=this.globalSearchState$.conversationResults.get(),r=this.globalSearchState$.messageResults.get(),i=n.length>0||r.length>0;return"searching"===t||"searching"===e?i?vR(1e3).then(()=>"searching"):"searching":i||"loadedAll"!==t||"loadedAll"!==e?"idle":"noResults"}),this.globalSearchEnabled$=Ao(()=>{var t;const e=this.app$.features.get();return null!==(t=null==e?void 0:e.includes("search_conv_and_messages"))&&void 0!==t&&t}),this.globalSearchActive$=Ao(()=>{const t=this.globalSearchEnabled$.get(),e=this.globalSearchState$.query.get().trim();return t&&e.length>=3}),this.highlightedStrings$=Ao(()=>{const t=this.globalSearchActive$.get(),e=this.globalSearchState$.query.get();return t?e.split(/\s+/).map(t=>t.trim()).filter(t=>t.length):[]})}setGlobalSearchQuery(t){this.globalSearchEnabled$.peek()?si(()=>{this.globalSearchState$.query.set(t),this.globalSearchActive$.peek()||this.globalSearchState$.selectedResultId.set(null)}):WA.error('The "Search messages & conversations" feature is only available to customers on Growth plan and above.')}cancelGlobalSearch(){this.globalSearchEnabled$.peek()?this.setGlobalSearchQuery(""):WA.error('The "Search messages & conversations" feature is only available to customers on Growth plan and above.')}},DI=class{constructor(t,e,n){this.session=t,this.store=e,this.onSelectConversation=n}async selectConversation(t,e){var n;if(t===this.store.currentConversationId$.peek()&&!e)return;si(()=>{if(this.store.globalSearchActive$.peek()){const n=null!=e?e:t;this.store.globalSearchState$.selectedResultId.set(n)}this.store.currentConversationId$.set(t)});const r=t&&e&&await this.session.conversation(t).message(e).get(),i=t&&(null!==(n=this.store.conversationsMap$.child(t).peek())&&void 0!==n?n:await this.session.conversation(t).get()),o={currentUser:this.store.currentUser$.peek(),conversation:i,...r&&{focusedMessage:r}};this.onSelectConversation(o)}jumpToHighlight(t){}},TI=l((t,e)=>{e.exports=function t(e,n){if(e===n)return!0;if(e&&n&&"object"==typeof e&&"object"==typeof n){if(e.constructor!==n.constructor)return!1;var r,i,o;if(Array.isArray(e)){if((r=e.length)!=n.length)return!1;for(i=r;0!==i--;)if(!t(e[i],n[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if((r=(o=Object.keys(e)).length)!==Object.keys(n).length)return!1;for(i=r;0!==i--;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;0!==i--;){var s=o[i];if(!("_owner"===s&&e.$$typeof||t(e[s],n[s])))return!1}return!0}return e!=e&&n!=n}});Xe();var RI=h(TI(),1);function yI(t,e){ht(t,function(t){const e=ft(void 0);return(0,RI.default)(t,e.current)||(e.current=t),e.current}(e))}Xe();const II=Qt(function(t,e){const{__hostElement:n,onSelectConversation:r}=t;ht(()=>{var e;null===(e=t.__internalOnLoaded)||void 0===e||e.call(t)},[]);const i=Ky(),o=ft(null!=n?n:null);Xy(o);const s=Wy(r,n,["selectConversation","select-conversation","selectconversation","SelectConversation"]),a=Et(()=>new OI(t.appId,t.userId),[]);ht(()=>{si(()=>{a.extUserId$.set(t.userId),a.appId$.set(t.appId)})},[a,t.appId,t.userId]);const{session:l,fetcher:c}=Vy(a,t);ht(()=>{const t=c.subscribeToConversationListBaseData();return()=>t()},[c]),yI(()=>{const e=c.subscribeToConversationList(t.conversationFilter);return()=>e()},[c,t.conversationFilter]);const d=Et(()=>new DI(l,a,s),[l,a,s]),h=ft(void 0);ht(()=>{t.selectedConversationId!==h.current&&(h.current=t.selectedConversationId,a.currentConversationId$.set(t.selectedConversationId||null))},[a,t.selectedConversationId]),ht(()=>{const e=t.__hostElement;if(e)return a.currentConversationId$.onChange(({value:t})=>{e.selectedConversationId=t})},[a,t.__hostElement]),mt(e,()=>({controller:d}));const p=_t(({error:e})=>Gs(ZR,{appId:t.appId,chatboxState:{type:"unexpected-error",error:e}}),[t.appId]),f=i?null:Gs(dR,{fallbackRender:p,children:Gs(In.Provider,{value:a,children:Gs(_n.Provider,{value:t.theme,children:Gs(Nn.Provider,{value:d,children:Gs(Dn.Provider,{value:l,children:Gs(SI,{appId:t.appId})})})})})});return n?f:Gs("div",{className:"t-conversation-list"+(t.className?` ${t.className}`:""),style:t.style,ref:o,children:f})});Xe(),lt();var CI=new WeakMap,NI=new WeakSet,bI=class{constructor(t){Zy(this,NI),Qy(this,CI,void 0),eI(CI,this,t)}selectConversation(t,e){return wI.call(tI(NI,this)).selectConversation(t,e)}};function wI(){return nI(CI,this).current.controller}const kI=Qt(function(t,e){const n=ft(null),r=Et(()=>new bI(n),[]);mt(e,()=>r,[r]);const{theme:i,baseTheme:o,...s}=t,a=Et(()=>sR(o,i,"ConversationList"),[o,i]),l=`conversation-list|${t.userId}|${t.appId}`;return Gs(Ln.Provider,{value:r,children:g(II,{...s,key:l,theme:a,ref:n})})});function LI(t){return{render:function(e){!function(t,e,n){null==e.__k&&(e.textContent=""),V(t,e),"function"==typeof n&&n(),t&&t.__c}(e,t)},unmount:function(){!function(t){!!t.__k&&V(null,t)}(t)}}}Xe();const MI=new Promise(t=>{"undefined"!=typeof document&&"loading"===document.readyState?document.addEventListener("DOMContentLoaded",t,{once:!0}):t(void 0)});function PI(t,e,n,r){const i=new Map,o=[],s=[];for(const[t,e]of function(t){return Object.entries(t)}(n)){const n=[t,t.toLowerCase(),xI(t)];for(const e of n)i.set(e,t);["string","boolean","number"].includes(e.type)&&o.push(...n),!1!==e.required&&s.push(t)}class u extends HTMLElement{constructor(){super(),this._renderRequested=!1,this._props={},this._renderRoot=null,this._ref={current:null};for(const[t,e]of i)if(Object.hasOwnProperty.call(this,t)){const n=this[t];this.updateProp(e,n),delete this[t]}else this.hasAttribute(t)&&this.syncAttributeToProp(t)}updateProp(t,e){const{type:r}=n[t];if("boolean"===r&&"string"==typeof e?e="false"!==e:"number"===r&&"string"==typeof e&&(e=Number(e)),void 0===e){const e=t in this._props;return delete this._props[t],e}{const n=this._props[t]!==e;return this._props[t]=e,n}}syncAttributeToProp(t){const e=i.get(t);En(e,`Attribute "${t}" should have matching prop`);const n=this.getAttribute(t);return this.updateProp(e,n)}async requestRender(){this.isConnected&&!this._renderRequested&&(this._renderRequested=!0,this._renderRequested=await!1,this.render())}render(){this._renderRoot||(this._renderRoot=LI(this));const e=s.filter(t=>!(t in this._props));if(e.length>0)return r(e),void this._renderRoot.render(null);const n=Object.assign({},this._props),i=t=>{const e=[...Object.getOwnPropertyNames(t.current),...Object.getOwnPropertyNames(Object.getPrototypeOf(t.current))];for(const n of e)"constructor"!==n&&("function"==typeof t.current[n]?this[n]=(...e)=>(this._renderRequested&&this.render(),t.current[n](...e)):Object.defineProperty(this,n,{enumerable:!0,configurable:!0,get:()=>t.current[n]}))},o=t;$e(()=>{this._renderRoot.render(Gs(o,{...n,ref:this._ref,__hostElement:this,__internalOnLoaded:()=>{i(this._ref)}}))})}async connectedCallback(){await MI;for(const t of o)this.hasAttribute(t)&&this.syncAttributeToProp(t);this.requestRender()}disconnectedCallback(){this._renderRoot&&setTimeout(()=>{this._renderRoot&&(this._renderRoot.unmount(),this._renderRoot=null)})}attributeChangedCallback(t,e,n){e!==n&&this.syncAttributeToProp(t)&&this.requestRender()}}u.observedAttributes=o;const a={};for(const[t,e]of i)a[t]={set(t){this.updateProp(e,t)&&this.requestRender()},get(){return this._props[e]}};return Object.defineProperties(u.prototype,a),Object.defineProperty(u,"name",{value:e}),u}function xI(t){return t.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,e)=>(e?"-":"")+t.toLowerCase())}function FI(t){const{selectedConversationId:e,focusedMessageId:n,chatboxProps:r,conversationListProps:i,style:o,__hostElement:s}=t,{onDeleteMessage:a,onSendMessage:l,onMessageAction:c,onFocusMessage:d,onMissingBrowserPermission:h,...p}=r,{onSelectConversation:f,...m}=i,[E,_]=ut(e||null),[A,g]=ut(t.focusedMessageId||null);ht(()=>{_(e||null)},[e]),ht(()=>{g(t.focusedMessageId||null)},[t.focusedMessageId]);const S=Wy(a,s,["deleteMessage","delete-message","deletemessage","DeleteMessage"]),v=Wy(l,s,["sendMessage","send-message","sendmessage","SendMessage"]),D=Wy(c,s,["messageAction","message-action","messageaction","MessageAction"]),T=Wy(d,s,["focusMessage","focus-message","focusmessage","FocusMessage"]),R=Wy(h,s,["browserPermissionDenied","browser-permission-denied","browserpermissiondenied","BrowserPermissionDenied"]),y=Wy(f,s,["selectConversation","select-conversation","selectconversation","SelectConversation"]),I=_t(t=>{var e,n,i;(_(null!==(e=null===(n=t.conversation)||void 0===n?void 0:n.id)&&void 0!==e?e:null),t.conversation)&&(null===(i=r.ref.current)||void 0===i||i.focusMessageField());y(t)},[r.ref,y]),C=_t(t=>{var e,n;g(null!==(e=null===(n=t.message)||void 0===n?void 0:n.id)&&void 0!==e?e:null),T(t)},[T]);ht(()=>{var e;null===(e=t.__internalOnLoaded)||void 0===e||e.call(t)},[]);const N=ft(null!=s?s:null),[b,w]=ut(void 0);pt(()=>{var e;const n=null!==(e=t.mobileBreakPoint)&&void 0!==e?e:700,r=new ResizeObserver(t=>{const e=t[0].contentRect.width;w(e>=n)});return r.observe(N.current),()=>r.disconnect()},[t.mobileBreakPoint]);const k=_t(t=>{_(null),y({conversation:null,currentUser:t.currentUser})},[y]),L=E?"chatbox":"conversation-list";ht(()=>{s&&(b?s.removeAttribute("t-mobile-inbox"):s.setAttribute("t-mobile-inbox",L))},[b,s,L]);const M=void 0===b?null:Gs(O,{children:[Gs(kI,{...m,onSelectConversation:I,selectedConversationId:null!=E?E:void 0}),Gs(rI,{...p,onDeleteMessage:S,onSendMessage:v,onMessageAction:D,onFocusMessage:C,onMissingBrowserPermission:R,onBackButtonClick:k,conversationId:E,focusedMessageId:null!=A?A:void 0})]});return s?M:Gs("div",{ref:N,style:o,className:"t-inbox"+(t.className?` ${t.className}`:""),"t-mobile-inbox":b?void 0:L,children:M})}Xe(),Xe();var HI=new WeakMap,UI=class{constructor(t){Qy(this,HI,void 0),eI(HI,this,t)}get chatbox(){return nI(HI,this).current}};const BI=Qt(function(t,e){const n=ft(null),r=ft(null),i=Et(()=>new UI(n),[]);mt(e,()=>i,[i]);const{theme:o,baseTheme:s,appId:a,userId:l,__hostElement:c,__internalOnLoaded:d,beforeSendMessage:h,beforeBrowserPermissionPrompt:p,chatHeaderVisible:f,className:m,style:E,enterSendsMessage:_,messageFieldVisible:A,messageFieldSpellcheck:g,messageFieldPlaceholder:S,onDeleteMessage:v,onSendMessage:O,onMessageAction:D,onFocusMessage:T,onMissingBrowserPermission:R,onSelectConversation:y,themeCustom:I,host:C,focusedMessageId:N,selectedConversationId:b,conversationFilter:w,mobileBreakPoint:k,transformMentions:L}=t,M=Et(()=>sR(s,o,"Inbox"),[s,o]);return Gs(FI,{style:E,className:m,selectedConversationId:b,focusedMessageId:N,chatboxProps:{appId:a,userId:l,theme:M,host:C,focusedMessageId:N,enterSendsMessage:_,chatHeaderVisible:f,messageFieldVisible:A,messageFieldSpellcheck:g,messageFieldPlaceholder:S,beforeSendMessage:h,beforeBrowserPermissionPrompt:p,onDeleteMessage:v,onSendMessage:O,onMessageAction:D,onFocusMessage:T,onMissingBrowserPermission:R,themeCustom:I,transformMentions:L,ref:n},conversationListProps:{appId:a,userId:l,theme:M,host:C,onSelectConversation:y,conversationFilter:w,themeCustom:I,ref:r},mobileBreakPoint:k,__hostElement:c,__internalOnLoaded:d},`inbox|${t.userId}|${t.appId}`)});function jI(t,e){const n=JSON.stringify(e).replace(",",", ");WA.error(`Could not initialize ${t} because the following required props are missing: ${n}.`)}const VI=PI(rI,"ChatboxElement",{__internalOnLoaded:{type:"function",required:!1},appId:{type:"string"},userId:{type:"string"},conversationId:{type:"string"},baseTheme:{type:"string",required:!1},theme:{type:"object",required:!1},token:{type:"string",required:!1},tokenFetcher:{type:"function",required:!1},host:{type:"string",required:!1},focusedMessageId:{type:"string",required:!1},enterSendsMessage:{type:"boolean",required:!1},chatHeaderVisible:{type:"boolean",required:!1},messageFieldVisible:{type:"boolean",required:!1},messageFieldSpellcheck:{type:"boolean",required:!1},messageFieldPlaceholder:{type:"string",required:!1},transformMentions:{type:"function",required:!1},onSendMessage:{type:"function",required:!1},beforeSendMessage:{type:"function",required:!1},onDeleteMessage:{type:"function",required:!1},onMessageAction:{type:"function",required:!1},onFocusMessage:{type:"function",required:!1},beforeBrowserPermissionPrompt:{type:"function",required:!1},onMissingBrowserPermission:{type:"function",required:!1},themeCustom:{type:"object",required:!1}},t=>jI("<t-chatbox>",t)),zI=PI(kI,"ConversationListElement",{__internalOnLoaded:{type:"function",required:!1},appId:{type:"string"},userId:{type:"string"},selectedConversationId:{type:"string",required:!1},baseTheme:{type:"string",required:!1},theme:{type:"object",required:!1},token:{type:"string",required:!1},tokenFetcher:{type:"function",required:!1},host:{type:"string",required:!1},onSelectConversation:{type:"function",required:!1},conversationFilter:{type:"object",required:!1},themeCustom:{type:"object",required:!1}},t=>jI("<t-conversation-list>",t)),$I=PI(BI,"InboxElement",{__internalOnLoaded:{type:"function",required:!1},appId:{type:"string"},userId:{type:"string"},selectedConversationId:{type:"string",required:!1},focusedMessageId:{type:"string",required:!1},mobileBreakPoint:{type:"number",required:!1},baseTheme:{type:"string",required:!1},theme:{type:"object",required:!1},host:{type:"string",required:!1},enterSendsMessage:{type:"boolean",required:!1},chatHeaderVisible:{type:"boolean",required:!1},messageFieldVisible:{type:"boolean",required:!1},messageFieldSpellcheck:{type:"boolean",required:!1},messageFieldPlaceholder:{type:"string",required:!1},transformMentions:{type:"function",required:!1},onSendMessage:{type:"function",required:!1},beforeSendMessage:{type:"function",required:!1},onDeleteMessage:{type:"function",required:!1},onMessageAction:{type:"function",required:!1},onFocusMessage:{type:"function",required:!1},beforeBrowserPermissionPrompt:{type:"function",required:!1},onMissingBrowserPermission:{type:"function",required:!1},onSelectConversation:{type:"function",required:!1},conversationFilter:{type:"object",required:!1},themeCustom:{type:"object",required:!1}},t=>jI("<t-inbox>",t)),YI=fT,GI=tR;customElements.get("t-chatbox")||customElements.define("t-chatbox",VI),customElements.get("t-conversation-list")||customElements.define("t-conversation-list",zI),customElements.get("t-inbox")||customElements.define("t-inbox",$I);export{ka as AudioPlayer,VI as ChatboxElement,zI as ConversationListElement,J_ as Editor,rg as EmojiPicker,bg as EmojiSuggestBar,UA as Highlightable,Na as Icon,$I as InboxElement,ZO as KeyboardNavigationListItem,$O as MentionSuggestList,JO as MenuItem,BA as MessageContent,KO as PopoverButton,zt as Preact,ig as ReactionPicker,tD as SearchInput,HA as Text,dD as VirtualMessage,iD as Waveform,GI as classicTheme,YI as defaultTheme,AD as formatDuration,mD as formatFilesize,ED as getGoogleMapsUrls,pD as getPhotoUrlWithFallback,hD as getRandomColor,fD as getSVGForInitials,yD as html,ID as useParticipants,CD as useReactions,_D as useTimeAgo,SD as userFriendlyDate};
|
|
5
|
+
t).catch(()=>new Function("url","return import(url)")(t)).catch(()=>{throw new Error("Cannot dynamically import module in this environment")})}function QA(){const t=Cn(),[e,n]=ut();return zo(()=>{const e=t.translationData$.get();t.app$.get()&&t.currentUser$.get()&&e&&function(t,e){const n=JSON.stringify([t,e]);if(n in eg)return eg[n];const r=JA(t,e);return eg[n]=r,r}(e.emojiPickerTranslationUrl,e.emojiDataUrl).then(t=>n({value:t}))},[]),e}Xe();const eg={};function rg(t){var e;const{onClose:n,onEmojiSelected:r}=Fn(),i=ft(null),o=Cn(),s=yo(o.t$),a=QA(),l=yo(o.colorScheme$);return ht(()=>{if(!a)return;En.defined(i.current);const t=i.current,e=t.shadowRoot;!function(t,e){const n=document.createElement("style");n.textContent=e,t.appendChild(n)}(e,".search-row{margin-right:var(--emoji-padding)}.emoji-menu{grid-template-columns:repeat(auto-fill,var(--total-emoji-size));padding:var(--emoji-padding)}.emoji,button.emoji{border-radius:8px}.favorites{border-top-width:1px}input.search:focus{border-color:var(--input-focused-border-color);outline:0}.picker{container-type:size}@container (height < 300px){.favorites{display:none}}#skintone-button{margin:0 -3px 0 4px}.custom-emoji{padding:0}#emo-🏻,#emo-🏼,#emo-🏽,#emo-🏾,#emo-🏿{display:none}[data-has-mouse] .emoji:hover{background-color:var(--button-hover-background)}");const n=t=>{var e;const n=null!==(e=t.detail.unicode)&&void 0!==e?e:t.detail.name;r(n)};function o(t){"mouse"===t.pointerType&&(e.querySelector("section").dataset.hasMouse="true")}return t.addEventListener("emoji-click",n),t.addEventListener("pointermove",o,{once:!0}),t.i18n=a.value.i18n,()=>{t.removeEventListener("emoji-click",n),t.removeEventListener("pointermove",o)}},[a,r]),ht(()=>{var t;a&&i.current&&!o.device$.isMobile.peek()&&(null===(t=i.current.shadowRoot.getElementById("search"))||void 0===t||t.focus())},[a,o]),zA(()=>n(),".t-emoji-picker"),Gs("div",a?{className:"t-emoji-picker",children:Gs("emoji-picker",{locale:s.locale,ref:i,class:null!==(e=t.colorScheme)&&void 0!==e?e:l,"data-source":a.value.dataSource})}:{className:"t-emoji-picker","t-loading":"",children:Gs($A,{})})}function ig({messageId:t,colorScheme:e}){const{closePopover:n}=Un(),r=bn();return Gs("div",{className:"t-reaction-picker",children:Gs(xn.Provider,{value:{onClose:n,onEmojiSelected:e=>{r.addReaction(t,e),n()}},children:Gs(rg,{colorScheme:e})})})}function og(){return og=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},og.apply(null,arguments)}function sg(t,e){if(null==t)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(-1!==e.indexOf(r))continue;n[r]=t[r]}return n}function ag(t,e){return(ag=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function lg(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,ag(t,e)}Xe();var cg=l((t,e)=>{e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}),ug=l((t,e)=>{var n=cg();function r(){}function i(){}i.resetWarningCache=r,e.exports=function(){function t(t,e,r,i,o,s){if(s!==n){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function e(){return t}t.isRequired=t;var o={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:i,resetWarningCache:r};return o.PropTypes=o,o}}),hg=l((t,e)=>{e.exports=ug()()});function pg(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}var fg=!1;Xe();var mg=We.createContext(null);hg();Xe();var Eg="unmounted",_g="exited",Ag="entering",gg="entered",Sg="exiting",vg=function(t){function e(e,n){var r,i=t.call(this,e,n)||this,o=n&&!n.isMounting?e.enter:e.appear;return i.appearStatus=null,e.in?o?(r=_g,i.appearStatus=Ag):r=gg:r=e.unmountOnExit||e.mountOnEnter?Eg:_g,i.state={status:r},i.nextCallback=null,i}lg(e,t),e.getDerivedStateFromProps=function(t,e){return t.in&&"unmounted"===e.status?{status:_g}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(t){var e=null;if(t!==this.props){var n=this.state.status;this.props.in?"entering"!==n&&"entered"!==n&&(e=Ag):("entering"===n||"entered"===n)&&(e=Sg)}this.updateStatus(!1,e)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var t,e,n=this.props.timeout,r=t=e=n;return null!=n&&"number"!=typeof n&&(r=n.exit,t=n.enter,e=void 0!==n.appear?n.appear:t),{exit:r,enter:t,appear:e}},n.updateStatus=function(t,e){void 0===t&&(t=!1),null!==e?(this.cancelNextCallback(),"entering"===e?this.performEnter(t):this.performExit()):this.props.unmountOnExit&&"exited"===this.state.status&&this.setState({status:Eg})},n.performEnter=function(t){var e=this,n=this.props.enter,r=this.context?this.context.isMounting:t,i=this.props.nodeRef?[r]:[We.findDOMNode(this),r],o=i[0],s=i[1],a=this.getTimeouts(),l=r?a.appear:a.enter;!t&&!n||fg?this.safeSetState({status:gg},function(){e.props.onEntered(o)}):(this.props.onEnter(o,s),this.safeSetState({status:Ag},function(){e.props.onEntering(o,s),e.onTransitionEnd(l,function(){e.safeSetState({status:gg},function(){e.props.onEntered(o,s)})})}))},n.performExit=function(){var t=this,e=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:We.findDOMNode(this);e&&!fg?(this.props.onExit(r),this.safeSetState({status:Sg},function(){t.props.onExiting(r),t.onTransitionEnd(n.exit,function(){t.safeSetState({status:_g},function(){t.props.onExited(r)})})})):this.safeSetState({status:_g},function(){t.props.onExited(r)})},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(t,e){e=this.setNextCallback(e),this.setState(t,e)},n.setNextCallback=function(t){var e=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,e.nextCallback=null,t(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(t,e){this.setNextCallback(e);var n=this.props.nodeRef?this.props.nodeRef.current:We.findDOMNode(this),r=null==t&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],o=i[0],s=i[1];this.props.addEndListener(o,s)}null!=t&&setTimeout(this.nextCallback,t)}else setTimeout(this.nextCallback,0)},n.render=function(){var t=this.state.status;if("unmounted"===t)return null;var e=this.props,n=e.children;e.in,e.mountOnEnter,e.unmountOnExit,e.appear,e.enter,e.exit,e.timeout,e.addEndListener,e.onEnter,e.onEntering,e.onEntered,e.onExit,e.onExiting,e.onExited,e.nodeRef;var r=sg(e,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return We.createElement(mg.Provider,{value:null},"function"==typeof n?n(t,r):We.cloneElement(We.Children.only(n),r))},e}(We.Component);function Og(){}vg.contextType=mg,vg.propTypes={},vg.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Og,onEntering:Og,onEntered:Og,onExit:Og,onExiting:Og,onExited:Og},vg.UNMOUNTED=Eg,vg.EXITED=_g,vg.ENTERING=Ag,vg.ENTERED=gg,vg.EXITING=Sg,Xe();var Dg=function(t,e){return t&&e&&e.split(" ").forEach(function(e){return function(t,e){t.classList?t.classList.remove(e):"string"==typeof t.className?t.className=pg(t.className,e):t.setAttribute("class",pg(t.className&&t.className.baseVal||"",e))}(t,e)})},Tg=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).appliedClasses={appear:{},enter:{},exit:{}},e.onEnter=function(t,n){var r=e.resolveArguments(t,n),i=r[0],o=r[1];e.removeClasses(i,"exit"),e.addClass(i,o?"appear":"enter","base"),e.props.onEnter&&e.props.onEnter(t,n)},e.onEntering=function(t,n){var r=e.resolveArguments(t,n),i=r[0],o=r[1]?"appear":"enter";e.addClass(i,o,"active"),e.props.onEntering&&e.props.onEntering(t,n)},e.onEntered=function(t,n){var r=e.resolveArguments(t,n),i=r[0],o=r[1]?"appear":"enter";e.removeClasses(i,o),e.addClass(i,o,"done"),e.props.onEntered&&e.props.onEntered(t,n)},e.onExit=function(t){var n=e.resolveArguments(t)[0];e.removeClasses(n,"appear"),e.removeClasses(n,"enter"),e.addClass(n,"exit","base"),e.props.onExit&&e.props.onExit(t)},e.onExiting=function(t){var n=e.resolveArguments(t)[0];e.addClass(n,"exit","active"),e.props.onExiting&&e.props.onExiting(t)},e.onExited=function(t){var n=e.resolveArguments(t)[0];e.removeClasses(n,"exit"),e.addClass(n,"exit","done"),e.props.onExited&&e.props.onExited(t)},e.resolveArguments=function(t,n){return e.props.nodeRef?[e.props.nodeRef.current,t]:[t,n]},e.getClassNames=function(t){var n=e.props.classNames,r="string"==typeof n,i=r?""+(r&&n?n+"-":"")+t:n[t];return{baseClassName:i,activeClassName:r?i+"-active":n[t+"Active"],doneClassName:r?i+"-done":n[t+"Done"]}},e}lg(e,t);var n=e.prototype;return n.addClass=function(t,e,n){var r=this.getClassNames(e)[n+"ClassName"],i=this.getClassNames("enter").doneClassName;"appear"===e&&"done"===n&&i&&(r+=" "+i),"active"===n&&t&&t.scrollTop,r&&(this.appliedClasses[e][n]=r,function(t,e){t&&e&&e.split(" ").forEach(function(e){return function(t,e){t.classList?t.classList.add(e):function(t,e){return t.classList?!!e&&t.classList.contains(e):-1!==(" "+(t.className.baseVal||t.className)+" ").indexOf(" "+e+" ")}(t,e)||("string"==typeof t.className?t.className=t.className+" "+e:t.setAttribute("class",(t.className&&t.className.baseVal||"")+" "+e))}(t,e)})}(t,r))},n.removeClasses=function(t,e){var n=this.appliedClasses[e],r=n.base,i=n.active,o=n.done;this.appliedClasses[e]={},r&&Dg(t,r),i&&Dg(t,i),o&&Dg(t,o)},n.render=function(){var t=this.props;t.classNames;var e=sg(t,["classNames"]);return We.createElement(vg,og({},e,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},e}(We.Component);Tg.defaultProps={classNames:""},Tg.propTypes={};const Rg={ltr:["ArrowLeft","ArrowRight"],rtl:["ArrowRight","ArrowLeft"],ttb:["ArrowUp","ArrowDown"]};function yg(t,{focused:e,setFocused:n,itemCount:r,dir:i,onConfirm:o,onSpace:s}){if(0===r)return!1;const a=t=>{t=cn(0,t,r-1),n(t)},[l,c]=Rg[i];switch(t){case l:return a(e-1),!0;case c:return a(e+1),!0;case" ":return!!s&&s();case"Enter":case"Tab":return o(),!0}return!1}function Ig({focused:t,setFocused:e,buttonId:n}){pt(()=>{const e=n(t);var r;e&&(null===(r=document.getElementById(e))||void 0===r||r.scrollIntoView({block:"nearest"}))},[t,n]);const r=_t(t=>{const n=t.currentTarget.dataset.index;e(+n)},[e]);return{containerProps:Et(()=>({role:"menu","aria-activedescendant":n(t)}),[t,n]),itemProps:_t(t=>({onMouseMove:r,id:n(t),"data-index":t}),[r,n])}}var Cg;Xe();const Ng=null!==(Cg=globalThis.window)&&void 0!==Cg&&Cg.document?function(){if("undefined"==typeof window||window.E2E||window.__talkjsE2E)return 16;for(const[t,e]of Object.entries({"":16,"🚶➡️":15.1,"🫨":15,"🫠":14,"😵💫":13.1,"🥲":13,"🧑🦰":12.1,"🥻":12,"🥰":11,"🤩":5,"👱♀️":4,"🤣":3,"👁️🗨️":2,"😀":1,"😐️":.7,"😃":.6}))if(AA(t))return e}():0;function bg(t){const[e,n]=ut([]),[r,i]=ut([]),[o,s]=ut(0),[a,l]=ut(0),c=QA(),d=Et(()=>(null==c?void 0:c.value)&&new c.value.Database({dataSource:c.value.dataSource}),[c]),h=Sn(),p=yo(h.state$.suggestEmojiQuery);ht(()=>{if(d){if(!p)return void n([]);!async function(){const t=await d.getPreferredSkinTone();l(t);let e=await d.getEmojiBySearchQuery(p);if(e=e.filter(t=>t.url||function(t){return t.version<=Ng&&!Pg.includes(t.unicode)}(t)),function(t,e){e.sort((e,n)=>{var r,i;const o=null===(r=e.shortcodes)||void 0===r?void 0:r.find(e=>e.startsWith(t)),s=null===(i=n.shortcodes)||void 0===i?void 0:i.find(e=>e.startsWith(t));return o&&!s?-1:!o&&s?1:o&&s?o.length-s.length:0})}(p.substring(1),e),s(0),n(e),e.length>0&&i(e),p.endsWith(":")){const n=p.slice(1,-1),r=e.find(t=>{var e;return null===(e=t.shortcodes)||void 0===e?void 0:e.includes(n)});r&&h.selectEmoji(wg(r,t))}}()}},[p,h,d]);const{containerProps:f,itemProps:m}=Ig({focused:o,setFocused:s,buttonId:_t(t=>{const n=e[t];return n&&"emoji-button-"+wg(n,a)},[e,a])}),E=e.length>0;zA(()=>h.closeSuggester(),".t-emoji-suggest-bar",E),ht(()=>{if(E)return h.listenKeydown("emoji",t=>yg(t,{dir:"ltr",focused:o,setFocused:s,itemCount:e.length,onConfirm(){const t=e[o];En.defined(t),h.selectEmoji(wg(t,a))}})),()=>{h.listenKeydown("emoji",void 0)};h.listenKeydown("emoji",void 0)},[h,e,o,E,a]);const _=ft(null);return Gs(Tg,{in:E,timeout:100,classNames:"slide",mountOnEnter:!0,unmountOnExit:!0,nodeRef:_,children:Gs("div",{className:"t-emoji-suggest-bar",ref:_,...f,children:r.map((t,e)=>Gs(Lg,{emoji:t,skinTone:a,focused:e===o,onSelect:t=>h.selectEmoji(t),...m(e)},wg(t,a)))})})}function wg(t,e){return kg(t)?Mg(t,e):t.name}function kg(t){return!!t.unicode}function Lg(t){var e;const{emoji:n,focused:r,skinTone:i,onSelect:o,...s}=t,a=(null!==(e=n.shortcodes)&&void 0!==e?e:[]).join(", "),l=kg(n)?[n.unicode,a].join(", "):a;return Gs("button",{"t-focused":r?"":void 0,title:a,"aria-label":l,onClick:()=>o(wg(n,i)),...s,children:kg(n)?Mg(n,i):null})}function Mg(t,e){var n,r;const i=null===(n=t.skins)||void 0===n?void 0:n.find(t=>t.tone===e);return null!==(r=null==i?void 0:i.unicode)&&void 0!==r?r:t.unicode}Xe();const Pg=["🏻","🏼","🏽","🏾","🏿"];const xg=["top","right","bottom","left"],Fg=Math.min,Hg=Math.max,Ug=Math.round,Bg=Math.floor,jg=t=>({x:t,y:t}),Vg={left:"right",right:"left",bottom:"top",top:"bottom"},zg={start:"end",end:"start"};function $g(t,e,n){return Hg(t,Fg(e,n))}function Yg(t,e){return"function"==typeof t?t(e):t}function Gg(t){return t.split("-")[0]}function Wg(t){return t.split("-")[1]}function Xg(t){return"x"===t?"y":"x"}function Kg(t){return"y"===t?"height":"width"}const qg=new Set(["top","bottom"]);function Jg(t){return qg.has(Gg(t))?"y":"x"}function Zg(t){return Xg(Jg(t))}function Qg(t){return t.replace(/start|end/g,t=>zg[t])}const eS=["left","right"],nS=["right","left"],rS=["top","bottom"],iS=["bottom","top"];function oS(t,e,n,r){const i=Wg(t);let o=function(t,e,n){switch(t){case"top":case"bottom":return n?e?nS:eS:e?eS:nS;case"left":case"right":return e?rS:iS;default:return[]}}(Gg(t),"start"===n,r);return i&&(o=o.map(t=>t+"-"+i),e&&(o=o.concat(o.map(Qg)))),o}function sS(t){return t.replace(/left|right|bottom|top/g,t=>Vg[t])}function aS(t){const{x:e,y:n,width:r,height:i}=t;return{width:r,height:i,top:n,left:e,right:e+r,bottom:n+i,x:e,y:n}}function lS(t,e,n){let{reference:r,floating:i}=t;const o=Jg(e),s=Zg(e),a=Kg(s),l=Gg(e),c="y"===o,d=r.x+r.width/2-i.width/2,h=r.y+r.height/2-i.height/2,p=r[a]/2-i[a]/2;let f;switch(l){case"top":f={x:d,y:r.y-i.height};break;case"bottom":f={x:d,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:h};break;case"left":f={x:r.x-i.width,y:h};break;default:f={x:r.x,y:r.y}}switch(Wg(e)){case"start":f[s]-=p*(n&&c?-1:1);break;case"end":f[s]+=p*(n&&c?-1:1)}return f}async function cS(t,e){var n;void 0===e&&(e={});const{x:r,y:i,platform:o,rects:s,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:p=!1,padding:f=0}=Yg(e,t),m=function(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}(f),E=a[p?"floating"===h?"reference":"floating":h],_=aS(await o.getClippingRect({element:null==(n=await(null==o.isElement?void 0:o.isElement(E)))||n?E:E.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),A="floating"===h?{x:r,y:i,width:s.floating.width,height:s.floating.height}:s.reference,g=await(null==o.getOffsetParent?void 0:o.getOffsetParent(a.floating)),S=await(null==o.isElement?void 0:o.isElement(g))&&await(null==o.getScale?void 0:o.getScale(g))||{x:1,y:1},v=aS(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:A,offsetParent:g,strategy:l}):A);return{top:(_.top-v.top+m.top)/S.y,bottom:(v.bottom-_.bottom+m.bottom)/S.y,left:(_.left-v.left+m.left)/S.x,right:(v.right-_.right+m.right)/S.x}}function uS(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function dS(t){return xg.some(e=>t[e]>=0)}const hS=new Set(["left","top"]);function pS(){return"undefined"!=typeof window}function fS(t){return _S(t)?(t.nodeName||"").toLowerCase():"#document"}function mS(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function ES(t){var e;return null==(e=(_S(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function _S(t){return!!pS()&&(t instanceof Node||t instanceof mS(t).Node)}function AS(t){return!!pS()&&(t instanceof Element||t instanceof mS(t).Element)}function gS(t){return!!pS()&&(t instanceof HTMLElement||t instanceof mS(t).HTMLElement)}function SS(t){return!(!pS()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof mS(t).ShadowRoot)}const vS=new Set(["inline","contents"]);function OS(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=MS(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!vS.has(i)}const DS=new Set(["table","td","th"]);function TS(t){return DS.has(fS(t))}const RS=[":popover-open",":modal"];function yS(t){return RS.some(e=>{try{return t.matches(e)}catch(t){return!1}})}const IS=["transform","translate","scale","rotate","perspective"],CS=["transform","translate","scale","rotate","perspective","filter"],NS=["paint","layout","strict","content"];function bS(t){const e=wS(),n=AS(t)?MS(t):t;return IS.some(t=>!!n[t]&&"none"!==n[t])||!!n.containerType&&"normal"!==n.containerType||!e&&!!n.backdropFilter&&"none"!==n.backdropFilter||!e&&!!n.filter&&"none"!==n.filter||CS.some(t=>(n.willChange||"").includes(t))||NS.some(t=>(n.contain||"").includes(t))}function wS(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const kS=new Set(["html","body","#document"]);function LS(t){return kS.has(fS(t))}function MS(t){return mS(t).getComputedStyle(t)}function PS(t){return AS(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function xS(t){if("html"===fS(t))return t;const e=t.assignedSlot||t.parentNode||SS(t)&&t.host||ES(t);return SS(e)?e.host:e}function FS(t){const e=xS(t);return LS(e)?t.ownerDocument?t.ownerDocument.body:t.body:gS(e)&&OS(e)?e:FS(e)}function HS(t,e,n){var r;void 0===e&&(e=[]),void 0===n&&(n=!0);const i=FS(t),o=i===(null==(r=t.ownerDocument)?void 0:r.body),s=mS(i);if(o){const t=US(s);return e.concat(s,s.visualViewport||[],OS(i)?i:[],t&&n?HS(t):[])}return e.concat(i,HS(i,[],n))}function US(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function BS(t){const e=MS(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=gS(t),o=i?t.offsetWidth:n,s=i?t.offsetHeight:r,a=Ug(n)!==o||Ug(r)!==s;return a&&(n=o,r=s),{width:n,height:r,$:a}}function jS(t){return AS(t)?t:t.contextElement}function VS(t){const e=jS(t);if(!gS(e))return jg(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:o}=BS(e);let s=(o?Ug(n.width):n.width)/r,a=(o?Ug(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const zS=jg(0);function $S(t){const e=mS(t);return wS()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:zS}function YS(t,e,n,r){void 0===e&&(e=!1),void 0===n&&(n=!1);const i=t.getBoundingClientRect(),o=jS(t);let s=jg(1);e&&(r?AS(r)&&(s=VS(r)):s=VS(t));const a=function(t,e,n){return void 0===e&&(e=!1),!(!n||e&&n!==mS(t))&&e}(o,n,r)?$S(o):jg(0);let l=(i.left+a.x)/s.x,c=(i.top+a.y)/s.y,d=i.width/s.x,h=i.height/s.y;if(o){const t=mS(o),e=r&&AS(r)?mS(r):r;let n=t,i=US(n);for(;i&&r&&e!==n;){const t=VS(i),e=i.getBoundingClientRect(),r=MS(i),o=e.left+(i.clientLeft+parseFloat(r.paddingLeft))*t.x,s=e.top+(i.clientTop+parseFloat(r.paddingTop))*t.y;l*=t.x,c*=t.y,d*=t.x,h*=t.y,l+=o,c+=s,n=mS(i),i=US(n)}}return aS({width:d,height:h,x:l,y:c})}function GS(t,e){const n=PS(t).scrollLeft;return e?e.left+n:YS(ES(t)).left+n}function WS(t,e){const n=t.getBoundingClientRect();return{x:n.left+e.scrollLeft-GS(t,n),y:n.top+e.scrollTop}}const XS=new Set(["absolute","fixed"]);function KS(t,e,n){let r;if("viewport"===e)r=function(t,e){const n=mS(t),r=ES(t),i=n.visualViewport;let o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;const t=wS();(!t||t&&"fixed"===e)&&(a=i.offsetLeft,l=i.offsetTop)}const c=GS(r);if(c<=0){const t=r.ownerDocument,e=t.body,n=getComputedStyle(e),i="CSS1Compat"===t.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,s=Math.abs(r.clientWidth-e.clientWidth-i);s<=25&&(o-=s)}else c<=25&&(o+=c);return{width:o,height:s,x:a,y:l}}(t,n);else if("document"===e)r=function(t){const e=ES(t),n=PS(t),r=t.ownerDocument.body,i=Hg(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),o=Hg(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+GS(t);const a=-n.scrollTop;return"rtl"===MS(r).direction&&(s+=Hg(e.clientWidth,r.clientWidth)-i),{width:i,height:o,x:s,y:a}}(ES(t));else if(AS(e))r=function(t,e){const n=YS(t,!0,"fixed"===e),r=n.top+t.clientTop,i=n.left+t.clientLeft,o=gS(t)?VS(t):jg(1);return{width:t.clientWidth*o.x,height:t.clientHeight*o.y,x:i*o.x,y:r*o.y}}(e,n);else{const n=$S(t);r={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return aS(r)}function qS(t,e){const n=xS(t);return!(n===e||!AS(n)||LS(n))&&("fixed"===MS(n).position||qS(n,e))}function JS(t,e){const n=e.get(t);if(n)return n;let r=HS(t,[],!1).filter(t=>AS(t)&&"body"!==fS(t)),i=null;const o="fixed"===MS(t).position;let s=o?xS(t):t;for(;AS(s)&&!LS(s);){const e=MS(s),n=bS(s);!n&&"fixed"===e.position&&(i=null),(o?!n&&!i:!n&&"static"===e.position&&i&&XS.has(i.position)||OS(s)&&!n&&qS(t,s))?r=r.filter(t=>t!==s):i=e,s=xS(s)}return e.set(t,r),r}function ZS(t,e,n){const r=gS(e),i=ES(e),o="fixed"===n,s=YS(t,!0,o,e);let a={scrollLeft:0,scrollTop:0};const l=jg(0);function c(){l.x=GS(i)}if(r||!r&&!o)if(("body"!==fS(e)||OS(i))&&(a=PS(e)),r){const t=YS(e,!0,o,e);l.x=t.x+e.clientLeft,l.y=t.y+e.clientTop}else i&&c();o&&!r&&i&&c();const d=!i||r||o?jg(0):WS(i,a);return{x:s.left+a.scrollLeft-l.x-d.x,y:s.top+a.scrollTop-l.y-d.y,width:s.width,height:s.height}}function QS(t){return"static"===MS(t).position}function tv(t,e){if(!gS(t)||"fixed"===MS(t).position)return null;if(e)return e(t);let n=t.offsetParent;return ES(t)===n&&(n=n.ownerDocument.body),n}function ev(t,e){const n=mS(t);if(yS(t))return n;if(!gS(t)){let e=xS(t);for(;e&&!LS(e);){if(AS(e)&&!QS(e))return e;e=xS(e)}return n}let r=tv(t,e);for(;r&&TS(r)&&QS(r);)r=tv(r,e);return r&&LS(r)&&QS(r)&&!bS(r)?n:r||function(t){let e=xS(t);for(;gS(e)&&!LS(e);){if(bS(e))return e;if(yS(e))return null;e=xS(e)}return null}(t)||n}const nv={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:r,strategy:i}=t;const o="fixed"===i,s=ES(r),a=!!e&&yS(e.floating);if(r===s||a&&o)return n;let l={scrollLeft:0,scrollTop:0},c=jg(1);const d=jg(0),h=gS(r);if((h||!h&&!o)&&(("body"!==fS(r)||OS(s))&&(l=PS(r)),gS(r))){const t=YS(r);c=VS(r),d.x=t.x+r.clientLeft,d.y=t.y+r.clientTop}const p=!s||h||o?jg(0):WS(s,l);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+d.x+p.x,y:n.y*c.y-l.scrollTop*c.y+d.y+p.y}},getDocumentElement:ES,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:r,strategy:i}=t;const o=[..."clippingAncestors"===n?yS(e)?[]:JS(e,this._c):[].concat(n),r],s=o[0],a=o.reduce((t,n)=>{const r=KS(e,n,i);return t.top=Hg(r.top,t.top),t.right=Fg(r.right,t.right),t.bottom=Fg(r.bottom,t.bottom),t.left=Hg(r.left,t.left),t},KS(e,s,i));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:ev,getElementRects:async function(t){const e=this.getOffsetParent||ev,n=this.getDimensions,r=await n(t.floating);return{reference:ZS(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:n}=BS(t);return{width:e,height:n}},getScale:VS,isElement:AS,isRTL:function(t){return"rtl"===MS(t).direction}};function rv(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function iv(t,e,n,r){void 0===r&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=jS(t),d=i||o?[...c?HS(c):[],...HS(e)]:[];d.forEach(t=>{i&&t.addEventListener("scroll",n,{passive:!0}),o&&t.addEventListener("resize",n)});const h=c&&a?function(t,e){let n,r=null;const i=ES(t);function o(){var t;clearTimeout(n),null==(t=r)||t.disconnect(),r=null}return function s(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),o();const c=t.getBoundingClientRect(),{left:d,top:h,width:p,height:f}=c;if(a||e(),!p||!f)return;const m={rootMargin:-Bg(h)+"px "+-Bg(i.clientWidth-(d+p))+"px "+-Bg(i.clientHeight-(h+f))+"px "+-Bg(d)+"px",threshold:Hg(0,Fg(1,l))||1};let E=!0;function _(e){const r=e[0].intersectionRatio;if(r!==l){if(!E)return s();r?s(!1,r):n=setTimeout(()=>{s(!1,1e-7)},1e3)}1===r&&!rv(c,t.getBoundingClientRect())&&s(),E=!1}try{r=new IntersectionObserver(_,{...m,root:i.ownerDocument})}catch(t){r=new IntersectionObserver(_,m)}r.observe(t)}(!0),o}(c,n):null;let p=-1,f=null;s&&(f=new ResizeObserver(t=>{let[r]=t;r&&r.target===c&&f&&(f.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var t;null==(t=f)||t.observe(e)})),n()}),c&&!l&&f.observe(c),f.observe(e));let m,E=l?YS(t):null;return l&&function e(){const r=YS(t);E&&!rv(E,r)&&n(),E=r,m=requestAnimationFrame(e)}(),n(),()=>{var t;d.forEach(t=>{i&&t.removeEventListener("scroll",n),o&&t.removeEventListener("resize",n)}),null==h||h(),null==(t=f)||t.disconnect(),f=null,l&&cancelAnimationFrame(m)}}const ov=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:i,y:o,placement:s,middlewareData:a}=e,l=await async function(t,e){const{placement:n,platform:r,elements:i}=t,o=await(null==r.isRTL?void 0:r.isRTL(i.floating)),s=Gg(n),a=Wg(n),l="y"===Jg(n),c=hS.has(s)?-1:1,d=o&&l?-1:1,h=Yg(e,t);let{mainAxis:p,crossAxis:f,alignmentAxis:m}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return a&&"number"==typeof m&&(f="end"===a?-1*m:m),l?{x:f*d,y:p*c}:{x:p*c,y:f*d}}(e,t);return s===(null==(n=a.offset)?void 0:n.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:s}}}}},sv=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:i}=e,{mainAxis:o=!0,crossAxis:s=!1,limiter:a={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}},...l}=Yg(t,e),c={x:n,y:r},d=await cS(e,l),h=Jg(Gg(i)),p=Xg(h);let f=c[p],m=c[h];if(o){const t="y"===p?"bottom":"right";f=$g(f+d["y"===p?"top":"left"],f,f-d[t])}if(s){const t="y"===h?"bottom":"right";m=$g(m+d["y"===h?"top":"left"],m,m-d[t])}const E=a.fn({...e,[p]:f,[h]:m});return{...E,data:{x:E.x-n,y:E.y-r,enabled:{[p]:o,[h]:s}}}}}},av=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:i,middlewareData:o,rects:s,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:E=!0,..._}=Yg(t,e);if(null!=(n=o.arrow)&&n.alignmentOffset)return{};const A=Gg(i),g=Jg(a),S=Gg(a)===a,v=await(null==l.isRTL?void 0:l.isRTL(c.floating)),O=p||(S||!E?[sS(a)]:function(t){const e=sS(t);return[Qg(t),e,Qg(e)]}(a)),D="none"!==m;!p&&D&&O.push(...oS(a,E,m,v));const T=[a,...O],R=await cS(e,_),y=[];let I=(null==(r=o.flip)?void 0:r.overflows)||[];if(d&&y.push(R[A]),h){const t=function(t,e,n){void 0===n&&(n=!1);const r=Wg(t),i=Zg(t),o=Kg(i);let s="x"===i?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return e.reference[o]>e.floating[o]&&(s=sS(s)),[s,sS(s)]}(i,s,v);y.push(R[t[0]],R[t[1]])}if(I=[...I,{placement:i,overflows:y}],!y.every(t=>t<=0)){var C,N;const t=((null==(C=o.flip)?void 0:C.index)||0)+1,e=T[t];if(e&&("alignment"!==h||g===Jg(e)||I.every(t=>Jg(t.placement)!==g||t.overflows[0]>0)))return{data:{index:t,overflows:I},reset:{placement:e}};let n=null==(N=I.filter(t=>t.overflows[0]<=0).sort((t,e)=>t.overflows[1]-e.overflows[1])[0])?void 0:N.placement;if(!n)switch(f){case"bestFit":{var b;const t=null==(b=I.filter(t=>{if(D){const e=Jg(t.placement);return e===g||"y"===e}return!0}).map(t=>[t.placement,t.overflows.filter(t=>t>0).reduce((t,e)=>t+e,0)]).sort((t,e)=>t[1]-e[1])[0])?void 0:b[0];t&&(n=t);break}case"initialPlacement":n=a}if(i!==n)return{reset:{placement:n}}}return{}}}},lv=function(t){return void 0===t&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:r="referenceHidden",...i}=Yg(t,e);switch(r){case"referenceHidden":{const t=uS(await cS(e,{...i,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:dS(t)}}}case"escaped":{const t=uS(await cS(e,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:t,escaped:dS(t)}}}default:return{}}}}},cv=(t,e,n)=>{const r=new Map,i={platform:nv,...n},o={...i.platform,_c:r};return(async(t,e,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:s}=n,a=o.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(e));let c=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:d,y:h}=lS(c,r,l),p=r,f={},m=0;for(let n=0;n<a.length;n++){const{name:o,fn:E}=a[n],{x:_,y:A,data:g,reset:S}=await E({x:d,y:h,initialPlacement:r,placement:p,strategy:i,middlewareData:f,rects:c,platform:s,elements:{reference:t,floating:e}});d=null!=_?_:d,h=null!=A?A:h,f={...f,[o]:{...f[o],...g}},S&&m<=50&&(m++,"object"==typeof S&&(S.placement&&(p=S.placement),S.rects&&(c=!0===S.rects?await s.getElementRects({reference:t,floating:e,strategy:i}):S.rects),({x:d,y:h}=lS(c,p,l))),n=-1)}return{x:d,y:h,placement:p,strategy:i,middlewareData:f}})(t,e,{...i,platform:o})};Xe();var uv="undefined"!=typeof document?pt:function(){};function dv(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if("function"==typeof t&&t.toString()===e.toString())return!0;let n,r,i;if(t&&e&&"object"==typeof t){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;0!==r--;)if(!dv(t[r],e[r]))return!1;return!0}if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(r=n;0!==r--;)if(!{}.hasOwnProperty.call(e,i[r]))return!1;for(r=n;0!==r--;){const n=i[r];if(!("_owner"===n&&t.$$typeof||dv(t[n],e[n])))return!1}return!0}return t!=t&&e!=e}function hv(t){return"undefined"==typeof window?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function pv(t,e){const n=hv(t);return Math.round(e*n)/n}function fv(t){const e=ft(t);return uv(()=>{e.current=t}),e}function mv(t){void 0===t&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=t,[d,h]=ut({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[p,f]=ut(r);dv(p,r)||f(r);const[m,E]=ut(null),[_,A]=ut(null),g=_t(t=>{t!==D.current&&(D.current=t,E(t))},[]),S=_t(t=>{t!==T.current&&(T.current=t,A(t))},[]),v=o||m,O=s||_,D=ft(null),T=ft(null),R=ft(d),y=null!=l,I=fv(l),C=fv(i),N=fv(c),b=_t(()=>{if(!D.current||!T.current)return;const t={placement:e,strategy:n,middleware:p};C.current&&(t.platform=C.current),cv(D.current,T.current,t).then(t=>{const e={...t,isPositioned:!1!==N.current};w.current&&!dv(R.current,e)&&(R.current=e,$e(()=>{h(e)}))})},[p,e,n,C,N]);uv(()=>{!1===c&&R.current.isPositioned&&(R.current.isPositioned=!1,h(t=>({...t,isPositioned:!1})))},[c]);const w=ft(!1);uv(()=>(w.current=!0,()=>{w.current=!1}),[]),uv(()=>{if(v&&(D.current=v),O&&(T.current=O),v&&O){if(I.current)return I.current(v,O,b);b()}},[v,O,b,I,y]);const k=Et(()=>({reference:D,floating:T,setReference:g,setFloating:S}),[g,S]),L=Et(()=>({reference:v,floating:O}),[v,O]),M=Et(()=>{const t={position:n,left:0,top:0};if(!L.floating)return t;const e=pv(L.floating,d.x),r=pv(L.floating,d.y);return a?{...t,transform:"translate("+e+"px, "+r+"px)",...hv(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:e,top:r}},[n,a,L.floating,d.x,d.y]);return Et(()=>({...d,update:b,refs:k,elements:L,floatingStyles:M}),[d,b,k,L,M])}const Ev=(t,e)=>({...ov(t),options:[t,e]}),_v=(t,e)=>({...sv(t),options:[t,e]}),Av=(t,e)=>({...av(t),options:[t,e]}),gv=(t,e)=>({...lv(t),options:[t,e]});var Sv,vv,Ov,Dv,Tv,Rv,yv,Iv,Cv,Nv,bv,wv,kv,Lv,Mv,Pv,xv,Fv,Hv,Uv,Bv,jv,Vv,zv,$v,Yv,Gv,Wv,Xv,Kv,qv,Jv,Zv,Qv=c({focusable:()=>Kv,getTabIndex:()=>bv,isFocusable:()=>Zv,isTabbable:()=>qv,tabbable:()=>Xv}),tO=a(()=>{vv=(Sv=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"]).join(","),Ov="undefined"==typeof Element,Dv=Ov?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Tv=!Ov&&Element.prototype.getRootNode?function(t){var e;return null==t||null===(e=t.getRootNode)||void 0===e?void 0:e.call(t)}:function(t){return null==t?void 0:t.ownerDocument},Rv=function(t,e){var n;void 0===e&&(e=!0);var r=null==t||null===(n=t.getAttribute)||void 0===n?void 0:n.call(t,"inert");return""===r||"true"===r||e&&t&&Rv(t.parentNode)},yv=function(t){var e,n=null==t||null===(e=t.getAttribute)||void 0===e?void 0:e.call(t,"contenteditable");return""===n||"true"===n},Iv=function(t,e,n){if(Rv(t))return[];var r=Array.prototype.slice.apply(t.querySelectorAll(vv));return e&&Dv.call(t,vv)&&r.unshift(t),r=r.filter(n)},Cv=function(t,e,n){for(var r=[],i=Array.from(t);i.length;){var o=i.shift();if(!Rv(o,!1))if("SLOT"===o.tagName){var s=o.assignedElements(),a=Cv(s.length?s:o.children,!0,n);n.flatten?r.push.apply(r,a):r.push({scopeParent:o,candidates:a})}else{Dv.call(o,vv)&&n.filter(o)&&(e||!t.includes(o))&&r.push(o);var l=o.shadowRoot||"function"==typeof n.getShadowRoot&&n.getShadowRoot(o),c=!Rv(l,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(o));if(l&&c){var d=Cv(!0===l?o.children:l.children,!0,n);n.flatten?r.push.apply(r,d):r.push({scopeParent:o,candidates:d})}else i.unshift.apply(i,o.children)}}return r},Nv=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},bv=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||yv(t))&&!Nv(t)?0:t.tabIndex},wv=function(t,e){var n=bv(t);return n<0&&e&&!Nv(t)?0:n},kv=function(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex},Lv=function(t){return"INPUT"===t.tagName},Mv=function(t){return Lv(t)&&"hidden"===t.type},Pv=function(t){return"DETAILS"===t.tagName&&Array.prototype.slice.apply(t.children).some(function(t){return"SUMMARY"===t.tagName})},xv=function(t,e){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===e)return t[n]},Fv=function(t){if(!t.name)return!0;var e,n=t.form||Tv(t),r=function(t){return n.querySelectorAll('input[type="radio"][name="'+t+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)e=r(window.CSS.escape(t.name));else try{e=r(t.name)}catch(t){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",t.message),!1}var i=xv(e,t.form);return!i||i===t},Hv=function(t){return Lv(t)&&"radio"===t.type},Uv=function(t){return Hv(t)&&!Fv(t)},Bv=function(t){var e,n,r,i,o=t&&Tv(t),s=null===(e=o)||void 0===e?void 0:e.host,a=!1;if(o&&o!==t)for(a=!!(null!==(n=s)&&void 0!==n&&null!==(r=n.ownerDocument)&&void 0!==r&&r.contains(s)||null!=t&&null!==(i=t.ownerDocument)&&void 0!==i&&i.contains(t));!a&&s;){var l,c,d;a=!(null===(c=s=null===(l=o=Tv(s))||void 0===l?void 0:l.host)||void 0===c||null===(d=c.ownerDocument)||void 0===d||!d.contains(s))}return a},jv=function(t){var e=t.getBoundingClientRect(),n=e.width,r=e.height;return 0===n&&0===r},Vv=function(t,e){var n=e.displayCheck,r=e.getShadowRoot;if("full-native"===n&&"checkVisibility"in t)return!t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if("hidden"===getComputedStyle(t).visibility)return!0;var i=Dv.call(t,"details>summary:first-of-type")?t.parentElement:t;if(Dv.call(i,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"full-native"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return jv(t)}else{if("function"==typeof r){for(var o=t;t;){var s=t.parentElement,a=Tv(t);if(s&&!s.shadowRoot&&!0===r(s))return jv(t);t=t.assignedSlot?t.assignedSlot:s||a===t.ownerDocument?s:a.host}t=o}if(Bv(t))return!t.getClientRects().length;if("legacy-full"!==n)return!0}return!1},zv=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var e=t.parentElement;e;){if("FIELDSET"===e.tagName&&e.disabled){for(var n=0;n<e.children.length;n++){var r=e.children.item(n);if("LEGEND"===r.tagName)return!!Dv.call(e,"fieldset[disabled] *")||!r.contains(t)}return!0}e=e.parentElement}return!1},$v=function(t,e){return!(e.disabled||Rv(e)||Mv(e)||Vv(e,t)||Pv(e)||zv(e))},Yv=function(t,e){return!(Uv(e)||bv(e)<0||!$v(t,e))},Gv=function(t){var e=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(e)||e>=0)},Wv=function(t){var e=[],n=[];return t.forEach(function(t,r){var i=!!t.scopeParent,o=i?t.scopeParent:t,s=wv(o,i),a=i?Wv(t.candidates):o;0===s?i?e.push.apply(e,a):e.push(o):n.push({documentOrder:r,tabIndex:s,item:t,isScope:i,content:a})}),n.sort(kv).reduce(function(t,e){return e.isScope?t.push.apply(t,e.content):t.push(e.content),t},[]).concat(e)},Xv=function(t,e){var n;return n=(e=e||{}).getShadowRoot?Cv([t],e.includeContainer,{filter:Yv.bind(null,e),flatten:!1,getShadowRoot:e.getShadowRoot,shadowRootFilter:Gv}):Iv(t,e.includeContainer,Yv.bind(null,e)),Wv(n)},Kv=function(t,e){return(e=e||{}).getShadowRoot?Cv([t],e.includeContainer,{filter:$v.bind(null,e),flatten:!0,getShadowRoot:e.getShadowRoot}):Iv(t,e.includeContainer,$v.bind(null,e))},qv=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return!1!==Dv.call(t,vv)&&Yv(e,t)},Jv=Sv.concat("iframe").join(","),Zv=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return!1!==Dv.call(t,Jv)&&$v(e,t)}});function eO(t){return(null==t?void 0:t.ownerDocument)||document}Xe(),tO();var nO="undefined"!=typeof document?pt:function(){};({...zt}).useInsertionEffect;const rO=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function iO(t,e){const n=Xv(t,rO()),r=n.length;if(0===r)return;const i=function(t){let e=t.activeElement;for(;null!=(null==(n=e)||null==(n=n.shadowRoot)?void 0:n.activeElement);){var n;e=e.shadowRoot.activeElement}return e}(eO(t)),o=n.indexOf(i);return n[-1===o?1===e?0:r-1:o+e]}function oO(t,e){const n=e||t.currentTarget,r=t.relatedTarget;return!r||!function(t,e){if(!t||!e)return!1;const n=null==e.getRootNode?void 0:e.getRootNode();if(t.contains(e))return!0;if(n&&SS(n)){let n=e;for(;n;){if(t===n)return!0;n=n.parentNode||n.host}}return!1}(n,r)}function sO(t){Xv(t,rO()).forEach(t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")})}function aO(t){t.querySelectorAll("[data-tabindex]").forEach(t=>{const e=t.dataset.tabindex;delete t.dataset.tabindex,e?t.setAttribute("tabindex",e):t.removeAttribute("tabindex")})}Xe();const lO={...zt};let cO=!1,uO=0;const dO=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+uO++;const hO=lO.useId||function(){const[t,e]=ut(()=>cO?dO():void 0);return nO(()=>{null==t&&e(dO())},[]),ht(()=>{cO=!0},[]),t};function pO(t){return"data-floating-ui-"+t}const fO={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},mO=Qt(function(t,e){const[n,r]=ut();nO(()=>{/apple/i.test(navigator.vendor)&&r("button")},[]);return Gs("span",{...t,...{ref:e,tabIndex:0,role:n,"aria-hidden":!n||void 0,[pO("focus-guard")]:"",style:fO}})}),EO=Y(null),_O=pO("portal");function AO(t){const{children:e,id:n,root:r,preserveTabOrder:i=!0}=t,o=function(t){void 0===t&&(t={});const{id:e,root:n}=t,r=hO(),i=gO(),[o,s]=ut(null),a=ft(null);return nO(()=>()=>{null==o||o.remove(),queueMicrotask(()=>{a.current=null})},[o]),nO(()=>{if(!r||a.current)return;const t=e?document.getElementById(e):null;if(!t)return;const n=document.createElement("div");n.id=r,n.setAttribute(_O,""),t.appendChild(n),a.current=n,s(n)},[e,r]),nO(()=>{if(null===n||!r||a.current)return;let t=n||(null==i?void 0:i.portalNode);t&&!_S(t)&&(t=t.current),t=t||document.body;let o=null;e&&(o=document.createElement("div"),o.id=e,t.appendChild(o));const l=document.createElement("div");l.id=r,l.setAttribute(_O,""),t=o||t,t.appendChild(l),a.current=l,s(l)},[e,n,r,i]),o}({id:n,root:r}),[s,a]=ut(null),l=ft(null),c=ft(null),d=ft(null),h=ft(null),p=null==s?void 0:s.modal,f=null==s?void 0:s.open,m=!!s&&!s.modal&&s.open&&i&&!(!r&&!o);return ht(()=>{if(o&&i&&!p)return o.addEventListener("focusin",t,!0),o.addEventListener("focusout",t,!0),()=>{o.removeEventListener("focusin",t,!0),o.removeEventListener("focusout",t,!0)};function t(t){o&&oO(t)&&("focusin"===t.type?aO:sO)(o)}},[o,i,p]),ht(()=>{o&&(f||aO(o))},[f,o]),Gs(EO.Provider,{value:Et(()=>({preserveTabOrder:i,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:d,afterInsideRef:h,portalNode:o,setFocusManagerState:a}),[i,o]),children:[m&&o&&Gs(mO,{"data-type":"outside",ref:l,onFocus:t=>{if(oO(t,o)){var e;null==(e=d.current)||e.focus()}else{const t=function(t){return iO(eO(t).body,-1)||t}(s?s.domReference:null);null==t||t.focus()}}}),m&&o&&Gs("span",{"aria-owns":o.id,style:fO}),o&&le(e,o),m&&o&&Gs(mO,{"data-type":"outside",ref:c,onFocus:t=>{if(oO(t,o)){var e;null==(e=h.current)||e.focus()}else{const e=function(t){return iO(eO(t).body,1)||t}(s?s.domReference:null);null==e||e.focus(),null!=s&&s.closeOnFocusOut&&(null==s||s.onOpenChange(!1,t.nativeEvent,"focus-out"))}}})]})}const gO=()=>At(EO);var SO=c({createFocusTrap:()=>HO});function vO(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function OO(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=IO(t))||e){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}function DO(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function TO(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function RO(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?TO(Object(n),!0).forEach(function(e){DO(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):TO(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function yO(t){return function(t){if(Array.isArray(t))return vO(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||IO(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function IO(t,e){if(t){if("string"==typeof t)return vO(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?vO(t,e):void 0}}var CO,NO,bO,wO,kO,LO,MO,PO,xO,FO,HO,UO=a(()=>{tO(),CO={getActiveTrap:function(t){return(null==t?void 0:t.length)>0?t[t.length-1]:null},activateTrap:function(t,e){e!==CO.getActiveTrap(t)&&CO.pauseTrap(t);var n=t.indexOf(e);-1===n||t.splice(n,1),t.push(e)},deactivateTrap:function(t,e){var n=t.indexOf(e);-1!==n&&t.splice(n,1),CO.unpauseTrap(t)},pauseTrap:function(t){var e=CO.getActiveTrap(t);null==e||e._setPausedState(!0)},unpauseTrap:function(t){var e=CO.getActiveTrap(t);e&&!e._isManuallyPaused()&&e._setPausedState(!1)}},NO=function(t){return t.tagName&&"input"===t.tagName.toLowerCase()&&"function"==typeof t.select},bO=function(t){return"Escape"===(null==t?void 0:t.key)||"Esc"===(null==t?void 0:t.key)||27===(null==t?void 0:t.keyCode)},wO=function(t){return"Tab"===(null==t?void 0:t.key)||9===(null==t?void 0:t.keyCode)},kO=function(t){return wO(t)&&!t.shiftKey},LO=function(t){return wO(t)&&t.shiftKey},MO=function(t){return setTimeout(t,0)},PO=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return"function"==typeof t?t.apply(void 0,n):t},xO=function(t){return t.target.shadowRoot&&"function"==typeof t.composedPath?t.composedPath()[0]:t.target},FO=[],HO=function(t,e){var n,r=(null==e?void 0:e.document)||document,i=(null==e?void 0:e.trapStack)||FO,o=RO({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isolateSubtrees:!1,isKeyForward:kO,isKeyBackward:LO},e),s={containers:[],containerGroups:[],tabbableGroups:[],adjacentElements:new Set,alreadyInert:new Set,nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,manuallyPaused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},a=function(t,e,n){return t&&void 0!==t[e]?t[e]:o[n||e]},l=function(t,e){var n="function"==typeof(null==e?void 0:e.composedPath)?e.composedPath():void 0;return s.containerGroups.findIndex(function(e){var r=e.container,i=e.tabbableNodes;return r.contains(t)||(null==n?void 0:n.includes(r))||i.find(function(e){return e===t})})},c=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.hasFallback,i=void 0!==n&&n,s=e.params,a=void 0===s?[]:s,l=o[t];if("function"==typeof l&&(l=l.apply(void 0,yO(a))),!0===l&&(l=void 0),!l){if(void 0===l||!1===l)return l;throw new Error("`".concat(t,"` was specified but was not a node, or did not return a node"))}var c=l;if("string"==typeof l){try{c=r.querySelector(l)}catch(e){throw new Error("`".concat(t,'` appears to be an invalid selector; error="').concat(e.message,'"'))}if(!c&&!i)throw new Error("`".concat(t,"` as selector refers to no known node"))}return c},d=function(){var t=c("initialFocus",{hasFallback:!0});if(!1===t)return!1;if(void 0===t||t&&!Zv(t,o.tabbableOptions))if(l(r.activeElement)>=0)t=r.activeElement;else{var e=s.tabbableGroups[0];t=e&&e.firstTabbableNode||c("fallbackFocus")}else null===t&&(t=c("fallbackFocus"));if(!t)throw new Error("Your focus-trap needs to have at least one focusable element");return t},h=function(){if(s.containerGroups=s.containers.map(function(t){var e=Xv(t,o.tabbableOptions),n=Kv(t,o.tabbableOptions),r=e.length>0?e[0]:void 0,i=e.length>0?e[e.length-1]:void 0,s=n.find(function(t){return qv(t)}),a=n.slice().reverse().find(function(t){return qv(t)});return{container:t,tabbableNodes:e,focusableNodes:n,posTabIndexesFound:!!e.find(function(t){return bv(t)>0}),firstTabbableNode:r,lastTabbableNode:i,firstDomTabbableNode:s,lastDomTabbableNode:a,nextTabbableNode:function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=e.indexOf(t);return i<0?r?n.slice(n.indexOf(t)+1).find(function(t){return qv(t)}):n.slice(0,n.indexOf(t)).reverse().find(function(t){return qv(t)}):e[i+(r?1:-1)]}}}),s.tabbableGroups=s.containerGroups.filter(function(t){return t.tabbableNodes.length>0}),s.tabbableGroups.length<=0&&!c("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(s.containerGroups.find(function(t){return t.posTabIndexesFound})&&s.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},p=function(t){var e=t.activeElement;if(e)return e.shadowRoot&&null!==e.shadowRoot.activeElement?p(e.shadowRoot):e},f=function(t){if(!1!==t&&t!==p(document)){if(!t||!t.focus)return void f(d());t.focus({preventScroll:!!o.preventScroll}),s.mostRecentlyFocusedNode=t,NO(t)&&t.select()}},m=function(t){var e=c("setReturnFocus",{params:[t]});return e||!1!==e&&t},E=function(t){var e=t.target,n=t.event,r=t.isBackward,i=void 0!==r&&r;e=e||xO(n),h();var a=null;if(s.tabbableGroups.length>0){var d=l(e,n),p=d>=0?s.containerGroups[d]:void 0;if(d<0)a=i?s.tabbableGroups[s.tabbableGroups.length-1].lastTabbableNode:s.tabbableGroups[0].firstTabbableNode;else if(i){var f=s.tabbableGroups.findIndex(function(t){var n=t.firstTabbableNode;return e===n});if(f<0&&(p.container===e||Zv(e,o.tabbableOptions)&&!qv(e,o.tabbableOptions)&&!p.nextTabbableNode(e,!1))&&(f=d),f>=0){var m=0===f?s.tabbableGroups.length-1:f-1,E=s.tabbableGroups[m];a=bv(e)>=0?E.lastTabbableNode:E.lastDomTabbableNode}else wO(n)||(a=p.nextTabbableNode(e,!1))}else{var _=s.tabbableGroups.findIndex(function(t){var n=t.lastTabbableNode;return e===n});if(_<0&&(p.container===e||Zv(e,o.tabbableOptions)&&!qv(e,o.tabbableOptions)&&!p.nextTabbableNode(e))&&(_=d),_>=0){var A=_===s.tabbableGroups.length-1?0:_+1,g=s.tabbableGroups[A];a=bv(e)>=0?g.firstTabbableNode:g.firstDomTabbableNode}else wO(n)||(a=p.nextTabbableNode(e))}}else a=c("fallbackFocus");return a},_=function(t){if(!(l(xO(t),t)>=0)){if(PO(o.clickOutsideDeactivates,t))return void n.deactivate({returnFocus:o.returnFocusOnDeactivate});PO(o.allowOutsideClick,t)||t.preventDefault()}},A=function(t){var e=xO(t),n=l(e,t)>=0;if(n||e instanceof Document)n&&(s.mostRecentlyFocusedNode=e);else{t.stopImmediatePropagation();var r,i=!0;if(s.mostRecentlyFocusedNode)if(bv(s.mostRecentlyFocusedNode)>0){var a=l(s.mostRecentlyFocusedNode),c=s.containerGroups[a].tabbableNodes;if(c.length>0){var h=c.findIndex(function(t){return t===s.mostRecentlyFocusedNode});h>=0&&(o.isKeyForward(s.recentNavEvent)?h+1<c.length&&(r=c[h+1],i=!1):h-1>=0&&(r=c[h-1],i=!1))}}else s.containerGroups.some(function(t){return t.tabbableNodes.some(function(t){return bv(t)>0})})||(i=!1);else i=!1;i&&(r=E({target:s.mostRecentlyFocusedNode,isBackward:o.isKeyBackward(s.recentNavEvent)})),f(r||s.mostRecentlyFocusedNode||d())}s.recentNavEvent=void 0},g=function(t){(o.isKeyForward(t)||o.isKeyBackward(t))&&function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];s.recentNavEvent=t;var n=E({event:t,isBackward:e});n&&(wO(t)&&t.preventDefault(),f(n))}(t,o.isKeyBackward(t))},S=function(t){bO(t)&&!1!==PO(o.escapeDeactivates,t)&&(t.preventDefault(),n.deactivate())},v=function(t){l(xO(t),t)>=0||PO(o.clickOutsideDeactivates,t)||PO(o.allowOutsideClick,t)||(t.preventDefault(),t.stopImmediatePropagation())},O=function(){if(s.active)return CO.activateTrap(i,n),s.delayInitialFocusTimer=o.delayInitialFocus?MO(function(){f(d())}):f(d()),r.addEventListener("focusin",A,!0),r.addEventListener("mousedown",_,{capture:!0,passive:!1}),r.addEventListener("touchstart",_,{capture:!0,passive:!1}),r.addEventListener("click",v,{capture:!0,passive:!1}),r.addEventListener("keydown",g,{capture:!0,passive:!1}),r.addEventListener("keydown",S),n},D=function(){if(s.active)return r.removeEventListener("focusin",A,!0),r.removeEventListener("mousedown",_,!0),r.removeEventListener("touchstart",_,!0),r.removeEventListener("click",v,!0),r.removeEventListener("keydown",g,!0),r.removeEventListener("keydown",S),n},T="undefined"!=typeof window&&"MutationObserver"in window?new MutationObserver(function(t){t.some(function(t){return Array.from(t.removedNodes).some(function(t){return t===s.mostRecentlyFocusedNode})})&&f(d())}):void 0,R=function(){T&&(T.disconnect(),s.active&&!s.paused&&s.containers.map(function(t){T.observe(t,{subtree:!0,childList:!0})}))};return n={get active(){return s.active},get paused(){return s.paused},activate:function(t){if(s.active)return this;var e=a(t,"onActivate"),l=a(t,"onPostActivate"),c=a(t,"checkCanFocusTrap"),d=CO.getActiveTrap(i),f=!1;d&&!d.paused&&(d._setSubtreeIsolation(!1),f=!0);try{c||h(),s.active=!0,s.paused=!1,s.nodeFocusedBeforeActivation=p(r),null==e||e();var m=function(){c&&h(),O(),R(),o.isolateSubtrees&&n._setSubtreeIsolation(!0),null==l||l()};if(c)return c(s.containers.concat()).then(m,m),this;m()}catch(t){throw d===CO.getActiveTrap(i)&&f&&d._setSubtreeIsolation(!0),t}return this},deactivate:function(t){if(!s.active)return this;var e=RO({onDeactivate:o.onDeactivate,onPostDeactivate:o.onPostDeactivate,checkCanReturnFocus:o.checkCanReturnFocus},t);clearTimeout(s.delayInitialFocusTimer),s.delayInitialFocusTimer=void 0,s.paused||n._setSubtreeIsolation(!1),s.alreadyInert.clear(),D(),s.active=!1,s.paused=!1,R(),CO.deactivateTrap(i,n);var r=a(e,"onDeactivate"),l=a(e,"onPostDeactivate"),c=a(e,"checkCanReturnFocus"),d=a(e,"returnFocus","returnFocusOnDeactivate");null==r||r();var h=function(){MO(function(){d&&f(m(s.nodeFocusedBeforeActivation)),null==l||l()})};return d&&c?(c(m(s.nodeFocusedBeforeActivation)).then(h,h),this):(h(),this)},pause:function(t){return s.active?(s.manuallyPaused=!0,this._setPausedState(!0,t)):this},unpause:function(t){return s.active?(s.manuallyPaused=!1,i[i.length-1]!==this?this:this._setPausedState(!1,t)):this},updateContainerElements:function(t){return s.containers=[].concat(t).filter(Boolean).map(function(t){return"string"==typeof t?r.querySelector(t):t}),o.isolateSubtrees&&function(t){s.active&&!s.paused&&n._setSubtreeIsolation(!1),s.adjacentElements.clear(),s.alreadyInert.clear();var e,r=new Set,i=new Set,o=OO(t);try{for(o.s();!(e=o.n()).done;){var a=e.value;r.add(a);for(var l="undefined"!=typeof ShadowRoot&&a.getRootNode()instanceof ShadowRoot,c=a;c;){r.add(c);var d=c.parentElement,h=[];d?h=d.children:!d&&l&&(h=c.getRootNode().children,d=c.getRootNode().host,l="undefined"!=typeof ShadowRoot&&d.getRootNode()instanceof ShadowRoot);var p,f=OO(h);try{for(f.s();!(p=f.n()).done;){var m=p.value;i.add(m)}}catch(t){f.e(t)}finally{f.f()}c=d}}}catch(t){o.e(t)}finally{o.f()}r.forEach(function(t){i.delete(t)}),s.adjacentElements=i}(s.containers),s.active&&(h(),o.isolateSubtrees&&!s.paused&&n._setSubtreeIsolation(!0)),R(),this}},Object.defineProperties(n,{_isManuallyPaused:{value:function(){return s.manuallyPaused}},_setPausedState:{value:function(t,e){if(s.paused===t)return this;if(s.paused=t,t){var r=a(e,"onPause"),i=a(e,"onPostPause");null==r||r(),D(),R(),n._setSubtreeIsolation(!1),null==i||i()}else{var o=a(e,"onUnpause"),l=a(e,"onPostUnpause");null==o||o(),n._setSubtreeIsolation(!0),h(),O(),R(),null==l||l()}return this}},_setSubtreeIsolation:{value:function(t){o.isolateSubtrees&&s.adjacentElements.forEach(function(e){t?((e.inert||e.hasAttribute("inert"))&&s.alreadyInert.add(e),e.inert=!0):s.alreadyInert.has(e)||(e.inert=!1)})}}}),n.updateContainerElements(t),n}}),BO=l((t,e)=>{function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var r,i;function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,d(r.key),r)}}function s(t,e,r){return e=l(e),function(t,e){if(e&&("object"==n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,a()?Reflect.construct(e,r||[],l(t).constructor):e.apply(t,r))}function a(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(a=function(){return!!t})()}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function c(t,e){return(c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function d(t){var e=function(t,e){if("object"!=n(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==n(e)?e:e+""}var h=(Xe(),p(zt)),f=(UO(),p(SO)).createFocusTrap,m=(tO(),p(Qv)).isFocusable,E=parseInt(null!==(r=null===(i=/^(\d+)\./.exec(h.version))||void 0===i?void 0:i[1])&&void 0!==r?r:0,10),_=function(t){function e(t){var n;(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,e),function(t,e,n){(e=d(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}(n=s(this,e,[t]),"getNodeForOption",function(t){var e,n=null!==(e=this.internalOptions[t])&&void 0!==e?e:this.originalOptions[t];if("function"==typeof n){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];n=n.apply(void 0,i)}if(!0===n&&(n=void 0),!n){if(void 0===n||!1===n)return n;throw new Error("`".concat(t,"` was specified but was not a node, or did not return a node"))}var s,a=n;if("string"==typeof n&&!(a=null===(s=this.getDocument())||void 0===s?void 0:s.querySelector(n)))throw new Error("`".concat(t,"` as selector refers to no known node"));return a}),n.handleDeactivate=n.handleDeactivate.bind(n),n.handlePostDeactivate=n.handlePostDeactivate.bind(n),n.handleClickOutsideDeactivates=n.handleClickOutsideDeactivates.bind(n),n.internalOptions={returnFocusOnDeactivate:!1,checkCanReturnFocus:null,onDeactivate:n.handleDeactivate,onPostDeactivate:n.handlePostDeactivate,clickOutsideDeactivates:n.handleClickOutsideDeactivates},n.originalOptions={returnFocusOnDeactivate:!0,onDeactivate:null,onPostDeactivate:null,checkCanReturnFocus:null,clickOutsideDeactivates:!1};var r=t.focusTrapOptions;for(var i in r)if(Object.prototype.hasOwnProperty.call(r,i)){if("returnFocusOnDeactivate"===i||"onDeactivate"===i||"onPostDeactivate"===i||"checkCanReturnFocus"===i||"clickOutsideDeactivates"===i){n.originalOptions[i]=r[i];continue}n.internalOptions[i]=r[i]}return n.outsideClick=null,n.focusTrapElements=t.containerElements||[],n.updatePreviousElement(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&c(t,e)}(e,t),function(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}(e,[{key:"getDocument",value:function(){return this.props.focusTrapOptions.document||("undefined"!=typeof document?document:void 0)}},{key:"getReturnFocusNode",value:function(){var t=this.getNodeForOption("setReturnFocus",this.previouslyFocusedElement);return t||!1!==t&&this.previouslyFocusedElement}},{key:"updatePreviousElement",value:function(){var t=this.getDocument();t&&(this.previouslyFocusedElement=t.activeElement)}},{key:"deactivateTrap",value:function(){!this.focusTrap||!this.focusTrap.active||this.focusTrap.deactivate({returnFocus:!1,checkCanReturnFocus:null,onDeactivate:this.originalOptions.onDeactivate})}},{key:"handleClickOutsideDeactivates",value:function(t){var e="function"==typeof this.originalOptions.clickOutsideDeactivates?this.originalOptions.clickOutsideDeactivates.call(null,t):this.originalOptions.clickOutsideDeactivates;return e&&(this.outsideClick={target:t.target,allowDeactivation:e}),e}},{key:"handleDeactivate",value:function(){this.originalOptions.onDeactivate&&this.originalOptions.onDeactivate.call(null),this.deactivateTrap()}},{key:"handlePostDeactivate",value:function(){var t=this,e=function(){var e=t.getReturnFocusNode(),n=!(!t.originalOptions.returnFocusOnDeactivate||null==e||!e.focus||t.outsideClick&&(!t.outsideClick.allowDeactivation||m(t.outsideClick.target,t.internalOptions.tabbableOptions))),r=t.internalOptions.preventScroll,i=void 0!==r&&r;n&&e.focus({preventScroll:i}),t.originalOptions.onPostDeactivate&&t.originalOptions.onPostDeactivate.call(null),t.outsideClick=null};this.originalOptions.checkCanReturnFocus?this.originalOptions.checkCanReturnFocus.call(null,this.getReturnFocusNode()).then(e,e):e()}},{key:"setupFocusTrap",value:function(){this.focusTrap?this.props.active&&!this.focusTrap.active&&(this.focusTrap.activate(),this.props.paused&&this.focusTrap.pause()):this.focusTrapElements.some(Boolean)&&(this.focusTrap=this.props._createFocusTrap(this.focusTrapElements,this.internalOptions),this.props.active&&this.focusTrap.activate(),this.props.paused&&this.focusTrap.pause())}},{key:"componentDidMount",value:function(){this.props.active&&this.setupFocusTrap()}},{key:"componentDidUpdate",value:function(t){if(this.focusTrap){t.containerElements!==this.props.containerElements&&this.focusTrap.updateContainerElements(this.props.containerElements);var e=!t.active&&this.props.active,n=t.active&&!this.props.active,r=!t.paused&&this.props.paused,i=t.paused&&!this.props.paused;if(e&&(this.updatePreviousElement(),this.focusTrap.activate()),n)return void this.deactivateTrap();r&&this.focusTrap.pause(),i&&this.focusTrap.unpause()}else t.containerElements!==this.props.containerElements&&(this.focusTrapElements=this.props.containerElements),this.props.active&&(this.updatePreviousElement(),this.setupFocusTrap())}},{key:"componentWillUnmount",value:function(){this.deactivateTrap()}},{key:"render",value:function(){var t=this,e=this.props.children?h.Children.only(this.props.children):void 0;if(e){if(e.type&&e.type===h.Fragment)throw new Error("A focus-trap cannot use a Fragment as its child container. Try replacing it with a <div> element.");return h.cloneElement(e,{ref:function(n){var r=t.props.containerElements;e&&(E>=19?"function"==typeof e.props.ref?e.props.ref(n):e.props.ref&&(e.props.ref.current=n):"function"==typeof e.ref?e.ref(n):e.ref&&(e.ref.current=n)),t.focusTrapElements=r||[n]}})}return null}}])}(h.Component);_.defaultProps={active:!0,paused:!1,focusTrapOptions:{},_createFocusTrap:f},e.exports=_,e.exports.FocusTrap=_});Xe();var jO=BO();function VO(t){var e;const{children:n,preferredPlacement:r="top-start",anchorElement:i,boundaryElement:o,trapFocus:s=!1,initialFocus:a,portal:l,...c}=t,{anchor:d,boundary:h}=Et(()=>({anchor:zO(i),boundary:o?zO(o):void 0}),[i,o]);let p=[];h&&(p=[Av({boundary:h,fallbackPlacements:["top-start","top-end","bottom-start","bottom-end","top","bottom"]}),_v({boundary:h,padding:8}),gv({boundary:h})]);const{refs:f,floatingStyles:m,middlewareData:E}=mv({placement:r,middleware:p,whileElementsMounted:iv});pt(()=>{d&&f.setReference(d)},[f,d]);const _=s?Gs(jO.FocusTrap,{focusTrapOptions:{initialFocus:a,fallbackFocus:".t-fallback-focus",allowOutsideClick:!0,tabbableOptions:{getShadowRoot:!0}},children:Gs("div",{children:[n,Gs("span",{className:"t-fallback-focus",tabIndex:-1})]})}):n,A=Gs("div",{ref:f.setFloating,style:{...m,zIndex:1e3,visibility:null!==(e=E.hide)&&void 0!==e&&e.referenceHidden?"hidden":"visible"},...c,children:_});var g;return l?Gs(AO,{root:null===(g=h||d)||void 0===g?void 0:g.closest("[t-menu-boundary='root']"),children:A}):A}function zO(t){return"string"==typeof t?document.querySelector(t):t}function $O(t){const e=Cn(),n=Sn(),r=yo(n.state$.suggestMentionQuery),i=yo(e.state$.currentConversationId),{transformMentions:o}=yn(),s=jn(i,r?1e3:0),a=Et(()=>{const t=s.map(t=>({id:t.user.id,name:t.user.name}));if(!o)return t;try{return o(t)}catch(e){return WA.error("Exception in transformMentions, using default mention suggestions",e),t}},[s,o]),[l,c]=ut(0),d=Et(()=>Object.fromEntries(a.map(t=>[t.id,dn(t.name)])),[a]),h=Et(()=>{if(!r)return[];const t=GO(r);return""===t?a:a.filter(e=>d[e.id].some(e=>function(t,e){return un(t.substring(0,e.length),e)}(e,t)))},[r,a,d]),p=ft(void 0);ht(()=>{if(p.current){const t=h.findIndex(t=>t.id===p.current);c(-1===t?0:t)}},[h]),ht(()=>{var t;p.current=null===(t=h[l])||void 0===t?void 0:t.id},[l,h]);const{containerProps:f,itemProps:m}=Ig({focused:l,setFocused:c,buttonId:_t(t=>{var e;const n=null===(e=h[t])||void 0===e?void 0:e.id;return n&&"mention-button-"+n},[h])});if(ht(()=>{if(0!==h.length)return n.listenKeydown("mention",t=>yg(t,{dir:"ttb",focused:l,setFocused:c,itemCount:h.length,onSpace(){if(r){const t=h[l];if(un(t.name,GO(r)))return n.selectMention(t),!0}return!1},onConfirm(){const t=h[l];n.selectMention(t)}})),()=>{n.listenKeydown("mention",void 0)}},[n,l,h,r]),zA(()=>n.closeSuggester(),".t-mention-suggest-list",h.length>0),0===h.length)return null;const E=document.querySelector(".ProseMirror-suggestion");let _;if(E){let t=E.getBoundingClientRect();_={getBoundingClientRect(){const e=E.getBoundingClientRect();return e.width>0&&(t=e),t}}}return Gs(VO,{className:"t-mention-suggest-list",...f,anchorElement:_,children:h.map((t,e)=>Gs(YO,{user:t,isFocused:e===l,onSelect:()=>n.selectMention(t),...m(e)},t.id))})}Xe();const YO=Zt(function(t){const{user:e,isFocused:n,onSelect:r,...i}=t;return Gs("button",{className:n?"focused":"",onClick:()=>r(e.id),...i,children:e.name})});function GO(t){return En("@"===t[0]),t.substring(1)}function WO(t,e,n){const r=Kv(t),i=r.indexOf(e);return-1===i?null:r[i+n]||null}tO(),Xe();const XO=Qt(function(t,e){const{children:n,triggerElement:r}=t,{closePopover:i}=Un(),o=ft(null);return mt(e,()=>o.current),ht(()=>{var t;null===(t=o.current)||void 0===t||t.focus()},[]),Gs("div",{"t-menu":"",role:"menu",tabIndex:-1,ref:o,onKeyDown:_t(t=>{!function(t,e,n,r){var i;const o=e.querySelectorAll("[t-menu-item]"),s=document.activeElement;if(!s||!s.hasAttribute("t-menu-item")&&!s.hasAttribute("t-menu"))return;const a=Array.from(o).indexOf(s);let l;switch(t.key){case"ArrowDown":l=Math.min(a+1,o.length-1);break;case"ArrowUp":l=Math.max(a-1,0),-1===a&&(l=o.length-1);break;case"Home":l=0;break;case"End":l=o.length-1;break;case"Tab":{const e=n.closest("t-chatbox,t-conversation-list,.t-chatbox,.t-conversation-list"),i=t.shiftKey?function(t,e){return WO(t,e,-1)}(e,n):function(t,e){return WO(t,e,1)}(e,n);return null==i||i.focus(),void r()}default:return}null===(i=o[l])||void 0===i||i.focus()}(t,o.current,r,i)},[i,r]),children:n})});function KO(t){const{popoverComponent:e,popoverProps:n,children:r,type:i="popover",initialFocus:o,portal:s,...a}=t,[l,c]=ut(void 0),d=ft(null),[h,p]=ut(!1);zA(_t(t=>{var e,n;t&&null!==(e=d.current)&&void 0!==e&&e.contains(t.target)||(p(!1),null===(n=d.current)||void 0===n||n.focus())},[]),"[t-popover-content]",h);const f="menu"===i?Gs(XO,{triggerElement:d.current,children:Gs(e,{...n})}):Gs(e,{...n});return Gs(Hn.Provider,{value:{closePopover:()=>p(!1)},children:[Gs(qO,{...a,"aria-haspopup":"menu"===i?"menu":"true","aria-expanded":h,onTrigger:()=>p(t=>!t),ref:t=>(t=>{var e;const n=null!==(e=null==t?void 0:t.closest("[t-menu-boundary]"))&&void 0!==e?e:void 0;d.current=t,c(n)})(t),children:r}),h&&Gs(VO,{portal:s,"t-popover-content":"",anchorElement:d.current,boundaryElement:l,preferredPlacement:"bottom-start",trapFocus:"popover"===i,initialFocus:"menu"===i?"t-menu":o,role:"menu"===i?void 0:"dialog",children:f})]})}Xe();const qO=Qt(function(t,e){const{onTrigger:n,...r}=t,i=_t(t=>{("Enter"===t.key||" "===t.key)&&n()},[n]);return Gs("button",{...r,ref:e,onClick:n,onKeyDown:i})});function JO(t){const{onSelect:e,...n}=t,{closePopover:r}=Un(),i=_t(t=>{("Enter"===t.key||" "===t.key)&&(r(),null==e||e())},[e,r]);return Gs("div",{tabIndex:-1,role:"menuitem",onClick:_t(()=>{r(),null==e||e()},[r,e]),onKeyDown:i,"t-menu-item":"",...n})}function ZO(t){const{as:e="div",children:n,...r}=t;return g(e,{...r,"t-keyboard-nav-list-item":""},n)}function QO(t){const e=ft(t);return pt(()=>{e.current=t},[t]),e}function tD(t){const e=Cn(),n=bn(),r=ft(null),{value:i,onChange:o,onKeyDown:s,onKeyUp:a,...l}=t,c=QO(o),d=QO(s),h=QO(a);ht(()=>()=>{si(()=>{"ChatboxStore"===e.type&&(e.searchQuery$.set(""),e.highlightedStrings$.set([]),e.focusedMessage$.set(null))})},[e]);const p=_t(()=>{r.current.blur(),n.jumpToHighlight("up")},[n]),f=_t(t=>{var n;null===(n=d.current)||void 0===n||n.call(d,t),!t.defaultPrevented&&"ChatboxStore"===e.type&&e.state$.enterSendsMessage.peek()&&ln(t)&&t.preventDefault()},[d,e]),m=_t(t=>{var n;null===(n=h.current)||void 0===n||n.call(h,t),!t.defaultPrevented&&"ChatboxStore"===e.type&&e.state$.enterSendsMessage.peek()&&ln(t)&&(t.preventDefault(),p())},[h,e,p]),E=_t(t=>{var n;const r=t.target.value;"ChatboxStore"===e.type?e.setSearchQuery(r):e.setGlobalSearchQuery(r),null===(n=c.current)||void 0===n||n.call(c,t)},[e,c]),_=yo(()=>"ChatboxStore"===e.type?e.searchQuery$.get():e.globalSearchState$.query.get());return Gs("input",{type:"search",enterKeyHint:"search",autoComplete:"off",value:null!=i?i:_,onChange:E,onKeyUp:m,onKeyDown:f,...l,ref:r})}Xe(),Xe(),Xe(),Xe(),Xe();const eD={barHeight:4,barRadius:2,barGap:2,barWidth:2,height:24},nD={state:null,duration:0,recordingUrl:void 0,uploadState:"done",fileToken:void 0},rD=new WeakMap;function iD({className:t,voiceRecorder:e}){const n=rD.get(e);return n?Gs("div",{className:t,style:{shapeRendering:"crispEdges"},ref:n}):(WA.warn("Can only use Waveform component if a voice recorder is active"),null)}Xe();const oD=Symbol("no_render");function sD(t){const e=Vo(!1),n=ft({_value:"function"==typeof t?t():t.peek(),get value(){return setTimeout(()=>{e.set(!0)}),n.current._value},set value(t){n.current._value=t}});return yo(()=>{if(!e.get())return oD;const r="function"==typeof t?t():t.get();return n.current.value=r,r}),n.current}function aD(){const t=Tn(),e=Cn(),n=Pn(),r=An(),i=sD(e.app$.appMetadata),o=sD(e.currentUser$),s=sD(e.state$.currentConversation),a=sD(e.state$.currentConversationId),l=sD(e.t$),c=sD(e.device$),d=sD(e.themeCustom$),h=sD(e.chatSearchState$),p=sD(e.focusedMessage$),f=sD(()=>{const t=e.state$.currentConversationId.get(),n=t&&e.state$.typing.child(t).get();return null!=n?n:{many:!1,users:[]}}),m=sD(()=>{const t=e.state$.currentConversationId.get();return t&&e.state$.participants.child(t).get()});return Et(()=>({session:t,store:e,chatbox:n,theme:r,get app(){return i.value},get currentUser(){return o.value},get conversation(){return s.value},get conversationId(){return a.value},get t(){return l.value},get device(){return c.value},get themeCustom(){return d.value.value},get typing(){return f.value},get participants(){return m.value},get focusedMessage(){return p.value},get chatSearchState(){return h.value}}),[i,n,s,a,o,c,e,l,r,d,f,m,t,h,p])}function lD(){const t=Tn(),e=Cn(),n=An(),r=Pn(),i=sD(e.app$.appMetadata),o=sD(e.currentUser$),s=sD(e.t$),a=sD(e.device$),l=sD(e.themeCustom$);return Et(()=>({session:t,store:e,theme:n,conversationList:r,get app(){return i.value},get currentUser(){return o.value},get t(){return s.value},get device(){return a.value},get themeCustom(){return l.value.value}}),[i,r,o,a,t,e,s,n,l])}function cD(t){return t.map(t=>function(t){if("text"===t.type)return function(t,e){return uD(t,SA(e))}(t.children,{});if("file"===t.type&&"video"===t.subtype)return`🎥 ${t.filename}`;if("file"===t.type&&"image"===t.subtype)return`📷 ${t.filename}`;if("file"===t.type&&"audio"===t.subtype)return`🎧 ${t.filename}`;if("file"===t.type&&"voice"===t.subtype){const e=t.duration;return void 0===e?"🎙️":`🎙️ (${Math.floor(e/60)}:${Math.floor(e%60).toString().padStart(2,"0")})`}return"file"===t.type?(t.subtype,`📎 ${t.filename}`):"location"===t.type?"📍":""}(t)).join("\n\n")}function uD(t,e){return t.flatMap(t=>{if("string"==typeof t)return t;switch(t.type){case"blockquote":case"bold":case"italic":case"strikethrough":case"link":case"actionlink":case"actionLink":case"actionbutton":case"actionButton":return uD(t.children,e);case"bulletlist":case"bulletList":return"\n"+uD(t.children,e);case"bulletpoint":case"bulletPoint":return"- "+uD(t.children,e)+"\n";case"autolink":case"autoLink":case"codeblock":case"codeBlock":case"codespan":case"codeSpan":case"emoji":case"customemoji":case"customEmoji":return t.text;case"suppressed":return e.contactInfoHiddenText;case"mention":return`@${t.text}`}}).join("")}function dD(t){var e,n,r;const{sender:i}=t,o=Tn(),s=aD(),a=An(),[l,c]=ut(i&&"object"==typeof i?i:null);ht(()=>{"string"==typeof i&&o.user(i).get().then(c)},[o,i]);const d="virtual-message-"+vt(),[h,p]=Et(()=>{var e;const n=null!==(e=t.content)&&void 0!==e?e:function(t){return[{type:"text",children:F_(null!=t?t:"")}]}(t.text);return[n,cD(n)]},[t.content,t.text]);if(i&&!l)return null;const f={id:d,type:l?"UserMessage":"SystemMessage",sender:l,custom:null!==(e=t.custom)&&void 0!==e?e:{},createdAt:null!==(n=t.createdAt)&&void 0!==n?n:-1,editedAt:null,referencedMessage:null,origin:"web",plaintext:p,content:h,reactions:[]};return Gs(a.Message,{common:s,message:f,messageStatus:null!==(r=t.status)&&void 0!==r?r:"virtual",permissions:{showTypingIndicator:!1,canShareFile:!1,canShareLocation:!1,canMention:!1,showOnlineStatus:!1,canSendVoiceMessage:!1,canLeaveConversation:!1,canMarkConversationAsUnread:!1,canDeleteMessage:!1,canReplyToMessage:!1,canAddReaction:!1,canEditMessage:!1,canSearch:!1}})}function hD(t){return nn(t)}function pD(t){var e;return null!==(e=t.photoUrl)&&void 0!==e?e:en(t.id,tn(t.name))}function fD(t,e){return en(t,e)}function mD(t){return t<1024?t+" B":t<1048576?Math.floor(t/1024)+" KB":t<1073741824?Math.floor(t/1048576)+" MB":t<1099511627776?Math.floor(t/1073741824)+" GB":Math.floor(t/1099511627776)+" TB"}function ED({latitude:t,longitude:e}){const n=t+","+e;return{imageUrl:`https://maps.googleapis.com/maps/api/staticmap?center=${n}&zoom=15&size=300x200&scale=2&maptype=roadmap&markers=${n}&key=${Ke}`,linkUrl:`https://maps.google.com/maps?q=${n}&z=15`}}function _D(t,e){const[n,r]=ut({long:"",short:""});return pt(()=>{let n,i=!0;const o=()=>{const n=Date.now(),i=function(t,e,n){const r=t-e;let i,o,s;const a=new Date(e),l={month:"short",day:"numeric"};if(r<vD)return{changeTimeout:5e3,short:n.JUST_NOW,long:n.JUST_NOW};if(r<OD)i=vD,o="MINUTES",s=n.MINUTES;else if(r<DD)i=OD,o="HOURS",s=n.HOURS;else{if(!(r<TD)){if(a.getFullYear()===new Date(t).getFullYear()){const t=a.toLocaleDateString(n.locale,l);return{changeTimeout:void 0,short:t,long:t}}{const t=a.toLocaleDateString(n.locale,{...l,year:"numeric"});return{changeTimeout:void 0,short:t,long:t}}}i=DD,o="DAYS",s=n.DAYS}const c=Math.floor(r/i);return{changeTimeout:i,short:c+s,long:RD(c,o.toLowerCase(),n.locale)}}(n,t>n?n-2e3:t,e);return r(i),i},s=()=>{const t=o();i&&t.changeTimeout&&(n=window.setTimeout(s,t.changeTimeout))};return o(),n=window.setTimeout(s,100),()=>{i=!1,clearTimeout(n)}},[e,t]),n}function AD(t){t=Math.floor(t);const e=Math.floor(t/3600);t%=3600;const n=Math.floor(t/60);t%=60;const r=t=>t.toString().padStart(2,"0");let i=`${r(n)}:${r(t)}`;return e>0&&(i=`${r(e)}:${i}`),i}Xe(),Xe();const gD=864e5;function SD(t,e){const n=Date.now(),r=function(t,e){return Math.floor((e-t)/gD)}(t,n);if(r<0)return e.TODAY;if(0===r)return e.TODAY;if(1===r)return e.YESTERDAY;const i={weekday:"long"},o=new Date(t);if(r<7)return o.toLocaleDateString(e.locale,i);const s=new Date(n);return 0===function(t,e){return Math.floor((e-t)/(365*gD))}(s.setFullYear(s.getFullYear()-1),t)?o.toLocaleDateString(e.locale,{...i,month:"long",day:"numeric"}):o.toLocaleDateString(e.locale,{...i,year:"numeric",month:"long",day:"numeric"})}const vD=6e4,OD=36e5,DD=864e5,TD=6048e5;function RD(t,e,n){return new Intl.RelativeTimeFormat(n).format(-t,e)}function yD(t,...e){const n=E.bind(g)(t,...e);return Array.isArray(n)?g(O,{},...n):n}function ID(t,e=10){return jn(t,Math.min(e,100))}function CD(t,e,n){const r=Tn(),i=Vo([]),o=Vo(!1);zo(s=>{if(o.get()){const o=r.conversation(t).message(e).reactions(n).subscribe(t=>{var e;null!==(e=t)&&void 0!==e||(t=[]),t=t.slice(0,10),i.set(t)});s.onCleanup=()=>{o.unsubscribe()}}});const s=_t(()=>o.set(!0),[o]);return[yo(i),s]}function ND(t){const{conversation:e,theme:n,chatbox:r,t:i,chatSearchState:o}=t.common,{ConversationImage:s,ChatSearchBox:a}=n,l=ID(e.id,10);return t.permissions.canSearch&&"hidden"!==o?Gs("div",{className:"t-theme-chat-header",children:Gs(a,{common:t.common,searchQuery:t.searchQuery})}):Gs("div",{className:"t-theme-chat-header",children:Gs("div",{className:"t-inner",children:[Gs("div",{className:"t-content",children:[Gs("button",{className:"t-back-button","aria-label":i.INBOX,title:i.INBOX,onClick:()=>r.clickBackButton(),children:Gs(Na,{type:"chevronLeft",size:20})}),Gs("div",{className:"t-image",children:Gs(s,{conversation:e,participants:l,common:t.common})}),Gs("div",{className:"t-info",children:Gs(bD,{...t})})]}),Gs("div",{className:"t-actions",children:Gs("button",{className:"t-action-button","aria-label":i.ARIA_SEARCH_INSIDE_CONVERSATION,title:i.ARIA_SEARCH_INSIDE_CONVERSATION,onClick:()=>r.toggleSearchBox(),children:Gs(Na,{type:"search",size:20})})})]})})}function bD(t){const{common:e}=t;return e.conversation.subject?Gs(O,{children:[Gs("div",{className:"t-title",children:e.conversation.subject}),Gs("div",{className:"t-subtitle",children:Gs(wD,{...t})})]}):Gs("div",{className:"t-title",children:Gs(wD,{...t})})}function wD({common:t,isUserConnected:e,permissions:n}){const r=ID(t.conversation.id,10),i=r.find(({user:e})=>e.id===t.currentUser.id),o=r.filter(({user:e})=>e.id!==t.currentUser.id),s=o.length>2?r:2===r.length?o:i?[i,...o]:[];return n.showOnlineStatus?Gs("span",{className:"t-participants",children:s.map(({user:n})=>Gs("span",{className:"t-participant",children:[Gs("span",{children:n.name}),n.id===t.currentUser.id&&Gs("span",{className:"t-participant-you",children:" (you)"}),Gs("span",{className:"t-online-indicator","t-status":e[n.id]?"online":"offline"})]},n.id))}):Gs("span",{className:"t-participants",children:s.map(({user:t})=>t.name).join(", ")})}function kD(t){return null}function LD(t){var e,n;const{message:r,messageStatus:i,permissions:o,common:s}=t,{currentUser:a,theme:l,conversation:c,t:d}=s,{Avatar:h,ReferencedMessage:p,MessageActionMenu:f}=l,m=ID(c.id,3).length>=3,E=r.sender,_=(null==E?void 0:E.id)!==a.id&&m,A=r.referencedMessage,g="sending"!==i&&(o.canReplyToMessage||o.canDeleteMessage),S=o.canAddReaction&&"ReadWrite"===c.access;let v;v=E?E.id===a.id?"currentUser":"other":"system";const O=null===(e=s.focusedMessage)||void 0===e?void 0:e.id,D=void 0!==O&&r.id===O;return Gs("div",{className:"t-theme-message","t-sender":v,"t-message-id":r.id,"t-status":i,"t-focused":D?"":void 0,children:[E&&Gs("div",{className:"t-avatar-wrapper",children:Gs(h,{photoUrl:pD(E),common:s})}),E&&_&&Gs("div",{className:"t-message-sender-name",style:{color:hD(E.id)},children:E.name}),Gs("div",{className:"t-message-body",children:["system"===v&&Gs("span",{className:"sys-icon",children:Gs(Na,{type:"info",size:14})}),A&&Gs(p,{referencedMessage:A,common:s}),Gs(BA,{common:s,message:r,messageStatus:i}),(null===(n=r.reactions)||void 0===n?void 0:n.length)>0&&Gs("div",{className:"t-emoji-reactions",children:r.reactions.map(t=>Gs(MD,{summary:t,message:r,common:s,permissions:o},t.emoji))})]}),Gs("div",{className:"t-message-status",children:[Gs(xD,{timestamp:r.createdAt,common:s}),"currentUser"==v&&Gs(PD,{...t})]}),Gs("div",{className:"t-message-buttons",children:[g&&Gs(KO,{type:"menu",popoverComponent:f,popoverProps:{message:r,permissions:o,common:s},className:"t-message-action-menu-button","aria-label":d.ARIA_MORE_ACTIONS,children:Gs(Na,{type:"horizontalDots",className:"t-action-menu-icon",size:20})}),S&&Gs(KO,{className:"t-add-reaction-button",popoverComponent:ig,popoverProps:{messageId:r.id},"aria-label":d.ADD_REACTION,children:Gs(Na,{type:"addEmoji",className:"t-add-reaction-icon",size:20})})]})]})}function MD({summary:t,message:e,common:n,permissions:r}){const{t:i,chatbox:o,conversation:s}=n,{emoji:a,count:l,currentUserReacted:c}=t,[d,h]=CD(s.id,e.id,t.emoji),p=d.map(t=>t.user.name);d.length&&d.length<t.count&&p.push("...");const f=p.join(", ");return Gs("button",{className:"t-reaction-button","t-active":c?"true":void 0,onClick:()=>o.toggleReaction(e.id,a),disabled:!r.canAddReaction,"aria-label":i.ARIA_REACTION_COUNT(l,a),"aria-pressed":c,onMouseOver:h,onTouchStart:h,"t-tooltip-text":f,children:[Gs("span",{className:"t-emoji",children:a}),Gs("span",{className:"t-num-reactions",children:l})]})}function PD({messageStatus:t}){return"sending"===t?Gs("span",{className:"t-status-icon","t-status":"sending",children:Gs(Na,{type:"inProgress",className:"t-message-loading-spinner",size:"20px"})}):"sent"===t?Gs("span",{className:"t-status-icon","t-status":"sent",children:Gs(Na,{type:"checkmark",size:12})}):"everyoneRead"===t?Gs("span",{className:"t-status-icon","t-status":"everyoneRead",children:[Gs(Na,{type:"checkmark",size:12}),Gs(Na,{type:"checkmark",size:12})]}):null}function xD({timestamp:t,common:e}){if(-1===t)return null;const{t:n}=e;return Gs("span",{className:"t-theme-time-ago",children:Gs("span",{role:"time",title:new Date(t).toLocaleString(n.locale,{weekday:"short",year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),children:new Date(t).toLocaleTimeString(n.locale,{hour:"numeric",minute:"numeric"})})})}function FD(t){const{message:e,permissions:n,common:r}=t,{chatbox:i,t:o}=r;return Gs("div",{className:"t-theme-message-action-menu",children:[n.canReplyToMessage&&Gs(JO,{className:"t-menu-item",onSelect:()=>i.setReferencedMessage(e.id),children:[Gs("span",{className:"t-menu-item-icon-box",children:Gs(Na,{type:"reply",className:"t-menu-item-icon",size:16})}),Gs("span",{children:o.REPLY_TO_MESSAGE})]}),n.canEditMessage&&Gs(JO,{className:"t-menu-item",onSelect:()=>i.setEditing(e.id),children:[Gs("span",{className:"t-menu-item-icon-box",children:Gs(Na,{type:"edit",className:"t-menu-item-icon",size:16})}),Gs("span",{children:o.EDIT_MESSAGE})]}),n.canDeleteMessage&&Gs(JO,{className:"t-menu-item t-danger",onSelect:()=>i.deleteMessage(e.id),children:[Gs("span",{className:"t-menu-item-icon-box",children:Gs(Na,{type:"trash",className:"t-menu-item-icon",size:16})}),Gs("span",{children:o.DELETE_MESSAGE})]})]})}function HD(t){const{common:e,referencedMessage:n,editor:r,voiceRecorder:i,permissions:o,editMessageId:s}=t,{chatbox:a,device:l,conversation:c,t:d,theme:h}=e,{ReplyBar:p,VoiceRecorder:f,RecordingPreview:m}=h,E=s?"edit":"send",_="edit"===E&&!r.atTextLimit&&r.characterCount>0,A=!r.isEmpty&&!r.atTextLimit&&!r.sendBlocked&&"ReadWrite"===c.access,g=!i&&"ReadWrite"===c.access,S="send"===E&&r.isEmpty&&o.canShareLocation,v="send"===E&&o.canShareFile,D="send"===E&&l.supportsEmojiPicker&&!l.isMobile,T="send"===E&&r.isEmpty&&o.canSendVoiceMessage;return Gs("div",{className:"t-theme-message-field","t-mode":E,children:[r.showEmojiPicker&&Gs("div",{className:"t-emoji-picker-wrapper",children:Gs(rg,{})}),Gs(bg,{}),Gs($O,{}),n&&Gs(p,{common:e,referencedMessage:n}),Gs("div",{className:"t-wrapper",children:[r.atTextLimit&&Gs("div",{className:"t-text-limit-indicator",children:d.ENTRYBOX_TEXT_LIMIT}),Gs("div",{className:"t-text-form",children:["Read"===c.access&&Gs("div",{className:"t-readonly",children:d.ENTRYBOX_PLACEHOLDER_CHAT_READONLY}),i&&"recording"===i.state&&Gs(f,{common:e,voiceRecorder:i}),i&&"previewing"===i.state&&Gs(m,{common:e,voiceRecorder:i}),g&&Gs(O,{children:[v&&Gs("div",{className:"t-attachment-column",children:Gs("button",{className:"t-attachment-button","t-kind":"icon-button","aria-label":d.UPLOAD_SEND_FILE,title:d.UPLOAD_SEND_FILE,onClick:()=>r.attachFile(),children:Gs(Na,{type:"attachment",size:20})})}),Gs("div",{className:"t-textbox-column",children:[Gs(J_,{placeholder:d.ENTRYBOX_PLACEHOLDER}),Gs("div",{className:"t-button-overlay",children:[S&&Gs("button",{className:"t-location-button","t-kind":"icon-button","aria-label":d.UPLOAD_SHARE_LOCATION,title:d.UPLOAD_SHARE_LOCATION,onClick:()=>r.shareLocation(),children:Gs(Na,{type:"location",size:20})}),D&&Gs("button",{className:"t-emoji-button","t-kind":"icon-button","aria-label":d.ARIA_INSERT_EMOJI,title:d.ARIA_INSERT_EMOJI,onClick:()=>r.toggleEmojiPicker(),children:Gs(Na,{type:r.showEmojiPicker?"close":"emoji",size:r.showEmojiPicker?24:20})})]})]})]}),"send"===E&&g&&Gs("div",{className:"t-send-column",children:[T&&Gs("button",{className:"t-record-button","t-kind":"icon-button","aria-label":d.VOICE_MESSAGE,title:d.VOICE_MESSAGE,onClick:()=>r.recordVoiceMessage(),disabled:r.sendBlocked,children:Gs(Na,{type:"microphone",size:20})}),!T&&Gs("button",{className:"t-send-button","t-kind":"icon-button","aria-label":d.SEND_BUTTON_TEXT,title:d.SEND_BUTTON_TEXT,onClick:()=>r.send(),disabled:!A,children:Gs(Na,{type:"arrowUp",size:20})})]}),"edit"===E&&Gs("div",{className:"t-edit-row",children:[Gs("button",{"t-action":"cancel",onClick:()=>a.setEditing(null),children:d.CANCEL}),Gs("button",{"t-action":"save",onClick:()=>r.send(),disabled:!_,children:d.SAVE})]})]})]})]})}function UD(t){const{timestamp:e,isReadMarker:n,isDayMarker:r,common:i}=t,{t:o}=i;return Gs("div",{className:"t-message-divider",children:[Gs("div",{className:"t-line","t-side":"left",children:Gs("div",{className:"t-line-segment"})}),r&&void 0!==e&&Gs("span",{className:"t-day-marker",children:SD(e,o)}),Gs("div",{className:"t-line","t-side":"right",children:[Gs("div",{className:"t-line-segment"}),n&&Gs("span",{className:"t-unread-marker",children:o.MESSAGELIST_NEW_MARKER})]})]})}function BD(t){return null}function jD({common:t}){const e=t.conversation.welcomeMessages;return 0===e.length?null:Gs("div",{className:"t-message-group",children:e.map((t,e)=>Gs(dD,{text:t},e)).reverse()})}function VD({common:t}){const{typing:e,theme:n}=t,{Avatar:r}=n;if(!e.many&&0===e.users.length)return null;const i=e.many?Gs("div",{className:"t-theme-avatar",children:"5+"}):e.users.slice(0,2).map(e=>Gs(r,{photoUrl:pD(e),common:t},e.id));return Gs("div",{className:"t-theme-after-messages","t-many":String(e.many),"aria-label":zD(e),children:[Gs("div",{className:"t-typing-avatars","aria-hidden":"true",children:[i,!e.many&&e.users.length>2&&Gs("div",{className:"t-theme-avatar",children:["+",e.users.length-2]})]}),Gs("div",{className:"t-typing-bubble",children:Gs("div",{className:"t-typing-animation",children:[Gs("span",{}),Gs("span",{}),Gs("span",{})]})})]})}function zD(t){if(t.many)return"Several people are typing";const{users:e}=t;return 1===e.length?`${e[0].name} is typing`:2===e.length?`${e[0].name} and ${e[1].name} are typing`:`${e[0].name}, ${e[1].name}, and ${e.length-2} others are typing`}function $D(t){return Gs("span",{className:"t-theme-compact-message-content",children:Gs(YD,{...t})})}function YD({message:t,common:e}){const n=t.content[0],{t:r}=e;if("text"===n.type)return Gs(HA,{block:n,message:t,nonInteractive:!0});if("location"===n.type)return Gs(O,{children:[Gs(Na,{type:"location",size:16})," ",r.LOCATION]});if("file"===n.type){if("image"===n.subtype)return Gs(O,{children:[Gs(Na,{type:"image",size:16}),n.filename]});if("video"===n.subtype)return Gs(O,{children:[Gs(Na,{type:"movie",size:16}),n.filename]});if("audio"===n.subtype)return Gs(O,{children:[Gs(Na,{type:"attachment",size:16}),n.filename]});var i;if("voice"===n.subtype)return Gs(O,{children:[Gs(Na,{type:"microphone",size:16}),r.VOICE_MESSAGE," (",AD(null!==(i=n.duration)&&void 0!==i?i:0),")"]});if(void 0===n.subtype)return Gs(O,{children:[Gs(Na,{type:"attachment",size:16}),n.filename]})}return null}function GD(t){const{t:e,chatbox:n,chatSearchState:r}=t.common,{searchQuery:i}=t;let o;"searching"===r?o=e.SEARCH_SEARCHING:"noResults"===r?o=e.SEARCH_NO_RESULTS:"noMoreResults"===r&&(o=e.SEARCH_NO_MORE_RESULTS);return Gs("div",{className:"t-theme-chat-search-wrap",children:[Gs("div",{className:"t-theme-chat-search-box",children:[Gs("button",{className:"t-button t-back-button","aria-label":e.ARIA_LEAVE_SEARCH_MODE,onClick:()=>n.toggleSearchBox(),children:Gs(Na,{type:"chevronLeft",size:20})}),Gs("div",{className:"t-search-field",children:[Gs(tD,{id:"t-search-input",autoFocus:!0,placeholder:e.SEARCH_PLACEHOLDER_TEXT,className:"t-search-input"}),i.length>0&&Gs("button",{type:"button",className:"t-clear","aria-label":e.ARIA_LEAVE_SEARCH_MODE,onClick:()=>{n.setSearchQuery("")},children:Gs(Na,{type:"close",size:20})})]}),Gs("button",{className:"t-button t-previous-button","aria-label":e.ARIA_SEARCH_UP,disabled:"searching"===r,onClick:()=>n.jumpToPreviousHighlight(),children:Gs(Na,{type:"chevronUp",size:20})}),Gs("button",{className:"t-button t-next-button","aria-label":e.ARIA_SEARCH_DOWN,disabled:"searching"===r,onClick:()=>n.jumpToNextHighlight(),children:Gs(Na,{type:"chevronDown",size:20})})]}),o&&Gs("div",{className:"t-theme-chat-search-status",role:"status","aria-live":"polite",children:Gs("span",{className:"t-text",children:o})})]})}function WD({block:t,downloadUrl:e}){return Gs("div",{className:"t-theme-audio-block",children:[Gs(ka,{src:t.url,filename:t.filename}),Gs("div",{className:"t-metadata",children:[Gs("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:[Gs(Na,{className:"t-download-icon",type:"download"}),Gs(UA,{className:"t-filename",text:t.filename})]}),Gs("span",{className:"t-filesize",children:[" (",mD(t.size),")"]})]})]})}function XD({block:t,downloadUrl:e}){return Gs("div",{className:"t-theme-file-block",children:Gs("div",{className:"t-metadata",children:[Gs("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:[Gs(Na,{type:"attachment",className:"t-attachment-icon"}),Gs(UA,{className:"t-filename",text:t.filename})]}),Gs("span",{className:"t-filesize",children:[" (",mD(t.size),")"]})]})})}function KD({block:t,downloadUrl:e}){const n={"--img-w":t.width||1,"--img-h":t.height||1};return Gs("div",{className:"t-theme-image-block",children:[Gs("a",{href:t.url,className:"t-image-wrapper",target:"_blank",rel:"noopener noreferrer",children:Gs("div",{className:"t-root",style:n,children:Gs("img",{src:t.url,className:"t-image"})})}),Gs("div",{className:"t-metadata",children:[Gs("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:[Gs(Na,{className:"t-download-icon",type:"download"}),Gs(UA,{className:"t-filename",text:t.filename})]}),Gs("span",{className:"t-filesize",children:[" (",mD(t.size),")"]})]})]})}function qD({block:t}){const{imageUrl:e,linkUrl:n}=ED(t);return Gs("div",{className:"t-theme-location-block",children:[Gs("div",{className:"t-location-wrapper",children:Gs("a",{href:n,target:"_blank",rel:"noopener noreferrer",className:"t-root",style:{backgroundImage:`url(${JSON.stringify(e)})`}})}),Gs("div",{className:"t-metadata",children:Gs("a",{href:n,target:"_blank",rel:"noopener noreferrer",children:[Gs(Na,{className:"t-location-icon",type:"pin"}),Gs("span",{className:"t-location-link",children:n})]})})]})}function JD({block:t,message:e}){return Gs("div",{className:"t-theme-text-block",children:Gs(HA,{block:t,message:e})})}function ZD({block:t,downloadUrl:e}){return Gs("div",{className:"t-theme-video-block",children:[Gs("div",{className:"t-video-wrapper",children:Gs("div",{className:"t-root",style:{"--video-w":t.width||1,"--video-h":t.height||1},children:Gs("video",{className:"t-video",controls:!0,preload:"metadata",src:`${t.url}#t=0.1`,playsInline:!0})})}),Gs("div",{className:"t-metadata",children:[Gs("a",{href:e,className:"t-body-text",target:"_blank",rel:"noopener noreferrer",children:[Gs(Na,{className:"t-download-icon",type:"download"}),Gs(UA,{className:"t-filename",text:t.filename})]}),Gs("span",{className:"t-filesize",children:[" (",mD(t.size),")"]})]})]})}function QD({block:t}){return Gs(ka,{className:"t-theme-voice-block",src:t.url,filename:t.filename})}function tT({photoUrl:t}){return Gs("div",{className:"t-theme-avatar",style:{backgroundImage:`url("${t}")`}})}function eT({common:t,conversation:e,participants:n}){const{currentUser:r,theme:i}=t,{Avatar:o,GroupChatImage:s}=i;if(e.photoUrl)return Gs(o,{photoUrl:e.photoUrl,common:t});if(0===n.length)return null;if(1===n.length)return Gs(o,{photoUrl:pD(r),common:t});if(2===n.length){const e=n[0],i=n[1];return e&&i?Gs(o,{photoUrl:pD(e.user.id===r.id?i.user:e.user),common:t}):null}return Gs(s,{conversation:e,participants:n,common:t})}function nT({participants:t,conversation:e}){var n;const r=t[0];return Gs("div",{className:"t-theme-group-chat-image",children:[Gs("div",{className:"t-mini-avatar",style:{backgroundImage:`url("${e.subject?fD(e.id,(null!==(n=e.subject[0])&&void 0!==n?n:"").toUpperCase()):r?pD(r.user):""}")`}}),t.length>2&&Gs("svg",{className:"t-counter",viewBox:"0 0 22 22",xmlns:"http://www.w3.org/2000/svg",children:[Gs("g",{className:"t-group",children:Gs("rect",{x:"0",y:"0",width:22,height:22,fill:"currentColor"})}),Gs("text",{textAnchor:"middle",dominantBaseline:"central",x:11,y:10,fontSize:t.length>9?10:12,fill:"currentColor",children:t.length>9?"9+":t.length})]})]})}function rT({referencedMessage:t,common:e}){const{theme:n,chatbox:r}=e,{CompactMessageContent:i}=n;return Gs("div",{className:"t-theme-referenced-message",onClick:()=>r.focusMessage(t.id),children:[Gs("span",{className:"t-accent-bar"}),Gs("div",{className:"t-inner",children:[Gs("span",{className:"t-sender-name",children:t.sender.name}),Gs("div",{className:"t-content",children:Gs(i,{message:t,common:e})})]})]})}function iT(t){const{common:e,referencedMessage:n}=t,{chatbox:r,t:i,theme:o}=e,{CompactMessageContent:s}=o;return Gs("div",{className:"t-theme-reply-bar",children:[Gs(Na,{className:"t-reply-icon",type:"reply",size:20}),Gs("div",{className:"t-body",onClick:()=>r.focusMessage(n.id),children:[Gs("div",{className:"t-sender-name",children:n.sender.name}),Gs("div",{className:"t-content",children:Gs(s,{message:n,common:e})})]}),Gs("button",{className:"t-close-button",title:i.REPLY_MODE_LEAVE_ARIA_LABEL,"aria-label":i.REPLY_MODE_LEAVE_ARIA_LABEL,onClick:()=>r.setReferencedMessage(null),children:Gs(Na,{className:"t-close-icon",type:"close",size:24})})]})}function oT({timestamp:t,common:e}){const{t:n}=e,r=_D(t,n);return-1===t?null:Gs("span",{className:"t-theme-time-ago",children:Gs("span",{role:"time",title:new Date(t).toLocaleString(n.locale,{weekday:"short",year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),"aria-description":r.long,children:r.short})})}function sT(t){var e,n,r;const{common:i,conversation:o,isSelected:s}=t,{currentUser:a,theme:l,conversationList:c}=i,{TimeAgo:d,ConversationImage:h,CompactMessageContent:p}=l,{lastMessage:f}=o,m=ID(o.id,10),E=m.length>=3,_=null==f||null===(e=f.sender)||void 0===e?void 0:e.name,A=null!==(n=null==f?void 0:f.editedAt)&&void 0!==n?n:null==f?void 0:f.createdAt,g=m.filter(t=>t.user.id!==a.id),S=g.length?g:m,v=null!==(r=o.subject)&&void 0!==r?r:S.map(t=>t.user.name).join(", ");return Gs("div",{className:"t-theme-conversation-list-item","t-unread":o.unreadMessageCount?"":void 0,"t-selected":s?"":void 0,children:[Gs(h,{conversation:o,participants:m,common:i}),Gs("div",{className:"t-inner",children:[Gs("div",{className:"t-header",children:[Gs(ZO,{as:"a",className:"t-conversation-name-link",href:"#","aria-current":s?"page":void 0,"t-selected":s?"":void 0,onClick:t=>{t.preventDefault(),c.selectConversation(o.id)},children:Gs("h3",{className:"t-conversation-name",children:v})}),A&&Gs("span",{className:"t-timestamp",children:Gs(d,{timestamp:A,common:i})})]}),Gs("div",{className:"t-body",children:[f&&Gs("div",{className:"t-message",children:[E&&_&&Gs("span",{className:"t-message-sender",children:[_,":"]}),Gs(p,{message:f,common:i})]}),Gs(aT,{...t})]})]})]})}function aT({conversation:t}){const{isUnread:e,unreadMessageCount:n}=t;return e?Gs("div",0===n?{className:"t-unread-generic-dot"}:n>999?{className:"t-unread-dot",children:Gs("span",{children:"999+"})}:{className:"t-unread-dot",children:Gs("span",{children:n})}):null}function lT(t){var e,n,r;const{common:i,conversation:o,message:s,isSelected:a}=t,{currentUser:l,theme:c,conversationList:d}=i,{TimeAgo:h,ConversationImage:p,CompactMessageContent:f}=c,m=ID(o.id,10),E=m.length>=3,_=null==s||null===(e=s.sender)||void 0===e?void 0:e.name,A=null!==(n=null==s?void 0:s.editedAt)&&void 0!==n?n:null==s?void 0:s.createdAt,g=m.filter(t=>t.user.id!==l.id),S=g.length?g:m,v=null!==(r=o.subject)&&void 0!==r?r:S.map(t=>t.user.name).join(", ");return Gs("div",{className:"t-theme-global-search-result-item","t-selected":a?"":void 0,onClick:()=>{d.selectConversation(o.id,null==s?void 0:s.id)},children:[Gs(p,{conversation:o,participants:m,common:i}),Gs("div",{className:"t-inner",children:[Gs("div",{className:"t-header",children:[Gs("div",{className:"t-conversation-name",children:Gs(UA,{text:v})}),A&&Gs("span",{className:"t-timestamp",children:Gs(h,{timestamp:A,common:i})})]}),Gs("div",{className:"t-body",children:s&&Gs("div",{className:"t-message",children:[E&&_&&Gs("span",{className:"t-message-sender",children:[Gs(UA,{text:_}),":"]}),Gs(f,{message:s,common:i})]})})]})]})}function cT(t){const{common:e,query:n,cancel:r}=t,{t:i}=e;return Gs("div",{className:"t-theme-global-search-header",children:Gs("div",{className:"t-theme-global-search-box",children:[Gs("span",{className:"t-search-icon","aria-hidden":"true",children:Gs(Na,{type:"search",size:20})}),Gs(tD,{placeholder:i.SEARCH_PLACEHOLDER_TEXT,className:"t-input"}),n.length>0&&Gs("button",{type:"button",onClick:r,"aria-label":i.ARIA_LEAVE_SEARCH_MODE,className:"t-clear",children:Gs(Na,{type:"close",size:20})})]})})}function uT(t){const{common:e,canLoadMore:n,loadMore:r,type:i}=t,{t:o}=e;return Gs("div",{className:"t-theme-global-search-result-header",children:[Gs("span",{className:"t-title",children:"messages"===i?o.SEARCH_RESULTS_MESSAGES:o.SEARCH_RESULTS_CONVERSATIONS}),n&&Gs("button",{className:"t-show-more",onClick:r,children:o.SEARCH_RESULTS_SHOW_MORE})]})}function dT(t){const{common:e,voiceRecorder:n}=t,{t:r}=e;return Gs("div",{className:"t-theme-recording-preview",children:[Gs("button",{className:"t-close-button","t-kind":"icon-button","aria-label":r.ARIA_CANCEL_UPLOAD,title:r.ARIA_CANCEL_UPLOAD,onClick:()=>n.cancel(),children:Gs(Na,{type:"close",size:24})}),Gs("div",{className:"t-textbox-column",children:Gs(ka,{src:n.recordingUrl})}),"pending"===n.uploadState&&Gs("div",{className:"t-send-column",children:Gs("div",{className:"t-loading",children:Gs(Na,{type:"spinner",className:"t-spinner",size:24})})}),"done"===n.uploadState&&Gs("div",{className:"t-send-column",children:Gs("button",{className:"t-send-button","t-kind":"icon-button","aria-label":r.SEND_BUTTON_TEXT,title:r.SEND_BUTTON_TEXT,onClick:()=>n.send(),children:Gs(Na,{type:"send",size:24})})})]})}function hT(t){const{common:e,voiceRecorder:n}=t,{t:r}=e;return Gs("div",{className:"t-theme-voice-recorder",children:[Gs("button",{className:"t-close-button","t-kind":"icon-button","aria-label":r.ARIA_CANCEL_RECORDING,title:r.ARIA_CANCEL_RECORDING,onClick:()=>n.cancel(),children:Gs(Na,{type:"close",size:24})}),Gs("div",{className:"t-textbox-column t-waveform-wrapper",children:[Gs(iD,{className:"t-waveform",voiceRecorder:n}),Gs("span",{className:"t-duration",children:AD(n.duration)})]}),Gs("div",{className:"t-send-column",children:Gs("button",{className:"t-stop-button","t-kind":"icon-button","aria-label":r.ARIA_STOP_RECORDING,title:r.ARIA_STOP_RECORDING,onClick:()=>n.stop(),children:Gs(Na,{type:"stop",className:"t-stop-icon",size:20})})})]})}function pT({common:t}){return Gs("div",{className:"t-theme-no-conversation-selected",children:t.t.SELECT_CONVERSATION})}var fT=c({AfterMessages:()=>VD,AudioBlock:()=>WD,Avatar:()=>tT,BeforeMessages:()=>jD,ChatHeader:()=>ND,ChatSearchBox:()=>GD,CompactMessageContent:()=>$D,ConversationImage:()=>eT,ConversationListItem:()=>sT,FileBlock:()=>XD,GlobalSearchBox:()=>cT,GlobalSearchResultHeader:()=>uT,GlobalSearchResultItem:()=>lT,GroupChatImage:()=>nT,ImageBlock:()=>KD,LocationBlock:()=>qD,Message:()=>LD,MessageActionMenu:()=>FD,MessageDivider:()=>UD,MessageField:()=>HD,MessageListFooter:()=>BD,MessageListHeader:()=>kD,NoConversationSelected:()=>pT,RecordingPreview:()=>dT,ReferencedMessage:()=>rT,ReplyBar:()=>iT,TextBlock:()=>JD,TimeAgo:()=>oT,VideoBlock:()=>ZD,VoiceBlock:()=>QD,VoiceRecorder:()=>hT});function mT(t){const{conversation:e,theme:n,t:r,chatbox:i,chatSearchState:o}=t.common,{ConversationImage:s,ChatSearchBox:a}=n,l=ID(e.id,10);return t.permissions.canSearch&&"hidden"!==o?Gs("div",{className:"t-theme-chat-header",children:Gs(a,{common:t.common,searchQuery:t.searchQuery})}):Gs("div",{className:"t-theme-chat-header",children:Gs("div",{className:"t-inner",children:[Gs("div",{className:"t-content",children:[Gs("button",{className:"t-back-button","aria-label":r.INBOX,title:r.INBOX,onClick:()=>i.clickBackButton(),children:Gs(Na,{type:"chevronLeft"})}),Gs("div",{className:"t-image",children:Gs(s,{conversation:e,participants:l,common:t.common})}),Gs("div",{className:"t-info",children:Gs(ET,{...t})})]}),Gs("div",{className:"t-actions",children:Gs("button",{className:"t-action-button","aria-label":r.ARIA_SEARCH_INSIDE_CONVERSATION,title:r.ARIA_SEARCH_INSIDE_CONVERSATION,onClick:()=>i.toggleSearchBox(),children:Gs(Na,{type:"search",size:"20px"})})})]})})}function ET(t){const{common:e}=t;return e.conversation.subject?Gs(O,{children:[Gs("div",{className:"t-title",children:e.conversation.subject}),Gs("div",{className:"t-subtitle",children:Gs(_T,{...t})})]}):Gs("div",{className:"t-title",children:Gs(_T,{...t})})}function _T(t){const{common:e,isUserConnected:n,permissions:r}=t,i=ID(e.conversation.id,10),o=i.filter(({user:t})=>t.id!==e.currentUser.id),s=0===o.length?i:o;return r.showOnlineStatus?Gs("span",{className:"t-participants",children:s.map(({user:t})=>Gs("span",{className:"t-participant",children:[Gs("span",{children:t.name}),Gs("span",{className:"t-online-indicator","t-status":n[t.id]?"online":"offline"})]},t.id))}):Gs("span",{className:"t-participants",children:s.map(({user:t})=>t.name).join(", ")})}function AT(t){return null}function gT(t){const{message:e,messageStatus:n,permissions:r,common:i}=t,{currentUser:o,theme:s,conversation:a,conversationId:l,t:c,focusedMessage:d}=i,{Avatar:h,ReferencedMessage:p,TimeAgo:f,MessageActionMenu:m}=s,E=ID(l,3).length>=3,_=e.sender,A=(null==_?void 0:_.id)!==o.id&&E,g=e.referencedMessage,S=r.canReplyToMessage||r.canDeleteMessage,v=r.canAddReaction&&"ReadWrite"===a.access;let O;O=_?_.id===o.id?"currentUser":"other":"system";const D=e.id===(null==d?void 0:d.id);return Gs("div",{className:"t-theme-message","t-sender":O,"t-message-id":e.id,"t-status":n,"t-focused":D?"":void 0,children:[Gs("div",{className:"t-message-row",children:[_&&Gs(h,{photoUrl:pD(_),common:i}),Gs("div",{className:"t-message-body",children:[_&&A&&Gs("div",{className:"t-message-sender-name",style:{color:hD(_.id)},children:_.name}),g&&Gs(p,{referencedMessage:g,common:i}),Gs(BA,{common:i,message:e,messageStatus:n}),Gs("div",{className:"t-message-status",children:[Gs(f,{timestamp:e.createdAt,common:i}),"currentUser"==O&&Gs(vT,{...t})]})]}),(S||v)&&Gs("div",{className:"t-message-buttons",children:[S&&Gs(KO,{type:"menu",popoverComponent:m,popoverProps:{message:e,permissions:r,common:i},className:"t-message-action-menu-button","aria-label":c.ARIA_MORE_ACTIONS,children:Gs(Na,{className:"t-action-menu-icon",type:"horizontalDots"})}),v&&Gs(KO,{className:"t-add-reaction-button",popoverComponent:ig,popoverProps:{messageId:e.id,colorScheme:"light"},"aria-label":c.ADD_REACTION,children:Gs(Na,{type:"addEmoji"})})]})]}),e.reactions.length>0&&Gs("div",{className:"t-emoji-reactions",children:e.reactions.map(t=>Gs(ST,{summary:t,message:e,common:i,permissions:r},t.emoji))})]})}function ST(t){const{summary:e,message:n,common:r,permissions:i}=t,{t:o,chatbox:s,conversationId:a}=r,{emoji:l,count:c,currentUserReacted:d}=e,[h,p]=CD(a,n.id,e.emoji),f=h.map(t=>t.user.name);return h.length&&h.length<e.count&&f.push("..."),Gs("button",{className:"t-reaction-button","t-active":d?"true":void 0,onClick:()=>s.toggleReaction(n.id,l),disabled:!i.canAddReaction,"aria-label":o.ARIA_REACTION_COUNT(c,l),"aria-pressed":d,onMouseOver:p,onTouchStart:p,"t-tooltip-text":f.join(", "),children:[Gs("span",{className:"t-emoji",children:l}),Gs("span",{className:"t-num-reactions",children:c})]})}function vT({messageStatus:t}){return"virtual"===t?null:"sending"===t?Gs("span",{className:"t-status-icon",children:Gs(Na,{type:"spinner",className:"t-message-loading-spinner"})}):"sent"===t?Gs("span",{className:"t-status-icon",children:"✓"}):"everyoneRead"===t?Gs("span",{className:"t-status-icon",children:"✓✓"}):null}function OT(t){const{message:e,permissions:n,common:r}=t,{chatbox:i,t:o}=r;return Gs("div",{className:"t-theme-message-action-menu",children:[n.canReplyToMessage&&Gs(JO,{className:"t-menu-item",onSelect:()=>i.setReferencedMessage(e.id),children:o.REPLY_TO_MESSAGE}),n.canEditMessage&&Gs(JO,{className:"t-menu-item",onSelect:()=>i.setEditing(e.id),children:o.EDIT_MESSAGE}),n.canDeleteMessage&&Gs(JO,{className:"t-menu-item t-danger",onSelect:()=>i.deleteMessage(e.id),children:o.DELETE_MESSAGE})]})}function DT(t){const{common:e,referencedMessage:n,editor:r,voiceRecorder:i,permissions:o,editMessageId:s}=t,{chatbox:a,device:l,conversation:c,t:d,theme:h}=e,{ReplyBar:p,VoiceRecorder:f,RecordingPreview:m}=h,E=s?"edit":"send",_=!r.atTextLimit&&!r.isEmpty&&!r.sendBlocked&&"ReadWrite"===c.access,A="send"===E&&r.isEmpty&&o.canShareLocation,g="send"===E&&r.isEmpty&&o.canShareFile,S="send"===E&&l.supportsEmojiPicker&&!l.isMobile,v="send"===E&&r.isEmpty&&o.canSendVoiceMessage,O=!i&&"ReadWrite"===c.access;return Gs("div",{className:"t-theme-message-field","t-mode":E,children:[r.showEmojiPicker&&Gs("div",{className:"t-emoji-picker-wrapper",children:Gs(rg,{colorScheme:"light"})}),Gs(bg,{}),Gs($O,{}),n&&Gs(p,{common:e,referencedMessage:n}),Gs("div",{className:"t-wrapper",children:[r.atTextLimit&&Gs("div",{className:"t-text-limit-indicator",children:d.ENTRYBOX_TEXT_LIMIT}),Gs("div",{className:"t-text-form",children:["Read"===c.access&&Gs("div",{className:"t-readonly",children:d.ENTRYBOX_PLACEHOLDER_CHAT_READONLY}),"recording"===(null==i?void 0:i.state)&&Gs(f,{common:e,voiceRecorder:i}),"previewing"===(null==i?void 0:i.state)&&Gs(m,{common:e,voiceRecorder:i}),O&&Gs("div",{className:"t-textbox-column",children:[Gs(J_,{placeholder:d.ENTRYBOX_PLACEHOLDER}),Gs("div",{className:"t-button-overlay",children:[A&&Gs("button",{className:"t-location-button","t-kind":"icon-button","aria-label":d.UPLOAD_SHARE_LOCATION,title:d.UPLOAD_SHARE_LOCATION,onClick:()=>r.shareLocation(),children:Gs(Na,{type:"location",size:"20px"})}),g&&Gs("button",{className:"t-attachment-button","t-kind":"icon-button","aria-label":d.UPLOAD_SEND_FILE,title:d.UPLOAD_SEND_FILE,onClick:()=>r.attachFile(),children:Gs(Na,{type:"attachment"})}),S&&Gs("button",{className:"t-emoji-button","t-kind":"icon-button","aria-label":d.ARIA_INSERT_EMOJI,title:d.ARIA_INSERT_EMOJI,onClick:()=>r.toggleEmojiPicker(),children:Gs(Na,{type:r.showEmojiPicker?"close":"emoji",size:r.showEmojiPicker?"24px":"20px"})})]})]}),"send"===E&&O&&Gs("div",{className:"t-send-column",children:[v&&Gs("button",{className:"t-record-button","t-kind":"icon-button","aria-label":d.VOICE_MESSAGE,title:d.VOICE_MESSAGE,onClick:()=>r.recordVoiceMessage(),disabled:r.sendBlocked,children:Gs(Na,{type:"microphone",size:"20px"})}),!v&&Gs("button",{className:"t-send-button","t-kind":"icon-button","aria-label":d.SEND_BUTTON_TEXT,title:d.SEND_BUTTON_TEXT,onClick:()=>r.send(),disabled:!_,children:Gs(Na,{type:"arrowUp",size:"20px"})})]}),"edit"===E&&Gs("div",{className:"t-edit-row",children:[Gs("button",{"t-action":"cancel",onClick:()=>a.setEditing(null),children:d.CANCEL}),Gs("button",{"t-action":"save",onClick:()=>r.send(),disabled:!_,children:d.SAVE})]})]})]})]})}function TT(t){const{common:e,voiceRecorder:n}=t,{t:r}=e;return Gs("div",{className:"t-theme-voice-recorder",children:[Gs("button",{className:"t-close-button","t-kind":"icon-button","aria-label":r.ARIA_CANCEL_RECORDING,title:r.ARIA_CANCEL_RECORDING,onClick:()=>n.cancel(),children:Gs(Na,{type:"close",size:"24px"})}),Gs("div",{className:"t-textbox-column t-waveform-wrapper",children:[Gs(iD,{className:"t-waveform",voiceRecorder:n}),Gs("span",{className:"t-duration",children:AD(n.duration)})]}),Gs("div",{className:"t-send-column",children:Gs("button",{className:"t-stop-button","t-kind":"icon-button","aria-label":r.ARIA_STOP_RECORDING,title:r.ARIA_STOP_RECORDING,onClick:()=>n.stop(),children:Gs(Na,{type:"stop",className:"t-stop-icon",size:"20px"})})})]})}function RT(t){const{common:e,voiceRecorder:n}=t,{t:r}=e;return Gs("div",{className:"t-theme-recording-preview",children:[Gs("button",{className:"t-close-button","t-kind":"icon-button","aria-label":r.ARIA_CANCEL_UPLOAD,title:r.ARIA_CANCEL_UPLOAD,onClick:()=>n.cancel(),children:Gs(Na,{type:"close",size:"24px"})}),Gs("div",{className:"t-textbox-column",children:Gs(ka,{src:n.recordingUrl})}),"pending"===n.uploadState&&Gs("div",{className:"t-send-column",children:Gs("div",{className:"t-loading",children:Gs(Na,{type:"spinner",className:"t-spinner"})})}),"done"===n.uploadState&&Gs("div",{className:"t-send-column",children:Gs("button",{className:"t-send-button","t-kind":"icon-button","aria-label":r.SEND_BUTTON_TEXT,title:r.SEND_BUTTON_TEXT,onClick:()=>n.send(),children:Gs(Na,{type:"arrowUp",size:"20px"})})})]})}function yT(t){const{timestamp:e,isReadMarker:n,isDayMarker:r,common:i}=t,{t:o}=i;return Gs("div",{className:"t-message-divider",children:[Gs("div",{className:"t-line","t-side":"left",children:Gs("div",{className:"t-line-segment"})}),r&&Gs("span",{className:"t-day-marker",children:SD(e,o)}),Gs("div",{className:"t-line","t-side":"right",children:[Gs("div",{className:"t-line-segment"}),n&&Gs("span",{className:"t-unread-marker",children:o.MESSAGELIST_NEW_MARKER})]})]})}function IT(t){return null}function CT({common:t}){const e=t.conversation.welcomeMessages;return 0===e.length?null:Gs("div",{className:"t-message-group",children:e.map((t,e)=>Gs(dD,{text:t},e)).reverse()})}function NT({common:t}){const{typing:e,theme:n}=t,{Avatar:r}=n;if(!e.many&&0===e.users.length)return null;const i=e.many?Gs("div",{className:"t-theme-avatar",children:"5+"}):e.users.slice(0,2).map(e=>Gs(r,{photoUrl:pD(e),common:t},e.id));return Gs("div",{className:"t-theme-after-messages","t-many":String(e.many),"aria-label":bT(e),children:[Gs("div",{className:"t-typing-avatars","aria-hidden":"true",children:[i,!e.many&&e.users.length>2&&Gs("div",{className:"t-theme-avatar",children:["+",e.users.length-2]})]}),Gs("div",{className:"t-typing-bubble",children:Gs("div",{className:"t-typing-animation",children:[Gs("span",{}),Gs("span",{}),Gs("span",{})]})})]})}function bT(t){if(t.many)return"Several people are typing";const{users:e}=t;return 1===e.length?`${e[0].name} is typing`:2===e.length?`${e[0].name} and ${e[1].name} are typing`:`${e[0].name}, ${e[1].name}, and ${e.length-2} others are typing`}function wT({common:t}){return Gs("div",{className:"t-theme-no-conversation-selected",children:t.t.SELECT_CONVERSATION})}function kT(t){return Gs("span",{className:"t-theme-compact-message-content",children:Gs(LT,{...t})})}function LT({message:t,common:e}){const n=t.content[0],{t:r}=e;if("text"===n.type)return Gs(HA,{block:n,message:t,nonInteractive:!0});if("location"===n.type)return Gs(O,{children:[Gs(Na,{type:"location"})," ",r.LOCATION]});if("file"===n.type){if("image"===n.subtype)return Gs(O,{children:[Gs(Na,{type:"image"})," ",n.filename]});if("video"===n.subtype)return Gs(O,{children:[Gs(Na,{type:"movie"})," ",n.filename]});if("audio"===n.subtype)return Gs(O,{children:[Gs(Na,{type:"attachment"})," ",n.filename]});var i;if("voice"===n.subtype)return Gs(O,{children:[Gs(Na,{type:"microphone"})," ",r.VOICE_MESSAGE," (",AD(null!==(i=n.duration)&&void 0!==i?i:0),")"]});if(void 0===n.subtype)return Gs(O,{children:[Gs(Na,{type:"attachment"})," ",n.filename]})}return null}function MT(t){const{t:e,chatbox:n,chatSearchState:r}=t.common;let i;return"searching"===r?i=e.SEARCH_SEARCHING:"noResults"===r?i=e.SEARCH_NO_RESULTS:"noMoreResults"===r&&(i=e.SEARCH_NO_MORE_RESULTS),Gs("div",{className:"t-theme-chat-search-box",children:[Gs("button",{className:"t-button t-back-button","aria-label":e.ARIA_LEAVE_SEARCH_MODE,onClick:()=>n.toggleSearchBox(),children:Gs(Na,{type:"arrowLeft",size:"20px"})}),Gs("div",{className:"t-search-field",children:[Gs("label",{htmlFor:"t-search-input","t-label-text":i?"on":"off",children:i}),Gs(tD,{id:"t-search-input",autoFocus:!0,className:"t-search-input",placeholder:e.SEARCH_PLACEHOLDER_TEXT})]}),Gs("button",{className:"t-button t-previous-button","aria-label":e.ARIA_SEARCH_UP,disabled:"searching"===r,onClick:()=>n.jumpToPreviousHighlight(),children:Gs(Na,{type:"chevronUp",size:"20px"})}),Gs("button",{className:"t-button t-next-button","aria-label":e.ARIA_SEARCH_DOWN,disabled:"searching"===r,onClick:()=>n.jumpToNextHighlight(),children:Gs(Na,{type:"chevronDown",size:"20px"})})]})}function PT({block:t,downloadUrl:e}){return Gs("div",{className:"t-theme-audio-block",children:[Gs(ka,{src:t.url,filename:t.filename}),Gs("a",{className:"t-body-text",href:e,target:"_blank",rel:"noreferrer",children:[Gs(Na,{type:"attachment",className:"t-attachment-icon"}),Gs(UA,{text:t.filename}),Gs("span",{className:"t-filesize",children:[" (",mD(t.size),")"]})]})]})}function xT({block:t,downloadUrl:e}){return Gs("div",{className:"t-theme-file-block",children:Gs("a",{className:"t-body-text",href:e,target:"_blank",rel:"noreferrer",children:[Gs(Na,{type:"attachment",className:"t-attachment-icon"}),Gs(UA,{className:"t-filename",text:t.filename}),Gs("span",{className:"t-filesize",children:[" (",mD(t.size),")"]})]})})}function FT({block:t,downloadUrl:e}){const n={"--img-w":t.width||1,"--img-h":t.height||1};return Gs("div",{className:"t-theme-image-block",children:[Gs("a",{href:t.url,className:"t-image-wrapper",target:"_blank",rel:"noopener noreferrer",children:Gs("div",{className:"t-root",style:n,children:Gs("img",{src:t.url,className:"t-image"})})}),Gs("a",{href:e,className:"t-body-text",target:"_blank",rel:"noreferrer",children:[Gs(Na,{className:"download-icon",type:"download"}),Gs(UA,{text:t.filename}),Gs("span",{className:"t-filesize",children:[" (",mD(t.size),")"]})]})]})}function HT({block:t}){const{imageUrl:e,linkUrl:n}=ED(t);return Gs("div",{className:"t-theme-location-block",children:[Gs("a",{href:n,target:"_blank",rel:"noreferrer",className:"t-root",style:{background:`url(${JSON.stringify(e)}) center center / cover no-repeat`}}),Gs("span",{className:"t-body-text",children:Gs("a",{href:n,target:"_blank",rel:"noopener noreferrer",children:n})})]})}function UT({block:t,message:e}){return Gs("div",{className:"t-theme-text-block",children:Gs(HA,{block:t,message:e})})}function BT({block:t,downloadUrl:e}){return Gs("div",{className:"t-theme-video-block",children:[Gs("div",{className:"t-video-wrapper",children:Gs("div",{className:"t-root",style:{"--video-w":t.width||1,"--video-h":t.height||1},children:Gs("video",{className:"t-video",controls:!0,preload:"metadata",src:`${t.url}#t=0.1`,playsInline:!0})})}),Gs("a",{href:e,className:"t-body-text",target:"_blank",rel:"noreferrer",children:[Gs(Na,{className:"download-icon",type:"download"}),Gs(UA,{text:t.filename}),Gs("span",{className:"t-filesize",children:[" (",mD(t.size),")"]})]})]})}function jT({block:t}){return Gs(ka,{className:"t-theme-voice-block",src:t.url,filename:t.filename})}function VT({photoUrl:t}){return Gs("div",{className:"t-theme-avatar",style:{backgroundImage:`url("${t}")`}})}function zT(t){const{common:e,conversation:n,participants:r}=t,{currentUser:i,theme:o}=e,{Avatar:s,GroupChatImage:a}=o;return n.photoUrl?Gs(s,{photoUrl:n.photoUrl,common:e}):0===r.length?null:1===r.length?Gs(s,{photoUrl:pD(i),common:e}):2===r.length?Gs(s,{photoUrl:pD(r[0].user.id===i.id?r[1].user:r[0].user),common:e}):Gs(a,{conversation:n,participants:r,common:e})}function $T({participants:t}){return Gs("div",{className:"t-theme-group-chat-image",children:[Gs("div",{className:"t-mini-avatar",style:{backgroundImage:`url("${pD(t[0].user)}")`}}),Gs("div",{className:"t-mini-avatar",style:{backgroundImage:`url("${pD(t[1].user)}")`}}),t.length>2&&Gs("svg",{className:"t-counter",viewBox:"0 0 22 22",xmlns:"http://www.w3.org/2000/svg",children:[Gs("g",{className:"t-group",children:Gs("rect",{x:"0",y:"0",width:22,height:22,fill:"currentColor"})}),Gs("text",{textAnchor:"middle",x:11,y:Math.round(22*.666),width:22,height:22,fontSize:t.length>9?10:12,fill:"currentColor",children:t.length>9?"9+":t.length})]})]})}function YT(t){const{referencedMessage:e,common:n}=t,{theme:r,chatbox:i}=n,{CompactMessageContent:o}=r;return Gs("div",{className:"t-theme-referenced-message",onClick:()=>i.focusMessage(e.id),children:[Gs("div",{className:"t-sender-name",children:e.sender.name}),Gs("div",{className:"t-content",children:Gs(o,{message:e,common:n})})]})}function GT(t){const{common:e,referencedMessage:n}=t,{chatbox:r,t:i,theme:o}=e,{CompactMessageContent:s}=o;return Gs("div",{className:"t-theme-reply-bar",children:[Gs(Na,{className:"t-reply-icon",type:"reply"}),Gs("div",{className:"t-body",onClick:()=>r.focusMessage(n.id),children:[Gs("div",{className:"t-sender-name",children:n.sender.name}),Gs("div",{className:"t-content",children:Gs(s,{message:n,common:e})})]}),Gs("button",{className:"t-close-button",title:i.REPLY_MODE_LEAVE_ARIA_LABEL,"aria-label":i.REPLY_MODE_LEAVE_ARIA_LABEL,onClick:()=>r.setReferencedMessage(null),children:Gs(Na,{className:"t-close-icon",type:"close"})})]})}function WT(t){return-1===t.timestamp?null:Gs(XT,{...t})}function XT({timestamp:t,common:e}){const{t:n}=e,r=new Date(t).toLocaleString(n.locale,{weekday:"short",year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),i=_D(t,n);return Gs("span",{className:"t-theme-time-ago",children:Gs("span",{role:"time",title:r,"aria-description":i.long,children:i.short})})}function KT(t){var e,n,r;const{common:i,conversation:o,isSelected:s}=t,{currentUser:a,theme:l,conversationList:c}=i,{TimeAgo:d,ConversationImage:h,CompactMessageContent:p}=l,{lastMessage:f}=o,m=ID(o.id,10),E=m.length>=3,_=null==f||null===(e=f.sender)||void 0===e?void 0:e.name,A=null!==(n=null==f?void 0:f.editedAt)&&void 0!==n?n:null==f?void 0:f.createdAt,g=m.filter(t=>t.user.id!==a.id),S=g.length?g:m,v=null!==(r=o.subject)&&void 0!==r?r:S.map(t=>t.user.name).join(", ");return Gs("div",{className:"t-theme-conversation-list-item","t-unread":o.unreadMessageCount?"":void 0,"t-selected":s?"":void 0,children:[Gs(h,{conversation:o,participants:m,common:i}),Gs("div",{className:"t-inner",children:[Gs("div",{className:"t-header",children:[Gs(ZO,{as:"a",className:"t-conversation-name-link",href:"#","aria-current":s?"page":void 0,"t-selected":s?"":void 0,onClick:t=>{t.preventDefault(),c.selectConversation(o.id)},children:Gs("h3",{className:"t-conversation-name",children:v})}),A&&Gs("span",{className:"t-timestamp",children:Gs(d,{timestamp:A,common:i})})]}),Gs("div",{className:"t-body",children:[f&&Gs("div",{className:"t-message",children:[E&&_&&Gs("span",{className:"t-message-sender",children:[_,":"]}),Gs(p,{message:f,common:i})]}),Gs(qT,{...t})]})]})]})}function qT({conversation:t}){const{isUnread:e,unreadMessageCount:n}=t;return e?Gs("div",0===n?{className:"t-unread-generic-dot"}:n>999?{className:"t-unread-dot",children:Gs("span",{children:"999+"})}:{className:"t-unread-dot",children:Gs("span",{children:n})}):null}function JT(t){var e,n,r;const{common:i,conversation:o,message:s,isSelected:a}=t,{currentUser:l,theme:c,conversationList:d}=i,{TimeAgo:h,ConversationImage:p,CompactMessageContent:f}=c,m=ID(o.id,10),E=m.length>=3,_=null==s||null===(e=s.sender)||void 0===e?void 0:e.name,A=null!==(n=null==s?void 0:s.editedAt)&&void 0!==n?n:null==s?void 0:s.createdAt,g=m.filter(t=>t.user.id!==l.id),S=g.length?g:m,v=null!==(r=o.subject)&&void 0!==r?r:S.map(t=>t.user.name).join(", ");return Gs("div",{className:"t-theme-global-search-result-item","t-selected":a?"":void 0,onClick:()=>{d.selectConversation(o.id,null==s?void 0:s.id)},children:[Gs(p,{conversation:o,participants:m,common:i}),Gs("div",{className:"t-inner",children:[Gs("div",{className:"t-header",children:[Gs("div",{className:"t-conversation-name",children:Gs(UA,{text:v})}),A&&Gs("span",{className:"t-timestamp",children:Gs(h,{timestamp:A,common:i})})]}),Gs("div",{className:"t-body",children:s&&Gs("div",{className:"t-message",children:[E&&_&&Gs("span",{className:"t-message-sender",children:[Gs(UA,{text:_}),":"]}),Gs(f,{message:s,common:i})]})})]})]})}function ZT(t){const{common:e,query:n,cancel:r}=t,{t:i}=e;return Gs("div",{className:"t-theme-global-search-box",children:[Gs(tD,{className:"t-input",placeholder:i.SEARCH_PLACEHOLDER_TEXT}),n.length>0&&Gs("button",{type:"button",onClick:r,"aria-label":i.ARIA_LEAVE_SEARCH_MODE,className:"t-clear",children:Gs(Na,{type:"close",size:"20px"})}),0===n.length&&Gs(Na,{className:"t-submit",type:"search",size:"20px"})]})}function QT(t){const{common:e,canLoadMore:n,loadMore:r,type:i}=t,{t:o}=e;return Gs("div",{className:"t-theme-global-search-result-header",children:[Gs("span",{className:"t-title",children:"messages"===i?o.SEARCH_RESULTS_MESSAGES:o.SEARCH_RESULTS_CONVERSATIONS}),n&&Gs("button",{className:"t-show-more",onClick:r,children:o.SEARCH_RESULTS_SHOW_MORE})]})}var tR=c({AfterMessages:()=>NT,AudioBlock:()=>PT,Avatar:()=>VT,BeforeMessages:()=>CT,ChatHeader:()=>mT,ChatSearchBox:()=>MT,CompactMessageContent:()=>kT,ConversationImage:()=>zT,ConversationListItem:()=>KT,FileBlock:()=>xT,GlobalSearchBox:()=>ZT,GlobalSearchResultHeader:()=>QT,GlobalSearchResultItem:()=>JT,GroupChatImage:()=>$T,ImageBlock:()=>FT,LocationBlock:()=>HT,Message:()=>gT,MessageActionMenu:()=>OT,MessageDivider:()=>yT,MessageField:()=>DT,MessageListFooter:()=>IT,MessageListHeader:()=>AT,NoConversationSelected:()=>wT,RecordingPreview:()=>RT,ReferencedMessage:()=>YT,ReplyBar:()=>GT,TextBlock:()=>UT,TimeAgo:()=>WT,VideoBlock:()=>BT,VoiceBlock:()=>jT,VoiceRecorder:()=>TT}),{globalState:eR,observableProperties:nR,observableFns:rR,ObservablePrimitiveClass:iR}=go;function oR(t,e){return void 0===t||"default"===t?"default":"classic"===t?"classic":(WA.warn(`Invalid \`baseTheme\` value '${t}' for ${e}; expected "classic" or "default", falling back to "default".`),"default")}function sR(t,e,n){return{..."classic"===oR(t,n)?tR:fT,...null!=e?e:{}}}function aR(t,e,n){return t.clearRect(0,0,100,100),t.fillStyle=n,t.fillText(e,0,0),t.getImageData(0,0,1,1).data.join(",")}function lR(t){const e=function(){const t=document.createElement("canvas");t.width=t.height=1;const e=t.getContext("2d",{willReadFrequently:!0});return e.textBaseline="top",e.font='100px "Twemoji Mozilla","Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji","EmojiOne Color","Android Emoji",sans-serif',e.scale(.01,.01),e}(),n=aR(e,t,"#fff"),r=aR(e,t,"#000");return r===n&&!r.startsWith("0,0,0,")}Xe();const cR=Y(null),uR={didCatch:!1,error:null};var dR=class extends D{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=uR}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(null!==t){for(var e,n,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];null===(e=(n=this.props).onReset)||void 0===e||e.call(n,{args:i,reason:"imperative-api"}),this.setState(uR)}}componentDidCatch(t,e){var n,r;null===(n=(r=this.props).onError)||void 0===n||n.call(r,t,e)}componentDidUpdate(t,e){const{didCatch:n}=this.state,{resetKeys:r}=this.props;var i,o;n&&null!==e.error&&function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.length!==e.length||t.some((t,n)=>!Object.is(t,e[n]))}(t.resetKeys,r)&&(null===(i=(o=this.props).onReset)||void 0===i||i.call(o,{next:r,prev:t.resetKeys,reason:"keys"}),this.setState(uR))}render(){const{children:t,fallbackRender:e,FallbackComponent:n,fallback:r}=this.props,{didCatch:i,error:o}=this.state;let s=t;if(i){const t={error:o,resetErrorBoundary:this.resetErrorBoundary};if("function"==typeof e)s=e(t);else if(n)s=g(n,t);else{if(void 0===r)throw o;s=r}}return g(cR.Provider,{value:{didCatch:i,error:o,resetErrorBoundary:this.resetErrorBoundary}},s)}};const hR={ar:{code:"ar",name:"Arabic",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/ar.js",emojiDataUrl:null,translation:{YESTERDAY:"الأمس",TODAY:"اليوم",DAYS:"يوم",HOURS:"ساعة",MINUTES:"دقيقة",JUST_NOW:"فقط الآن",LOCATION:"الموقع",CANCEL:"إلغاء",INBOX:"علبة الوارد",DESKTOP_NOTIFICATIONS:"إشعارات المتصفح",DESKTOP_NOTIFICATIONS_ERROR:"لا يمكن تمكين إشعارات المتصفح لأن متصفحك يمنعها بشكل نشط. جرّب البحث في الإعدادات أو استخدام متصفح آخر.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`إعلام ${t} التجريبي`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"إذا أبقيت علامة تبويب المتصفح مفتوحة ، فسترى هذا ينبثق عندما يتحدث شخص معك.",SEND_BUTTON_TEXT:"إرسال",ENTRYBOX_TEXT_LIMIT:"يُسمح فقط بـ 10.000 حرف.",ENTRYBOX_PLACEHOLDER:"قل شيئًا ...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"هذه المحادثة لم تعد نشطة.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"يمكنك القراءة ، لكن لا يمكنك إرسال الرسائل.",MESSAGELIST_LOADING_OLDER:"جارٍ تحميل الرسائل القديمة ...",MESSAGELIST_SHOW_OLDER:"عرض الرسائل الأقدم",MESSAGELIST_NEW_MARKER:"جديد",MESSAGE_SENT_VIA_EMAIL:"تم إرسال هذه الرسالة عبر البريد الإلكتروني",YOU_MARKER:"أنت",UPLOAD_IN_PROGRESS:"جارٍ التحميل ...",UPLOAD_SEND_FILE:"إرسال ملف",UPLOAD_SHARE_LOCATION:"مشاركة الموقع",UPLOAD_ERROR:"حدث خطأ ما في تحميل شيء. ربما يكون الملف غير متوافق أو كبير جدًا.",SHARE_LOCATION_ERROR:"لا يمكن مشاركة الموقع:",LOADING:"جارٍ التحميل ...",HUB_EMPTY:"سوف يظهر سجل الدردشات هنا",HUB_SHOW_EARLIER:"إظهار الدردشات السابقة",INBOX_NO_CHATS_TITLE:"لا توجد دردشات بعد!",INBOX_NO_CHATS_BODY:"بمجرد أن يكون لديك واحد أو أكثر من المحادثات ، سوف تظهر هنا.",ENABLE_TRANSLATION:"ترجم هذه المحادثة إلى العربية",DISABLE_TRANSLATION:"إظهار الأصلي",SEARCH_PLACEHOLDER_TEXT:"...بحث",SEARCH_SEARCHING:"...يتم الآن البحث",SEARCH_NO_RESULTS:"لم يتم العثور على نتائج",SEARCH_NO_MORE_RESULTS:"لا يوجد المزيد من النتائج",SEARCH_RESULTS_CONVERSATIONS:"المحادثات",SEARCH_RESULTS_MESSAGES:"الرسائل",SEARCH_RESULTS_SHOW_MORE:"إظهار المزيد",CHAT_NOT_FOUND:"لم يتم العثور على الدردشة",DELETE_MESSAGE:"احذف الرسالة",DELETION_EXPLANATION:"إذا قمت بحذف هذه الرسالة، فهي ستختفي للجميع.",EDIT_MESSAGE:"تعديل الرسالة",SAVE:"حفظ",EDITED_INDICATOR:"معدّلة",REPLY_TO_MESSAGE:"رد",ADD_REACTION:"أضف تفاعلاً",AUTH_EXPIRED_OVERLAY_TITLE:"انتهت جلسة الدردشة المخصصة لك",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"يُرجى إعادة تحميل الصفحة للمتابعة",VOICE_MESSAGE:"رسالة صوتية",LEAVE_CONVERSATION:"الخروج من المحادثة",MARK_CONVERSATION_AS_UNREAD:"وضع علامة غير مقروءة",STATUS_INDICATOR_ONLINE:"نشط",STATUS_INDICATOR_OFFLINE:"بعيد",CONTACT_INFORMATION_HIDDEN:"المعلومات المخفية",ARIA_LEAVE_SEARCH_MODE:"الخروج من وضع البحث",ARIA_SEARCH_UP:"البحث لأعلى",ARIA_SEARCH_DOWN:"البحث لأسفل",ARIA_CLOSE_CHAT_POPUP:"إغلاق نافذة الدردشة",ARIA_SEARCH_INSIDE_CONVERSATION:"البحث داخل هذه المحادثة",ARIA_SEARCH:"بحث",ARIA_CHAT:"دردشة",ARIA_SET_PLAYBACK_SPEED:"تعيين سرعة التشغيل",ARIA_CANCEL_UPLOAD:"إلغاء الرفع",ARIA_STOP_RECORDING:"إيقاف التسجيل",ARIA_CANCEL_RECORDING:"إلغاء التسجيل",ARIA_INSERT_EMOJI:"إدراج رمز تعبيري",ARIA_PLAY_AUDIO:"تشغيل الصوت",ARIA_PAUSE_AUDIO:"إيقاف الصوت مؤقتاً",ARIA_REACTION_COUNT:(t,e)=>`${t} تفاعل مع ${e}`,ARIA_MORE_ACTIONS:"المزيد من الإجراءات",ARIA_REPLYING_TO:(t,e)=>`الرد على ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"الخروج من وضع الرد",SELECT_CONVERSATION:"حدد محادثة"}},bg:{code:"bg-BG",name:"Bulgarian",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Вчера",TODAY:"Днес",DAYS:"Ден",HOURS:"Час",MINUTES:"m",JUST_NOW:"Току-що",LOCATION:"местоположението",CANCEL:"Откажи",INBOX:"Кутия",DESKTOP_NOTIFICATIONS:"Известия на браузъра",DESKTOP_NOTIFICATIONS_ERROR:"Не можете да активирате известията на браузъра, защото браузърът ви ги блокира активно. Опитайте да погледнете в настройките или да използвате друг браузър.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} демо известие`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Ако държите раздела на браузъра си отворен, ще видите този изскачащ прозорец, когато някой говори с вас.",SEND_BUTTON_TEXT:"Изпрати",ENTRYBOX_TEXT_LIMIT:"Разрешени са само до 10.000 знака.",ENTRYBOX_PLACEHOLDER:"Кажете нещо...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Този разговор вече не е активен.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Можете да четете, но не и да изпращате съобщения.",MESSAGELIST_LOADING_OLDER:"Зареждане на по-стари съобщения...",MESSAGELIST_SHOW_OLDER:"Показване на по-стари съобщения",MESSAGELIST_NEW_MARKER:"Нови",MESSAGE_SENT_VIA_EMAIL:"Това съобщение беше изпратено по имейл",YOU_MARKER:"Вие",UPLOAD_IN_PROGRESS:"Качване...",UPLOAD_SEND_FILE:"Изпращане на файл",UPLOAD_SHARE_LOCATION:"Споделяне на местоположението",UPLOAD_ERROR:"За съжаление нещо се обърка при качването. Файлът може да не се поддържа или е твърде голям.",SHARE_LOCATION_ERROR:"Не може да се сподели местоположението: ",LOADING:"Зареждане...",HUB_EMPTY:"Историята на вашите разговори ще се покаже тук",HUB_SHOW_EARLIER:"Показване на по-ранни чатове",INBOX_NO_CHATS_TITLE:"Все още нямате разговори!",INBOX_NO_CHATS_BODY:"След като проведете един или повече разговори, те ще се покажат тук.",ENABLE_TRANSLATION:"Преведете този разговор на български",DISABLE_TRANSLATION:"Показване на оригинал",SEARCH_PLACEHOLDER_TEXT:"Търсене...",SEARCH_SEARCHING:"Търсене...",SEARCH_NO_RESULTS:"Няма намерени резултати",SEARCH_NO_MORE_RESULTS:"Няма повече резултати",SEARCH_RESULTS_CONVERSATIONS:"Разговори",SEARCH_RESULTS_MESSAGES:"Съобщения",SEARCH_RESULTS_SHOW_MORE:"Покажи повече",CHAT_NOT_FOUND:"Чатът не е намерен",DELETE_MESSAGE:"Изтриване на съобщение",DELETION_EXPLANATION:"Ако изтриете това съобщение, то ще изчезне за всички.",EDIT_MESSAGE:"Редактиране на съобщението",SAVE:"Запиши",EDITED_INDICATOR:"редактирано",REPLY_TO_MESSAGE:"Отговори",ADD_REACTION:"Добави реакция",AUTH_EXPIRED_OVERLAY_TITLE:"Вашата чат сесия е изтекла",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Обновете страницата, за да продължите",VOICE_MESSAGE:"Гласово съобщение",CONTACT_INFORMATION_HIDDEN:"Скрита информация",LEAVE_CONVERSATION:"Напускане на разговора",MARK_CONVERSATION_AS_UNREAD:"Маркирай като непрочетено",STATUS_INDICATOR_ONLINE:"Активен",STATUS_INDICATOR_OFFLINE:"Отсъстващ",ARIA_LEAVE_SEARCH_MODE:"Напусни режим на търсене",ARIA_SEARCH_UP:"Търси нагоре",ARIA_SEARCH_DOWN:"Търси надолу",ARIA_CLOSE_CHAT_POPUP:"Затвори прозореца за чат",ARIA_SEARCH_INSIDE_CONVERSATION:"Търси в този разговор",ARIA_SEARCH:"Търсене",ARIA_CHAT:"Чат",ARIA_SET_PLAYBACK_SPEED:"задай скорост на възпроизвеждане",ARIA_CANCEL_UPLOAD:"Отмени качване",ARIA_STOP_RECORDING:"Спри запис",ARIA_CANCEL_RECORDING:"Отмени запис",ARIA_INSERT_EMOJI:"Вмъкни emoji",ARIA_PLAY_AUDIO:"възпроизведи аудио",ARIA_PAUSE_AUDIO:"паузирай аудио",ARIA_REACTION_COUNT:(t,e)=>`${t} реакции с ${e}`,ARIA_MORE_ACTIONS:"Още действия",ARIA_REPLYING_TO:(t,e)=>`Отговор на ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Излизане от режим на отговор",SELECT_CONVERSATION:"Изберете разговор"}},bs:{code:"bs-BA",name:"Bosnian",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Jučer",TODAY:"Danas",DAYS:"d",HOURS:"s",MINUTES:"m",JUST_NOW:"Upravo sad",LOCATION:"Lokacija",CANCEL:"Otkaži",INBOX:"Pretinac",DESKTOP_NOTIFICATIONS:"Obavijesti preglednika",DESKTOP_NOTIFICATIONS_ERROR:"Notifikacije preglednika se ne mogu omogućiti jer ih vaš preglednik aktivno blokira. Pokušajte pregledati postavke ili koristiti drugi preglednik.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} demo notifikacija`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Ako karticu preglednika ostavite otvorenu, pojavit će se ovaj pop-up kada netko razgovara s vama.",SEND_BUTTON_TEXT:"Pošalji",ENTRYBOX_TEXT_LIMIT:"Dozvoljeno je samo 10.000 znakova.",ENTRYBOX_PLACEHOLDER:"Reci nešto...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Ovaj razgovor više nije aktivan.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Možeš čitati, ali ne i slati poruke.",MESSAGELIST_LOADING_OLDER:"Učitavam starije poruke...",MESSAGELIST_SHOW_OLDER:"Prikaži starije poruke",MESSAGELIST_NEW_MARKER:"Novo",MESSAGE_SENT_VIA_EMAIL:"Ova poruka je poslana e-poštom",YOU_MARKER:"ti",UPLOAD_IN_PROGRESS:"Učitavam...",UPLOAD_SEND_FILE:"Pošalji datoteku",UPLOAD_SHARE_LOCATION:"Podijeli lokaciju",UPLOAD_ERROR:"Nažalost, nešto je pošlo krivo. Datoteka možda nije podržana ili je prevelika.",SHARE_LOCATION_ERROR:"Nije moguće podijeliti lokaciju: ",LOADING:"Učitavam...",HUB_EMPTY:"Ovdje će se prikazati vaša povijest razgovora",HUB_SHOW_EARLIER:"Prikaži ranije razgovore",INBOX_NO_CHATS_TITLE:"Nema razgovora!",INBOX_NO_CHATS_BODY:"Nakon što vodite jedan ili više razgovora, oni će se pojaviti ovdje.",ENABLE_TRANSLATION:"Prevedi ovaj razgovor na bosanski jezik",DISABLE_TRANSLATION:"Prikaži original",SEARCH_PLACEHOLDER_TEXT:"Pretraži...",SEARCH_SEARCHING:"Pretraživanje...",SEARCH_NO_RESULTS:"Nema rezultata",SEARCH_NO_MORE_RESULTS:"Nema više rezultata",SEARCH_RESULTS_CONVERSATIONS:"Razgovori",SEARCH_RESULTS_MESSAGES:"Poruke",SEARCH_RESULTS_SHOW_MORE:"Prikaži više",CHAT_NOT_FOUND:"Ćaskanje nije pronađeno",DELETE_MESSAGE:"Obriši poruku",DELETION_EXPLANATION:"Ako izbrišete ovu poruku, ona će nestati za sve.",EDIT_MESSAGE:"Uredi poruku",SAVE:"Sačuvati",EDITED_INDICATOR:"uređeno",REPLY_TO_MESSAGE:"Odgovorite",ADD_REACTION:"Dodajte reakciju",AUTH_EXPIRED_OVERLAY_TITLE:"Vaša chat sesija je istekla",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Osvježite stranicu da nastavite",VOICE_MESSAGE:"Glasovna poruka",CONTACT_INFORMATION_HIDDEN:"Skrivene informacije",LEAVE_CONVERSATION:"Napusti razgovor",MARK_CONVERSATION_AS_UNREAD:"Označi kao nepročitano",STATUS_INDICATOR_ONLINE:"Aktivan",STATUS_INDICATOR_OFFLINE:"Odsutan",ARIA_LEAVE_SEARCH_MODE:"Napusti način pretrage",ARIA_SEARCH_UP:"Traži gore",ARIA_SEARCH_DOWN:"Traži dolje",ARIA_CLOSE_CHAT_POPUP:"Zatvori prozor chata",ARIA_SEARCH_INSIDE_CONVERSATION:"Traži u ovom razgovoru",ARIA_SEARCH:"Traži",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"postavi brzinu reprodukcije",ARIA_CANCEL_UPLOAD:"Otkaži učitavanje",ARIA_STOP_RECORDING:"Zaustavi snimanje",ARIA_CANCEL_RECORDING:"Otkaži snimanje",ARIA_INSERT_EMOJI:"Umetni emoji",ARIA_PLAY_AUDIO:"reproduciraj audio",ARIA_PAUSE_AUDIO:"pauziraj audio",ARIA_REACTION_COUNT:(t,e)=>`${t} reakcija s ${e}`,ARIA_MORE_ACTIONS:"Više radnji",ARIA_REPLYING_TO:(t,e)=>`Odgovaranje korisniku ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Izađi iz moda odgovaranja",SELECT_CONVERSATION:"Odaberite razgovor"}},ca:{code:"ca-ES",name:"Catalan (ES)",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Ahir",TODAY:"Avui",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"ara mateix",LOCATION:"Ubicació",CANCEL:"Cancel·lar",INBOX:"Safata d'entrada",DESKTOP_NOTIFICATIONS:"Notificacions d'escriptori",DESKTOP_NOTIFICATIONS_ERROR:"No es poden habilitar les notificacions del navegador perquè el teu navegador les bloqueja activament. Prova de buscar a la configuració o utilitza un altre navegador.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`Notificació de demostració de ${t}`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Si mantens la pestanya del navegador oberta, veuràs aquesta notificació quan algú et parli.",SEND_BUTTON_TEXT:"Enviar",ENTRYBOX_TEXT_LIMIT:"Només es permeten 10.000 caràcters.",ENTRYBOX_PLACEHOLDER:"Digues alguna cosa...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Aquesta conversa ja no està activa.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Pots llegir, però no enviar missatges.",MESSAGELIST_LOADING_OLDER:"Carregant missatges antics...",MESSAGELIST_SHOW_OLDER:"Mostrar missatges més antics",MESSAGELIST_NEW_MARKER:"Nou",MESSAGE_SENT_VIA_EMAIL:"Aquest missatge s'ha enviat per correu electrònic",YOU_MARKER:"tu",UPLOAD_IN_PROGRESS:"S'està pujant...",UPLOAD_SEND_FILE:"Enviar arxiu",UPLOAD_SHARE_LOCATION:"Compartir ubicació",UPLOAD_ERROR:"Desafortunadament, alguna cosa ha anat malament en pujar. L'arxiu pot ser no compatible o massa gran.",SHARE_LOCATION_ERROR:"No es pot compartir la ubicació: ",LOADING:"Carregant...",HUB_EMPTY:"El teu historial de xat apareixerà aquí",HUB_SHOW_EARLIER:"Mostra xats anteriors",INBOX_NO_CHATS_TITLE:"Encara no hi ha xats!",INBOX_NO_CHATS_BODY:"Un cop hagis tingut una o més converses, apareixeran aquí.",ENABLE_TRANSLATION:"Traduir aquesta conversa al català",DISABLE_TRANSLATION:"Mostrar original",SEARCH_PLACEHOLDER_TEXT:"Cerca...",SEARCH_SEARCHING:"Buscant...",SEARCH_NO_RESULTS:"No s'han trobat resultats",SEARCH_NO_MORE_RESULTS:"No hi ha més resultats",SEARCH_RESULTS_CONVERSATIONS:"Converses",SEARCH_RESULTS_MESSAGES:"Missatges",SEARCH_RESULTS_SHOW_MORE:"Mostrar més",CHAT_NOT_FOUND:"Xat no trobat",DELETE_MESSAGE:"Esborrar missatge",DELETION_EXPLANATION:"Si esborres aquest missatge, desapareixerà per a tothom.",EDIT_MESSAGE:"Editar missatge",SAVE:"Desar",EDITED_INDICATOR:"editat",REPLY_TO_MESSAGE:"Respondre",ADD_REACTION:"Afegir reacció",VOICE_MESSAGE:"Missatge de veu",LEAVE_CONVERSATION:"Abandonar la conversa",MARK_CONVERSATION_AS_UNREAD:"marcar com no llegit",STATUS_INDICATOR_ONLINE:"Actiu",STATUS_INDICATOR_OFFLINE:"Absent",CONTACT_INFORMATION_HIDDEN:"informació oculta",AUTH_EXPIRED_OVERLAY_TITLE:"La teva sessió de xat ha caducat",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Actualitza la pàgina per continuar",ARIA_LEAVE_SEARCH_MODE:"Sortir del mode de cerca",ARIA_SEARCH_UP:"Cercar cap amunt",ARIA_SEARCH_DOWN:"Cercar cap avall",ARIA_CLOSE_CHAT_POPUP:"Tancar la finestra de xat",ARIA_SEARCH_INSIDE_CONVERSATION:"Cercar en aquesta conversa",ARIA_SEARCH:"Cercar",ARIA_CHAT:"Xat",ARIA_SET_PLAYBACK_SPEED:"establir velocitat de reproducció",ARIA_CANCEL_UPLOAD:"Cancel·lar la càrrega",ARIA_STOP_RECORDING:"Aturar l'enregistrament",ARIA_CANCEL_RECORDING:"Cancel·lar l'enregistrament",ARIA_INSERT_EMOJI:"Inserir un emoji",ARIA_PLAY_AUDIO:"reproduir àudio",ARIA_PAUSE_AUDIO:"pausar àudio",ARIA_REACTION_COUNT:(t,e)=>`${t} reaccions amb ${e}`,ARIA_MORE_ACTIONS:"Més accions",ARIA_REPLYING_TO:(t,e)=>`Responent a ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Sortir del mode de resposta",SELECT_CONVERSATION:"Selecciona una conversa"}},cs:{code:"cs-CZ",name:"Czech",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Včera",TODAY:"Dnes",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"právě teď",LOCATION:"Lokace",CANCEL:"Zrušit",INBOX:"Doručené",DESKTOP_NOTIFICATIONS:"Oznámení v prohlížeči",DESKTOP_NOTIFICATIONS_ERROR:"Nelze povolit notifikace prohlížeče, protože váš prohlížeč je aktivně blokuje. Zkuste se podívat na nastavení nebo zkuste použít jiný prohlížeč.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} demo notifikace`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Pokud necháte kartu prohlížeče otevřenou, uvidíte tento popup jakmile s vámi bude někdo mluvit.",SEND_BUTTON_TEXT:"Odeslat",ENTRYBOX_TEXT_LIMIT:"Je povoleno Maximálně 10.000 znaků.",ENTRYBOX_PLACEHOLDER:"Napište něco...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Tato konverzace již není aktivní.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Můžete číst, ale nemůžete posílat zprávy.",MESSAGELIST_LOADING_OLDER:"Nahrávám starší zprávy...",MESSAGELIST_SHOW_OLDER:"Zobrazit starší zprávy",MESSAGELIST_NEW_MARKER:"Nové",MESSAGE_SENT_VIA_EMAIL:"Tato zpráva byla odeslána přes mail.",YOU_MARKER:"vy",UPLOAD_IN_PROGRESS:"Nahrávám...",UPLOAD_SEND_FILE:"Poslat soubor",UPLOAD_SHARE_LOCATION:"Sdílet pozici",UPLOAD_ERROR:"Nepodařilo se nahrát soubor. Ten je buď nepodporován a/nebo příliš velký.",SHARE_LOCATION_ERROR:"Není možné sdílet pozici: ",LOADING:"Nahrávám...",HUB_EMPTY:"Vaše historie se zde zobrazí",HUB_SHOW_EARLIER:"Zobrazit dřívější konverzace",INBOX_NO_CHATS_TITLE:"Zatím zde nejsou žádné konverzace!",INBOX_NO_CHATS_BODY:"Jakmile budete mít jednu nebo více konverzací, objeví se zde.",ENABLE_TRANSLATION:"Přeložit tuto konverzaci do češtiny",DISABLE_TRANSLATION:"Zobrazit původní",SEARCH_PLACEHOLDER_TEXT:"Hledat...",SEARCH_SEARCHING:"Hledání...",SEARCH_NO_RESULTS:"Nenašly se žádné výsledky",SEARCH_NO_MORE_RESULTS:"Žádné další výsledky",SEARCH_RESULTS_CONVERSATIONS:"Konverzace",SEARCH_RESULTS_MESSAGES:"Zprávy",SEARCH_RESULTS_SHOW_MORE:"Zobrazit více",CHAT_NOT_FOUND:"Chat nenalezen",DELETE_MESSAGE:"Smazat zprávu",DELETION_EXPLANATION:"Pokud tuto zprávu smažete, zmizí pro všechny.",EDIT_MESSAGE:"Upravit zprávu",SAVE:"Uložit",EDITED_INDICATOR:"upraveno",REPLY_TO_MESSAGE:"Odpovědět",ADD_REACTION:"Reagovat",AUTH_EXPIRED_OVERLAY_TITLE:"Váš chat byl kvůli nečinnosti odpojen",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Pro pokračování obnovte stránku",VOICE_MESSAGE:"Hlasová zpráva",CONTACT_INFORMATION_HIDDEN:"Skrytá informace",LEAVE_CONVERSATION:"Opustit konverzaci",MARK_CONVERSATION_AS_UNREAD:"Označit jako nepřečtené",STATUS_INDICATOR_ONLINE:"Aktivní",STATUS_INDICATOR_OFFLINE:"Nedostupný",ARIA_LEAVE_SEARCH_MODE:"Opustit režim vyhledávání",ARIA_SEARCH_UP:"Hledat nahoru",ARIA_SEARCH_DOWN:"Hledat dolů",ARIA_CLOSE_CHAT_POPUP:"Zavřít okno chatu",ARIA_SEARCH_INSIDE_CONVERSATION:"Hledat v této konverzaci",ARIA_SEARCH:"Hledat",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"nastavit rychlost přehrávání",ARIA_CANCEL_UPLOAD:"Zrušit nahrávání",ARIA_STOP_RECORDING:"Zastavit nahrávání",ARIA_CANCEL_RECORDING:"Zrušit nahrávání",ARIA_INSERT_EMOJI:"Vložit emoji",ARIA_PLAY_AUDIO:"přehrát audio",ARIA_PAUSE_AUDIO:"pozastavit audio",ARIA_REACTION_COUNT:(t,e)=>`${t} reakcí s ${e}`,ARIA_MORE_ACTIONS:"Další akce",ARIA_REPLYING_TO:(t,e)=>`Odpověď na ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Opustit režim odpovědi",SELECT_CONVERSATION:"Vyberte konverzaci"}},da:{code:"da-DK",name:"Danish",emojiPickerTranslationUrl:null,emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/da/emojibase/data.json",translation:{YESTERDAY:"I går",TODAY:"I dag",DAYS:"d",HOURS:"t",MINUTES:"m",JUST_NOW:"lige nu",LOCATION:"Placering",CANCEL:"Annuller",INBOX:"Indbakke",DESKTOP_NOTIFICATIONS:"Browsermeddelelser",DESKTOP_NOTIFICATIONS_ERROR:"Kan ikke aktivere Browsermeddelelser, fordi din browser aktivt blokerer dem. Prøv at kigge i indstillingerne eller benyt en anden browser.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} demomeddelelse`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Hvis du holder dit browser-faneblad åben, vil du se det her komme op, når nogen taler til dig.",SEND_BUTTON_TEXT:"Send",ENTRYBOX_TEXT_LIMIT:"Kun 10.000 tegn er tilladt.",ENTRYBOX_PLACEHOLDER:"Sig noget...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Denne samtale er ikke længere aktiv.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Du kan læse, men ikke sende beskeder.",MESSAGELIST_LOADING_OLDER:"Indlæser ældre beskeder...",MESSAGELIST_SHOW_OLDER:"Vis ældre beskeder",MESSAGELIST_NEW_MARKER:"Ny",MESSAGE_SENT_VIA_EMAIL:"Denne besked blev sendt via e-mail",YOU_MARKER:"dig",UPLOAD_IN_PROGRESS:"Overfører...",UPLOAD_SEND_FILE:"Send fil",UPLOAD_SHARE_LOCATION:"Del placering",UPLOAD_ERROR:"Der er sket noget forkert ved upload. Filen kan ikke understøttes eller filen er for stor.",SHARE_LOCATION_ERROR:"Kan ikke dele placering: ",LOADING:"Indlæser...",HUB_EMPTY:"Dine samtaler vises her",HUB_SHOW_EARLIER:"Vis tidligere chats",INBOX_NO_CHATS_TITLE:"Ingen chats endnu!",INBOX_NO_CHATS_BODY:"Når du har haft en eller flere samtaler, vises de her.",ENABLE_TRANSLATION:"Oversæt denne konversation til dansk",DISABLE_TRANSLATION:"Vis den oprindelige",SEARCH_PLACEHOLDER_TEXT:"Søg...",SEARCH_SEARCHING:"Søger...",SEARCH_NO_RESULTS:"Ingen resultater fundet",SEARCH_NO_MORE_RESULTS:"Ikke flere resultater",SEARCH_RESULTS_CONVERSATIONS:"Samtaler",SEARCH_RESULTS_MESSAGES:"Beskeder",SEARCH_RESULTS_SHOW_MORE:"Vis mere",CHAT_NOT_FOUND:"Chat ikke fundet",DELETE_MESSAGE:"Slet besked",DELETION_EXPLANATION:"Hvis du sletter denne besked, vil ingen kunne se den.",EDIT_MESSAGE:"Rediger besked",SAVE:"Gem",EDITED_INDICATOR:"redigeret",REPLY_TO_MESSAGE:"Svar",ADD_REACTION:"Tilføj reaktion",AUTH_EXPIRED_OVERLAY_TITLE:"Din chatsession er udløbet",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Opdater siden for at fortsætte",VOICE_MESSAGE:"Talebesked",CONTACT_INFORMATION_HIDDEN:"Skjulte oplysninger",LEAVE_CONVERSATION:"Forlad samtale",MARK_CONVERSATION_AS_UNREAD:"Marker som ulæst",STATUS_INDICATOR_ONLINE:"Online",STATUS_INDICATOR_OFFLINE:"Offline",ARIA_LEAVE_SEARCH_MODE:"Forlad søgemodus",ARIA_SEARCH_UP:"Søg opad",ARIA_SEARCH_DOWN:"Søg nedad",ARIA_CLOSE_CHAT_POPUP:"Luk chatvindue",ARIA_SEARCH_INSIDE_CONVERSATION:"Søg i denne samtale",ARIA_SEARCH:"Søg",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"Indstil afspilningshastighed",ARIA_CANCEL_UPLOAD:"Annuller upload",ARIA_STOP_RECORDING:"Stop optagelse",ARIA_CANCEL_RECORDING:"Annuller optagelse",ARIA_INSERT_EMOJI:"Indsæt en emoji",ARIA_PLAY_AUDIO:"Afspil lyd",ARIA_PAUSE_AUDIO:"Pauser lyd",ARIA_REACTION_COUNT:(t,e)=>`${t} Reaktioner med ${e}`,ARIA_MORE_ACTIONS:"Flere handlinger",ARIA_REPLYING_TO:(t,e)=>`Svarer til ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Forlad svarstilstand",SELECT_CONVERSATION:"Vælg en samtale"}},de:{code:"de-DE",name:"German",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/de.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/de/cldr/data.json",translation:{YESTERDAY:"Gestern",TODAY:"Heute",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"gerade jetzt",LOCATION:"Standort",CANCEL:"Abbrechen",INBOX:"Inbox",DESKTOP_NOTIFICATIONS:"Browser-Benachrichtigungen",DESKTOP_NOTIFICATIONS_ERROR:"Browser-Benachrichtigungen können nicht aktiviert werden, da Ihr Browser sie aktiv blockiert. Versuchen Sie, in den Einstellungen nachzuschlagen oder einen anderen Browser zu verwenden.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} Demo-Benachrichtigung`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Wenn Sie Ihre Browser-Registerkarte geöffnet lassen, wird dies angezeigt, wenn jemand mit Ihnen spricht.",SEND_BUTTON_TEXT:"Senden",ENTRYBOX_TEXT_LIMIT:"Nur 10.000 Zeichen sind erlaubt.",ENTRYBOX_PLACEHOLDER:"Sag etwas...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Diese Konversation ist nicht mehr aktiv.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Sie können Nachrichten lesen, aber nicht senden.",MESSAGELIST_LOADING_OLDER:"Ältere Nachrichten werden geladen...",MESSAGELIST_SHOW_OLDER:"Zeige ältere Nachrichten",MESSAGELIST_NEW_MARKER:"Neu",MESSAGE_SENT_VIA_EMAIL:"Diese Nachricht wurde per E-Mail gesendet",YOU_MARKER:"du",UPLOAD_IN_PROGRESS:"Hochladen...",UPLOAD_SEND_FILE:"Datei senden",UPLOAD_SHARE_LOCATION:"Standort teilen",UPLOAD_ERROR:"Beim Hochladen ist ein Fehler aufgetreten. Die Datei ist möglicherweise nicht unterstützt oder zu groß.",SHARE_LOCATION_ERROR:"Standort kann nicht freigegeben werden: ",LOADING:"Laden...",HUB_EMPTY:"Ihr Chat-Verlauf wird hier angezeigt",HUB_SHOW_EARLIER:"Zeige frühere Chats",INBOX_NO_CHATS_TITLE:"Noch keine Chats!",INBOX_NO_CHATS_BODY:"Sobald Sie eine oder mehrere Unterhaltungen geführt haben, werden sie hier angezeigt.",ENABLE_TRANSLATION:"Dieses Gespräch auf Deutsch übersetzen",DISABLE_TRANSLATION:"Originaltext anzeigen",SEARCH_PLACEHOLDER_TEXT:"Suche...",SEARCH_SEARCHING:"Suchen...",SEARCH_NO_RESULTS:"Keine Suchergebnisse gefunden",SEARCH_NO_MORE_RESULTS:"Keine weiteren Suchergebnisse",SEARCH_RESULTS_CONVERSATIONS:"Unterhaltungen",SEARCH_RESULTS_MESSAGES:"Nachrichten",SEARCH_RESULTS_SHOW_MORE:"Mehr anzeigen",CHAT_NOT_FOUND:"Chat nicht gefunden",DELETE_MESSAGE:"Nachricht löschen",DELETION_EXPLANATION:"Wenn Sie diese Nachricht löschen, wird sie für alle verschwinden.",EDIT_MESSAGE:"Nachricht bearbeiten",SAVE:"Speichern",EDITED_INDICATOR:"bearbeitet",REPLY_TO_MESSAGE:"Antworten",ADD_REACTION:"Reaktion hinzufügen",AUTH_EXPIRED_OVERLAY_TITLE:"Ihre Chatsitzung ist abgelaufen",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Laden Sie zum Fortfahren die Seite neu",VOICE_MESSAGE:"Sprachnachricht",CONTACT_INFORMATION_HIDDEN:"Geschützte Angaben",LEAVE_CONVERSATION:"Unterhaltung verlassen",MARK_CONVERSATION_AS_UNREAD:"als ungelesen markieren",STATUS_INDICATOR_ONLINE:"Aktiv",STATUS_INDICATOR_OFFLINE:"Abwesend",ARIA_LEAVE_SEARCH_MODE:"Suchmodus verlassen",ARIA_SEARCH_UP:"Nach oben suchen",ARIA_SEARCH_DOWN:"Nach unten suchen",ARIA_CLOSE_CHAT_POPUP:"Chat-Popup schließen",ARIA_SEARCH_INSIDE_CONVERSATION:"In dieser Unterhaltung suchen",ARIA_SEARCH:"Suchen",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"Wiedergabegeschwindigkeit einstellen",ARIA_CANCEL_UPLOAD:"Upload abbrechen",ARIA_STOP_RECORDING:"Aufnahme stoppen",ARIA_CANCEL_RECORDING:"Aufnahme abbrechen",ARIA_INSERT_EMOJI:"Emoji einfügen",ARIA_PLAY_AUDIO:"Audio abspielen",ARIA_PAUSE_AUDIO:"Audio pausieren",ARIA_REACTION_COUNT:(t,e)=>`${t} Reaktionen mit ${e}`,ARIA_MORE_ACTIONS:"Weitere Aktionen",ARIA_REPLYING_TO:(t,e)=>`Antworten an ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Antwortmodus verlassen",SELECT_CONVERSATION:"Unterhaltung auswählen"}},el:{code:"el-GR",name:"Greek (Greece)",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Χθές",TODAY:"Σήμερα",DAYS:"Ημέρες",HOURS:"'Ωρες",MINUTES:"Λεπτά",JUST_NOW:"Μόλις τώρα",LOCATION:"Τοποθεσία",CANCEL:"Ακύρωση",INBOX:"Εισερχόμενα",DESKTOP_NOTIFICATIONS:"Ειδοποιήσεις περιηγητή",DESKTOP_NOTIFICATIONS_ERROR:"Δεν είναι δυνατή η ενεργοποίηση των ειδοποιήσεων του προγράμματος περιήγησης, επειδή το πρόγραμμα περιήγησης τις αποκλείει ενεργά. Δοκιμάστε να τσεκάρετε τις ρυθμίσεις ή να χρησιμοποιήσετε διαφορετικό πρόγραμμα περιήγησης.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} Δοκιμαστική επίδειξη`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Αν διατηρήσετε ανοιχτή τη σελίδα του προγράμματος περιήγησης, θα δείτε αυτό το pop up (παράθυρο) όταν κάποιος σας μιλάει.",SEND_BUTTON_TEXT:"Αποστολή",ENTRYBOX_TEXT_LIMIT:"Επιτρέπονται μόνο 10.000 χαρακτήρες.",ENTRYBOX_PLACEHOLDER:"Πείτε κάτι...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Αυτή η συζήτηση δεν είναι πλέον ενεργή.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Μπορείτε να διαβάσετε αλλά δεν μπορείτε να στείλετε μηνύματα.",MESSAGELIST_LOADING_OLDER:"Φόρτωση παλαιοτέρων μηνυμάτων...",MESSAGELIST_SHOW_OLDER:"Εμφάνιση παλαιότερων μηνυμάτων",MESSAGELIST_NEW_MARKER:"Νέο",MESSAGE_SENT_VIA_EMAIL:"Αυτό το μήνυμα εστάλη μέσω ηλεκτρονικού ταχυδρομείου",YOU_MARKER:"Εσείς",UPLOAD_IN_PROGRESS:"Ανέβασμα...",UPLOAD_SEND_FILE:"Αποστολή αρχείου",UPLOAD_SHARE_LOCATION:"Κοινή χρήση τοποθεσίας",UPLOAD_ERROR:"Κάτι πήγε στραβά κατά τη φόρτωση. Το αρχείο ενδέχεται να μην υποστηρίζεται ή να είναι υπερβολικά μεγάλο.",SHARE_LOCATION_ERROR:"Δεν είναι δυνατή η χρήση κοινής τοποθεσίας: ",LOADING:"Φόρτωση...",HUB_EMPTY:"Το ιστορικό των συνομιλιών σας θα εμφανιστεί εδώ",HUB_SHOW_EARLIER:"Εμφάνιση προηγούμενων συνομιλιών",INBOX_NO_CHATS_TITLE:"Δεν υπάρχουν ακόμα συζητήσεις!",INBOX_NO_CHATS_BODY:"Μόλις έχετε μία ή περισσότερες συνομιλίες, θα εμφανιστούν εδώ.",ENABLE_TRANSLATION:"Μετάφραση αυτής της συνομιλίας στα ελληνικά",DISABLE_TRANSLATION:"Προβολή πρωτοτύπου",SEARCH_PLACEHOLDER_TEXT:"Αναζήτηση...",SEARCH_SEARCHING:"Αναζήτηση...",SEARCH_NO_RESULTS:"Δεν βρέθηκαν αποτελέσματα",SEARCH_NO_MORE_RESULTS:"Δεν υπάρχουν περισσότερα αποτελέσματα",SEARCH_RESULTS_CONVERSATIONS:"Συνομιλίες",SEARCH_RESULTS_MESSAGES:"Μηνύματα",SEARCH_RESULTS_SHOW_MORE:"Εμφάνιση περισσότερων",CHAT_NOT_FOUND:"Η συνομιλία δεν βρέθηκε",DELETE_MESSAGE:"Διαγραφή μηνύματος",DELETION_EXPLANATION:"Εάν διαγράψετε αυτό το μήνυμα, θα εξαφανιστεί για όλους.",EDIT_MESSAGE:"Επεξεργασία μηνύματος",SAVE:"Αποθήκευση",EDITED_INDICATOR:"επεξεργασμένο",REPLY_TO_MESSAGE:"Απάντηση",ADD_REACTION:"Προσθήκη αντίδρασης",AUTH_EXPIRED_OVERLAY_TITLE:"Η συνεδρία της συνομιλίας σας έχει λήξει",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Ανανεώστε τη σελίδα για να συνεχίσετε",VOICE_MESSAGE:"Ηχητικό μήνυμα",CONTACT_INFORMATION_HIDDEN:"Κρυμμένες πληροφορίες",LEAVE_CONVERSATION:"Αποσυρθείτε από τη συζήτηση",MARK_CONVERSATION_AS_UNREAD:"Επισήμανση ως μη αναγνωσμένα",STATUS_INDICATOR_ONLINE:"Ενεργός",STATUS_INDICATOR_OFFLINE:"Ανενεργός",ARIA_LEAVE_SEARCH_MODE:"Αποχώρηση από τη λειτουργία αναζήτησης",ARIA_SEARCH_UP:"Αναζήτηση προς τα πάνω",ARIA_SEARCH_DOWN:"Αναζήτηση προς τα κάτω",ARIA_CLOSE_CHAT_POPUP:"Κλείσιμο παραθύρου συνομιλίας",ARIA_SEARCH_INSIDE_CONVERSATION:"Αναζήτηση σε αυτή τη συνομιλία",ARIA_SEARCH:"Αναζήτηση",ARIA_CHAT:"Συνομιλία",ARIA_SET_PLAYBACK_SPEED:"ορισμός ταχύτητας αναπαραγωγής",ARIA_CANCEL_UPLOAD:"Ακύρωση φόρτωσης",ARIA_STOP_RECORDING:"Διακοπή εγγραφής",ARIA_CANCEL_RECORDING:"Ακύρωση εγγραφής",ARIA_INSERT_EMOJI:"Εισαγωγή emoji",ARIA_PLAY_AUDIO:"αναπαραγωγή ήχου",ARIA_PAUSE_AUDIO:"παύση ήχου",ARIA_REACTION_COUNT:(t,e)=>`${t} αντιδράσεις με ${e}`,ARIA_MORE_ACTIONS:"Περισσότερες ενέργειες",ARIA_REPLYING_TO:(t,e)=>`Απάντηση στον ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Έξοδος από τη λειτουργία απάντησης",SELECT_CONVERSATION:"Επιλέξτε μια συζήτηση"}},en:XA,es:{code:"es-ES",name:"Spanish",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/es.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/es/cldr/data.json",translation:{YESTERDAY:"Ayer",TODAY:"Hoy",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"justo ahora",LOCATION:"Ubicación",CANCEL:"Cancelar",INBOX:"Inbox",DESKTOP_NOTIFICATIONS:"Notificaciones del navigator",DESKTOP_NOTIFICATIONS_ERROR:"No se logró habilitar las notificaciones del navigador, comprueba que tu navegador no las esté bloqueando o intenta con otro navegador.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} notificación de prueba`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Si dejas esta pestaña abierta, verás este pop up cuando alguien te hable.",SEND_BUTTON_TEXT:"Enviar",ENTRYBOX_TEXT_LIMIT:"Sólo 10.000 caracteres permitidos.",ENTRYBOX_PLACEHOLDER:"Escribe algo...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Esta conversación ya no está activa.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Puedes leer pero no enviar mensajes.",MESSAGELIST_LOADING_OLDER:"Cargando mensajes pasados...",MESSAGELIST_SHOW_OLDER:"Ver mensajes pasados",MESSAGELIST_NEW_MARKER:"Nuevo",MESSAGE_SENT_VIA_EMAIL:"Este mensaje ha sido enviado vía email",YOU_MARKER:"tú",UPLOAD_IN_PROGRESS:"Subir...",UPLOAD_SEND_FILE:"Enviar archivo",UPLOAD_SHARE_LOCATION:"Compartir ubicación",UPLOAD_ERROR:"Ocurrió un problema subiendo el archivo. Puede que el archivo esté en un formato no soportado o que sea demasiado grande.",SHARE_LOCATION_ERROR:"No se logró compartir la ubicación: ",LOADING:"Cargando...",HUB_EMPTY:"Tu historial de conversaciones se mostrará aquí",HUB_SHOW_EARLIER:"Ver conversaciones pasadas",INBOX_NO_CHATS_TITLE:"¡Aún sin conversaciones!",INBOX_NO_CHATS_BODY:"Una vez que tengas una o más conversaciones, se mostrarán aquí.",ENABLE_TRANSLATION:"Traducir esta conversación al español",DISABLE_TRANSLATION:"Mostrar la conversación original",SEARCH_PLACEHOLDER_TEXT:"Buscar...",SEARCH_SEARCHING:"Buscando...",SEARCH_NO_RESULTS:"No se encontraron resultados",SEARCH_NO_MORE_RESULTS:"No hay más resultados",SEARCH_RESULTS_CONVERSATIONS:"Conversaciones",SEARCH_RESULTS_MESSAGES:"Mensajes",SEARCH_RESULTS_SHOW_MORE:"Mostrar más",CHAT_NOT_FOUND:"Chat no encontrado",DELETE_MESSAGE:"Eliminar mensaje",DELETION_EXPLANATION:"Este mensaje desaparecerá para todos si lo borras.",EDIT_MESSAGE:"Editar mensaje",SAVE:"Guardar",EDITED_INDICATOR:"editado",REPLY_TO_MESSAGE:"Responder",ADD_REACTION:"Añadir reacción",AUTH_EXPIRED_OVERLAY_TITLE:"Su sesión de chat ha expirado",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Actualice la página para continuar",VOICE_MESSAGE:"Mensaje de voz",CONTACT_INFORMATION_HIDDEN:"Información oculta",LEAVE_CONVERSATION:"Abandonar conversación",MARK_CONVERSATION_AS_UNREAD:"Marcar como no leída",STATUS_INDICATOR_ONLINE:"Activo",STATUS_INDICATOR_OFFLINE:"Ausente",ARIA_LEAVE_SEARCH_MODE:"Salir del modo búsqueda",ARIA_SEARCH_UP:"Buscar hacia arriba",ARIA_SEARCH_DOWN:"Buscar hacia abajo",ARIA_CLOSE_CHAT_POPUP:"Cerrar la ventana de chat",ARIA_SEARCH_INSIDE_CONVERSATION:"Buscar en esta conversación",ARIA_SEARCH:"Buscar",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"establecer velocidad de reproducción",ARIA_CANCEL_UPLOAD:"Cancelar envío",ARIA_STOP_RECORDING:"Detener grabación",ARIA_CANCEL_RECORDING:"Cancelar grabación",ARIA_INSERT_EMOJI:"Insertar un emoji",ARIA_PLAY_AUDIO:"reproducir audio",ARIA_PAUSE_AUDIO:"pausar audio",ARIA_REACTION_COUNT:(t,e)=>`${t} reacciones con ${e}`,ARIA_MORE_ACTIONS:"Más acciones",ARIA_REPLYING_TO:(t,e)=>`Respondiendo a ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Salir del modo respuesta",SELECT_CONVERSATION:"Selecciona una conversación"}},et:{code:"et-EE",name:"Estonian",emojiPickerTranslationUrl:null,emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/et/cldr/data.json",translation:{YESTERDAY:"Eile",TODAY:"Täna",DAYS:"p",HOURS:"t",MINUTES:"m",JUST_NOW:"Just nüüd",LOCATION:"Asukoht",CANCEL:"Katkesta",INBOX:"Postkast",DESKTOP_NOTIFICATIONS:"Veebibrauseri teated",DESKTOP_NOTIFICATIONS_ERROR:"Töölaua teatisi ei saa lubada, kuna Teie brauser blokeerib need aktiivselt. Proovige muuta seadeid või kasutada mõnda muud brauserit.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} demo teavitus`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Kui hoiate oma brauseri vahekaardi lahti ja näete seda hüpikakent, siis keegi soovib Teiega rääkida.",SEND_BUTTON_TEXT:"Saada",ENTRYBOX_TEXT_LIMIT:"Ainult kuni 10.000 tähemärki on lubatud.",ENTRYBOX_PLACEHOLDER:"Kirjuta midagi...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"See vestlus ei ole enam aktiivne.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Sa saad lugeda teateid, aga mitte kirjutada.",MESSAGELIST_LOADING_OLDER:"Laen vanemaid teateid...",MESSAGELIST_SHOW_OLDER:"Näita vanemaid teateid",MESSAGELIST_NEW_MARKER:"Uus",MESSAGE_SENT_VIA_EMAIL:"See teade on saadetud e-postiga",YOU_MARKER:"Sina",UPLOAD_IN_PROGRESS:"Laen...",UPLOAD_SEND_FILE:"Saada fail",UPLOAD_SHARE_LOCATION:"Jaga faili asukohta",UPLOAD_ERROR:"Nüüd läks midagi nihu, seoses faili ülesse laadimisega. Tundmatu fail või liiga suur.",SHARE_LOCATION_ERROR:"Ei suuda jagada faili asukohta: ",LOADING:"Laen...",HUB_EMPTY:"Siin on Sinu vestluste ajalugu",HUB_SHOW_EARLIER:"Näita vanemaid vestlusi",INBOX_NO_CHATS_TITLE:"Pole ühtegi vestlust!",INBOX_NO_CHATS_BODY:"Kui Sul tekib üks või rohkem vestlust, siis on need kuvatakse siin.",ENABLE_TRANSLATION:"Tõlgi see vestlus eesti keelde",DISABLE_TRANSLATION:"Näita algteksti",SEARCH_PLACEHOLDER_TEXT:"Otsi...",SEARCH_SEARCHING:"Otsin...",SEARCH_NO_RESULTS:"Otsingu tulemused puuduvad",SEARCH_NO_MORE_RESULTS:"Rohkem tulemusi ei ole ",SEARCH_RESULTS_CONVERSATIONS:"Vestlused",SEARCH_RESULTS_MESSAGES:"Sõnumid",SEARCH_RESULTS_SHOW_MORE:"Näita rohkem",CHAT_NOT_FOUND:"Vestlust ei leitud",DELETE_MESSAGE:"Kustuta sõnum",DELETION_EXPLANATION:"Kui kustutate selle sõnumi, kaob see kõigi jaoks.",EDIT_MESSAGE:"Redigeeri sõnumit",SAVE:"Salvesta",EDITED_INDICATOR:"muudetud",REPLY_TO_MESSAGE:"Vasta",ADD_REACTION:"Lisa reaktsioon",AUTH_EXPIRED_OVERLAY_TITLE:"Teie vestlussessioon on lõppenud",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Jätkamiseks värskendage lehte",VOICE_MESSAGE:"Häälsõnum",CONTACT_INFORMATION_HIDDEN:"Varjatud informatsioon",LEAVE_CONVERSATION:"Lahku vestlusest",MARK_CONVERSATION_AS_UNREAD:"Märgi mitteloetuks",STATUS_INDICATOR_ONLINE:"Aktiivne",STATUS_INDICATOR_OFFLINE:"Eemal",ARIA_LEAVE_SEARCH_MODE:"Välju otsingurežiimist",ARIA_SEARCH_UP:"Otsi üles",ARIA_SEARCH_DOWN:"Otsi alla",ARIA_CLOSE_CHAT_POPUP:"Sulge vestluse aken",ARIA_SEARCH_INSIDE_CONVERSATION:"Otsi sellest vestlusest",ARIA_SEARCH:"Otsi",ARIA_CHAT:"Vestlus",ARIA_SET_PLAYBACK_SPEED:"määra taasesituse kiirus",ARIA_CANCEL_UPLOAD:"Tühista üleslaadimine",ARIA_STOP_RECORDING:"Peata salvestamine",ARIA_CANCEL_RECORDING:"Tühista salvestamine",ARIA_INSERT_EMOJI:"Sisesta emoji",ARIA_PLAY_AUDIO:"esita heli",ARIA_PAUSE_AUDIO:"pausi heli",ARIA_REACTION_COUNT:(t,e)=>`${t} reaktsiooni (${e})`,ARIA_MORE_ACTIONS:"Rohkem toiminguid",ARIA_REPLYING_TO:(t,e)=>`Vastamine kasutajale ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Välju vastamisrežiimist",SELECT_CONVERSATION:"Vali vestlus"}},fa:{code:"fa",name:"Persian (Farsi)",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/fa.js",emojiDataUrl:null,translation:{YESTERDAY:"دیروز",TODAY:"امروز",DAYS:"روز",HOURS:"ساعت",MINUTES:"دقیقه",JUST_NOW:"هم اکنون",LOCATION:"مکان",CANCEL:"لغو",INBOX:"صندوق",DESKTOP_NOTIFICATIONS:"اطلاعیههای مرورگر",DESKTOP_NOTIFICATIONS_ERROR:"خطا در فعال سازی اعلان های مرورگر، مرورگر شما آنها را مسدود می کند سعی کنید تنظیمات مرورگر را تغییر دهید یا از یک مرورگر دیگر استفاده کنید.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`نوتیفیکیشن دمو ${t}`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"اگر صفحه ی مرورگر را باز نگهدارید این را موقعه ای که کسی با شما صحبت کند خواهید دید",SEND_BUTTON_TEXT:"بفرست",ENTRYBOX_TEXT_LIMIT:"فقط ۱۰،۰۰۰ حروف مجاز می باشد.",ENTRYBOX_PLACEHOLDER:"...چیزی بنویسید",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:".این مکالمه دیگر فعال نمی باشد",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"شما می توانید بخوانید اما نمی توانید پیام بفرستید",MESSAGELIST_LOADING_OLDER:"...در حال بارگذاری پیام های قدیمی تر",MESSAGELIST_SHOW_OLDER:"نشان دادن پیام های قدیمی",MESSAGELIST_NEW_MARKER:"جدید",MESSAGE_SENT_VIA_EMAIL:"پیام توسط ایمل ارسال شد",YOU_MARKER:"شما",UPLOAD_IN_PROGRESS:"...در حال بارگذاری",UPLOAD_SEND_FILE:"فرستادن پوشه",UPLOAD_SHARE_LOCATION:"اشتراک گذاری مکان",UPLOAD_ERROR:"متاسفانه بارگذاری با مشکل روبه رو شد. ممکن است فایل حجیم باشد یا ساپورت نشده باشد.",SHARE_LOCATION_ERROR:"خطا در اشتراک گذاری مکان: ",LOADING:"...بارگذاری",HUB_EMPTY:"تاریخچه گفتگو اینجا نمایان می شود",HUB_SHOW_EARLIER:"دیدن گفتگو های قبلی",INBOX_NO_CHATS_TITLE:"هنوز گفتگویی وجود ندارد",INBOX_NO_CHATS_BODY:"بعد از داشتن یک مکالمه یا بیشتر، آنها اینجا نمایان می شوند.",ENABLE_TRANSLATION:"این مکالمه را به فارسی ترجمه کن",DISABLE_TRANSLATION:"زبان اصلی را نشان بده",SEARCH_PLACEHOLDER_TEXT:"...جستجو",SEARCH_SEARCHING:"...در حال جستجو",SEARCH_NO_RESULTS:"نتیجه ای یافت نشد",SEARCH_NO_MORE_RESULTS:"نتیجه بیشتری وجود ندارد",SEARCH_RESULTS_CONVERSATIONS:"گفتگوها",SEARCH_RESULTS_MESSAGES:"پیامها",SEARCH_RESULTS_SHOW_MORE:"نمایش بیشتر",CHAT_NOT_FOUND:"مکالمه پیدا نشد",DELETE_MESSAGE:"حذف پیام ",DELETION_EXPLANATION:"اگر این پیام را حذف کنید، برای همه ناپدید می شود.",EDIT_MESSAGE:"ویرایش پیام",SAVE:"ذخیره",EDITED_INDICATOR:"ویرایششده",REPLY_TO_MESSAGE:"پاسخ دادن",ADD_REACTION:"واکنش را اضافه کنید",AUTH_EXPIRED_OVERLAY_TITLE:"جلسه چت شما منقضی شده است",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"برای ادامه صفحه را بازخوانی کنید",VOICE_MESSAGE:"پیام صوتی",CONTACT_INFORMATION_HIDDEN:"اطلاعات پنهان",LEAVE_CONVERSATION:"خروج از گفتگو",MARK_CONVERSATION_AS_UNREAD:"به عنوان خوانده نشده علامت گذاری کن",STATUS_INDICATOR_ONLINE:"فعال",STATUS_INDICATOR_OFFLINE:"غایب",ARIA_LEAVE_SEARCH_MODE:"خروج از حالت جستجو",ARIA_SEARCH_UP:"جستجوی بالا",ARIA_SEARCH_DOWN:"جستجوی پایین",ARIA_CLOSE_CHAT_POPUP:"بستن پنجره چت",ARIA_SEARCH_INSIDE_CONVERSATION:"جستجو در این گفتگو",ARIA_SEARCH:"جستجو",ARIA_CHAT:"چت",ARIA_SET_PLAYBACK_SPEED:"تنظیم سرعت پخش",ARIA_CANCEL_UPLOAD:"لغو آپلود",ARIA_STOP_RECORDING:"توقف ضبط",ARIA_CANCEL_RECORDING:"لغو ضبط",ARIA_INSERT_EMOJI:"درج ایموجی",ARIA_PLAY_AUDIO:"پخش صدا",ARIA_PAUSE_AUDIO:"مکث صدا",ARIA_REACTION_COUNT:(t,e)=>`${t} واکنش با ${e}`,ARIA_MORE_ACTIONS:"اقدامات بیشتر",ARIA_REPLYING_TO:(t,e)=>`در حال پاسخ به ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"خروج از حالت پاسخ",SELECT_CONVERSATION:"یک گفتگو را انتخاب کنید"}},fi:{code:"fi-FI",name:"Finnish",emojiPickerTranslationUrl:null,emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/fi/cldr/data.json",translation:{YESTERDAY:"Eilen",TODAY:"Tänään",DAYS:"p",HOURS:"t",MINUTES:"m",JUST_NOW:"juuri nyt",LOCATION:"Sijainti",CANCEL:"Peruuta",INBOX:"Saapuneet",DESKTOP_NOTIFICATIONS:"Selaimen ilmoitukset",DESKTOP_NOTIFICATIONS_ERROR:"Työpöydän ilmoituksia ei voitu kytkeä päälle, koska selaimesi estää ne aktiivisesti. Koeta tutkia sen asetuksia tai vaihda selainta.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} demo ilmoitus`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Jos pidät tämän sivun auki, näet vastaavan ilmoituksen kun joku puhuu sinulle.",SEND_BUTTON_TEXT:"Lähetä",ENTRYBOX_TEXT_LIMIT:"Maksimissaan 10000 merkkiä.",ENTRYBOX_PLACEHOLDER:"Sano jotain...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Tämä keskustelu ei ole enää aktiivinen.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Voit lukea, mutta et lähettää viestejä.",MESSAGELIST_LOADING_OLDER:"Ladataan vanhoja viestejä..",MESSAGELIST_SHOW_OLDER:"Näytä vanhat viestit",MESSAGELIST_NEW_MARKER:"Uusi",MESSAGE_SENT_VIA_EMAIL:"Tämä viesti on lähetetty sähköpostin välityksellä",YOU_MARKER:"sinä",UPLOAD_IN_PROGRESS:"Ladataan...",UPLOAD_SEND_FILE:"Lähetä tiedosto",UPLOAD_SHARE_LOCATION:"Jaa sijainti",UPLOAD_ERROR:"Valitettavasti jokin meni vikaan. Tiedostotyyppiä ei ehkä tueta tai se saattaa olla liian suuri.",SHARE_LOCATION_ERROR:"Sijaintia ei pystytty jakamaan: ",LOADING:"Ladataan...",HUB_EMPTY:"Keskusteluhistoriasi näkyy tässä",HUB_SHOW_EARLIER:"Näytä aiemmat keskustelut",INBOX_NO_CHATS_TITLE:"Ei keskusteluja, vielä!",INBOX_NO_CHATS_BODY:"Kun olet käynyt yhden tai useamman keskustelun, ne näkyvät täällä.",ENABLE_TRANSLATION:"Käännä keskustelu kielelle suomi",DISABLE_TRANSLATION:"Näytä alkuperäinen",SEARCH_PLACEHOLDER_TEXT:"Etsi...",SEARCH_SEARCHING:"Etsiminen...",SEARCH_NO_RESULTS:"Tuloksia ei löytynyt",SEARCH_NO_MORE_RESULTS:"Ei enempää tuloksia",SEARCH_RESULTS_CONVERSATIONS:"Keskustelut",SEARCH_RESULTS_MESSAGES:"Viestit",SEARCH_RESULTS_SHOW_MORE:"Näytä enemmän",CHAT_NOT_FOUND:"Keskustelua ei löytynyt",DELETE_MESSAGE:"Poista viesti",DELETION_EXPLANATION:"Jos poistat tämän viestin, se häviää kaikilta.",EDIT_MESSAGE:"Muokkaa viestiä",SAVE:"Tallenna",EDITED_INDICATOR:"muokattu",REPLY_TO_MESSAGE:"Vastaa",ADD_REACTION:"Lisää reaktio",AUTH_EXPIRED_OVERLAY_TITLE:"Istuntosi on vanhentunut",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Päivitä sivu jatkaaksesi",VOICE_MESSAGE:"Ääniviesti",CONTACT_INFORMATION_HIDDEN:"Piilotetut tiedot",LEAVE_CONVERSATION:"Poistu keskustelusta",MARK_CONVERSATION_AS_UNREAD:"Merkitse lukemattomaksi",STATUS_INDICATOR_ONLINE:"Aktiivinen",STATUS_INDICATOR_OFFLINE:"Poissa",ARIA_LEAVE_SEARCH_MODE:"Poistu hakutilasta",ARIA_SEARCH_UP:"Hae ylöspäin",ARIA_SEARCH_DOWN:"Hae alaspäin",ARIA_CLOSE_CHAT_POPUP:"Sulje chat-ikkuna",ARIA_SEARCH_INSIDE_CONVERSATION:"Hae tästä keskustelusta",ARIA_SEARCH:"Hae",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"aseta toistonopeus",ARIA_CANCEL_UPLOAD:"Peruuta lähetys",ARIA_STOP_RECORDING:"Lopeta tallennus",ARIA_CANCEL_RECORDING:"Peruuta tallennus",ARIA_INSERT_EMOJI:"Lisää emoji",ARIA_PLAY_AUDIO:"toista ääni",ARIA_PAUSE_AUDIO:"keskeytä ääni",ARIA_REACTION_COUNT:(t,e)=>`${t} reaktiota (${e})`,ARIA_MORE_ACTIONS:"Lisää toimintoja",ARIA_REPLYING_TO:(t,e)=>`Vastataan käyttäjälle ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Poistu vastaustilasta",SELECT_CONVERSATION:"Valitse keskustelu"}},fr:{code:"fr-FR",name:"French",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/fr.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/fr/emojibase/data.json",translation:{YESTERDAY:"Hier",TODAY:"Aujourd'hui",DAYS:"j",HOURS:"h",MINUTES:"m",JUST_NOW:"maintenant",LOCATION:"Emplacement",CANCEL:"Annuler",INBOX:"Boîte de réception",DESKTOP_NOTIFICATIONS:"Notifications du navigateur",DESKTOP_NOTIFICATIONS_ERROR:"Impossible d'activer les notifications du navigateur car votre navigateur les bloque. Essayez de changer ses paramètres ou de changer de navigateur.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`Notification de démonstration ${t}`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Si vous maintenez l'onglet ouvert dans votre navigateur vous verrez apparaître une alerte lorsque quelqu'un vous parlera.",SEND_BUTTON_TEXT:"Envoyer",ENTRYBOX_TEXT_LIMIT:"Seuls 10.000 caractères sont autorisés.",ENTRYBOX_PLACEHOLDER:"Écrivez un message...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Cette conversation n'est plus active.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Vous pouvez lire, mais pas envoyer de messages.",MESSAGELIST_LOADING_OLDER:"Chargement des anciens messages ...",MESSAGELIST_SHOW_OLDER:"Afficher les anciens messages",MESSAGELIST_NEW_MARKER:"Nouveau",MESSAGE_SENT_VIA_EMAIL:"Ce message a été envoyé par e-mail",YOU_MARKER:"vous",UPLOAD_IN_PROGRESS:"Envoi en cours...",UPLOAD_SEND_FILE:"Envoyer un fichier",UPLOAD_SHARE_LOCATION:"Partager mon emplacement",UPLOAD_ERROR:"Un problème est survenu lors de l'envoi: le fichier est peut-être non pris en charge ou trop volumineux.",SHARE_LOCATION_ERROR:"Impossible de partager votre emplacement: ",LOADING:"Chargement en cours...",HUB_EMPTY:"Votre historique de discussion apparaîtra ici",HUB_SHOW_EARLIER:"Afficher les conversations précédentes",INBOX_NO_CHATS_TITLE:"Aucune conversation pour l'instant!",INBOX_NO_CHATS_BODY:"Une fois que vous aurez eu une ou plusieurs conversations, elles apparaîtront ici.",ENABLE_TRANSLATION:"Traduire cette conversation en français",DISABLE_TRANSLATION:"Remontrer la conversation originale",SEARCH_PLACEHOLDER_TEXT:"Rechercher...",SEARCH_SEARCHING:"Recherche...",SEARCH_NO_RESULTS:"Aucun résultat trouvé",SEARCH_NO_MORE_RESULTS:"Il n’y a plus de résultats",SEARCH_RESULTS_CONVERSATIONS:"Conversations",SEARCH_RESULTS_MESSAGES:"Messages",SEARCH_RESULTS_SHOW_MORE:"Afficher plus",CHAT_NOT_FOUND:"Conversation introuvable",DELETE_MESSAGE:"Supprimer le message",DELETION_EXPLANATION:"Si vous supprimez ce message, il disparaîtra pour tout le monde.",EDIT_MESSAGE:"Modifier le message",SAVE:"Enregistrer",EDITED_INDICATOR:"modifié",REPLY_TO_MESSAGE:"Répondre",ADD_REACTION:"Ajouter une réaction",AUTH_EXPIRED_OVERLAY_TITLE:"Votre session de chat a expiré",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Actualisez la page pour continuer",VOICE_MESSAGE:"Message vocal",CONTACT_INFORMATION_HIDDEN:"Informations masquées",LEAVE_CONVERSATION:"Quitter la conversation",MARK_CONVERSATION_AS_UNREAD:"Marquer comme non lu",STATUS_INDICATOR_ONLINE:"Actif",STATUS_INDICATOR_OFFLINE:"Absent",ARIA_LEAVE_SEARCH_MODE:"Quitter le mode recherche",ARIA_SEARCH_UP:"Rechercher vers le haut",ARIA_SEARCH_DOWN:"Rechercher vers le bas",ARIA_CLOSE_CHAT_POPUP:"Fermer la fenêtre de chat",ARIA_SEARCH_INSIDE_CONVERSATION:"Rechercher dans cette conversation",ARIA_SEARCH:"Rechercher",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"définir la vitesse de lecture",ARIA_CANCEL_UPLOAD:"Annuler l'envoi",ARIA_STOP_RECORDING:"Arrêter l'enregistrement",ARIA_CANCEL_RECORDING:"Annuler l'enregistrement",ARIA_INSERT_EMOJI:"Insérer un emoji",ARIA_PLAY_AUDIO:"lire l'audio",ARIA_PAUSE_AUDIO:"mettre en pause l'audio",ARIA_REACTION_COUNT:(t,e)=>`${t} réactions avec ${e}`,ARIA_MORE_ACTIONS:"Plus d'actions",ARIA_REPLYING_TO:(t,e)=>`Répondre à ${t} : ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Quitter le mode réponse",SELECT_CONVERSATION:"Sélectionnez une conversation"}},he:{code:"he-IL",name:"Hebrew",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"אתמול",TODAY:"היום",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"עכשיו",LOCATION:"מיקום",CANCEL:"בטל",INBOX:"דואר נכנס",DESKTOP_NOTIFICATIONS:"התראות דפדפן",DESKTOP_NOTIFICATIONS_ERROR:"לא ניתן להפעיל התראות במרועה דפדפן מכיוון שהדפדפן שלך חוסם אותן באופן פעיל. נסה להסתכל בהגדרות או להשתמש בדפדפן אחר.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} הודעה על הדגמה`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"אם אתה שומר על כרטיסיית הדפדפן שלך פתוחה, תראה את זה צץ כשמישהו ידבר איתך.",SEND_BUTTON_TEXT:"שלח",ENTRYBOX_TEXT_LIMIT:"רק 10.000 תווים",ENTRYBOX_PLACEHOLDER:"תגיד משהו...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"שיחה זו אינה פעילה עוד.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"אתה יכול לקרוא, אך לא לשלוח הודעות.",MESSAGELIST_LOADING_OLDER:"טוען הודעות ישנות...",MESSAGELIST_SHOW_OLDER:"הצג הודעות ישנות",MESSAGELIST_NEW_MARKER:"חדש",MESSAGE_SENT_VIA_EMAIL:"הודעה זאת נשלחה דרך אימייל",YOU_MARKER:"אתה",UPLOAD_IN_PROGRESS:"מעלה ...",UPLOAD_SEND_FILE:"שלח קובץ",UPLOAD_SHARE_LOCATION:"שתף מיקום",UPLOAD_ERROR:"לרוע המזל משהו השתבש בהעלאה. ייתכן שהקובץ אינו נתמך או גדול מדי.",SHARE_LOCATION_ERROR:"לא ניתן לשתף מיקום: ",LOADING:"טוען...",HUB_EMPTY:"היסטוריית הצ'אט שלך תופיע כאן",HUB_SHOW_EARLIER:"הצג צ'אטים קודמים",INBOX_NO_CHATS_TITLE:"אין עדיין צ'אטים!",INBOX_NO_CHATS_BODY:"לאחר שניהלת שיחה אחת או יותר, הם יופיעו כאן.",ENABLE_TRANSLATION:"תרגם שיחה זו לעברית",DISABLE_TRANSLATION:"הצג מקור",SEARCH_PLACEHOLDER_TEXT:"...חפש",SEARCH_SEARCHING:"...מחפש",SEARCH_NO_RESULTS:"לא נמצאו תוצאות",SEARCH_NO_MORE_RESULTS:"אין תוצאות נוספות",SEARCH_RESULTS_CONVERSATIONS:"שיחות",SEARCH_RESULTS_MESSAGES:"הודעות",SEARCH_RESULTS_SHOW_MORE:"הצג עוד",CHAT_NOT_FOUND:"הצ'אט לא נמצא",DELETE_MESSAGE:"מחיקת הודעה",DELETION_EXPLANATION:"אם תמחק הודעה זו, היא תיעלם עבור כולם.",EDIT_MESSAGE:"עריכת הודעה",SAVE:"שמור",EDITED_INDICATOR:"ערוך",REPLY_TO_MESSAGE:"השב",ADD_REACTION:"הוספת תגובה",AUTH_EXPIRED_OVERLAY_TITLE:"הפעלת הצ׳אט שלכם פגה",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"רעננו את העמוד כדי להמשיך",VOICE_MESSAGE:"הודעה קולית",CONTACT_INFORMATION_HIDDEN:"מידע מוסתר",LEAVE_CONVERSATION:"צא מהשיחה",MARK_CONVERSATION_AS_UNREAD:"סמן כלא נקרא",STATUS_INDICATOR_ONLINE:"פעיל",STATUS_INDICATOR_OFFLINE:"לא פעיל",ARIA_LEAVE_SEARCH_MODE:"צא ממצב חיפוש",ARIA_SEARCH_UP:"חפש למעלה",ARIA_SEARCH_DOWN:"חפש למטה",ARIA_CLOSE_CHAT_POPUP:"סגור חלון צ'אט",ARIA_SEARCH_INSIDE_CONVERSATION:"חפש בתוך השיחה הזו",ARIA_SEARCH:"חפש",ARIA_CHAT:"צ'אט",ARIA_SET_PLAYBACK_SPEED:"הגדר מהירות השמעה",ARIA_CANCEL_UPLOAD:"בטל העלאה",ARIA_STOP_RECORDING:"עצור הקלטה",ARIA_CANCEL_RECORDING:"בטל הקלטה",ARIA_INSERT_EMOJI:"הוסף אמוג'י",ARIA_PLAY_AUDIO:"נגן אודיו",ARIA_PAUSE_AUDIO:"השהה אודיו",ARIA_REACTION_COUNT:(t,e)=>`${t} תגובות עם ${e}`,ARIA_MORE_ACTIONS:"פעולות נוספות",ARIA_REPLYING_TO:(t,e)=>`משיב ל-${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"צא ממצב תשובה",SELECT_CONVERSATION:"בחר שיחה"}},hi:{code:"hi-IN",name:"Hindi (IN)",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/hi.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/hi/cldr/data.json",translation:{YESTERDAY:"कल",TODAY:"आज",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"अभी",LOCATION:"जगह",CANCEL:"रद्द करें",INBOX:"इनबॉक्स",DESKTOP_NOTIFICATIONS:"ब्राउज़र सूचनाएं",DESKTOP_NOTIFICATIONS_ERROR:"ब्राउज़र सूचनाएं सक्षम नहीं कर सकता क्योंकि आपका ब्राउज़र सक्रिय रूप से उन्हें ब्लॉक करता है। सेटिंग्स में देखने या एक अलग ब्राउज़र का उपयोग करने का प्रयास करें।",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} डेमो अधिसूचना`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"यदि आप अपना ब्राउज़र टैब खुला रखते हैं, तो यह पॉप अप आपको तब दिखाई देगा जब कोई आपसे बात करेगा।",SEND_BUTTON_TEXT:"भेजें",ENTRYBOX_TEXT_LIMIT:"केवल 10,000 वर्णों की अनुमति है।",ENTRYBOX_PLACEHOLDER:"कुछ कहिए...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"यह चैट अब सक्रिय नहीं है।",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"आप पढ़ सकते हैं, लेकिन संदेश नहीं भेज सकते।",MESSAGELIST_LOADING_OLDER:"पुराने संदेश लोड हो रहे हैं ...",MESSAGELIST_SHOW_OLDER:"पुराने संदेश दिखाएं",MESSAGELIST_NEW_MARKER:"नया",MESSAGE_SENT_VIA_EMAIL:"यह संदेश ईमेल के माध्यम से भेजा गया था",YOU_MARKER:"आप",UPLOAD_IN_PROGRESS:"अपलोड हो रहा है...",UPLOAD_SEND_FILE:"फाइल भेजें",UPLOAD_SHARE_LOCATION:"जगह शेयर करें",UPLOAD_ERROR:"दुर्भाग्य से, अपलोड करते समय कुछ गलत हो गया। फ़ाइल असमर्थित या बहुत बड़ी हो सकती है।",SHARE_LOCATION_ERROR:"जगह शेयर नहीं हो पाया: ",LOADING:"लोड हो रहा है...",HUB_EMPTY:"आपका चैट इतिहास यहां दिखाई देगा",HUB_SHOW_EARLIER:"पहले की चैट दिखाओ",INBOX_NO_CHATS_TITLE:"अभी तक कोई चैट नहीं!",INBOX_NO_CHATS_BODY:"एक बार जब आप एक या अधिक चैट कर लेते हैं, तो वे यहां दिखाई देंगे।",ENABLE_TRANSLATION:"इस बातचीत का हिंदी में अनुवाद कीजिए",DISABLE_TRANSLATION:"मूल दिखाएँ",SEARCH_PLACEHOLDER_TEXT:"खोजें...",SEARCH_SEARCHING:"खोज जारी है...",SEARCH_NO_RESULTS:"कोई परिणाम नहीं मिला",SEARCH_NO_MORE_RESULTS:"और कोई परिणाम नहीं",SEARCH_RESULTS_CONVERSATIONS:"बातचीत",SEARCH_RESULTS_MESSAGES:"संदेश",SEARCH_RESULTS_SHOW_MORE:"और दिखाएं",CHAT_NOT_FOUND:"चैट नहीं मिली",DELETE_MESSAGE:"संदेश डिलीट करें",DELETION_EXPLANATION:"यदि आप इस संदेश को हटाते हैं, तो यह सभी के लिए गायब हो जाएगा.",EDIT_MESSAGE:"संदेश में बदलाव करें",SAVE:"सहेजें",EDITED_INDICATOR:"संपादित किया गया",REPLY_TO_MESSAGE:"जवाब दीजिए ।",ADD_REACTION:"प्रतिक्रिया जोड़ें",AUTH_EXPIRED_OVERLAY_TITLE:"आपका चैट सेशन समाप्त हो चुका है",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"आगे बढ़ने के लिए रिफ्रेश करें",VOICE_MESSAGE:"वॉयस मैसेज",CONTACT_INFORMATION_HIDDEN:"छुपी हुई जानकारी",LEAVE_CONVERSATION:"बातचीत को ख़त्म करें",MARK_CONVERSATION_AS_UNREAD:"अपठित के रूप में चिह्नित करें",STATUS_INDICATOR_ONLINE:"सक्रिय",STATUS_INDICATOR_OFFLINE:"अनुपस्थित",ARIA_LEAVE_SEARCH_MODE:"खोज मोड से बाहर निकलें",ARIA_SEARCH_UP:"ऊपर खोजें",ARIA_SEARCH_DOWN:"नीचे खोजें",ARIA_CLOSE_CHAT_POPUP:"चैट विंडो बंद करें",ARIA_SEARCH_INSIDE_CONVERSATION:"इस बातचीत में खोजें",ARIA_SEARCH:"खोजें",ARIA_CHAT:"चैट",ARIA_SET_PLAYBACK_SPEED:"प्लेबैक गति सेट करें",ARIA_CANCEL_UPLOAD:"अपलोड रद्द करें",ARIA_STOP_RECORDING:"रिकॉर्डिंग रोकें",ARIA_CANCEL_RECORDING:"रिकॉर्डिंग रद्द करें",ARIA_INSERT_EMOJI:"इमोजी डालें",ARIA_PLAY_AUDIO:"ऑडियो चलाएं",ARIA_PAUSE_AUDIO:"ऑडियो रोकें",ARIA_REACTION_COUNT:(t,e)=>`${t} प्रतिक्रियाएं (${e})`,ARIA_MORE_ACTIONS:"अधिक कार्य",ARIA_REPLYING_TO:(t,e)=>`${t} को उत्तर दे रहे हैं: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"उत्तर मोड से बाहर निकलें",SELECT_CONVERSATION:"एक बातचीत चुनें"}},hr:{code:"hr-HR",name:"Croatian",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Jučer",TODAY:"Danas",DAYS:"d",HOURS:"s",MINUTES:"m",JUST_NOW:"Upravo sad",LOCATION:"Lokacija",CANCEL:"Otkaži",INBOX:"Pretinac",DESKTOP_NOTIFICATIONS:"Obavijesti preglednika",DESKTOP_NOTIFICATIONS_ERROR:"Notifikacije preglednika nisu omogućene jer ih vaš preglednik aktivno blokira. Pokušajte pogledati postavke ili koristiti neki drugi preglednik.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} demo notifikacija`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Ako karticu preglednika ostavite otvorenu, pojavit će se ovaj pop-up kada netko razgovara s vama.",SEND_BUTTON_TEXT:"Pošalji",ENTRYBOX_TEXT_LIMIT:"Dozvoljeno je samo 10.000 znakova.",ENTRYBOX_PLACEHOLDER:"Reci nešto...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Ovaj razgovor više nije aktivan.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Možeš čitati, ali ne i slati poruke.",MESSAGELIST_LOADING_OLDER:"Učitavam starije poruke...",MESSAGELIST_SHOW_OLDER:"Prikaži starije poruke",MESSAGELIST_NEW_MARKER:"Novo",MESSAGE_SENT_VIA_EMAIL:"Ova poruka je poslana e-poštom",YOU_MARKER:"ti",UPLOAD_IN_PROGRESS:"Učitavam...",UPLOAD_SEND_FILE:"Pošalji datoteku",UPLOAD_SHARE_LOCATION:"Podijeli lokaciju",UPLOAD_ERROR:"Nažalost, nešto je pošlo krivo. Datoteka možda nije podržana ili je prevelika.",SHARE_LOCATION_ERROR:"Nije moguće podijeliti lokaciju: ",LOADING:"Učitavam...",HUB_EMPTY:"Ovdje će se prikazati vaša povijest razgovora",HUB_SHOW_EARLIER:"Prikaži ranije razgovore",INBOX_NO_CHATS_TITLE:"Nema razgovora!",INBOX_NO_CHATS_BODY:"Nakon što vodite jedan ili više razgovora, oni će se pojaviti ovdje.",ENABLE_TRANSLATION:"Prevedi ovaj razgovor na hrvatski jezik",DISABLE_TRANSLATION:"Prikaži original",SEARCH_PLACEHOLDER_TEXT:"Pretraži...",SEARCH_SEARCHING:"Pretraživanje...",SEARCH_NO_RESULTS:"Nema rezultata",SEARCH_NO_MORE_RESULTS:"Nema više rezultata",SEARCH_RESULTS_CONVERSATIONS:"Razgovori",SEARCH_RESULTS_MESSAGES:"Poruke",SEARCH_RESULTS_SHOW_MORE:"Prikaži više",CHAT_NOT_FOUND:"Razgovor nije pronađen",DELETE_MESSAGE:"Obriši poruku",DELETION_EXPLANATION:"Ako izbrišete ovu poruku, nestat će za sve.",EDIT_MESSAGE:"Uredi poruku",SAVE:"Spremi",EDITED_INDICATOR:"uređivao",REPLY_TO_MESSAGE:"Odgovorite",ADD_REACTION:"Dodajte reakciju",AUTH_EXPIRED_OVERLAY_TITLE:"Vaša sesija razgovora je istekla",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Osvježite stranicu za nastavak",VOICE_MESSAGE:"Glasovna poruka",CONTACT_INFORMATION_HIDDEN:"Skrivene informacije",LEAVE_CONVERSATION:"Napustiti razgovor",MARK_CONVERSATION_AS_UNREAD:"Označi kao nepročitano",STATUS_INDICATOR_ONLINE:"Aktivan",STATUS_INDICATOR_OFFLINE:"Odsutan",ARIA_LEAVE_SEARCH_MODE:"Napusti način pretraživanja",ARIA_SEARCH_UP:"Traži gore",ARIA_SEARCH_DOWN:"Traži dolje",ARIA_CLOSE_CHAT_POPUP:"Zatvori prozor za chat",ARIA_SEARCH_INSIDE_CONVERSATION:"Traži u ovom razgovoru",ARIA_SEARCH:"Traži",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"postavi brzinu reprodukcije",ARIA_CANCEL_UPLOAD:"Otkaži učitavanje",ARIA_STOP_RECORDING:"Zaustavi snimanje",ARIA_CANCEL_RECORDING:"Otkaži snimanje",ARIA_INSERT_EMOJI:"Umetni emoji",ARIA_PLAY_AUDIO:"reproduciraj audio",ARIA_PAUSE_AUDIO:"pauziraj audio",ARIA_REACTION_COUNT:(t,e)=>`${t} reakcija s ${e}`,ARIA_MORE_ACTIONS:"Više radnji",ARIA_REPLYING_TO:(t,e)=>`Odgovaranje korisniku ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Izađi iz moda odgovaranja",SELECT_CONVERSATION:"Odaberite razgovor"}},hu:{code:"hu-HU",name:"Hungarian",emojiPickerTranslationUrl:null,emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/hu/cldr/data.json",translation:{YESTERDAY:"Tegnap",TODAY:"Ma",DAYS:"n",HOURS:"ó",MINUTES:"p",JUST_NOW:"éppen most",LOCATION:"Helyszín",CANCEL:"Visszavonás",INBOX:"Postaláda",DESKTOP_NOTIFICATIONS:"Böngésző értesítések",DESKTOP_NOTIFICATIONS_ERROR:"Azért nem tudja bekapcsolni a böngésző értesítések funkciót, mert böngészője aktívan blokkolja azt. Tekintse meg a beállításokat vagy használjon másik böngészőt.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} demo értesítés`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Ha nyitva hagyja böngészőjét, felugró ablak fog megjelenni, ha valaki beszélni szeretne Önnel.",SEND_BUTTON_TEXT:"Küldés",ENTRYBOX_TEXT_LIMIT:"Mindőssze 10.000 karakter megengedett.",ENTRYBOX_PLACEHOLDER:"Mondjon valamit...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Ez a beszélgetés már nem aktív.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Elolvashatja az üzeneteket, de nem küldhet újat.",MESSAGELIST_LOADING_OLDER:"Korábbi üzenetek betöltése...",MESSAGELIST_SHOW_OLDER:"Korábbi üzenetek megjelenítése",MESSAGELIST_NEW_MARKER:"Új",MESSAGE_SENT_VIA_EMAIL:"Ez az üzenet e-mailben került elküldésre",YOU_MARKER:"Ön",UPLOAD_IN_PROGRESS:"Feltöltés...",UPLOAD_SEND_FILE:"Fájl küldése",UPLOAD_SHARE_LOCATION:"Helyszín megosztása",UPLOAD_ERROR:"Sajnos hiba történt a feltöltés során. A fájl nem támogatott vagy túl nagy.",SHARE_LOCATION_ERROR:"Helyszín megosztása nem lehetséges: ",LOADING:"Betöltés...",HUB_EMPTY:"A beszélgetések előzményei itt láthatók",HUB_SHOW_EARLIER:"Korábbi beszélgetések megjelenítése",INBOX_NO_CHATS_TITLE:"Még nincs megjeleníthető beszélgetés!",INBOX_NO_CHATS_BODY:"Amint egy vagy több beszélgetéssel rendelkezik, azok itt fognak megjelenni.",ENABLE_TRANSLATION:"A beszélgetés lefordítása erre a nyelvre: magyar",DISABLE_TRANSLATION:"Eredeti megjelenítése",SEARCH_PLACEHOLDER_TEXT:"Keresés...",SEARCH_SEARCHING:"Keresés...",SEARCH_NO_RESULTS:"Nincs találat",SEARCH_NO_MORE_RESULTS:"Nincs több találat",SEARCH_RESULTS_CONVERSATIONS:"Beszélgetések",SEARCH_RESULTS_MESSAGES:"Üzenetek",SEARCH_RESULTS_SHOW_MORE:"Több megjelenítése",CHAT_NOT_FOUND:"A csevegés nem található",DELETE_MESSAGE:"Üzenet törlése",DELETION_EXPLANATION:"Ha törlöd ezt az üzenetet, az mindenki számára eltűnik.",EDIT_MESSAGE:"Üzenet szerkesztése",SAVE:"Mentés",EDITED_INDICATOR:"szerkesztve",REPLY_TO_MESSAGE:"Válaszadás",ADD_REACTION:"Reagálás erre",AUTH_EXPIRED_OVERLAY_TITLE:"Chat munkamenete lejárt",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Folytatáshoz frissítse az oldalt",VOICE_MESSAGE:"Hangüzenet",CONTACT_INFORMATION_HIDDEN:"Rejtett információ",LEAVE_CONVERSATION:"Kilépés a beszélgetésből",MARK_CONVERSATION_AS_UNREAD:"Megjelölés olvasatlanként",STATUS_INDICATOR_ONLINE:"Aktív",STATUS_INDICATOR_OFFLINE:"Távol",ARIA_LEAVE_SEARCH_MODE:"Keresési mód elhagyása",ARIA_SEARCH_UP:"Keresés felfelé",ARIA_SEARCH_DOWN:"Keresés lefelé",ARIA_CLOSE_CHAT_POPUP:"Csevegő ablak bezárása",ARIA_SEARCH_INSIDE_CONVERSATION:"Keresés ebben a beszélgetésben",ARIA_SEARCH:"Keresés",ARIA_CHAT:"Csevegés",ARIA_SET_PLAYBACK_SPEED:"lejátszási sebesség beállítása",ARIA_CANCEL_UPLOAD:"Feltöltés megszakítása",ARIA_STOP_RECORDING:"Felvétel leállítása",ARIA_CANCEL_RECORDING:"Felvétel megszakítása",ARIA_INSERT_EMOJI:"Emoji beszúrása",ARIA_PLAY_AUDIO:"hang lejátszása",ARIA_PAUSE_AUDIO:"hang szüneteltetése",ARIA_REACTION_COUNT:(t,e)=>`${t} reakció (${e})`,ARIA_MORE_ACTIONS:"További műveletek",ARIA_REPLYING_TO:(t,e)=>`Válaszolás ${t} részére: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Kilépés a válasz módóból",SELECT_CONVERSATION:"Válasszon egy beszélgetést"}},id:{code:"id-ID",name:"Bahasa Indonesia",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/id.js",emojiDataUrl:null,translation:{YESTERDAY:"Kemarin",TODAY:"Hari ini",DAYS:"h",HOURS:"j",MINUTES:"m",JUST_NOW:"sekarang",LOCATION:"Lokasi",CANCEL:"Batal",INBOX:"Kotak Masuk",DESKTOP_NOTIFICATIONS:"Notifikasi peramban",DESKTOP_NOTIFICATIONS_ERROR:"Tidak dapat mengaktifkan pemberitahuan browser karena browser Anda secara aktif memblokir mereka. Coba cari di pengaturan atau menggunakan browser yang berbeda.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`pemberitahuan demo ${t}`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Jika Anda membiarkan tab browser tetap terbuka, Anda akan melihat ini muncul ketika seseorang berbicara kepada Anda.",SEND_BUTTON_TEXT:"Kirim",ENTRYBOX_TEXT_LIMIT:"Hanya 10.000 karakter yang diizinkan.",ENTRYBOX_PLACEHOLDER:"Katakan sesuatu...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Percakapan ini tidak lagi aktif.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Anda dapat membaca, tetapi tidak mengirim pesan.",MESSAGELIST_LOADING_OLDER:"Memuat pesan lama...",MESSAGELIST_SHOW_OLDER:"Tampilkan pesan yang lebih lama",MESSAGELIST_NEW_MARKER:"Baru",MESSAGE_SENT_VIA_EMAIL:"Pesan ini dikirim melalui email",YOU_MARKER:"Anda",UPLOAD_IN_PROGRESS:"Mengunggah...",UPLOAD_SEND_FILE:"Kirim mengajukan",UPLOAD_SHARE_LOCATION:"Bagikan lokasi",UPLOAD_ERROR:"Ada yang salah diunggah. File mungkin tidak didukung atau terlalu besar.",SHARE_LOCATION_ERROR:"Tidak dapat membagikan lokasi: ",LOADING:"Memuat...",HUB_EMPTY:"Riwayat obrolan Anda akan muncul di sini",HUB_SHOW_EARLIER:"Tampilkan obrolan sebelumnya",INBOX_NO_CHATS_TITLE:"Belum ada obrolan!",INBOX_NO_CHATS_BODY:"Setelah Anda melakukan satu atau lebih percakapan, mereka akan muncul di sini.",ENABLE_TRANSLATION:"Terjemahkan percakapan ini ke Indonesia",DISABLE_TRANSLATION:"Perlihatkan asli",SEARCH_PLACEHOLDER_TEXT:"Cari...",SEARCH_SEARCHING:"Mencari...",SEARCH_NO_RESULTS:"Tidak ditemukan hasil",SEARCH_NO_MORE_RESULTS:"Tidak ada hasil lainnya",SEARCH_RESULTS_CONVERSATIONS:"Percakapan",SEARCH_RESULTS_MESSAGES:"Pesan",SEARCH_RESULTS_SHOW_MORE:"Tampilkan lebih banyak",CHAT_NOT_FOUND:"Obrolan tidak ditemukan",DELETE_MESSAGE:"Hapus pesan",DELETION_EXPLANATION:"Jika pesan ini Anda hapus, pesan ini akan tidak terlihat bagi siapa pun.",EDIT_MESSAGE:"Sunting pesan",SAVE:"Mentés",EDITED_INDICATOR:"diedit",REPLY_TO_MESSAGE:"Balas",ADD_REACTION:"Tambah reaksi",AUTH_EXPIRED_OVERLAY_TITLE:"Sesi obrolan Anda sudah lewat batas waktu",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Muat ulang halaman untuk melanjutkan",VOICE_MESSAGE:"Pesan suara",CONTACT_INFORMATION_HIDDEN:"Informasi tersembunyi",LEAVE_CONVERSATION:"Tinggalkan percakapan",MARK_CONVERSATION_AS_UNREAD:"Tandai sebagai Belum dibaca",STATUS_INDICATOR_ONLINE:"Aktif",STATUS_INDICATOR_OFFLINE:"Tidak aktif",ARIA_LEAVE_SEARCH_MODE:"Keluar dari mode pencarian",ARIA_SEARCH_UP:"Cari ke atas",ARIA_SEARCH_DOWN:"Cari ke bawah",ARIA_CLOSE_CHAT_POPUP:"Tutup jendela obrolan",ARIA_SEARCH_INSIDE_CONVERSATION:"Cari dalam percakapan ini",ARIA_SEARCH:"Cari",ARIA_CHAT:"Obrolan",ARIA_SET_PLAYBACK_SPEED:"atur kecepatan pemutaran",ARIA_CANCEL_UPLOAD:"Batalkan unggah",ARIA_STOP_RECORDING:"Hentikan perekaman",ARIA_CANCEL_RECORDING:"Batalkan perekaman",ARIA_INSERT_EMOJI:"Sisipkan emoji",ARIA_PLAY_AUDIO:"putar audio",ARIA_PAUSE_AUDIO:"jeda audio",ARIA_REACTION_COUNT:(t,e)=>`${t} reaksi dengan ${e}`,ARIA_MORE_ACTIONS:"Tindakan lainnya",ARIA_REPLYING_TO:(t,e)=>`Membalas ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Keluar dari mode balasan",SELECT_CONVERSATION:"Pilih percakapan"}},is:{code:"is-IS",name:"Íslenska",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Í gær",TODAY:"Í dag",DAYS:"dagar",HOURS:"klst.",MINUTES:"mín.",JUST_NOW:"núna",LOCATION:"Staðsetning",CANCEL:"Hætta við",INBOX:"Pósthólf",DESKTOP_NOTIFICATIONS:"Tilkynningar í vafra",DESKTOP_NOTIFICATIONS_ERROR:"Ekki er hægt að birta tilkynningar í vafra vegna þess að vafrinn sem þú notar hindrar það. Reyndu að leita að stillingum eða að nota annan vafra.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} prufutilkynning`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Ef flipinn í vafranum er opinn muntu sjá þessa tilkynningu birtast þegar einhver sendir þér skilaboð.",SEND_BUTTON_TEXT:"Senda",ENTRYBOX_TEXT_LIMIT:"Aðeins 10.000 stafir komast fyrir.",ENTRYBOX_PLACEHOLDER:"Segðu eitthvað...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Þessar samræður eru ekki lengar virkar.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Þú getur lesið, en ekki sent skilaboð.",MESSAGELIST_LOADING_OLDER:"Sæki eldri skilaboð...",MESSAGELIST_SHOW_OLDER:"Sýna eldri skilaboð",MESSAGELIST_NEW_MARKER:"Ný",MESSAGE_SENT_VIA_EMAIL:"Þessi skilaboð voru send með tölvupósti",YOU_MARKER:"þú",UPLOAD_IN_PROGRESS:"Hleð upp...",UPLOAD_SEND_FILE:"Senda skrá",UPLOAD_SHARE_LOCATION:"Deila staðsetningu",UPLOAD_ERROR:"Því miður fór eitthvað úrskeiðis við að hlaða upp. Skráin gæti verið af rangri tegund eð of stór.",SHARE_LOCATION_ERROR:"Ekki er hægt að deila staðsetningu: ",LOADING:"Hleð...",HUB_EMPTY:"Fyrri samtöl munu birtast hér",HUB_SHOW_EARLIER:"Sýna fyrri samtöl",INBOX_NO_CHATS_TITLE:"Engin samtöl enn!",INBOX_NO_CHATS_BODY:"Þegar þú hefur átt eitt eða fleiri samtöl, munu þau birtast hér.",ENABLE_TRANSLATION:"Þýða þetta samtal á ensku",DISABLE_TRANSLATION:"Sýna upprunalegt",SEARCH_PLACEHOLDER_TEXT:"Leita...",SEARCH_SEARCHING:"Leita...",SEARCH_NO_RESULTS:"Ekkert fannst",SEARCH_NO_MORE_RESULTS:"Engar fleiri niðurstöður",SEARCH_RESULTS_CONVERSATIONS:"Samtöl",SEARCH_RESULTS_MESSAGES:"Skilaboð",SEARCH_RESULTS_SHOW_MORE:"Sýna meira",CHAT_NOT_FOUND:"Samtal fannst ekki",DELETE_MESSAGE:"Eyða skilaboðum",DELETION_EXPLANATION:"Ef þú eyðir þessum skilaboðum munu þau hverfa hjá öllum.",EDIT_MESSAGE:"Breyta skilaboðum",SAVE:"Vista",EDITED_INDICATOR:"breytt",REPLY_TO_MESSAGE:"Svara",ADD_REACTION:"Setja inn viðbrögð",AUTH_EXPIRED_OVERLAY_TITLE:"Spjallið hefur runnið út",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Endurnýjaðu síðuna til að halda áfram",VOICE_MESSAGE:"Raddskilaboð",LEAVE_CONVERSATION:"Skilja eftir skilaboð",MARK_CONVERSATION_AS_UNREAD:"Merkja sem ólesið",STATUS_INDICATOR_ONLINE:"Virk",STATUS_INDICATOR_OFFLINE:"Ekki við",CONTACT_INFORMATION_HIDDEN:"faldar upplýsingar",ARIA_LEAVE_SEARCH_MODE:"Hætta í leitastillingu",ARIA_SEARCH_UP:"Leita upp",ARIA_SEARCH_DOWN:"Leita niður",ARIA_CLOSE_CHAT_POPUP:"Loka spjallglugga",ARIA_SEARCH_INSIDE_CONVERSATION:"Leita í þessari samtal",ARIA_SEARCH:"Leita",ARIA_CHAT:"Spjall",ARIA_SET_PLAYBACK_SPEED:"stilla afspilunarhraða",ARIA_CANCEL_UPLOAD:"Hætta við upphleðslu",ARIA_STOP_RECORDING:"Stöðva upptöku",ARIA_CANCEL_RECORDING:"Hætta við upptöku",ARIA_INSERT_EMOJI:"Setja inn emoji",ARIA_PLAY_AUDIO:"spila hljóð",ARIA_PAUSE_AUDIO:"gera hlé á hljóði",ARIA_REACTION_COUNT:(t,e)=>`${t} viðbrögð með ${e}`,ARIA_MORE_ACTIONS:"Fleiri aðgerðir",ARIA_REPLYING_TO:(t,e)=>`Svara ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Hætta í svarmód",SELECT_CONVERSATION:"Veldu samtal"}},it:{code:"it-IT",name:"Italian",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/it.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/it/cldr/data.json",translation:{YESTERDAY:"Ieri",TODAY:"Oggi",DAYS:"g",HOURS:"o",MINUTES:"m",JUST_NOW:"adesso",LOCATION:"Posizione",CANCEL:"Annulla",INBOX:"Posta in arrivo",DESKTOP_NOTIFICATIONS:"Notifiche browser",DESKTOP_NOTIFICATIONS_ERROR:"Impossibile abilitare le notifiche browser perché il browser le blocca attivamente. Prova a cercare le impostazioni o utilizzare un browser diverso.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} demo notification`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Se si mantiene aperta la scheda del browser, questo verrà visualizzato quando qualcuno ti parla.",SEND_BUTTON_TEXT:"Invia",ENTRYBOX_TEXT_LIMIT:"Sono consentiti solo 10.000 caratteri.",ENTRYBOX_PLACEHOLDER:"Dì qualcosa...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Questa conversazione non è più attiva.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Puoi leggere, ma non inviare messaggi.",MESSAGELIST_LOADING_OLDER:"Caricamento dei messaggi precedenti...",MESSAGELIST_SHOW_OLDER:"Mostra messaggi precedenti",MESSAGELIST_NEW_MARKER:"Nuovo",MESSAGE_SENT_VIA_EMAIL:"Questo messaggio è stato inviato via email",YOU_MARKER:"tu",UPLOAD_IN_PROGRESS:"Caricamento in corso...",UPLOAD_SEND_FILE:"Invia file",UPLOAD_SHARE_LOCATION:"Condividi posizione",UPLOAD_ERROR:"Qualcosa è andato storto durante il caricamento. Il file potrebbe non essere supportato o troppo grande.",SHARE_LOCATION_ERROR:"Impossibile condividere la posizione: ",LOADING:"Caricamento in corso...",HUB_EMPTY:"La cronologia della tua chat verrà mostrata qui",HUB_SHOW_EARLIER:"Mostra chat precedenti",INBOX_NO_CHATS_TITLE:"Non ci sono ancora chat!",INBOX_NO_CHATS_BODY:"Una volta che hai avuto una o più conversazioni, verranno visualizzate qui.",ENABLE_TRANSLATION:"Traduci questa conversazione in italiano",DISABLE_TRANSLATION:"Mostra l'originale",SEARCH_PLACEHOLDER_TEXT:"Cerca...",SEARCH_SEARCHING:"Cercando...",SEARCH_NO_RESULTS:"Nessun risultato trovato",SEARCH_NO_MORE_RESULTS:"Non ci sono più risultati",SEARCH_RESULTS_CONVERSATIONS:"Conversazioni",SEARCH_RESULTS_MESSAGES:"Messaggi",SEARCH_RESULTS_SHOW_MORE:"Mostra altro",CHAT_NOT_FOUND:"Chat non trovata",DELETE_MESSAGE:"Elimina messaggio",DELETION_EXPLANATION:"Se elimini il messaggio, questo scomparirà per tutti.",EDIT_MESSAGE:"Modifica messaggio",SAVE:"Salva",EDITED_INDICATOR:"modificato",REPLY_TO_MESSAGE:"Rispondi",ADD_REACTION:"Aggiungi reazione",AUTH_EXPIRED_OVERLAY_TITLE:"La sessione di chat è scaduta",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Aggiorna la pagina per continuare",VOICE_MESSAGE:"Messaggio vocale",LEAVE_CONVERSATION:"Abbandona la conversazione",MARK_CONVERSATION_AS_UNREAD:"Segna come non letto",STATUS_INDICATOR_ONLINE:"Online",STATUS_INDICATOR_OFFLINE:"Offline",CONTACT_INFORMATION_HIDDEN:"Informazioni nascoste",ARIA_LEAVE_SEARCH_MODE:"Esci dalla modalità ricerca",ARIA_SEARCH_UP:"Cerca in alto",ARIA_SEARCH_DOWN:"Cerca in basso",ARIA_CLOSE_CHAT_POPUP:"Chiudi la finestra di chat",ARIA_SEARCH_INSIDE_CONVERSATION:"Cerca in questa conversazione",ARIA_SEARCH:"Cerca",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"imposta velocità di riproduzione",ARIA_CANCEL_UPLOAD:"Annulla caricamento",ARIA_STOP_RECORDING:"Interrompi registrazione",ARIA_CANCEL_RECORDING:"Annulla registrazione",ARIA_INSERT_EMOJI:"Inserisci un'emoji",ARIA_PLAY_AUDIO:"riproduci audio",ARIA_PAUSE_AUDIO:"metti in pausa audio",ARIA_REACTION_COUNT:(t,e)=>`${t} reazioni con ${e}`,ARIA_MORE_ACTIONS:"Altre azioni",ARIA_REPLYING_TO:(t,e)=>`Rispondendo a ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Esci dalla modalità risposta",SELECT_CONVERSATION:"Seleziona una conversazione"}},ja:{code:"ja-JP",name:"Japanese",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/ja.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/ja/emojibase/data.json",translation:{YESTERDAY:"昨日",TODAY:"今日",DAYS:"日前",HOURS:"時間前",MINUTES:"分前",JUST_NOW:"たった今",LOCATION:"場所",CANCEL:"キャンセル",INBOX:"受信箱",DESKTOP_NOTIFICATIONS:"ブラウザの通知",DESKTOP_NOTIFICATIONS_ERROR:"ブラウザの通知はブロックされているため、ブラウザの通知を有効にできません。設定を確認するか、別のブラウザを使用してください。",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} デモ通知`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"ブラウザのタブを開いたままにしておくと、誰かがあなたに話しかけたときにこのポップアップが表示されます。",SEND_BUTTON_TEXT:"送信",ENTRYBOX_TEXT_LIMIT:"許可されているのは10.000文字までです。",ENTRYBOX_PLACEHOLDER:"メッセージを入力してください",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"この会話はもうアクティブではありません。",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"あなたは読むことはできますが、メッセージを送ることはできません。",MESSAGELIST_LOADING_OLDER:"古いメッセージを読み込んでいます...",MESSAGELIST_SHOW_OLDER:"古いメッセージを表示",MESSAGELIST_NEW_MARKER:"新着",MESSAGE_SENT_VIA_EMAIL:"このメッセージはメールで送信されました",YOU_MARKER:"あなたは",UPLOAD_IN_PROGRESS:"アップロード中...",UPLOAD_SEND_FILE:"ファイル送信",UPLOAD_SHARE_LOCATION:"共有場所",UPLOAD_ERROR:"アップロード中に問題が発生しました。ファイルがサポートされていないか、大きすぎる可能性があります。",SHARE_LOCATION_ERROR:"場所を共有できません: ",LOADING:"読み込み中...",HUB_EMPTY:"あなたのチャット履歴がここに表示されます",HUB_SHOW_EARLIER:"以前のチャットを表示",INBOX_NO_CHATS_TITLE:"まだチャットがありません!",INBOX_NO_CHATS_BODY:"会話が1つ以上あると、ここに表示されます",ENABLE_TRANSLATION:"この会話を日本語に翻訳する",DISABLE_TRANSLATION:"オリジナルを表示",SEARCH_PLACEHOLDER_TEXT:"検索...",SEARCH_SEARCHING:"検索中...",SEARCH_NO_RESULTS:"結果が見つかりません",SEARCH_NO_MORE_RESULTS:"これ以上結果はありません",SEARCH_RESULTS_CONVERSATIONS:"会話",SEARCH_RESULTS_MESSAGES:"メッセージ",SEARCH_RESULTS_SHOW_MORE:"もっと見る",CHAT_NOT_FOUND:"チャットが見つかりませんでした",DELETE_MESSAGE:"メッセージを削除する",DELETION_EXPLANATION:"このメッセージを削除すると、全ての人に表示されなくなります。",EDIT_MESSAGE:"メッセージを編集する",SAVE:"上書き保存",EDITED_INDICATOR:"編集",REPLY_TO_MESSAGE:"返信する",ADD_REACTION:"リアクションを追加",AUTH_EXPIRED_OVERLAY_TITLE:"チャットセッションの有効期限が切れました",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"続けるにはページを更新してください",VOICE_MESSAGE:"ボイスメッセージ",CONTACT_INFORMATION_HIDDEN:"機密情報",LEAVE_CONVERSATION:"会話をやめる",MARK_CONVERSATION_AS_UNREAD:"未読としてマーク",STATUS_INDICATOR_ONLINE:"アクティブ",STATUS_INDICATOR_OFFLINE:"退席中",ARIA_LEAVE_SEARCH_MODE:"検索モードを終了",ARIA_SEARCH_UP:"上に検索",ARIA_SEARCH_DOWN:"下に検索",ARIA_CLOSE_CHAT_POPUP:"チャットポップアップを閉じる",ARIA_SEARCH_INSIDE_CONVERSATION:"この会話内を検索",ARIA_SEARCH:"検索",ARIA_CHAT:"チャット",ARIA_SET_PLAYBACK_SPEED:"再生速度を設定",ARIA_CANCEL_UPLOAD:"アップロードをキャンセル",ARIA_STOP_RECORDING:"録音を停止",ARIA_CANCEL_RECORDING:"録音をキャンセル",ARIA_INSERT_EMOJI:"絵文字を挿入",ARIA_PLAY_AUDIO:"音声を再生",ARIA_PAUSE_AUDIO:"音声を一時停止",ARIA_REACTION_COUNT:(t,e)=>`${t}件のリアクション(${e})`,ARIA_MORE_ACTIONS:"その他の操作",ARIA_REPLYING_TO:(t,e)=>`${t}に返信: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"返信モードを終了",SELECT_CONVERSATION:"会話を選択"}},ka:{code:"ka-GE",name:"Georgian",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"გუშინ",TODAY:"დღეს",DAYS:"დღ",HOURS:"სთ",MINUTES:"წთ",JUST_NOW:"ახლა",LOCATION:"ადგილმდებარეობა",CANCEL:"გაუქმება",INBOX:"მიღებული შეტყობინება",DESKTOP_NOTIFICATIONS:"ბრაუზერის შეტყობინებები",DESKTOP_NOTIFICATIONS_ERROR:"შეუძლებელია ბრაუზერის შეტკობინებების ჩართვა. ეს ბრაუზერი ბლოკავს მათ. სცადე ცვლილება ოპციებიდან ან გამოიყენე სხვა ბრაუზერი.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} შეტყობინებების დემო ვერსია`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"თუ დატოვებ ბრაუზერის ფანჯარას გახსნილს, როცა ვიღაც მოგწერს საუბარი ამოვარდება დესკტოპზე.",SEND_BUTTON_TEXT:"გაგზავნა",ENTRYBOX_TEXT_LIMIT:"დაშვებულია მხოლოდ 10.000 სიმბოლო.",ENTRYBOX_PLACEHOLDER:"დაწერე რაღაც...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"ეს დიალოგი აღარ არის ხელმისაწვდომი.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"შეგიძლია წაიკითხო, მაგრამ ვერ გააგზავნი შეტყობინებას.",MESSAGELIST_LOADING_OLDER:"იტვირთება ძველი შეტყობინებები...",MESSAGELIST_SHOW_OLDER:"ძველი შეტყობინებების ჩვენება",MESSAGELIST_NEW_MARKER:"ახალი",MESSAGE_SENT_VIA_EMAIL:"ეს შეტყობინება გამოგზავნილია იმეილით",YOU_MARKER:"you",UPLOAD_IN_PROGRESS:"იტვირთება...",UPLOAD_SEND_FILE:"ფაილის გაგზავნა",UPLOAD_SHARE_LOCATION:"ადგილმდებარეობის გაზიარება",UPLOAD_ERROR:"პრობლემაა ატვირთვისას. ფაილის შესაძლოა არის არათავსებადი ან ძალიან დიდი.",SHARE_LOCATION_ERROR:"შეუძლებელია ადგილმდებარეობის გაზიარება: ",LOADING:"იტვირთება...",HUB_EMPTY:"საუბრების ისტორია გამოჩნდება აქ",HUB_SHOW_EARLIER:"წინა საუბრების ნახვა",INBOX_NO_CHATS_TITLE:"ჯერ-ჯერობით არ არის საუბრები!",INBOX_NO_CHATS_BODY:"უკვე დასრულებული საუბარები გამოჩნდება აქ",ENABLE_TRANSLATION:"თარგმნეთ ეს საუბარი ინგლისურად",DISABLE_TRANSLATION:"ორიგინალის ჩვენება",SEARCH_PLACEHOLDER_TEXT:"ძიება...",SEARCH_SEARCHING:"მიმდინარეობს ძიება...",SEARCH_NO_RESULTS:"შედეგები ვერ ქართველი",SEARCH_NO_MORE_RESULTS:"სხვა შედეგი ვერ მოიძებნა",SEARCH_RESULTS_CONVERSATIONS:"საუბრები",SEARCH_RESULTS_MESSAGES:"შეტყობინებები",SEARCH_RESULTS_SHOW_MORE:"მეტის ჩვენება",CHAT_NOT_FOUND:"ჩატი ვერ მოიძებნა",DELETE_MESSAGE:"შეტყობინების წაშლა ",DELETION_EXPLANATION:"თუ ამ შეტყობინებას წაშლით, ის ყველასთვის გაქრება.",EDIT_MESSAGE:"შეტყობინების რედაქტირება",SAVE:"შენახვა",EDITED_INDICATOR:"რედაქტირებულია",REPLY_TO_MESSAGE:"პასუხის გაცემა",ADD_REACTION:"დაამატეთ რეაქცია",AUTH_EXPIRED_OVERLAY_TITLE:"თქვენი ჩეთის სესიის ვადა ამოიწურა",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"განაახლეთ გვერდი გასაგრძელებლად",VOICE_MESSAGE:"ხმოვანი შეტყობინება",LEAVE_CONVERSATION:"საუბრის დატოვება",MARK_CONVERSATION_AS_UNREAD:"წაუკითხავად მონიშვნა",STATUS_INDICATOR_ONLINE:"აქტიური",STATUS_INDICATOR_OFFLINE:"გამორთული",CONTACT_INFORMATION_HIDDEN:"ფარული ინფორმაცია",ARIA_LEAVE_SEARCH_MODE:"ძიების რეჟიმიდან გასვლა",ARIA_SEARCH_UP:"ძიება ზემოთ",ARIA_SEARCH_DOWN:"ძიება ქვემოთ",ARIA_CLOSE_CHAT_POPUP:"ჩეთის ფანჯრის დახურვა",ARIA_SEARCH_INSIDE_CONVERSATION:"ძიება ამ საუბარში",ARIA_SEARCH:"ძიება",ARIA_CHAT:"ჩეთი",ARIA_SET_PLAYBACK_SPEED:"გადახვევის სიჩქარის დაყენება",ARIA_CANCEL_UPLOAD:"ატვირთვის გაუქმება",ARIA_STOP_RECORDING:"ჩაწერის შეჩერება",ARIA_CANCEL_RECORDING:"ჩაწერის გაუქმება",ARIA_INSERT_EMOJI:"ემოჯის ჩასმა",ARIA_PLAY_AUDIO:"აუდიოს დაკვრა",ARIA_PAUSE_AUDIO:"აუდიოს შეჩერება",ARIA_REACTION_COUNT:(t,e)=>`${t} რეაქცია (${e})`,ARIA_MORE_ACTIONS:"მეტი ქმედება",ARIA_REPLYING_TO:(t,e)=>`პასუხი ${t}-ს: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"პასუხის რეჟიმიდან გასვლა",SELECT_CONVERSATION:"აირჩიეთ საუბარი"}},ko:{code:"ko-KR",name:"Korean (South Korea)",emojiPickerTranslationUrl:null,emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/ko/cldr/data.json",translation:{YESTERDAY:"어제",TODAY:"오늘",DAYS:"일 전",HOURS:"시간 전",MINUTES:"분 전",JUST_NOW:"방금",LOCATION:"위치",CANCEL:"취소",INBOX:"대화 목록",DESKTOP_NOTIFICATIONS:"브라우저 알림",DESKTOP_NOTIFICATIONS_ERROR:"브라우저 알림을 표시할 수 없습니다. 브라우저 설정을 확인하거나 다른 브라우저를 사용해주세요.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} 데모 알림`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"브라우저 탭을 열어 둔 상태에서 누군가 대화 할 때 이 팝업이 표시됩니다.",SEND_BUTTON_TEXT:"전송",ENTRYBOX_TEXT_LIMIT:"최대 10,000자까지 입력할 수 있습니다.",ENTRYBOX_PLACEHOLDER:"메세지를 입력하세요...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"채팅이 종료되었습니다.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"읽기만 가능하며 메시지를 보낼 수 없습니다.",MESSAGELIST_LOADING_OLDER:"이전 메시지 로드 중...",MESSAGELIST_SHOW_OLDER:"이전 메시지 표시",MESSAGELIST_NEW_MARKER:"새 메시지",MESSAGE_SENT_VIA_EMAIL:"이 메시지는 이메일을 통해 전송되었습니다.",YOU_MARKER:"나",UPLOAD_IN_PROGRESS:"업로드 중...",UPLOAD_SEND_FILE:"파일 전송",UPLOAD_SHARE_LOCATION:"위치 공유",UPLOAD_ERROR:"업로드가 실패했습니다. 파일이 지원되지 않거나 너무 클 수 있습니다.",SHARE_LOCATION_ERROR:"위치를 공유 할 수 없습니다: ",LOADING:"로드 중...",HUB_EMPTY:"채팅 기록이 여기에 표시됩니다",HUB_SHOW_EARLIER:"이전 채팅보기",INBOX_NO_CHATS_TITLE:"아직 채팅이 없습니다!",INBOX_NO_CHATS_BODY:"대화가 하나 이상 있으면 여기에 표시됩니다.",ENABLE_TRANSLATION:"이 대화를 한국어로 번역",DISABLE_TRANSLATION:"원본 표시",SEARCH_PLACEHOLDER_TEXT:"검색...",SEARCH_SEARCHING:"검색 중...",SEARCH_NO_RESULTS:"검색 결과 없음",SEARCH_NO_MORE_RESULTS:"추가 검색 결과 없음",SEARCH_RESULTS_CONVERSATIONS:"대화",SEARCH_RESULTS_MESSAGES:"메시지",SEARCH_RESULTS_SHOW_MORE:"더 보기",CHAT_NOT_FOUND:"대화를 찾지 못했습니다",DELETE_MESSAGE:"메시지 삭제",DELETION_EXPLANATION:"이 메시지를 삭제하면 모든 사람이 볼 수 없게 됩니다.",EDIT_MESSAGE:"메시지 편집하기",SAVE:"저장",EDITED_INDICATOR:"편집",REPLY_TO_MESSAGE:"회신",ADD_REACTION:"반응 추가",AUTH_EXPIRED_OVERLAY_TITLE:"채팅 세션이 만료되었습니다",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"계속하려면 페이지를 새로고침하세요",VOICE_MESSAGE:"음성 메시지",CONTACT_INFORMATION_HIDDEN:"숨겨진 정보",LEAVE_CONVERSATION:"대화 떠나기",MARK_CONVERSATION_AS_UNREAD:"읽지 않은 상태로 표시",STATUS_INDICATOR_ONLINE:"활성",STATUS_INDICATOR_OFFLINE:"부재중",ARIA_LEAVE_SEARCH_MODE:"검색 모드 종료",ARIA_SEARCH_UP:"위로 검색",ARIA_SEARCH_DOWN:"아래로 검색",ARIA_CLOSE_CHAT_POPUP:"채팅 팝업 닫기",ARIA_SEARCH_INSIDE_CONVERSATION:"이 대화 내 검색",ARIA_SEARCH:"검색",ARIA_CHAT:"채팅",ARIA_SET_PLAYBACK_SPEED:"재생 속도 설정",ARIA_CANCEL_UPLOAD:"업로드 취소",ARIA_STOP_RECORDING:"녹음 중지",ARIA_CANCEL_RECORDING:"녹음 취소",ARIA_INSERT_EMOJI:"이모지 삽입",ARIA_PLAY_AUDIO:"오디오 재생",ARIA_PAUSE_AUDIO:"오디오 일시 정지",ARIA_REACTION_COUNT:(t,e)=>`${t}개 반응 (${e})`,ARIA_MORE_ACTIONS:"추가 작업",ARIA_REPLYING_TO:(t,e)=>`${t}에게 답장: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"답장 모드 종료",SELECT_CONVERSATION:"대화 선택"}},nb:{code:"nb-NO",name:"Norwegian (Bokmål)",emojiPickerTranslationUrl:null,emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/nb/cldr/data.json",translation:{YESTERDAY:"I går",TODAY:"I dag",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"Nå",LOCATION:"Plassering",CANCEL:"Avbryt",INBOX:"Innboks",DESKTOP_NOTIFICATIONS:"Nettleservarsler",DESKTOP_NOTIFICATIONS_ERROR:"Kan ikke aktivere Nettleservarsler fordi nettleseren din aktivt blokkerer dem. Prøv å se i innstillingene eller bruke en annen nettleser.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} demo varslinger`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Hvis du holder nettleservinduet åpent, vil du se dette varsel når noen snakker til deg.",SEND_BUTTON_TEXT:"Send",ENTRYBOX_TEXT_LIMIT:"Kun 10.000 tegn er tillatt.",ENTRYBOX_PLACEHOLDER:"Si noe...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Denne samtale er ikke lengre aktiv.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Du kan lese, men ikke sende meldinger.",MESSAGELIST_LOADING_OLDER:"Laster eldre meldinger...",MESSAGELIST_SHOW_OLDER:"Vis eldre meldinger",MESSAGELIST_NEW_MARKER:"Ny",MESSAGE_SENT_VIA_EMAIL:"Denne meldingen er sendt via e-post",YOU_MARKER:"deg",UPLOAD_IN_PROGRESS:"Laster opp...",UPLOAD_SEND_FILE:"Send fil",UPLOAD_SHARE_LOCATION:"Del din plassering",UPLOAD_ERROR:"Noe gikk galt i uplastingen. Det kan være filen ikke støttes eller for stor.",SHARE_LOCATION_ERROR:"Kan ikke dele plasseringen: ",LOADING:"Laster...",HUB_EMPTY:"Din chats historikk vil vises her",HUB_SHOW_EARLIER:"Vis tidligere chats",INBOX_NO_CHATS_TITLE:"Ingen chats enda!",INBOX_NO_CHATS_BODY:"Så snart du får en eller flere samtaler, vil de vises her.",ENABLE_TRANSLATION:"Oversett denne samtalen til norsk",DISABLE_TRANSLATION:"Vis original",SEARCH_PLACEHOLDER_TEXT:"Søk...",SEARCH_SEARCHING:"Søker...",SEARCH_NO_RESULTS:"Finner ingen resultater",SEARCH_NO_MORE_RESULTS:"Ingen flere resultater",SEARCH_RESULTS_CONVERSATIONS:"Samtaler",SEARCH_RESULTS_MESSAGES:"Meldinger",SEARCH_RESULTS_SHOW_MORE:"Vis mer",CHAT_NOT_FOUND:"Chat ikke funnet",DELETE_MESSAGE:"Slett melding",DELETION_EXPLANATION:"Hvis du sletter denne meldingen, forsvinner den for alle.",EDIT_MESSAGE:"Rediger melding",SAVE:"Lagre",EDITED_INDICATOR:"redigert",REPLY_TO_MESSAGE:"Svar",ADD_REACTION:"Legg til reaksjon",AUTH_EXPIRED_OVERLAY_TITLE:"Chatøkten er utløpt",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Oppdater siden for å fortsette",VOICE_MESSAGE:"Lydmelding",CONTACT_INFORMATION_HIDDEN:"Skjult informasjon",LEAVE_CONVERSATION:"Forlat samtalen",MARK_CONVERSATION_AS_UNREAD:"Merk som ulest",STATUS_INDICATOR_ONLINE:"Aktiv",STATUS_INDICATOR_OFFLINE:"Borte",ARIA_LEAVE_SEARCH_MODE:"Forlat søkemodus",ARIA_SEARCH_UP:"Søk oppover",ARIA_SEARCH_DOWN:"Søk nedover",ARIA_CLOSE_CHAT_POPUP:"Lukk chatvindu",ARIA_SEARCH_INSIDE_CONVERSATION:"Søk i denne samtalen",ARIA_SEARCH:"Søk",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"angi avspillingshastighet",ARIA_CANCEL_UPLOAD:"Avbryt opplasting",ARIA_STOP_RECORDING:"Stopp opptak",ARIA_CANCEL_RECORDING:"Avbryt opptak",ARIA_INSERT_EMOJI:"Sett inn en emoji",ARIA_PLAY_AUDIO:"spill av lyd",ARIA_PAUSE_AUDIO:"pause lyd",ARIA_REACTION_COUNT:(t,e)=>`${t} reaksjoner med ${e}`,ARIA_MORE_ACTIONS:"Flere handlinger",ARIA_REPLYING_TO:(t,e)=>`Svarer til ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Avslutt svarmodus",SELECT_CONVERSATION:"Velg en samtale"}},nl:{code:"nl-NL",name:"Dutch",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/nl.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/nl/cldr/data.json",translation:{YESTERDAY:"Gisteren",TODAY:"Vandaag",DAYS:"d",HOURS:"u",MINUTES:"m",JUST_NOW:"zojuist",LOCATION:"Locatie",CANCEL:"Annuleren",INBOX:"Inbox",DESKTOP_NOTIFICATIONS:"Browsermeldingen",DESKTOP_NOTIFICATIONS_ERROR:"Browsermeldingen kunnen niet geactiveerd worden omdat de browser het blokkeert. Check de instellingen van je browser of probeer een andere browser.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} demo notificatie`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Als je je browser open houdt, zie je deze popup als iemand tegen je praat.",SEND_BUTTON_TEXT:"Verzenden",ENTRYBOX_TEXT_LIMIT:"Maximaal 10.000 tekens toegestaan.",ENTRYBOX_PLACEHOLDER:"Typ een bericht...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Dit gesprek is niet actief meer.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Je kunt geen berichten sturen.",MESSAGELIST_LOADING_OLDER:"Eerdere berichten laden...",MESSAGELIST_SHOW_OLDER:"Laad eerdere berichten",MESSAGELIST_NEW_MARKER:"Nieuw",MESSAGE_SENT_VIA_EMAIL:"Dit bericht is verstuurd via e-mail",YOU_MARKER:"jij",UPLOAD_IN_PROGRESS:"Uploaden...",UPLOAD_SEND_FILE:"Verzend bestand",UPLOAD_SHARE_LOCATION:"Deel locatie",UPLOAD_ERROR:"Er ging iets mis. Het bestand wordt niet ondersteund of is te groot.",SHARE_LOCATION_ERROR:"Locatie delen mislukt: ",LOADING:"Bezig met laden...",HUB_EMPTY:"Berichtengeschiedenis wordt hier weergegeven",HUB_SHOW_EARLIER:"Laat eerdere berichten zien",INBOX_NO_CHATS_TITLE:"Nog geen chats!",INBOX_NO_CHATS_BODY:"Zodra je een of meerdere conversaties hebt gehad, worden deze hier weergegeven.",ENABLE_TRANSLATION:"Vertaal dit gesprek naar het Nederlands",DISABLE_TRANSLATION:"Toon oorspronkelijk gesprek",SEARCH_PLACEHOLDER_TEXT:"Zoek...",SEARCH_SEARCHING:"Zoeken...",SEARCH_NO_RESULTS:"Geen resultaten gevonden",SEARCH_NO_MORE_RESULTS:"Niet meer resultaten",SEARCH_RESULTS_CONVERSATIONS:"Gesprekken",SEARCH_RESULTS_MESSAGES:"Berichten",SEARCH_RESULTS_SHOW_MORE:"Toon meer",CHAT_NOT_FOUND:"Chat niet gevonden",DELETE_MESSAGE:"Bericht verwijderen",DELETION_EXPLANATION:"Als je dit bericht verwijdert, zal het voor iedereen verdwijnen.",EDIT_MESSAGE:"Bericht bewerken",SAVE:"Opslaan",EDITED_INDICATOR:"bewerkt",REPLY_TO_MESSAGE:"Beantwoorden",ADD_REACTION:"Reactie toevoegen",AUTH_EXPIRED_OVERLAY_TITLE:"Je chatsessie is verlopen",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Ververs de pagina om door te gaan",VOICE_MESSAGE:"Spraakbericht",LEAVE_CONVERSATION:"Gesprek verlaten",MARK_CONVERSATION_AS_UNREAD:"Markeren als ongelezen",STATUS_INDICATOR_ONLINE:"Online",STATUS_INDICATOR_OFFLINE:"Offline",CONTACT_INFORMATION_HIDDEN:"verborgen informatie",ARIA_LEAVE_SEARCH_MODE:"Zoekmodus verlaten",ARIA_SEARCH_UP:"Omhoog zoeken",ARIA_SEARCH_DOWN:"Omlaag zoeken",ARIA_CLOSE_CHAT_POPUP:"Chatvenster sluiten",ARIA_SEARCH_INSIDE_CONVERSATION:"Zoeken in dit gesprek",ARIA_SEARCH:"Zoeken",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"Afspeelsnelheid instellen",ARIA_CANCEL_UPLOAD:"Upload annuleren",ARIA_STOP_RECORDING:"Opname stoppen",ARIA_CANCEL_RECORDING:"Opname annuleren",ARIA_INSERT_EMOJI:"Een emoji invoegen",ARIA_PLAY_AUDIO:"Audio afspelen",ARIA_PAUSE_AUDIO:"Audio pauzeren",ARIA_REACTION_COUNT:(t,e)=>`${t} Reacties met ${e}`,ARIA_MORE_ACTIONS:"Meer acties",ARIA_REPLYING_TO:(t,e)=>`Beantwoorden aan ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Verlaat antwoordmodus",SELECT_CONVERSATION:"Selecteer een gesprek"}},pl:{code:"pl-PL",name:"Polish",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/pl.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/pl/cldr/data.json",translation:{YESTERDAY:"Wczoraj",TODAY:"Dzisiaj",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"teraz",LOCATION:"Lokalizacja",CANCEL:"Anuluj",INBOX:"Skrzynka odbiorcza",DESKTOP_NOTIFICATIONS:"Powiadomienia",DESKTOP_NOTIFICATIONS_ERROR:"Nie można aktywować powiadomień, ponieważ twoja przeglądarka je blokuje. Proszę zmienić ustawienie lub spróbować innej przeglądarki.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} przykładowe powiadomienie`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Jeśli zostawisz tę kartę otwartą, zobaczysz takie powiadomienie, gdy ktoś napisze do Ciebie.",SEND_BUTTON_TEXT:"Wyślij",ENTRYBOX_TEXT_LIMIT:"Nie można wysyłać więcej niż 10000 znaków.",ENTRYBOX_PLACEHOLDER:"Napisz coś...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Ten czat nie jest aktywny.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Możesz czytać wiadomości, ale nie możesz ich wysyłać.",MESSAGELIST_LOADING_OLDER:"Wczytuję starsze wiadomości...",MESSAGELIST_SHOW_OLDER:"Zobacz starsze wiadomości",MESSAGELIST_NEW_MARKER:"Nowe",MESSAGE_SENT_VIA_EMAIL:"Ta wiadomość została wysłana przez email.",YOU_MARKER:"ty",UPLOAD_IN_PROGRESS:"Przesyłanie...",UPLOAD_SEND_FILE:"Prześlij plik",UPLOAD_SHARE_LOCATION:"Udostępnij lokalizację",UPLOAD_ERROR:"Coś poszło nie tak. Plik może być zbyt duży lub jest nieobsługiwany.",SHARE_LOCATION_ERROR:"Nie da się udostępnić lokalizacji: ",LOADING:"Ładowanie...",HUB_EMPTY:"Twoje czaty pojawią się tutaj",HUB_SHOW_EARLIER:"Zobacz starsze czaty",INBOX_NO_CHATS_TITLE:"Brak czatów!",INBOX_NO_CHATS_BODY:"Rozpoczęte konwersacje pojawią się tutaj.",ENABLE_TRANSLATION:"Przetłumacz tę konwersację na język polski",DISABLE_TRANSLATION:"Pokaż oryginał",SEARCH_PLACEHOLDER_TEXT:"Wyszukaj...",SEARCH_SEARCHING:"Wyszukiwanie...",SEARCH_NO_RESULTS:"Nie znaleziono wyników",SEARCH_NO_MORE_RESULTS:"Nie ma innych wyników",SEARCH_RESULTS_CONVERSATIONS:"Konwersacje",SEARCH_RESULTS_MESSAGES:"Wiadomości",SEARCH_RESULTS_SHOW_MORE:"Pokaż więcej",CHAT_NOT_FOUND:"Nie znaleziono konwersacji",DELETE_MESSAGE:"Usuń wiadomość",DELETION_EXPLANATION:"Jeśli usuniesz tę wiadomość, przestanie być widoczna dla wszystkich.",EDIT_MESSAGE:"Edytuj wiadomość",SAVE:"Zapisz",EDITED_INDICATOR:"edytowano",REPLY_TO_MESSAGE:"Odpowiedz",ADD_REACTION:"Dodaj reakcję",AUTH_EXPIRED_OVERLAY_TITLE:"Twoja sesja wygasła",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Odśwież stronę, aby kontynuować",VOICE_MESSAGE:"Wiadomość głosowa",CONTACT_INFORMATION_HIDDEN:"Ukryte informacje",LEAVE_CONVERSATION:"Opuść konwersację",MARK_CONVERSATION_AS_UNREAD:"Oznacz jako nieprzeczytane",STATUS_INDICATOR_ONLINE:"Aktywny",STATUS_INDICATOR_OFFLINE:"Nieobecny",ARIA_LEAVE_SEARCH_MODE:"Wyjdź z trybu wyszukiwania",ARIA_SEARCH_UP:"Szukaj w górę",ARIA_SEARCH_DOWN:"Szukaj w dół",ARIA_CLOSE_CHAT_POPUP:"Zamknij okno czatu",ARIA_SEARCH_INSIDE_CONVERSATION:"Szukaj w tej konwersacji",ARIA_SEARCH:"Szukaj",ARIA_CHAT:"Czat",ARIA_SET_PLAYBACK_SPEED:"ustaw prędkość odtwarzania",ARIA_CANCEL_UPLOAD:"Anuluj przesyłanie",ARIA_STOP_RECORDING:"Zatrzymaj nagrywanie",ARIA_CANCEL_RECORDING:"Anuluj nagrywanie",ARIA_INSERT_EMOJI:"Wstaw emoji",ARIA_PLAY_AUDIO:"odtwórz audio",ARIA_PAUSE_AUDIO:"wstrzymaj audio",ARIA_REACTION_COUNT:(t,e)=>`${t} reakcji z ${e}`,ARIA_MORE_ACTIONS:"Więcej akcji",ARIA_REPLYING_TO:(t,e)=>`Odpowiadanie na ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Wyjdź z trybu odpowiedzi",SELECT_CONVERSATION:"Wybierz konwersację"}},pt:{code:"pt-BR",name:"Portuguese (Brazil)",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/pt_BR.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/pt/cldr/data.json",translation:{YESTERDAY:"Ontem",TODAY:"Hoje",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"agora mesmo",LOCATION:"Localização",CANCEL:"Cancelar",INBOX:"Caixa de entrada",DESKTOP_NOTIFICATIONS:"Notificações do navegador",DESKTOP_NOTIFICATIONS_ERROR:"Não é possível ativar as notificações da navegador porque seu navegador as bloqueia. Tente procurar nas configurações ou usar um navegador diferente.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} notificação de demonstração`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Se você mantiver a guia do navegador aberta, verá essa mensagem quando alguém falar com você.",SEND_BUTTON_TEXT:"Enviar",ENTRYBOX_TEXT_LIMIT:"Apenas 10.000 caracteres são permitidos.",ENTRYBOX_PLACEHOLDER:"Diga algo...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Esta conversa não está mais ativa.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Você pode ler, mas não enviar mensagens.",MESSAGELIST_LOADING_OLDER:"Carregando mensagens antigas...",MESSAGELIST_SHOW_OLDER:"Mostrar mensagens mais antigas",MESSAGELIST_NEW_MARKER:"Novo",MESSAGE_SENT_VIA_EMAIL:"Esta mensagem foi enviada via email.",YOU_MARKER:"Você",UPLOAD_IN_PROGRESS:"Carregando...",UPLOAD_SEND_FILE:"Enviar arquivo",UPLOAD_SHARE_LOCATION:"Compartilhar localização",UPLOAD_ERROR:"Algo deu errado ao fazer o upload. O arquivo pode não ter suporte ou ser muito grande.",SHARE_LOCATION_ERROR:"Não é possível compartilhar o local: ",LOADING:"Carregando...",HUB_EMPTY:"Seu histórico de conversas será exibido aqui",HUB_SHOW_EARLIER:"Mostrar conversas anteriores",INBOX_NO_CHATS_TITLE:"Ainda não há chats!",INBOX_NO_CHATS_BODY:"Depois de ter uma ou mais conversas, elas serão exibidas aqui.",ENABLE_TRANSLATION:"Traduzir esta conversa para português",DISABLE_TRANSLATION:"Ver a conversa não traduzida",SEARCH_PLACEHOLDER_TEXT:"Busca...",SEARCH_SEARCHING:"Consultando...",SEARCH_NO_RESULTS:"Resultados nao encontrados",SEARCH_NO_MORE_RESULTS:"Não há mais resultados",SEARCH_RESULTS_CONVERSATIONS:"Conversas",SEARCH_RESULTS_MESSAGES:"Mensagens",SEARCH_RESULTS_SHOW_MORE:"Mostrar mais",CHAT_NOT_FOUND:"Conversa não encontrada",DELETE_MESSAGE:"Excluir mensagem",DELETION_EXPLANATION:"Se você excluir esta mensagem, ela desaparecerá para todos.",EDIT_MESSAGE:"Editar mensagem",SAVE:"Salvar",EDITED_INDICATOR:"editada",REPLY_TO_MESSAGE:"Responder",ADD_REACTION:"Adicionar reação",AUTH_EXPIRED_OVERLAY_TITLE:"Sua sessão de chat expirou",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Atualize a página para continuar",VOICE_MESSAGE:"Mensagem de voz",LEAVE_CONVERSATION:"Sair da conversa",MARK_CONVERSATION_AS_UNREAD:"Marcar como não lida",STATUS_INDICATOR_ONLINE:"Online",STATUS_INDICATOR_OFFLINE:"Offline",CONTACT_INFORMATION_HIDDEN:"Informação oculta",ARIA_LEAVE_SEARCH_MODE:"Sair do modo de pesquisa",ARIA_SEARCH_UP:"Pesquisar para cima",ARIA_SEARCH_DOWN:"Pesquisar para baixo",ARIA_CLOSE_CHAT_POPUP:"Fechar janela de chat",ARIA_SEARCH_INSIDE_CONVERSATION:"Pesquisar nesta conversa",ARIA_SEARCH:"Pesquisar",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"definir velocidade de reprodução",ARIA_CANCEL_UPLOAD:"Cancelar envio",ARIA_STOP_RECORDING:"Parar gravação",ARIA_CANCEL_RECORDING:"Cancelar gravação",ARIA_INSERT_EMOJI:"Inserir um emoji",ARIA_PLAY_AUDIO:"reproduzir áudio",ARIA_PAUSE_AUDIO:"pausar áudio",ARIA_REACTION_COUNT:(t,e)=>`${t} reações com ${e}`,ARIA_MORE_ACTIONS:"Mais ações",ARIA_REPLYING_TO:(t,e)=>`Respondendo a ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Sair do modo de resposta",SELECT_CONVERSATION:"Selecione uma conversa"}},ro:{code:"ro-RO",name:"Romanian (Romania)",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Ieri",TODAY:"Astăzi",DAYS:"z",HOURS:"o",MINUTES:"m",JUST_NOW:"chiar acum",LOCATION:"Locație",CANCEL:"Anulare",INBOX:"Inbox",DESKTOP_NOTIFICATIONS:"Notificări browser",DESKTOP_NOTIFICATIONS_ERROR:"Nu se pot activa notificări browser deoarece browserul dvs. le blochează în mod activ. Încercați să căutați în setări sau utilizând un alt browser.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`Notificare de debit ${t}`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Dacă țineți fișa browserului deschis, veți vedea acest pop-up atunci când cineva vorbește cu dvs.",SEND_BUTTON_TEXT:"Trimiteți",ENTRYBOX_TEXT_LIMIT:"Sunt permise numai 10.000 de caractere.",ENTRYBOX_PLACEHOLDER:"Spune ceva...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Această conversație nu mai este activă.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Puteți citi, dar nu puteți trimite mesaje.",MESSAGELIST_LOADING_OLDER:"Încărcarea mesajelor mai vechi...",MESSAGELIST_SHOW_OLDER:"Afișați mesaje mai vechi",MESSAGELIST_NEW_MARKER:"Nou",MESSAGE_SENT_VIA_EMAIL:"Acest mesaj a fost trimis prin e-mail",YOU_MARKER:"voi",UPLOAD_IN_PROGRESS:"Încărcarea...",UPLOAD_SEND_FILE:"Trimiteți fișierul",UPLOAD_SHARE_LOCATION:"Distribuiți locația",UPLOAD_ERROR:"Sa încărcat ceva în mod greșit. Fișierul ar putea fi neacceptat sau prea mare.",SHARE_LOCATION_ERROR:"Nu se poate partaja locația: ",LOADING:"Încărcare...",HUB_EMPTY:"Istoricul chat-ului dvs. va apărea aici",HUB_SHOW_EARLIER:"Afișați discuțiile anterioare",INBOX_NO_CHATS_TITLE:"Încă nu vorbești!",INBOX_NO_CHATS_BODY:"După ce ați avut una sau mai multe conversații, acestea vor apărea aici.",ENABLE_TRANSLATION:"Traduceți această conversație în română",DISABLE_TRANSLATION:"Arată originalul",SEARCH_PLACEHOLDER_TEXT:"Căutare...",SEARCH_SEARCHING:"Se caută...",SEARCH_NO_RESULTS:"Nu s-au găsit rezultate",SEARCH_NO_MORE_RESULTS:"Nu mai există rezultate",SEARCH_RESULTS_CONVERSATIONS:"Conversații",SEARCH_RESULTS_MESSAGES:"Mesaje",SEARCH_RESULTS_SHOW_MORE:"Arată mai mult",CHAT_NOT_FOUND:"Conversația nu a fost găsită",DELETE_MESSAGE:"Șterge mesajul",DELETION_EXPLANATION:"Dacă ștergi acest mesaj, acesta va dispărea pentru toată lumea.",EDIT_MESSAGE:"Redactează mesajul",SAVE:"Salvare",EDITED_INDICATOR:"editat",REPLY_TO_MESSAGE:"Răspundeți",ADD_REACTION:"Adaugă o reacție",AUTH_EXPIRED_OVERLAY_TITLE:"Sesiunea dumneavoastră de chat a expirat",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Reîmprospătați pagina pentru a continua",VOICE_MESSAGE:"Mesaj vocal",CONTACT_INFORMATION_HIDDEN:"Informații ascunse",LEAVE_CONVERSATION:"Părăsește conversația",MARK_CONVERSATION_AS_UNREAD:"Marcheaza ca necitit",STATUS_INDICATOR_ONLINE:"Activ",STATUS_INDICATOR_OFFLINE:"Plecat",ARIA_LEAVE_SEARCH_MODE:"Părăsește modul de căutare",ARIA_SEARCH_UP:"Caută în sus",ARIA_SEARCH_DOWN:"Caută în jos",ARIA_CLOSE_CHAT_POPUP:"Închide fereastra de chat",ARIA_SEARCH_INSIDE_CONVERSATION:"Caută în această conversație",ARIA_SEARCH:"Caută",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"setează viteza de redare",ARIA_CANCEL_UPLOAD:"Anulează încărcarea",ARIA_STOP_RECORDING:"Oprește înregistrarea",ARIA_CANCEL_RECORDING:"Anulează înregistrarea",ARIA_INSERT_EMOJI:"Inserează un emoji",ARIA_PLAY_AUDIO:"redă audio",ARIA_PAUSE_AUDIO:"pauză audio",ARIA_REACTION_COUNT:(t,e)=>`${t} reacții cu ${e}`,ARIA_MORE_ACTIONS:"Mai multe acțiuni",ARIA_REPLYING_TO:(t,e)=>`Răspuns la ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Părăsește modul de răspuns",SELECT_CONVERSATION:"Selectați o conversație"}},ru:{code:"ru-RU",name:"Russian",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/ru_RU.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/ru/emojibase/data.json",translation:{YESTERDAY:"Вчера",TODAY:"Сегодня",DAYS:"д",HOURS:"ч",MINUTES:"м",JUST_NOW:"только что",LOCATION:"Местоположение",CANCEL:"Отмена",INBOX:"Входящие",DESKTOP_NOTIFICATIONS:"Оповещения",DESKTOP_NOTIFICATIONS_ERROR:"Невозможно включить оповещения, потому что ваш браузер активно блокирует их. Проверьте ваши настройки или попробуйте другой браузер.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} демо-оповещение`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Если вкладка вашего браузера открыта, вы увидите всплывающее окошко оповещения когда кто-то отправит вам сообщение.",SEND_BUTTON_TEXT:"Отправить",ENTRYBOX_TEXT_LIMIT:"Разрешено использовать только 10 тысяч символов.",ENTRYBOX_PLACEHOLDER:"Напишите что-нибудь...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Этот разговор больше неактивен.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Вы можете читать, но не отправлять сообщения.",MESSAGELIST_LOADING_OLDER:"Загрузка старых сообщения...",MESSAGELIST_SHOW_OLDER:"Показать старые сообщения",MESSAGELIST_NEW_MARKER:"Новые",MESSAGE_SENT_VIA_EMAIL:"Это сообщение было отправлено по электронной почте",YOU_MARKER:"вы",UPLOAD_IN_PROGRESS:"Загрузка...",UPLOAD_SEND_FILE:"Отправить файл",UPLOAD_SHARE_LOCATION:"Поделиться местоположением",UPLOAD_ERROR:"Что-то пошло не так: такой файл не поддерживается или он слишком большой.",SHARE_LOCATION_ERROR:"Не удается поделиться местоположением: ",LOADING:"Загрузка...",HUB_EMPTY:"Здесь появится ваша история чата",HUB_SHOW_EARLIER:"Показать предыдущие чаты",INBOX_NO_CHATS_TITLE:"Пока нет чатов!",INBOX_NO_CHATS_BODY:"Как только у вас будет один или несколько разговоров, они появятся здесь.",ENABLE_TRANSLATION:"Переведите этот разговор на русский",DISABLE_TRANSLATION:"Show source",SEARCH_PLACEHOLDER_TEXT:"поиск...",SEARCH_SEARCHING:"Поиск...",SEARCH_NO_RESULTS:"Результаты не найдены",SEARCH_NO_MORE_RESULTS:"Больше результатов нет",SEARCH_RESULTS_CONVERSATIONS:"Разговоры",SEARCH_RESULTS_MESSAGES:"Сообщения",SEARCH_RESULTS_SHOW_MORE:"Показать ещё",CHAT_NOT_FOUND:"Чат не найден",DELETE_MESSAGE:"Удалить сообщение",DELETION_EXPLANATION:"Если вы удалите это сообщение, оно исчезнет для всех.",EDIT_MESSAGE:"Изменить сообщение",SAVE:"сохранить",EDITED_INDICATOR:"изменено",REPLY_TO_MESSAGE:"Ответить",ADD_REACTION:"Добавить реакцию",AUTH_EXPIRED_OVERLAY_TITLE:"Срок действия вашего сеанса чата истек",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Обновите страницу, чтобы продолжить",VOICE_MESSAGE:"Голосовое сообщение",CONTACT_INFORMATION_HIDDEN:"Информация скрыта",LEAVE_CONVERSATION:"Выйти из беседы",MARK_CONVERSATION_AS_UNREAD:"Отметить как непрочитанное",STATUS_INDICATOR_ONLINE:"Активен",STATUS_INDICATOR_OFFLINE:"Не в сети",ARIA_LEAVE_SEARCH_MODE:"Выйти из режима поиска",ARIA_SEARCH_UP:"Искать вверх",ARIA_SEARCH_DOWN:"Искать вниз",ARIA_CLOSE_CHAT_POPUP:"Закрыть окно чата",ARIA_SEARCH_INSIDE_CONVERSATION:"Искать в этом разговоре",ARIA_SEARCH:"Поиск",ARIA_CHAT:"Чат",ARIA_SET_PLAYBACK_SPEED:"установить скорость воспроизведения",ARIA_CANCEL_UPLOAD:"Отменить загрузку",ARIA_STOP_RECORDING:"Остановить запись",ARIA_CANCEL_RECORDING:"Отменить запись",ARIA_INSERT_EMOJI:"Вставить эмодзи",ARIA_PLAY_AUDIO:"воспроизвести аудио",ARIA_PAUSE_AUDIO:"приостановить аудио",ARIA_REACTION_COUNT:(t,e)=>`${t} реакций с ${e}`,ARIA_MORE_ACTIONS:"Дополнительные действия",ARIA_REPLYING_TO:(t,e)=>`Ответ на ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Выйти из режима ответа",SELECT_CONVERSATION:"Выберите беседу"}},sq:{code:"sq-AL",name:"Albanian",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Dje",TODAY:"Sot",DAYS:"d",HOURS:"o",MINUTES:"m",JUST_NOW:"Tani",LOCATION:"Pozicion",CANCEL:"Anulo",INBOX:"Inbox",DESKTOP_NOTIFICATIONS:"Njoftimet e shfletuesit",DESKTOP_NOTIFICATIONS_ERROR:"Nuk mund të aktivizohen njoftimet në shfletues sepse shfletuesi juaj i bllokon ato në mënyrë aktive. Provoni të shikoni cilësimet ose përdorni një shfletues të ndryshëm.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} njoftime në desktop`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Lënia e skedës së shfletuesit tuaj të hapur do të pop-up kur dikush flet me ju.",SEND_BUTTON_TEXT:"Dërgo",ENTRYBOX_TEXT_LIMIT:"Lejohen vetëm 10,000 karaktere",ENTRYBOX_PLACEHOLDER:"Thuaj diçka...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Kjo bisedë nuk është më aktive.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Mund të lexoni por jo të dërgoni mesazhe.",MESSAGELIST_LOADING_OLDER:"Duke ngarkuar mesazhe më të vjetra...",MESSAGELIST_SHOW_OLDER:"Trego mesazhe më të vjetra",MESSAGELIST_NEW_MARKER:"E ri",MESSAGE_SENT_VIA_EMAIL:"Ky mesazh u dërgua si email",YOU_MARKER:"ti",UPLOAD_IN_PROGRESS:"Ngarkim...",UPLOAD_SEND_FILE:"Dërgo datotekën",UPLOAD_SHARE_LOCATION:"Ndani lokacionin",UPLOAD_ERROR:"Na vjen keq, diçka nuk shkoi si duhet. Dosja mund të mos ket mbështetje ose mund të jetë shumë e madhe.",SHARE_LOCATION_ERROR:"Nuk mund të ndahet lokacioni: ",LOADING:"Ngarkim...",HUB_EMPTY:"Këtu do të paraqitet/ shfaqet historia e bisedës tuaj",HUB_SHOW_EARLIER:"Shfaqi bisedat e mëparshme",INBOX_NO_CHATS_TITLE:"Nuk ka biseda!",INBOX_NO_CHATS_BODY:"Pasi të keni një ose më shumë biseda, ato do të paraqiten/shfaqen këtu.",ENABLE_TRANSLATION:"Përkthejeni këtë bisedë në shqiptare",DISABLE_TRANSLATION:"Shikoni origjinalin",SEARCH_PLACEHOLDER_TEXT:"Kërko...",SEARCH_SEARCHING:"Kërko...",SEARCH_NO_RESULTS:"Nuk ka rezultate",SEARCH_NO_MORE_RESULTS:"Nuk ka më rezultate",SEARCH_RESULTS_CONVERSATIONS:"Bisedat",SEARCH_RESULTS_MESSAGES:"Mesazhe",SEARCH_RESULTS_SHOW_MORE:"Shfaq më shumë",CHAT_NOT_FOUND:"Biseda nuk u gjet",DELETE_MESSAGE:"Fshi mesazhin",DELETION_EXPLANATION:"Nëse e fshini këtë mesazh, ai do të zhduket për të gjithë.",EDIT_MESSAGE:"Redakto mesazhin",SAVE:"Ruaj",EDITED_INDICATOR:"redaktuar",REPLY_TO_MESSAGE:"Përgjigj",ADD_REACTION:"Shtoni reagimin",AUTH_EXPIRED_OVERLAY_TITLE:"Sesioni juaj i bisedës ka skaduar",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Rifresko faqen për të vazhduar",VOICE_MESSAGE:"Mesazh zanor",CONTACT_INFORMATION_HIDDEN:"informacione të fshehura",LEAVE_CONVERSATION:"Largohu nga bashkëbisedimi",MARK_CONVERSATION_AS_UNREAD:"Shëno si të palexuar",STATUS_INDICATOR_ONLINE:"Aktiv",STATUS_INDICATOR_OFFLINE:"Larg",ARIA_LEAVE_SEARCH_MODE:"Dil nga mënyra e kërkimit",ARIA_SEARCH_UP:"Kërko lart",ARIA_SEARCH_DOWN:"Kërko poshtë",ARIA_CLOSE_CHAT_POPUP:"Mbyll dritaren e bisedës",ARIA_SEARCH_INSIDE_CONVERSATION:"Kërko në këtë bisedë",ARIA_SEARCH:"Kërko",ARIA_CHAT:"Bisedë",ARIA_SET_PLAYBACK_SPEED:"vendos shpejtësinë e luajtjes",ARIA_CANCEL_UPLOAD:"Anulo ngarkimin",ARIA_STOP_RECORDING:"Ndalo regjistrimin",ARIA_CANCEL_RECORDING:"Anulo regjistrimin",ARIA_INSERT_EMOJI:"Fut një emoji",ARIA_PLAY_AUDIO:"luaj audio",ARIA_PAUSE_AUDIO:"pauzë audio",ARIA_REACTION_COUNT:(t,e)=>`${t} reagime me ${e}`,ARIA_MORE_ACTIONS:"Më shumë veprime",ARIA_REPLYING_TO:(t,e)=>`Duke u përgjigjur ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Dil nga mënyra e përgjigjes",SELECT_CONVERSATION:"Zgjidhni një bashkëbisedim"}},sr:{code:"sr-SP",name:"Serbian",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Juče",TODAY:"Danas",DAYS:"d",HOURS:"s",MINUTES:"m",JUST_NOW:"Upravo sad",LOCATION:"Lokacija",CANCEL:"Otkaži",INBOX:"Pretinac",DESKTOP_NOTIFICATIONS:"Browser Notifikacija",DESKTOP_NOTIFICATIONS_ERROR:"Browser notifikacije nisu omogućene jer ih vaš pregledač aktivno blokira. Pokušajte pogledati postavke ili koristiti neki drugi pregledač.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} demo notifikacija`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Ako karticu pregledača ostavite otvorenu, pojaviće se ovaj pop-up kada neko razgovara s vama.",SEND_BUTTON_TEXT:"Pošalji",ENTRYBOX_TEXT_LIMIT:"Dozvoljeno je samo 10.000 znakova.",ENTRYBOX_PLACEHOLDER:"Kaži nešto...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Ovaj razgovor više nije aktivan.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Možete da čitate, ali ne i da šaljete poruke.",MESSAGELIST_LOADING_OLDER:"Učitavam starije poruke...",MESSAGELIST_SHOW_OLDER:"Prikaži starije poruke",MESSAGELIST_NEW_MARKER:"Novo",MESSAGE_SENT_VIA_EMAIL:"Ova poruka je poslana imejlom",YOU_MARKER:"ti",UPLOAD_IN_PROGRESS:"Učitavam...",UPLOAD_SEND_FILE:"Pošalji datoteku",UPLOAD_SHARE_LOCATION:"Podeli lokaciju",UPLOAD_ERROR:"Nažalost, nešto je pošlo krivo. Datoteka možda nije podržana ili je prevelika.",SHARE_LOCATION_ERROR:"Nije moguće podeliti lokaciju: ",LOADING:"Učitavam...",HUB_EMPTY:"Ovde će biti prikazana istorija razgovora",HUB_SHOW_EARLIER:"Prikaži ranije razgovore",INBOX_NO_CHATS_TITLE:"Nema razgovora!",INBOX_NO_CHATS_BODY:"Nakon što vodite jedan ili više razgovora, oni će se pojaviti ovde.",ENABLE_TRANSLATION:"Prevedi ovaj razgovor na srpski jezik",DISABLE_TRANSLATION:"Prikaži original",SEARCH_PLACEHOLDER_TEXT:"Pretraži...",SEARCH_SEARCHING:"Pretraživanje...",SEARCH_NO_RESULTS:"Nema rezultata",SEARCH_NO_MORE_RESULTS:"Nema više rezultata",SEARCH_RESULTS_CONVERSATIONS:"Razgovori",SEARCH_RESULTS_MESSAGES:"Poruke",SEARCH_RESULTS_SHOW_MORE:"Prikaži više",CHAT_NOT_FOUND:"Ćaskanje nije pronađeno",DELETE_MESSAGE:"Izbriši poruku",DELETION_EXPLANATION:"Ako obrišete ovu poruku, ona neće biti vidljiva ni za koga.",EDIT_MESSAGE:"Ispravi poruku",SAVE:"Sačuvaj",EDITED_INDICATOR:"ispravljeno",REPLY_TO_MESSAGE:"Odgovorite",ADD_REACTION:"Dodaj reakciju",AUTH_EXPIRED_OVERLAY_TITLE:"Vaša sesija ćaskanja je istekla",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Osvežite stranicu da biste nastavili",VOICE_MESSAGE:"Glasovna poruka",CONTACT_INFORMATION_HIDDEN:"Sakrivene informacije",LEAVE_CONVERSATION:"Napusti razgovor",MARK_CONVERSATION_AS_UNREAD:"Označi kao nepročitanu",STATUS_INDICATOR_ONLINE:"Aktivan",STATUS_INDICATOR_OFFLINE:"Neaktivan",ARIA_LEAVE_SEARCH_MODE:"Напусти режим претраге",ARIA_SEARCH_UP:"Тражи горе",ARIA_SEARCH_DOWN:"Тражи доле",ARIA_CLOSE_CHAT_POPUP:"Затвори прозор ћаскања",ARIA_SEARCH_INSIDE_CONVERSATION:"Тражи у овом разговору",ARIA_SEARCH:"Тражи",ARIA_CHAT:"Ћаскање",ARIA_SET_PLAYBACK_SPEED:"постави брзину репродукције",ARIA_CANCEL_UPLOAD:"Откажи отпремање",ARIA_STOP_RECORDING:"Заустави снимање",ARIA_CANCEL_RECORDING:"Откажи снимање",ARIA_INSERT_EMOJI:"Уметни емоџи",ARIA_PLAY_AUDIO:"репродукуј аудио",ARIA_PAUSE_AUDIO:"паузирај аудио",ARIA_REACTION_COUNT:(t,e)=>`${t} реакција са ${e}`,ARIA_MORE_ACTIONS:"Више радњи",ARIA_REPLYING_TO:(t,e)=>`Одговарање кориснику ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Izađi iz moda odgovaranja",SELECT_CONVERSATION:"Izaberite razgovor"}},sv:{code:"sv-SE",name:"Swedish (Sweden)",emojiPickerTranslationUrl:null,emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/sv/emojibase/data.json",translation:{YESTERDAY:"Igår",TODAY:"Idag",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"just nu",LOCATION:"Plats",CANCEL:"Avbryt",INBOX:"Inkorg",DESKTOP_NOTIFICATIONS:"Webbläsarnotiser",DESKTOP_NOTIFICATIONS_ERROR:"Kan inte aktivera webbläsarnotiser eftersom din webbläsare aktivt blockerar dem. Se över inställningarna eller använd en annan webbläsare.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} demonotis`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Om du har fliken i webbläsaren öppen så kommer den här notisen visas när någon pratar med dig.",SEND_BUTTON_TEXT:"Skicka",ENTRYBOX_TEXT_LIMIT:"Max 10 000 tecken är tillåtet.",ENTRYBOX_PLACEHOLDER:"Skriv ett meddelande...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Den här konversationen är inte längre aktiv.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Du kan läsa men inte skicka meddelanden.",MESSAGELIST_LOADING_OLDER:"Läser in tidigare meddelanden...",MESSAGELIST_SHOW_OLDER:"Visa tidigare meddelanden",MESSAGELIST_NEW_MARKER:"Nytt",MESSAGE_SENT_VIA_EMAIL:"Detta meddelande skickades via e-post",YOU_MARKER:"du",UPLOAD_IN_PROGRESS:"Laddar upp...",UPLOAD_SEND_FILE:"Skicka fil",UPLOAD_SHARE_LOCATION:"Dela plats",UPLOAD_ERROR:"Något gick fel vid uppladdningen. Filen kan vara av en typ som inte stöds eller är för stor.",SHARE_LOCATION_ERROR:"Kan inte dela plats: ",LOADING:"Laddar...",HUB_EMPTY:"Din chatthistorik kommer att visas här",HUB_SHOW_EARLIER:"Visa tidigare chattar",INBOX_NO_CHATS_TITLE:"Inga chattar ännu!",INBOX_NO_CHATS_BODY:"När du har haft en eller flera konversationer kommer de att visas här.",ENABLE_TRANSLATION:"Översätt den här konversationen till svenska",DISABLE_TRANSLATION:"Visa original",SEARCH_PLACEHOLDER_TEXT:"Sök...",SEARCH_SEARCHING:"Söker...",SEARCH_NO_RESULTS:"Inga resultat hittades",SEARCH_NO_MORE_RESULTS:"Inga fler resultat",SEARCH_RESULTS_CONVERSATIONS:"Konversationer",SEARCH_RESULTS_MESSAGES:"Meddelanden",SEARCH_RESULTS_SHOW_MORE:"Visa mer",CHAT_NOT_FOUND:"Chatten hittades inte",DELETE_MESSAGE:"Radera meddelandet",DELETION_EXPLANATION:"Om du raderar det här meddelandet försvinner det för alla.",EDIT_MESSAGE:"Redigera meddelandet",SAVE:"Spara",EDITED_INDICATOR:"redigerad",REPLY_TO_MESSAGE:"Svara",ADD_REACTION:"Lägg till reaktion",AUTH_EXPIRED_OVERLAY_TITLE:"Din chatsession har gått ut",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Uppdatera sidan för att fortsätta",VOICE_MESSAGE:"Röstmeddelande",CONTACT_INFORMATION_HIDDEN:"Dold information",LEAVE_CONVERSATION:"Lämna konversationen",MARK_CONVERSATION_AS_UNREAD:"Markera som oläst",STATUS_INDICATOR_ONLINE:"Online",STATUS_INDICATOR_OFFLINE:"Offline",ARIA_LEAVE_SEARCH_MODE:"Avsluta sökläge",ARIA_SEARCH_UP:"Sök uppåt",ARIA_SEARCH_DOWN:"Sök nedåt",ARIA_CLOSE_CHAT_POPUP:"Stäng chattfönstret",ARIA_SEARCH_INSIDE_CONVERSATION:"Sök i denna konversation",ARIA_SEARCH:"Sök",ARIA_CHAT:"Chatt",ARIA_SET_PLAYBACK_SPEED:"Ställ in uppspelningshastighet",ARIA_CANCEL_UPLOAD:"Avbryt uppladdning",ARIA_STOP_RECORDING:"Stoppa inspelning",ARIA_CANCEL_RECORDING:"Avbryt inspelning",ARIA_INSERT_EMOJI:"Infoga en emoji",ARIA_PLAY_AUDIO:"Spela upp ljud",ARIA_PAUSE_AUDIO:"Pausa ljud",ARIA_REACTION_COUNT:(t,e)=>`${t} Reaktioner med ${e}`,ARIA_MORE_ACTIONS:"Fler åtgärder",ARIA_REPLYING_TO:(t,e)=>`Svarar på ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Avsluta svarsläge",SELECT_CONVERSATION:"Välj en konversation"}},th:{code:"th-TH",name:"Thai",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"เมื่อวาน",TODAY:"วันนี้",DAYS:"วัน",HOURS:"ชม.",MINUTES:"น.",JUST_NOW:"เมื่อสักครู่",LOCATION:"ตำแหน่งที่ตั้ง",CANCEL:"ยกเลิก",INBOX:"กล่องข้อความ",DESKTOP_NOTIFICATIONS:"การแจ้งเตือนในเบราว์เซอร์",DESKTOP_NOTIFICATIONS_ERROR:"ไม่สามารถเปิดใช้งานการแจ้งเตือนในเบราว์เซอร์ได้ เนื่องจากเบราว์เซอร์ของคุณกำลังบล็อกการแจ้งเตือนอยู่ ลองตรวจสอบการตั้งค่าหรือใช้เบราว์เซอร์อื่น",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`การแจ้งเตือนตัวอย่างของ ${t}`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"หากคุณเปิดแท็บเบราว์เซอร์นี้ไว้ คุณจะเห็นการแจ้งเตือนนี้เมื่อมีคนส่งข้อความถึงคุณ",SEND_BUTTON_TEXT:"ส่ง",ENTRYBOX_TEXT_LIMIT:"อนุญาตให้พิมพ์ได้สูงสุด 10,000 ตัวอักษร",ENTRYBOX_PLACEHOLDER:"พิมพ์ข้อความ...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"การสนทนานี้ไม่เปิดใช้งานอีกต่อไป",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"คุณสามารถอ่านข้อความได้ แต่ไม่สามารถส่งข้อความได้",MESSAGELIST_LOADING_OLDER:"กำลังโหลดข้อความเก่า...",MESSAGELIST_SHOW_OLDER:"แสดงข้อความเก่า",MESSAGELIST_NEW_MARKER:"ใหม่",MESSAGE_SENT_VIA_EMAIL:"ข้อความนี้ถูกส่งผ่านอีเมล",YOU_MARKER:"คุณ",UPLOAD_IN_PROGRESS:"กำลังอัปโหลด...",UPLOAD_SEND_FILE:"ส่งไฟล์",UPLOAD_SHARE_LOCATION:"แชร์ตำแหน่งที่ตั้ง",UPLOAD_ERROR:"ขออภัย เกิดข้อผิดพลาดระหว่างการอัปโหลด ไฟล์อาจไม่รองรับหรือมีขนาดใหญ่เกินไป",SHARE_LOCATION_ERROR:"ไม่สามารถแชร์ตำแหน่งที่ตั้งได้: ",LOADING:"กำลังโหลด...",HUB_EMPTY:"ประวัติการสนทนาของคุณจะแสดงที่นี่",HUB_SHOW_EARLIER:"แสดงการสนทนาก่อนหน้า",INBOX_NO_CHATS_TITLE:"ยังไม่มีการสนทนา!",INBOX_NO_CHATS_BODY:"เมื่อคุณมีการสนทนาอย่างน้อยหนึ่งรายการ การสนทนาเหล่านั้นจะแสดงที่นี่",ENABLE_TRANSLATION:"แปลการสนทนานี้เป็นภาษาไทย",DISABLE_TRANSLATION:"แสดงต้นฉบับ",SEARCH_PLACEHOLDER_TEXT:"ค้นหา...",SEARCH_SEARCHING:"กำลังค้นหา...",SEARCH_NO_RESULTS:"ไม่พบผลลัพธ์",SEARCH_NO_MORE_RESULTS:"ไม่มีผลลัพธ์เพิ่มเติม",SEARCH_RESULTS_CONVERSATIONS:"การสนทนา",SEARCH_RESULTS_MESSAGES:"ข้อความ",SEARCH_RESULTS_SHOW_MORE:"แสดงเพิ่มเติม",CHAT_NOT_FOUND:"ไม่พบการสนทนา",DELETE_MESSAGE:"ลบข้อความ",DELETION_EXPLANATION:"หากคุณลบข้อความนี้ ข้อความจะหายไปสำหรับทุกคน",EDIT_MESSAGE:"แก้ไขข้อความ",SAVE:"บันทึก",EDITED_INDICATOR:"แก้ไขแล้ว",REPLY_TO_MESSAGE:"ตอบกลับ",ADD_REACTION:"เพิ่มปฏิกิริยา",AUTH_EXPIRED_OVERLAY_TITLE:"เซสชันแชทของคุณหมดอายุแล้ว",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"รีเฟรชหน้าเพื่อดำเนินการต่อ",VOICE_MESSAGE:"ข้อความเสียง",LEAVE_CONVERSATION:"ออกจากการสนทนา",MARK_CONVERSATION_AS_UNREAD:"ทำเครื่องหมายว่ายังไม่ได้อ่าน",STATUS_INDICATOR_ONLINE:"ออนไลน์",STATUS_INDICATOR_OFFLINE:"ออฟไลน์",CONTACT_INFORMATION_HIDDEN:"ข้อมูลถูกซ่อน",ARIA_LEAVE_SEARCH_MODE:"ออกจากโหมดค้นหา",ARIA_SEARCH_UP:"ค้นหาขึ้น",ARIA_SEARCH_DOWN:"ค้นหาลง",ARIA_CLOSE_CHAT_POPUP:"ปิดหน้าต่างแชท",ARIA_SEARCH_INSIDE_CONVERSATION:"ค้นหาภายในการสนทนานี้",ARIA_SEARCH:"ค้นหา",ARIA_CHAT:"แชท",ARIA_SET_PLAYBACK_SPEED:"ตั้งค่าความเร็วการเล่น",ARIA_CANCEL_UPLOAD:"ยกเลิกการอัปโหลด",ARIA_STOP_RECORDING:"หยุดการบันทึก",ARIA_CANCEL_RECORDING:"ยกเลิกการบันทึก",ARIA_INSERT_EMOJI:"แทรกอีโมจิ",ARIA_PLAY_AUDIO:"เล่นเสียง",ARIA_PAUSE_AUDIO:"หยุดเสียงชั่วคราว",ARIA_REACTION_COUNT:(t,e)=>`${t} ปฏิกิริยาด้วย ${e}`,ARIA_MORE_ACTIONS:"การดำเนินการเพิ่มเติม",ARIA_REPLYING_TO:(t,e)=>`กำลังตอบกลับ ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"ออกจากโหมดตอบกลับ",SELECT_CONVERSATION:"เลือกการสนทนา"}},tr:{code:"tr-TR",name:"Turkish",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/tr.js",emojiDataUrl:null,translation:{YESTERDAY:"Dün",TODAY:"Bugün",DAYS:"g",HOURS:"s",MINUTES:"d",JUST_NOW:"az önce",LOCATION:"Konum",CANCEL:"İptal",INBOX:"Gelen Kutusu",SEND_BUTTON_TEXT:"Gönder",ENTRYBOX_TEXT_LIMIT:"En fazla 10.000 karaktere izin veriliyor.",ENTRYBOX_PLACEHOLDER:"Bir şeyler söyle...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Bu konuşma artık aktif değil.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Mesajları okuyabilirsiniz ancak mesaj gönderemezsiniz.",MESSAGELIST_LOADING_OLDER:"Eski mesajlar yükleniyor...",MESSAGELIST_SHOW_OLDER:"Eski mesajları göster",MESSAGELIST_NEW_MARKER:"Yeni",DESKTOP_NOTIFICATIONS:"Tarayıcı bildirimleri",DESKTOP_NOTIFICATIONS_ERROR:"Tarayıcınız aktif olarak engellediğinden tarayıcı bildirimlerini etkinleştiremiyoruz. Ayarları kontrol etmeyi veya farklı bir tarayıcı kullanmayı deneyebilirsiniz.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} test bildirimi`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Eğer tarayıcınızın penceresini açık tutarsanız biri mesaj yazdığında bu bildirimi göreceksiniz.",MESSAGE_SENT_VIA_EMAIL:"Bu mesaj e-posta ile gönderilmiştir.",YOU_MARKER:"siz",UPLOAD_IN_PROGRESS:"Yükleniyor...",UPLOAD_SEND_FILE:"Dosya gönder",UPLOAD_SHARE_LOCATION:"Konum paylaş",UPLOAD_ERROR:"Yükleme sırasında bir şeyler yanlış gitti. Dosya desteklenmiyor veya izin verilenden büyük olabilir.",SHARE_LOCATION_ERROR:"Konum paylaşılamadı: ",LOADING:"Yükleniyor...",HUB_EMPTY:"Konuşma geçmişiniz burada görünecek",HUB_SHOW_EARLIER:"Önceki konuşmaları göster",INBOX_NO_CHATS_TITLE:"Henüz konuşma yok!",INBOX_NO_CHATS_BODY:"Bir veya daha fazla konuşma başlattığınız konuşmalar burada belirecek.",ENABLE_TRANSLATION:"Bu konuşmayı Türkçe'ye çevir",DISABLE_TRANSLATION:"Orijinali göster",SEARCH_PLACEHOLDER_TEXT:"Ara...",SEARCH_SEARCHING:"Arıyor...",SEARCH_NO_RESULTS:"Sonuç bulunamadı",SEARCH_NO_MORE_RESULTS:"Başka sonuç bulunamadı.",SEARCH_RESULTS_CONVERSATIONS:"Konuşmalar",SEARCH_RESULTS_MESSAGES:"Mesajlar",SEARCH_RESULTS_SHOW_MORE:"Daha fazla göster",CHAT_NOT_FOUND:"Sohbet bulunamadı",DELETE_MESSAGE:"Mesajı sil",DELETION_EXPLANATION:"Bu mesajı silerseniz herkes için görünmez olacaktır.",EDIT_MESSAGE:"Mesajı düzenle",SAVE:"Kaydet",EDITED_INDICATOR:"düzenlenmiş",REPLY_TO_MESSAGE:"Yanıtla",ADD_REACTION:"Tepki ekle",AUTH_EXPIRED_OVERLAY_TITLE:"Sohbet oturumunuz sona erdi",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Devam etmek için sayfayı yenileyin",VOICE_MESSAGE:"Sesli mesaj",CONTACT_INFORMATION_HIDDEN:"Gizli bilgi",LEAVE_CONVERSATION:"Konuşmadan ayrıl",MARK_CONVERSATION_AS_UNREAD:"Okunmamış olarak işaretle",STATUS_INDICATOR_ONLINE:"Aktif",STATUS_INDICATOR_OFFLINE:"Uzakta",ARIA_LEAVE_SEARCH_MODE:"Arama modundan çık",ARIA_SEARCH_UP:"Yukarı ara",ARIA_SEARCH_DOWN:"Aşağı ara",ARIA_CLOSE_CHAT_POPUP:"Sohbet penceresini kapat",ARIA_SEARCH_INSIDE_CONVERSATION:"Bu konuşmada ara",ARIA_SEARCH:"Ara",ARIA_CHAT:"Sohbet",ARIA_SET_PLAYBACK_SPEED:"oynatma hızını ayarla",ARIA_CANCEL_UPLOAD:"Yüklemeyi iptal et",ARIA_STOP_RECORDING:"Kaydı durdur",ARIA_CANCEL_RECORDING:"Kaydı iptal et",ARIA_INSERT_EMOJI:"Emoji ekle",ARIA_PLAY_AUDIO:"sesi oynat",ARIA_PAUSE_AUDIO:"sesi duraklat",ARIA_REACTION_COUNT:(t,e)=>`${t} tepki (${e})`,ARIA_MORE_ACTIONS:"Daha fazla işlem",ARIA_REPLYING_TO:(t,e)=>`${t}'a yanıtlama: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Yanıt modundan çık",SELECT_CONVERSATION:"Bir konuşma seçin"}},uk:{code:"uk-UA",name:"Ukrainian (Ukraine)",emojiPickerTranslationUrl:null,emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/uk/cldr/data.json",translation:{YESTERDAY:"Вчора",TODAY:"Сьогодні",DAYS:"d",HOURS:"h",MINUTES:"м",JUST_NOW:"просто зараз",LOCATION:"Місцезнаходження",CANCEL:"Скасувати",INBOX:"Вхідні",DESKTOP_NOTIFICATIONS:"Сповіщення в браузері",DESKTOP_NOTIFICATIONS_ERROR:"Неможливо ввімкнути сповіщення в браузері, оскільки ваш веб-переглядач активно їх блокує. Спробуйте переглянути налаштування або використовувати інший браузер.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`Демо-повідомлення про ${t}`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Якщо ви відкриєте вкладку веб-переглядача відкритою, ви побачите це спливаюче вікно, коли хтось спілкується з вами.",SEND_BUTTON_TEXT:"Надіслати",ENTRYBOX_TEXT_LIMIT:"Дозволено лише 10 000 символів.",ENTRYBOX_PLACEHOLDER:"Скажи щось...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Ця розмова більше не активна.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Ви можете читати, але не надсилати повідомлення.",MESSAGELIST_LOADING_OLDER:"Завантаження старих повідомлень...",MESSAGELIST_SHOW_OLDER:"Показати старіші повідомлення",MESSAGELIST_NEW_MARKER:"Нові",MESSAGE_SENT_VIA_EMAIL:"Це повідомлення надіслано електронною поштою",YOU_MARKER:"ти",UPLOAD_IN_PROGRESS:"Завантаження...",UPLOAD_SEND_FILE:"Надіслати файл",UPLOAD_SHARE_LOCATION:"Поділитися місцезнаходженням",UPLOAD_ERROR:"На жаль, під час завантаження щось не вдалось. Файл може бути непідтримуваним або занадто великим.",SHARE_LOCATION_ERROR:"Неможливо поділити місцезнаходження: ",LOADING:"Завантаження...",HUB_EMPTY:"Тут відобразиться ваша історія чатів",HUB_SHOW_EARLIER:"Показати попередні чати",INBOX_NO_CHATS_TITLE:"Чатів ще немає!",INBOX_NO_CHATS_BODY:"Після того, як ви проведете одну чи кілька бесід, вони з’являться тут.",ENABLE_TRANSLATION:"Перекласти цю розмову англійською",DISABLE_TRANSLATION:"Показати оригінал",SEARCH_PLACEHOLDER_TEXT:"Пошук...",SEARCH_SEARCHING:"Пошук...",SEARCH_NO_RESULTS:"Не знайдено результатів",SEARCH_NO_MORE_RESULTS:"Більше немає результатів",SEARCH_RESULTS_CONVERSATIONS:"Розмови",SEARCH_RESULTS_MESSAGES:"Повідомлення",SEARCH_RESULTS_SHOW_MORE:"Показати більше",CHAT_NOT_FOUND:"Чат не знайдено",DELETE_MESSAGE:"Видалити повідомлення",DELETION_EXPLANATION:"Якщо ви видалите це повідомлення, воно зникне для всіх.",EDIT_MESSAGE:"Редагувати повідомлення",SAVE:"Зберегти",EDITED_INDICATOR:"відредаговано",REPLY_TO_MESSAGE:"Відповісти",ADD_REACTION:"Додати реакцію",AUTH_EXPIRED_OVERLAY_TITLE:"Ваша сесія в чаті закінчилась",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Оновіть сторінку, щоб продовжити",VOICE_MESSAGE:"Голосове повідомлення",CONTACT_INFORMATION_HIDDEN:"Прихована інформація",LEAVE_CONVERSATION:"Залишити розмову",MARK_CONVERSATION_AS_UNREAD:"Відзначити як непрочитане",STATUS_INDICATOR_ONLINE:"Активний",STATUS_INDICATOR_OFFLINE:"Відсутній",ARIA_LEAVE_SEARCH_MODE:"Вийти з режиму пошуку",ARIA_SEARCH_UP:"Шукати вгору",ARIA_SEARCH_DOWN:"Шукати вниз",ARIA_CLOSE_CHAT_POPUP:"Закрити вікно чату",ARIA_SEARCH_INSIDE_CONVERSATION:"Шукати в цій розмові",ARIA_SEARCH:"Пошук",ARIA_CHAT:"Чат",ARIA_SET_PLAYBACK_SPEED:"встановити швидкість відтворення",ARIA_CANCEL_UPLOAD:"Скасувати завантаження",ARIA_STOP_RECORDING:"Зупинити запис",ARIA_CANCEL_RECORDING:"Скасувати запис",ARIA_INSERT_EMOJI:"Вставити емодзі",ARIA_PLAY_AUDIO:"відтворити аудіо",ARIA_PAUSE_AUDIO:"призупинити аудіо",ARIA_REACTION_COUNT:(t,e)=>`${t} реакцій з ${e}`,ARIA_MORE_ACTIONS:"Більше дій",ARIA_REPLYING_TO:(t,e)=>`Відповідь на ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Вийти з режиму відповіді",SELECT_CONVERSATION:"Виберіть розмову"}},vi:{code:"vi-VN",name:"Vietnamese",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/vi.js",emojiDataUrl:null,translation:{YESTERDAY:"Hôm qua",TODAY:"Hôm nay",DAYS:"ngày",HOURS:"giờ",MINUTES:"phút",JUST_NOW:"vừa xong",LOCATION:"Địa điểm",CANCEL:"Hủy",INBOX:"Hộp thư đến",DESKTOP_NOTIFICATIONS:"Thông báo trình duyệt",DESKTOP_NOTIFICATIONS_ERROR:"Không thể bật thông báo trên trình duyệt vì trình duyệt của bạn đang tắt chức năng này. Hãy thử tìm trong cài đặt trình duyệt hoặc sử dụng một trình duyệt khác.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} thông báo thử nghiệm`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Nếu bạn giữ tab trình duyệt của bạn mở, bạn sẽ thấy cửa sổ bật lên khi ai đó nói chuyện với bạn.",SEND_BUTTON_TEXT:"Gửi",ENTRYBOX_TEXT_LIMIT:"Tối đa 10.000 ký tự.",ENTRYBOX_PLACEHOLDER:"Nói gì đó...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Cuộc hội thoại này không còn hoạt động.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Bạn có thể đọc, nhưng không thể gửi tin nhắn.",MESSAGELIST_LOADING_OLDER:"Đang tải tin nhắn cũ...",MESSAGELIST_SHOW_OLDER:"Hiển thị tin nhắn trước đó",MESSAGELIST_NEW_MARKER:"Mới",MESSAGE_SENT_VIA_EMAIL:"Tin nhắn này đã được gửi qua email",YOU_MARKER:"bạn",UPLOAD_IN_PROGRESS:"Đang tải lên...",UPLOAD_SEND_FILE:"Gửi tệp",UPLOAD_SHARE_LOCATION:"Chia sẻ vị trí",UPLOAD_ERROR:"Thật không may, quá trình tải lên không thành công. Tệp không được hỗ trợ hoặc quá lớn.",SHARE_LOCATION_ERROR:"Không thể chia sẻ vị trí: ",LOADING:"Đang tải...",HUB_EMPTY:"Lịch sử trò chuyện của bạn sẽ hiển thị ở đây",HUB_SHOW_EARLIER:"Hiển thị các cuộc trò chuyện trước đó",INBOX_NO_CHATS_TITLE:"Chưa có cuộc trò chuyện nào!",INBOX_NO_CHATS_BODY:"Khi bạn đã có một hoặc nhiều cuộc trò chuyện, chúng sẽ hiển thị ở đây.",ENABLE_TRANSLATION:"Dịch cuộc hội thoại sang Tiếng Việt",DISABLE_TRANSLATION:"Hiển thị nội dung gốc",SEARCH_PLACEHOLDER_TEXT:"TÌm kiếm...",SEARCH_SEARCHING:"Đang tìm kiếm...",SEARCH_NO_RESULTS:"Không tìm thấy kết quả nào",SEARCH_NO_MORE_RESULTS:"Không có kết quả nào khác",SEARCH_RESULTS_CONVERSATIONS:"Cuộc trò chuyện",SEARCH_RESULTS_MESSAGES:"Tin nhắn",SEARCH_RESULTS_SHOW_MORE:"Hiển thị thêm",CHAT_NOT_FOUND:"Không tìm thấy cuộc trò chuyện",DELETE_MESSAGE:"Xóa tin nhắn",DELETION_EXPLANATION:"Nếu bạn xóa tin nhắn này, tất cả mọi người sẽ không còn thấy nó.",EDIT_MESSAGE:"Chỉnh sửa tin nhắn",SAVE:"lưu",EDITED_INDICATOR:"đã chỉnh sửa",REPLY_TO_MESSAGE:"đáp lại",ADD_REACTION:"Thêm biểu tượng cảm xúc",AUTH_EXPIRED_OVERLAY_TITLE:"Phiên trò chuyện của bạn đã hết hạn",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Hãy làm mới trang để tiếp tục",VOICE_MESSAGE:"Tin nhắn thoại",CONTACT_INFORMATION_HIDDEN:"Thông tin ẩn",LEAVE_CONVERSATION:"Thoát khỏi cuộc trò chuyện",MARK_CONVERSATION_AS_UNREAD:"Đánh dấu là chưa đọc",STATUS_INDICATOR_ONLINE:"Hoạt động",STATUS_INDICATOR_OFFLINE:"Vắng mặt",ARIA_LEAVE_SEARCH_MODE:"Thoát chế độ tìm kiếm",ARIA_SEARCH_UP:"Tìm kiếm lên trên",ARIA_SEARCH_DOWN:"Tìm kiếm xuống dưới",ARIA_CLOSE_CHAT_POPUP:"Đóng cửa sổ trò chuyện",ARIA_SEARCH_INSIDE_CONVERSATION:"Tìm kiếm trong cuộc trò chuyện này",ARIA_SEARCH:"Tìm kiếm",ARIA_CHAT:"Trò chuyện",ARIA_SET_PLAYBACK_SPEED:"đặt tốc độ phát",ARIA_CANCEL_UPLOAD:"Hủy tải lên",ARIA_STOP_RECORDING:"Dừng ghi âm",ARIA_CANCEL_RECORDING:"Hủy ghi âm",ARIA_INSERT_EMOJI:"Chèn biểu tượng cảm xúc",ARIA_PLAY_AUDIO:"phát âm thanh",ARIA_PAUSE_AUDIO:"tạm dừng âm thanh",ARIA_REACTION_COUNT:(t,e)=>`${t} phản ứng với ${e}`,ARIA_MORE_ACTIONS:"Thêm hành động",ARIA_REPLYING_TO:(t,e)=>`Đang trả lời ${t}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Thoát chế độ trả lời",SELECT_CONVERSATION:"Chọn một cuộc trò chuyện"}},zh:{code:"zh-CN",name:"Chinese (Simplified)",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/zh_CN.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/zh/emojibase/data.json",translation:{YESTERDAY:"昨天",TODAY:"今天",DAYS:"天",HOURS:"小时",MINUTES:"分钟",JUST_NOW:"刚才",LOCATION:"地点",CANCEL:"取消",INBOX:"收件箱",DESKTOP_NOTIFICATIONS:"浏览器通知",DESKTOP_NOTIFICATIONS_ERROR:"因浏览器设置为阻止,所以无法激活浏览器提醒。请去设置里查看或者尝试其他的浏览器。",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} 演示提醒`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"只要保持浏览器开着,如果有人和你对话,将会自动弹出对话窗口。",SEND_BUTTON_TEXT:"发送",ENTRYBOX_TEXT_LIMIT:"不超过10,000个字符。",ENTRYBOX_PLACEHOLDER:"写点什么吧……",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"该对话已结束。",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"你只能阅读信息,不能发送信息。",MESSAGELIST_LOADING_OLDER:"载入之前的信息……",MESSAGELIST_SHOW_OLDER:"显示之前的信息",MESSAGELIST_NEW_MARKER:"新消息",MESSAGE_SENT_VIA_EMAIL:"该信息已通过邮件发送。",YOU_MARKER:"你",UPLOAD_IN_PROGRESS:"上传中……",UPLOAD_SEND_FILE:"发送文件",UPLOAD_SHARE_LOCATION:"分享地址",UPLOAD_ERROR:"上传出错。文件格式不支持或者太大。",SHARE_LOCATION_ERROR:"无法分享地址: ",LOADING:"正在载入……",HUB_EMPTY:"你的聊天记录将在此显示。",HUB_SHOW_EARLIER:"显示之前的聊天记录。",INBOX_NO_CHATS_TITLE:"暂无任何聊天记录!",INBOX_NO_CHATS_BODY:"如果你有一个或多个对话窗口进行中,将显示在这里。",ENABLE_TRANSLATION:"翻译至简体中文",DISABLE_TRANSLATION:"查看原文",SEARCH_PLACEHOLDER_TEXT:"搜索...",SEARCH_SEARCHING:"正在搜索...",SEARCH_NO_RESULTS:"未找到结果",SEARCH_NO_MORE_RESULTS:"无更多结果",SEARCH_RESULTS_CONVERSATIONS:"对话",SEARCH_RESULTS_MESSAGES:"消息",SEARCH_RESULTS_SHOW_MORE:"显示更多",CHAT_NOT_FOUND:"未找到“聊天”",DELETE_MESSAGE:"删除消息",DELETION_EXPLANATION:"如果您删除此消息,那么所有人都将无法再看到它。",EDIT_MESSAGE:"编辑消息",SAVE:"保存",EDITED_INDICATOR:"本消息有改动",REPLY_TO_MESSAGE:"回复",ADD_REACTION:"添加反应",AUTH_EXPIRED_OVERLAY_TITLE:"您的聊天会话已过期",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"刷新页面以继续",VOICE_MESSAGE:"语音消息",CONTACT_INFORMATION_HIDDEN:"隐藏信息",LEAVE_CONVERSATION:"离开对话",MARK_CONVERSATION_AS_UNREAD:"标记为未读",STATUS_INDICATOR_ONLINE:"活跃",STATUS_INDICATOR_OFFLINE:"离开",ARIA_LEAVE_SEARCH_MODE:"退出搜索模式",ARIA_SEARCH_UP:"向上搜索",ARIA_SEARCH_DOWN:"向下搜索",ARIA_CLOSE_CHAT_POPUP:"关闭聊天弹窗",ARIA_SEARCH_INSIDE_CONVERSATION:"在此对话中搜索",ARIA_SEARCH:"搜索",ARIA_CHAT:"聊天",ARIA_SET_PLAYBACK_SPEED:"设置播放速度",ARIA_CANCEL_UPLOAD:"取消上传",ARIA_STOP_RECORDING:"停止录音",ARIA_CANCEL_RECORDING:"取消录音",ARIA_INSERT_EMOJI:"插入表情符号",ARIA_PLAY_AUDIO:"播放音频",ARIA_PAUSE_AUDIO:"暂停音频",ARIA_REACTION_COUNT:(t,e)=>`${t}个反应(${e})`,ARIA_MORE_ACTIONS:"更多操作",ARIA_REPLYING_TO:(t,e)=>`正在回复 ${t}:${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"退出回复模式",SELECT_CONVERSATION:"选择对话"}},zhTw:{code:"zh-TW",name:"Chinese (Traditional)",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/zh_CN.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/zh-hant/cldr/data.json",translation:{YESTERDAY:"昨天",TODAY:"昨天",DAYS:"天",HOURS:"小時",MINUTES:"分",JUST_NOW:"現在",LOCATION:"地點",CANCEL:"取消",INBOX:"收件箱",DESKTOP_NOTIFICATIONS:"瀏覽器通知",DESKTOP_NOTIFICATIONS_ERROR:"無法啟用瀏覽器通知,因為您的瀏覽器主動阻止它們。 嘗試查看設置或使用其他瀏覽器。",DESKTOP_NOTIFICATIONS_DEMO_TITLE:t=>`${t} 演示通知`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"如果您持續打開瀏覽器標籤頁,當有人與您通話時,您會看到此彈出窗口。",SEND_BUTTON_TEXT:"發送",ENTRYBOX_TEXT_LIMIT:"只允許10.000個字符。",ENTRYBOX_PLACEHOLDER:"說些什麼...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"此對話不再有效。",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"您可以閱讀,但不能發送消息。",MESSAGELIST_LOADING_OLDER:"加載舊訊息...",MESSAGELIST_SHOW_OLDER:"顯示較舊的訊息",MESSAGELIST_NEW_MARKER:"新的",MESSAGE_SENT_VIA_EMAIL:"此訊息是通過電郵發送的",YOU_MARKER:"您",UPLOAD_IN_PROGRESS:"上傳中...",UPLOAD_SEND_FILE:"發送文件",UPLOAD_SHARE_LOCATION:"共享位置",UPLOAD_ERROR:"不幸的是,上傳出了問題。 該文件可能不受支持或太大。",SHARE_LOCATION_ERROR:"無法分享位置:",LOADING:"載入中...",HUB_EMPTY:"您的聊天記錄將顯示在此處",HUB_SHOW_EARLIER:"顯示早先的聊天記錄",INBOX_NO_CHATS_TITLE:"還沒聊天!",INBOX_NO_CHATS_BODY:"一旦您進行了一次或多次對話,他們就會顯示在此處。",ENABLE_TRANSLATION:"翻譯此對話至繁體中文",DISABLE_TRANSLATION:"顯示原文",SEARCH_PLACEHOLDER_TEXT:"搜尋...",SEARCH_SEARCHING:"正在搜尋...",SEARCH_NO_RESULTS:"找不到任何結果",SEARCH_NO_MORE_RESULTS:"沒有其他結果",SEARCH_RESULTS_CONVERSATIONS:"對話",SEARCH_RESULTS_MESSAGES:"訊息",SEARCH_RESULTS_SHOW_MORE:"顯示更多",CHAT_NOT_FOUND:"查無對話",DELETE_MESSAGE:"刪除訊息",DELETION_EXPLANATION:"您如果刪除這條訊息,所有人都將看不到它。",EDIT_MESSAGE:"編輯訊息",SAVE:"儲存",EDITED_INDICATOR:"已編輯",REPLY_TO_MESSAGE:"回覆",ADD_REACTION:"加入表情回應",AUTH_EXPIRED_OVERLAY_TITLE:"您的會話過程已過期",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"請刷新頁面以繼續",VOICE_MESSAGE:"語音訊息",CONTACT_INFORMATION_HIDDEN:"隱藏訊息",LEAVE_CONVERSATION:"離開對話",MARK_CONVERSATION_AS_UNREAD:"標記為未讀",STATUS_INDICATOR_ONLINE:"活躍",STATUS_INDICATOR_OFFLINE:"離開",ARIA_LEAVE_SEARCH_MODE:"離開搜尋模式",ARIA_SEARCH_UP:"向上搜尋",ARIA_SEARCH_DOWN:"向下搜尋",ARIA_CLOSE_CHAT_POPUP:"關閉聊天彈窗",ARIA_SEARCH_INSIDE_CONVERSATION:"在此對話中搜尋",ARIA_SEARCH:"搜尋",ARIA_CHAT:"聊天",ARIA_SET_PLAYBACK_SPEED:"設定播放速度",ARIA_CANCEL_UPLOAD:"取消上傳",ARIA_STOP_RECORDING:"停止錄音",ARIA_CANCEL_RECORDING:"取消錄音",ARIA_INSERT_EMOJI:"插入表情符號",ARIA_PLAY_AUDIO:"播放音訊",ARIA_PAUSE_AUDIO:"暫停音訊",ARIA_REACTION_COUNT:(t,e)=>`${t}個反應(${e})`,ARIA_MORE_ACTIONS:"更多操作",ARIA_REPLYING_TO:(t,e)=>`正在回覆 ${t}:${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"退出回覆模式",SELECT_CONVERSATION:"選擇對話"}}};var pR=class{constructor(t,e){this.currentUser$=Ao(null),this.app$=Ao(null),this.appId$=Ao(null),this.extUserId$=Ao(null),this.hasTokenFetcher$=Ao(!1),this.authTokenState$=Ao("idle"),this.themeCustom$=Ao(Fr({value:void 0})),this.colorScheme$=Ao("light"),this.highlightedStrings$=Ao([]),this.device$=Ao({supportsEmojiPicker:!!Ng,isMobile:"undefined"!=typeof window&&/Mobi/i.test(window.navigator.userAgent)}),this.errors$=Ao({unknownUser:!1,wrongAppId:!1,serverError:!1}),this.conversationSearch=null,this.messageSearch=null,this.locale$=Ao(()=>{var t,e;const n=this.extUserId$.get(),r=this.app$.appMetadata.defaultLocale.get(),i=this.currentUser$.locale.get();return null!==(t=null!==(e=n&&i)&&void 0!==e?e:r)&&void 0!==t?t:"en-US"}),this.translationData$=Ao(()=>function(t){const e=t.replace(/_/g,"-").toLowerCase(),n=hR[e];if(n)return{strings:{...n.translation,locale:e},emojiPickerTranslationUrl:n.emojiPickerTranslationUrl,emojiDataUrl:n.emojiDataUrl};const r=e.slice(0,2),i=hR[r];return i?{strings:{...i.translation,locale:r},emojiPickerTranslationUrl:i.emojiPickerTranslationUrl,emojiDataUrl:i.emojiDataUrl}:(WA.warn(`User locale '${t}' not supported; falling back to English.`),{strings:{...XA.translation,locale:"en-US"},emojiPickerTranslationUrl:XA.emojiPickerTranslationUrl,emojiDataUrl:XA.emojiDataUrl})}(this.locale$.get())),this.t$=Ao(()=>this.translationData$.strings.get()),si(()=>{this.appId$.set(t),this.extUserId$.set(e)})}updateThemeCustom(t){this.themeCustom$.set(Fr({value:t}))}};const fR={canReplyToMessage:!1,canEditMessage:!1,canDeleteMessage:!1,canAddReaction:!1};var mR=class extends pR{constructor(t,e){super(t,e),this.type="ChatboxStore",this.messageSubscriptions={},this.readyForNewMessagesPromise=Promise.resolve(),this.fileUploads={},this.renderedConversationId$=Ao(void 0),this.focusedMessage$=Ao(null),this.chatSearchState$=Ao("hidden"),this.searchQuery$=Ao(""),this.messageFieldVisible$=Ao(!0),this.newMessageMarker$=Ao(void 0),this.state$=Ao({loadingConversationId:null,currentConversationId:null,editor:{isEmpty:!0,atTextLimit:!1,sendBlocked:!1,characterCount:0,showEmojiPicker:!1,suggestEmojiQuery:void 0,suggestMentionQuery:void 0},enterSendsMessage:!0,referencedMessageId:null,editingMessageId:null,unknownConversations:{},conversations:{},messages:{},participants:{},typing:{},isUserConnected:{},ephemeralMessages:{},ephemeralMessageIdMapping:{},localFileBlobUrls:{},currentConversation:()=>{const t=this.state$.currentConversationId.get();return t&&this.state$.conversations.child(t).get()},userPermissions:()=>{var t;const e=(null!==(t=this.app$.features.get())&&void 0!==t?t:[]).includes("search_in_conv"),n=this.app$.role.general.get(),r=this.app$.role.permissions.get();return En.defined(n),En.defined(r),{canSearch:e,showTypingIndicator:n.showTypingIndicators,canShareFile:n.enableFileTransfers,canShareLocation:n.enableLocation,canMention:n.enableMentions,showOnlineStatus:!1!==n.enablePresence,canSendVoiceMessage:n.enableVoiceRecording,canLeaveConversation:"all"===r.conversations.leave,canMarkConversationAsUnread:"all"===r.conversations.markAsUnread}},messagePermissions:()=>{const t=this.app$.role.permissions.get();En.defined(t);const e=this.state$.userPermissions.get(),n=this.messageFieldVisible$.get(),r={...fR,...e},i={canReplyToMessage:n&&ER(t.messages.reply,!0),canEditMessage:ER(t.messages.edit,!0),canDeleteMessage:ER(t.messages.delete,!0),canAddReaction:ER(t.messages.emojiReactions,!0),...e},o={...i,canEditMessage:!1},s={canReplyToMessage:n&&ER(t.messages.reply,!1),canEditMessage:ER(t.messages.edit,!1),canDeleteMessage:ER(t.messages.delete,!1),canAddReaction:ER(t.messages.emojiReactions,!1),...e};return{system:r,own:i,ownWithoutEditing:o,other:s,otherWithoutEditing:{...s,canEditMessage:!1}}}}),this.referencedMessage$=Ao(()=>{const t=this.state$.currentConversationId.get(),e=this.state$.referencedMessageId.get();return t&&e?this.state$.messages.child(t).lookup.child(e).get():null}),this.chatItems$=Ao(()=>{var t,e,n;const r=this.state$.currentConversationId.get();if(!r)return[];const i=null!==(t=this.newMessageMarker$.get())&&void 0!==t?t:1/0,o=null!==(e=this.state$.messages.child(r).state.get())&&void 0!==e?e:[],s=Object.values(null!==(n=this.state$.ephemeralMessages.child(r).get())&&void 0!==n?n:{}),a=(0===s.length?o:s.sort((t,e)=>e.createdAt-t.createdAt).concat(o)).map(t=>{const e=t.content[0],n=null==e?void 0:e.type;if(!e||"file"!==n)return t;const i=e.size+","+e.filename,o=this.state$.localFileBlobUrls.child(r).child(i).url.get();return o?{...t,content:[{...e,url:o}]}:t});let l=null,c=0,d=!1;const h=[];for(const t of a){const e=new Date(t.createdAt),n=new Date(e).setHours(0,0,0,0),r=c&&n!==c,o=e.getTime()>i,s=!(!d||o||null!=l&&l.id.startsWith("ephemeral"));(s||r)&&h.push(new _R({id:"border-before-"+t.id,isDayMarker:!!r,isReadMarker:!!s,timestamp:r?c:void 0})),h.push(t),d=o,c=n,l=t}const p=this.extUserId$.peek();return function(t,e){const n=[];let r=[],i=null;for(const o of t)null===i||e(i,o)?r.push(o):(n.push(r),r=[o]),i=o;return 0!==r.length&&n.push(r),n}(h,(t,e)=>{return t instanceof _R&&e instanceof _R?t.id===e.id:!(t instanceof _R||e instanceof _R)&&(Math.abs(t.createdAt-e.createdAt)<=6e4&&(null===(n=t.sender)||void 0===n?void 0:n.id)===(null===(r=e.sender)||void 0===r?void 0:r.id));var n,r}).map(t=>{var e;const n=t[t.length-1];return{items:t,id:n.id,type:n instanceof _R?"divider":n.sender?(null===(e=n.sender)||void 0===e?void 0:e.id)===p?"own":"other":"system"}})})}storeTyping(t,e){this.state$.typing.child(t).set(e)}setSearchQuery(t){const e=t.trim().split(/\s+/).map(t=>t.trim()).filter(Boolean);si(()=>{this.searchQuery$.set(t),this.highlightedStrings$.set(e)})}messagePermissions$(t){const e=this.currentUser$.get();if(!e)throw new Error("Unreachable");const n=t.content[0];return t.sender?e.id===t.sender.id?"text"===n.type?this.state$.messagePermissions.own:this.state$.messagePermissions.ownWithoutEditing:"text"===n.type?this.state$.messagePermissions.other:this.state$.messagePermissions.otherWithoutEditing:this.state$.messagePermissions.system}canRenderUi(t){const e=this.app$.get(),n=this.currentUser$.get();if(null===t)return!(!e||!n);const r=this.state$.conversations.child(t).get(),i=this.state$.participants.child(t).get();return!!(e&&n&&r&&i)}storeMessages(t,e,n){si(()=>{const r=e.reduce((t,e)=>(t[e.id]=e,t),{});En(this.extUserId$.peek()),this.state$.messages.child(t).set({state:e,lookup:r,loadedAll:n});const i=this.state$.ephemeralMessages.child(t);for(const n of e){const e=this.state$.ephemeralMessageIdMapping.child(t).child(n.id).peek();if(!e)continue;i.child(e).delete();const r=n.content[0];if("file"!==r.type)continue;const o=r.size+","+r.filename,s=this.state$.localFileBlobUrls.child(t).child(o);if(!1!==s.fetching.peek())continue;const a=()=>{URL.revokeObjectURL(s.url.peek()),s.delete()};if("image"===r.subtype){s.fetching.set(!0);const t=document.createElement("img");t.addEventListener("load",a,{once:!0}),t.src=r.url}else if("video"===r.subtype){s.fetching.set(!0);const t=document.createElement("video");t.addEventListener("loadeddata",a,{once:!0}),t.src=r.url}else if("audio"===r.subtype||"voice"===r.subtype){s.fetching.set(!0);const t=document.createElement("audio");t.addEventListener("loadeddata",a,{once:!0}),t.src=r.url}}})}};function ER(t,e){return"all"===t||"own"===t&&e||"other"===t&&!e}var _R=class{constructor({id:t,isDayMarker:e,isReadMarker:n,timestamp:r}){this.id=t,this.isDayMarker=e,this.isReadMarker=n,this.timestamp=e?r:void 0}};function AR(t,e=!1){return function(t,e=!1){return t.map(t=>{if("string"==typeof t)return t;switch(t.type){case"bold":return"*"+AR(t.children)+"*";case"italic":return"_"+AR(t.children)+"_";case"strikethrough":return"~"+AR(t.children)+"~";case"blockquote":return AR(t.children).split("\n").map(t=>"> "+t).join("\n")+"\n";case"autolink":case"autoLink":case"suppressed":case"emoji":return t.text;case"codeblock":case"codeBlock":return"```"+t.language+"\n"+t.text+"```";case"codespan":case"codeSpan":return"```"+t.text+"```";case"mention":return e?`<!!mention:${t.id}|${t.text}>`:`@${t.text}`;case"customemoji":case"customEmoji":return e?`<!!customemoji:${t.text}>`:t.text;case"link":return`<${t.url}|${AR(t.children)}>`;case"actionlink":case"actionLink":case"actionbutton":case"actionButton":return function(t){const e=new URLSearchParams(t.params).toString(),n=e?t.action+"?"+e:t.action;return`<${t.type}:${n}|${AR(t.children)}>`}(t);case"bulletlist":case"bulletList":return"\n"+AR(t.children);case"bulletpoint":case"bulletPoint":return"- "+AR(t.children)+"\n"}}).join("")}(t,e).trim()}var gR=class{constructor(t,e,n,r,i,o){this.send=e,this.attachFile=n,this.shareLocation=r,this.toggleEmojiPicker=i,this.recordVoiceMessage=o,this.isEmpty=t.isEmpty,this.sendBlocked=t.sendBlocked,this.atTextLimit=t.atTextLimit,this.characterCount=t.characterCount,this.showEmojiPicker=t.showEmojiPicker}};function SR(t,e){let n=0;return(...r)=>{n&&(clearTimeout(n),n=0),n=setTimeout(()=>{t(...r)},e)}}function vR(t){return new Promise(e=>setTimeout(e,t))}function OR(t,e){const n=Ao(t);return Hi(t=>{const r=n.peek();let i=!0;const o=e(r);!function(t){return!!t&&"object"==typeof t&&"function"==typeof t.then}(o)?n.set(o):o.then(t=>{i&&n.set(t)}),t.onCleanup=()=>{i=!1}}),n}var DR=class{constructor(t,e,n){this.state$=t,this.device$=e,this.userPermissions$=n,this.currentDoc=tA.EMPTY,this.maxLength=1e4,this.sendBlockedSemaphore=0,this.markAsTyping=function(t,e){let n=!1;return(...r)=>{if(!n)return n=!0,setTimeout(()=>{n=!1},e),t(...r)}}(()=>{var t;null===(t=this.controller)||void 0===t||t.markAsTyping()},5e3),this._suggesterKeydownHandlers={emoji:void 0,mention:void 0},this.toggleEmojiPicker=t=>{var e;const n=this.state$.showEmojiPicker;null!==(e=t)&&void 0!==e||(t=!n.peek()),n.set(t),!1===t&&this.focus()},this.spellcheck$=Ao(),this.placeholder$=Ao()}async blockSend(t){this.sendBlockedSemaphore++,this.state$.sendBlocked.set(!0);try{await t()}finally{this.sendBlockedSemaphore--,this.state$.sendBlocked.set(this.sendBlockedSemaphore>0)}}setEditorView(t){if(this.editorView=t,t&&this.pendingFocusOptions){const t=this.pendingFocusOptions;this.pendingFocusOptions=void 0,this.focus(t)}}emojiSuggesterPlugin(){if(this.device$.peek().supportsEmojiPicker)return G_({debug:!1,matcher:W_(X_,Np),onEnter:t=>this.suggestEmoji(t.text,t.range),onChange:t=>this.suggestEmoji(t.text,t.range),onExit:()=>this.onExitSuggester(),onKeyDown:({event:t})=>{var e,n,r;return null!==(e=null===(n=(r=this._suggesterKeydownHandlers).emoji)||void 0===n?void 0:n.call(r,t.key))&&void 0!==e&&e}})}mentionsPlugin(){const t=this.userPermissions$.peek();if(En.defined(t),t.canMention)return G_({debug:!1,matcher:W_(K_,Np),onEnter:t=>this.suggestMention(t.text,t.range),onChange:t=>this.suggestMention(t.text,t.range),onExit:()=>this.onExitSuggester(),onKeyDown:({event:t})=>{var e,n,r;return null!==(e=null===(n=(r=this._suggesterKeydownHandlers).mention)||void 0===n?void 0:n.call(r,t.key))&&void 0!==e&&e}})}closeSuggester(){En.defined(this._suggestionRange),function(t,e){const{from:n,to:r}=e,i=t.state.tr.addMark(n,r,Np.marks.literal.create());t.dispatch(i)}(this.editorView,this._suggestionRange)}listenKeydown(t,e){this._suggesterKeydownHandlers[t]=e}onExitSuggester(){this._suggestionRange=void 0,this.state$.suggestEmojiQuery.set(void 0),this.state$.suggestMentionQuery.set(void 0)}suggestEmoji(t,e){t.length<2||(this._suggestionRange=e,this.state$.suggestEmojiQuery.set(t))}suggestMention(t,e){t.length<1||(this._suggestionRange=e,this.state$.suggestMentionQuery.set(t))}onPasteImage(t){En.defined(this.uploadFile),this.uploadFile(t)}onChange(t){var e;this.currentDoc=t;const n=t.size>this.maxLength&&t.asText().length>this.maxLength;t.hasContent&&this.markAsTyping(),this.state$.assign({atTextLimit:n,isEmpty:!t.hasNonWhitespaceContent(),characterCount:0===t.size?0:t.size-2}),null===(e=this.controller)||void 0===e||e.storeDraft(()=>t.asText())}setMaxLength(t){this.maxLength=t}focus(t={}){if(!this.editorView)return void(this.pendingFocusOptions=t);const{skipProseMirrorStuff:e=!1}=t;e?this.editorView.dom.focus():this.editorView.focus()}setText(t){this.editorView&&function(t,e){const n=t.state.doc.content.size,r=e.split(/(<!!(?:mention|customemoji):.*?>)/g).filter(t=>t||t.length).map(t=>{const[e,n,r]=t.match(/<!!mention:(.*)\|(.*)>/)||[null];if(e&&n&&r)return Q_(n,r);const[i,o]=t.match(/<!!customemoji:(.*?)>/)||[null];return i&&o?Z_(o):Np.text(t)}),i=t.state.tr.replaceWith(0,n,r);t.dispatch(i)}(this.editorView,t)}typeText(t){this.editorView&&function(t,e,n="replace"){const r=t.state.doc.content.size,i="insert"==n?t.state.tr.insertText(e):t.state.tr.insertText(e,0,r);t.dispatch(i)}(this.editorView,t,"insert")}getText(){return this.currentDoc.asText().trim()}clearText(){this.editorView&&function(t){const e=t.state.doc.content.size,n=t.state.tr.insertText("",0,e);t.dispatch(n)}(this.editorView)}selectEmoji(t){En.defined(this.editorView),function(t,e,n){const r=Z_(e);if(n){const{from:e,to:r}=n,i=t.state.tr.deleteRange(e,r);t.dispatch(i)}const i=t.state.tr.replaceSelectionWith(r,!1);t.dispatch(i)}(this.editorView,t,this._suggestionRange),this.focus()}selectMention(t){En.defined(this.editorView),function(t,e,n){const r=Q_(e.id,e.name);let i=t.state.tr;if(n){const{from:t,to:e}=n;i=i.replaceRangeWith(t,e,r)}else i=i.replaceSelectionWith(r,!1);i=i.insertText(" "),t.dispatch(i)}(this.editorView,t,this._suggestionRange),this.focus()}};const TR=(()=>{if("undefined"!=typeof window){let t;try{t=window.localStorage;const e="__storage_test__";return t.setItem(e,e),t.removeItem(e),!0}catch(e){return e instanceof DOMException&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&t&&0!==t.length}}return!1})(),RR={};TR?(RR.setItem=window.localStorage.setItem.bind(window.localStorage),RR.getItem=window.localStorage.getItem.bind(window.localStorage),RR.removeItem=window.localStorage.removeItem.bind(window.localStorage),RR.isSupported=!0):(RR.setItem=function(){},RR.getItem=function(){return null},RR.removeItem=function(){},RR.isSupported=!1),RR.set=(t,e)=>RR.setItem(t,JSON.stringify(e)),RR.get=t=>JSON.parse(RR.getItem(t)||"null");const yR=function(t,e){let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>e(...r),t)}}(200,(t,e,n,r)=>{const i=IR(t,e,n),o=JSON.parse(RR.getItem("talkjs_drafts")||"{}"),s=r();s.match(/^\s*$/)?delete o[i]:o[i]=s,RR.setItem("talkjs_drafts",JSON.stringify(o))}),IR=(t,e,n)=>`draft_${t}_${e}_${n}`;function CR(t,e,n,r){return new(n||(n=Promise))(function(i,o){function s(t){try{l(r.next(t))}catch(t){o(t)}}function a(t){try{l(r.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(s,a)}l((r=r.apply(t,e||[])).next())})}Xe();var NR=class{constructor(){this.listeners={}}on(t,e,n){if(this.listeners[t]||(this.listeners[t]=new Set),null==n?void 0:n.once){const n=(...r)=>{this.un(t,n),e(...r)};return this.listeners[t].add(n),()=>this.un(t,n)}return this.listeners[t].add(e),()=>this.un(t,e)}un(t,e){var n;null===(n=this.listeners[t])||void 0===n||n.delete(e)}once(t,e){return this.on(t,e,{once:!0})}unAll(){this.listeners={}}emit(t,...e){this.listeners[t]&&this.listeners[t].forEach(t=>t(...e))}},bR=class extends NR{constructor(t){super(),this.subscriptions=[],this.isDestroyed=!1,this.options=t}onInit(){}_init(t){this.isDestroyed&&(this.subscriptions=[],this.isDestroyed=!1),this.wavesurfer=t,this.onInit()}destroy(){this.emit("destroy"),this.subscriptions.forEach(t=>t()),this.subscriptions=[],this.isDestroyed=!0,this.wavesurfer=void 0}},wR=class extends NR{constructor(){super(...arguments),this.animationFrameId=null,this.isRunning=!1}start(){if(this.isRunning)return;this.isRunning=!0;const t=()=>{this.isRunning&&(this.emit("tick"),this.animationFrameId=requestAnimationFrame(t))};t()}stop(){this.isRunning=!1,null!==this.animationFrameId&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=null)}destroy(){this.stop()}};const kR=["audio/webm","audio/wav","audio/mpeg","audio/mp4","audio/mp3"];var LR=class tS extends bR{constructor(t){var e,n,r,i,o,s;super(Object.assign(Object.assign({},t),{audioBitsPerSecond:null!==(e=t.audioBitsPerSecond)&&void 0!==e?e:128e3,scrollingWaveform:null!==(n=t.scrollingWaveform)&&void 0!==n&&n,scrollingWaveformWindow:null!==(r=t.scrollingWaveformWindow)&&void 0!==r?r:5,continuousWaveform:null!==(i=t.continuousWaveform)&&void 0!==i&&i,renderRecordedAudio:null===(o=t.renderRecordedAudio)||void 0===o||o,mediaRecorderTimeslice:null!==(s=t.mediaRecorderTimeslice)&&void 0!==s?s:void 0})),this.stream=null,this.mediaRecorder=null,this.dataWindow=null,this.isWaveformPaused=!1,this.lastStartTime=0,this.lastDuration=0,this.duration=0,this.micStream=null,this.recordedBlobUrl=null,this.timer=new wR,this.subscriptions.push(this.timer.on("tick",()=>{const t=performance.now()-this.lastStartTime;this.duration=this.isPaused()?this.duration:this.lastDuration+t,this.emit("record-progress",this.duration)}))}static create(t){return new tS(t||{})}renderMicStream(t){var e;const n=new AudioContext,r=n.createMediaStreamSource(t),i=n.createAnalyser();r.connect(i),(this.options.continuousWaveform||this.options.scrollingWaveform)&&(i.fftSize=32);const o=i.frequencyBinCount,s=new Float32Array(o);let a=0;this.wavesurfer&&(null!==(e=this.originalOptions)&&void 0!==e||(this.originalOptions=Object.assign({},this.wavesurfer.options)),this.wavesurfer.options.interact=!1,this.options.scrollingWaveform&&(this.wavesurfer.options.cursorWidth=0,this.wavesurfer.options.normalize=!0,this.wavesurfer.options.maxPeak=1));const l=setInterval(()=>{var t,e,n,r;if(!this.isWaveformPaused){if(i.getFloatTimeDomainData(s),this.options.scrollingWaveform){const t=Math.floor(100*(this.options.scrollingWaveformWindow||0));let e=0;for(let t=0;t<o;t++){const n=Math.abs(s[t]);n>e&&(e=n)}this.dataWindow||(this.dataWindow=new Float32Array(t));const n=new Float32Array(t);if(this.dataWindow&&this.dataWindow.length>0){const e=t-1,r=this.dataWindow.slice(-e);n.set(r,0)}n[t-1]=e,this.dataWindow=n}else if(this.options.continuousWaveform){if(!this.dataWindow){const n=this.options.continuousWaveformDuration?Math.round(100*this.options.continuousWaveformDuration):(null!==(e=null===(t=this.wavesurfer)||void 0===t?void 0:t.getWidth())&&void 0!==e?e:0)*window.devicePixelRatio;this.dataWindow=new Float32Array(n)}let n=0;for(let t=0;t<o;t++){const e=Math.abs(s[t]);e>n&&(n=e)}if(a+1>this.dataWindow.length){const t=new Float32Array(2*this.dataWindow.length);t.set(this.dataWindow,0),this.dataWindow=t}this.dataWindow[a]=n,a++}else this.dataWindow=s;if(this.wavesurfer){const t=(null!==(r=null===(n=this.dataWindow)||void 0===n?void 0:n.length)&&void 0!==r?r:0)/100;this.wavesurfer.load("",[this.dataWindow],this.options.scrollingWaveform?this.options.scrollingWaveformWindow:t).then(()=>{this.wavesurfer&&this.options.continuousWaveform&&(this.wavesurfer.setTime(this.getDuration()/1e3),this.wavesurfer.options.minPxPerSec||this.wavesurfer.setOptions({minPxPerSec:this.wavesurfer.getWidth()/this.wavesurfer.getDuration()}))}).catch(t=>{console.error("Error rendering real-time recording data:",t)})}}},10);return{onDestroy:()=>{clearInterval(l),null==r||r.disconnect(),null==n||n.close()},onEnd:()=>{this.isWaveformPaused=!0,this.stopMic()}}}startMic(t){return CR(this,void 0,void 0,function*(){let e;this.micStream&&this.stopMic();try{e=yield navigator.mediaDevices.getUserMedia({audio:null==t||t})}catch(t){throw new Error("Error accessing the microphone: "+t.message)}const n=this.renderMicStream(e);return this.micStream=n,this.unsubscribeDestroy=this.once("destroy",n.onDestroy),this.unsubscribeRecordEnd=this.once("record-end",n.onEnd),this.stream=e,e})}stopMic(){var t,e,n;null===(t=this.micStream)||void 0===t||t.onDestroy(),null===(e=this.unsubscribeDestroy)||void 0===e||e.call(this),null===(n=this.unsubscribeRecordEnd)||void 0===n||n.call(this),this.micStream=null,this.unsubscribeDestroy=void 0,this.unsubscribeRecordEnd=void 0,this.stream&&(this.stream.getTracks().forEach(t=>t.stop()),this.stream=null,this.mediaRecorder=null)}startRecording(t){return CR(this,void 0,void 0,function*(){const e=this.stream||(yield this.startMic(t));this.dataWindow=null;const n=this.mediaRecorder||new MediaRecorder(e,{mimeType:this.options.mimeType||kR.find(t=>MediaRecorder.isTypeSupported(t)),audioBitsPerSecond:this.options.audioBitsPerSecond});this.mediaRecorder=n,this.stopRecording();const r=[];n.ondataavailable=t=>{t.data.size>0&&r.push(t.data),this.emit("record-data-available",t.data)};const i=t=>{var e;const i=new Blob(r,{type:n.mimeType});this.emit(t,i),this.options.renderRecordedAudio&&(this.applyOriginalOptionsIfNeeded(),this.recordedBlobUrl&&URL.revokeObjectURL(this.recordedBlobUrl),this.recordedBlobUrl=URL.createObjectURL(i),null===(e=this.wavesurfer)||void 0===e||e.load(this.recordedBlobUrl))};n.onpause=()=>i("record-pause"),n.onstop=()=>i("record-end"),n.start(this.options.mediaRecorderTimeslice),this.lastStartTime=performance.now(),this.lastDuration=0,this.duration=0,this.isWaveformPaused=!1,this.timer.start(),this.emit("record-start")})}getDuration(){return this.duration}isRecording(){var t;return"recording"===(null===(t=this.mediaRecorder)||void 0===t?void 0:t.state)}isPaused(){var t;return"paused"===(null===(t=this.mediaRecorder)||void 0===t?void 0:t.state)}isActive(){var t;return"inactive"!==(null===(t=this.mediaRecorder)||void 0===t?void 0:t.state)}stopRecording(){var t;this.isActive()&&(null===(t=this.mediaRecorder)||void 0===t||t.stop(),this.timer.stop())}pauseRecording(){var t,e;this.isRecording()&&(this.isWaveformPaused=!0,null===(t=this.mediaRecorder)||void 0===t||t.requestData(),null===(e=this.mediaRecorder)||void 0===e||e.pause(),this.timer.stop(),this.lastDuration=this.duration)}resumeRecording(){var t;this.isPaused()&&(this.isWaveformPaused=!1,null===(t=this.mediaRecorder)||void 0===t||t.resume(),this.timer.start(),this.lastStartTime=performance.now(),this.emit("record-resume"))}static getAvailableAudioDevices(){return CR(this,void 0,void 0,function*(){return navigator.mediaDevices.enumerateDevices().then(t=>t.filter(t=>"audioinput"===t.kind))})}destroy(){this.applyOriginalOptionsIfNeeded(),super.destroy(),this.stopRecording(),this.stopMic(),this.recordedBlobUrl&&(URL.revokeObjectURL(this.recordedBlobUrl),this.recordedBlobUrl=null)}applyOriginalOptionsIfNeeded(){this.wavesurfer&&this.originalOptions&&(this.wavesurfer.setOptions(this.originalOptions),delete this.originalOptions)}},MR=l((t,e)=>{var n,r;n="undefined"!=typeof self?self:t,r=function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e||4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){(function(e){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function a(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}();return function(){var n,i=l(t);if(e){var o=l(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return function(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}(this,n)}}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var c,d=n(2),h=d.EventTarget,p=d.defineEventAttribute,f=(0,n(3).detect)(),m=e.AudioContext||e.webkitAudioContext,E=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(d,t);var n,r,l,c=a(d);function d(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,d);var i=n.mimeType,o=n.audioBitsPerSecond,s=(n.videoBitsPerSecond,n.bitsPerSecond),a=r.encoderWorkerFactory,l=r.OggOpusEncoderWasmPath,h=r.WebMOpusEncoderWasmPath;if((e=c.call(this))._stream=t,e._state="inactive",e._mimeType=i||"",e._audioBitsPerSecond=o||s,e.workerState="inactive",!d.isTypeSupported(e._mimeType))throw new TypeError("invalid arguments, a MIME Type is not supported");switch(d._parseType(e._mimeType).subtype){case"wave":case"wav":e._mimeType="audio/wave";break;case"webm":e._mimeType="audio/webm";break;case"ogg":e._mimeType="audio/ogg";break;default:switch(f&&f.name){case"chrome":case"edge":default:e._mimeType="audio/webm";break;case"firefox":e._mimeType="audio/ogg";break;case"ios":case"safari":e._mimeType="audio/wave"}}switch(e._mimeType){case"audio/wave":e._wasmPath="";break;case"audio/webm":e._wasmPath=h||"";break;case"audio/ogg":e._wasmPath=l||"";break;default:throw new Error("Internal Error: Unexpected MIME Type: ".concat(e._mimeType))}var p="";return document.currentScript?p=document.currentScript.src:self.location&&(p=self.location.href),p=p.substr(0,p.lastIndexOf("/"))+"/encoderWorker.umd.js","function"==typeof d.encoderWorker&&(p=URL.createObjectURL(new Blob(["(".concat(d.encoderWorker,")()")]))),e._workerFactory="function"==typeof a?a:function(t){return new Worker(p)},e._spawnWorker(),e}return n=d,l=[{key:"isTypeSupported",value:function(t){if("string"==typeof t&&!t)return!0;try{var e=d._parseType(t),n=e.type,r=e.subtype,i=e.codec}catch(t){return!1}if("audio"!==n||"ogg"!==r&&"webm"!==r&&"wave"!==r&&"wav"!==r)return!1;switch(r){case"ogg":case"webm":if("opus"!==i&&i)return!1;break;case"wave":case"wav":if(i)return!1}return!0}},{key:"_parseType",value:function(t){try{var e=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==a.return||a.return()}finally{if(i)throw o}}return n}}(t,e)||function(t,e){if(t){if("string"==typeof t)return i(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(t,e)}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t.match(/^(\w+)\/(\w+)(;\s*codecs=(\w+))?$/),5),n=e[1],r=e[2],o=e[4]}catch(e){return"string"!=typeof t||t?null:{type:"",subtype:"",codec:""}}return{type:n,subtype:r,codec:o}}}],(r=[{key:"_spawnWorker",value:function(){var t=this;this.worker=this._workerFactory(),this.worker.onmessage=function(e){return t._onmessageFromWorker(e)},this.worker.onerror=function(e){return t._onerrorFromWorker(e)},this._postMessageToWorker("loadEncoder",{mimeType:this._mimeType,wasmPath:this._wasmPath})}},{key:"_postMessageToWorker",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};switch(t){case"loadEncoder":var r=n.mimeType,i=n.wasmPath;this.worker.postMessage({command:t,mimeType:r,wasmPath:i});break;case"init":var o=n.sampleRate,s=n.channelCount,a=n.bitsPerSecond;this.worker.postMessage({command:t,sampleRate:o,channelCount:s,bitsPerSecond:a}),this.workerState="encoding",this.source.connect(this.processor),this.processor.connect(this.context.destination);var l=new e.Event("start");this.dispatchEvent(l);break;case"pushInputData":var c=n.channelBuffers,d=n.length,h=n.duration;this.worker.postMessage({command:t,channelBuffers:c,length:d,duration:h});break;case"getEncodedData":case"done":this.worker.postMessage({command:t});break;default:throw new Error("Internal Error: Incorrect postMessage requested.")}}},{key:"_onmessageFromWorker",value:function(t){var n,r=t.data,i=r.command,o=r.buffers;switch(i){case"readyToInit":var s=this.sampleRate,a=this.channelCount;this.workerState="readyToInit","recording"===this.state&&this._postMessageToWorker("init",{sampleRate:s,channelCount:a,bitsPerSecond:this.audioBitsPerSecond});break;case"encodedData":case"lastEncodedData":var l=new Blob(o,{type:this._mimeType});(n=new e.Event("dataavailable")).data=l,this.dispatchEvent(n),"lastEncodedData"===i&&(n=new e.Event("stop"),this.dispatchEvent(n),this.workerState="closed")}}},{key:"_onerrorFromWorker",value:function(t){this.source.disconnect(),this.processor.disconnect(),this.worker.terminate(),this.workerState="closed";var n=["FileName: "+t.filename,"LineNumber: "+t.lineno,"Message: "+t.message].join(" - "),r=new e.Event("error");r.name="UnknownError",r.message=n,this.dispatchEvent(r)}},{key:"_enableAudioProcessCallback",value:function(t){var e=this,n=0;this.processor.onaudioprocess=function(r){for(var i=r.inputBuffer,o=(r.playbackTime,i.sampleRate,i.length),s=i.duration,a=i.numberOfChannels,l=new Array(a),c=0;c<a;c++)l[c]=i.getChannelData(c);var d={channelBuffers:l,length:o,duration:s};e._postMessageToWorker("pushInputData",d),(n+=s)>=t&&(e._postMessageToWorker("getEncodedData"),n=0)}}},{key:"start",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Number.MAX_SAFE_INTEGER;if("inactive"!==this.state)throw new Error("DOMException: INVALID_STATE_ERR, state must be inactive.");if(t<0)throw new TypeError("invalid arguments, timeslice should be 0 or higher.");t/=1e3,"closed"===this.workerState&&this._spawnWorker(),this.context=new m;var e=this.stream.getAudioTracks();if(!e[0])throw new Error("DOMException: UnkownError, media track not found.");if(this.channelCount=e[0].getSettings().channelCount||1,this.sampleRate=this.context.sampleRate,this.source=this.context.createMediaStreamSource(this.stream),this.processor=this.context.createScriptProcessor(4096,this.channelCount,this.channelCount),this._state="recording",this._enableAudioProcessCallback(t),"readyToInit"===this.workerState){var n=this.sampleRate,r=this.channelCount;this._postMessageToWorker("init",{sampleRate:n,channelCount:r,bitsPerSecond:this.audioBitsPerSecond})}}},{key:"stop",value:function(){if("inactive"===this.state)throw new Error("DOMException: INVALID_STATE_ERR, state must NOT be inactive.");this.source.disconnect(),this.processor.disconnect(),this.context.close(),this._postMessageToWorker("done"),this._state="inactive"}},{key:"pause",value:function(){if("inactive"===this.state)throw new Error("DOMException: INVALID_STATE_ERR, state must NOT be inactive.");this.source.disconnect(),this.processor.disconnect();var t=new e.Event("pause");this.dispatchEvent(t),this._state="paused"}},{key:"resume",value:function(){if("inactive"===this.state)throw new Error("DOMException: INVALID_STATE_ERR, state must NOT be inactive.");this.source.connect(this.processor),this.processor.connect(this.context.destination);var t=new e.Event("resume");this.dispatchEvent(t),this._state="recording"}},{key:"requestData",value:function(){if("inactive"===this.state)throw new Error("DOMException: INVALID_STATE_ERR, state must NOT be inactive.");this._postMessageToWorker("getEncodedData")}},{key:"stream",get:function(){return this._stream}},{key:"mimeType",get:function(){return this._mimeType}},{key:"state",get:function(){return this._state}},{key:"videoBitsPerSecond",get:function(){}},{key:"audioBitsPerSecond",get:function(){return this._audioBitsPerSecond}}])&&o(n.prototype,r),l&&o(n,l),d}(h);["start","stop","dataavailable","pause","resume","error"].forEach(function(t){return p(E.prototype,t)}),f&&"edge"===f.name&&(c=Worker.prototype.postMessage,Worker.prototype.postMessage=function(t){c.apply(this,[t])}),t.exports=E}).call(this,n(1))},function(t,e){var n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){n.r(e),n.d(e,"defineEventAttribute",function(){return E}),n.d(e,"EventTarget",function(){return A});const r=new WeakMap,i=new WeakMap;function o(t){const e=r.get(t);return console.assert(null!=e,"'this' is expected an Event object, but got",t),e}function s(t,e){r.set(this,{eventTarget:t,event:e,eventPhase:2,currentTarget:t,canceled:!1,stopped:!1,passiveListener:null,timeStamp:e.timeStamp||Date.now()}),Object.defineProperty(this,"isTrusted",{value:!1,enumerable:!0});const n=Object.keys(e);for(let t=0;t<n.length;++t){const e=n[t];e in this||Object.defineProperty(this,e,a(e))}}function a(t){return{get(){return o(this).event[t]},set(e){o(this).event[t]=e},configurable:!0,enumerable:!0}}function l(t){return{value(){const e=o(this).event;return e[t].apply(e,arguments)},configurable:!0,enumerable:!0}}function c(t){if(null==t||t===Object.prototype)return s;let e=i.get(t);return null==e&&(e=function(t,e){const n=Object.keys(e);if(0===n.length)return t;function r(e,n){t.call(this,e,n)}r.prototype=Object.create(t.prototype,{constructor:{value:r,configurable:!0,writable:!0}});for(let i=0;i<n.length;++i){const o=n[i];if(!(o in t.prototype)){const t="function"==typeof Object.getOwnPropertyDescriptor(e,o).value;Object.defineProperty(r.prototype,o,t?l(o):a(o))}}return r}(c(Object.getPrototypeOf(t)),t),i.set(t,e)),e}function d(t){return o(t).stopped}function h(t,e){o(t).passiveListener=e}s.prototype={get type(){return o(this).event.type},get target(){return o(this).eventTarget},get currentTarget(){return o(this).currentTarget},composedPath(){const t=o(this).currentTarget;return null==t?[]:[t]},get NONE(){return 0},get CAPTURING_PHASE(){return 1},get AT_TARGET(){return 2},get BUBBLING_PHASE(){return 3},get eventPhase(){return o(this).eventPhase},stopPropagation(){const t=o(this);"function"==typeof t.event.stopPropagation&&t.event.stopPropagation()},stopImmediatePropagation(){const t=o(this);t.stopped=!0,"function"==typeof t.event.stopImmediatePropagation&&t.event.stopImmediatePropagation()},get bubbles(){return!!o(this).event.bubbles},get cancelable(){return!!o(this).event.cancelable},preventDefault(){const t=o(this);null==t.passiveListener?t.event.cancelable&&(t.canceled=!0,"function"==typeof t.event.preventDefault&&t.event.preventDefault()):console.warn("Event#preventDefault() was called from a passive listener:",t.passiveListener)},get defaultPrevented(){return o(this).canceled},get composed(){return!!o(this).event.composed},get timeStamp(){return o(this).timeStamp}},Object.defineProperty(s.prototype,"constructor",{value:s,configurable:!0,writable:!0}),"undefined"!=typeof window&&void 0!==window.Event&&(Object.setPrototypeOf(s.prototype,window.Event.prototype),i.set(window.Event.prototype,s));const p=new WeakMap;function f(t){return null!==t&&"object"==typeof t}function m(t){const e=p.get(t);if(null==e)throw new TypeError("'this' is expected an EventTarget object, but got another value.");return e}function E(t,e){Object.defineProperty(t,"on"+e,function(t){return{get(){let e=m(this).get(t);for(;null!=e;){if(3===e.listenerType)return e.listener;e=e.next}return null},set(e){"function"==typeof e||f(e)||(e=null);const n=m(this);let r=null,i=n.get(t);for(;null!=i;)3===i.listenerType?null!==r?r.next=i.next:null!==i.next?n.set(t,i.next):n.delete(t):r=i,i=i.next;if(null!==e){const i={listener:e,listenerType:3,passive:!1,once:!1,next:null};null===r?n.set(t,i):r.next=i}},configurable:!0,enumerable:!0}}(e))}function _(t){function e(){A.call(this)}e.prototype=Object.create(A.prototype,{constructor:{value:e,configurable:!0,writable:!0}});for(let n=0;n<t.length;++n)E(e.prototype,t[n]);return e}function A(){if(!(this instanceof A)){if(1===arguments.length&&Array.isArray(arguments[0]))return _(arguments[0]);if(arguments.length>0){const t=new Array(arguments.length);for(let e=0;e<arguments.length;++e)t[e]=arguments[e];return _(t)}throw new TypeError("Cannot call a class as a function")}p.set(this,new Map)}A.prototype={addEventListener(t,e,n){if(null==e)return!1;if("function"!=typeof e&&!f(e))throw new TypeError("'listener' should be a function or an object.");const r=m(this),i=f(n),o=(i?n.capture:n)?1:2,s={listener:e,listenerType:o,passive:i&&!!n.passive,once:i&&!!n.once,next:null};let a=r.get(t);if(void 0===a)return r.set(t,s),!0;let l=null;for(;null!=a;){if(a.listener===e&&a.listenerType===o)return!1;l=a,a=a.next}return l.next=s,!0},removeEventListener(t,e,n){if(null==e)return!1;const r=m(this),i=(f(n)?n.capture:n)?1:2;let o=null,s=r.get(t);for(;null!=s;){if(s.listener===e&&s.listenerType===i)return null!==o?o.next=s.next:null!==s.next?r.set(t,s.next):r.delete(t),!0;o=s,s=s.next}return!1},dispatchEvent(t){if(null==t||"string"!=typeof t.type)throw new TypeError('"event.type" should be a string.');const e=m(this),n=t.type;let r=e.get(n);if(null==r)return!0;const i=(s=this,a=t,new(c(Object.getPrototypeOf(a)))(s,a));var s,a;let l=null;for(;null!=r;){if(r.once?null!==l?l.next=r.next:null!==r.next?e.set(n,r.next):e.delete(n):l=r,h(i,r.passive?r.listener:null),"function"==typeof r.listener)try{r.listener.call(this,i)}catch(s){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(s)}else 3!==r.listenerType&&"function"==typeof r.listener.handleEvent&&r.listener.handleEvent(i);if(d(i))break;r=r.next}return h(i,null),function(t){o(t).eventPhase=0}(i),function(t){o(t).currentTarget=null}(i),!i.defaultPrevented}},Object.defineProperty(A.prototype,"constructor",{value:A,configurable:!0,writable:!0}),"undefined"!=typeof window&&void 0!==window.EventTarget&&Object.setPrototypeOf(A.prototype,window.EventTarget.prototype),e.default=A},function(t,e,n){(function(t){var n=this&&this.__spreadArrays||function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),i=0;for(e=0;e<n;e++)for(var o=arguments[e],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r};Object.defineProperty(e,"__esModule",{value:!0});var r=function(t,e,n){this.name=t,this.version=e,this.os=n};e.BrowserInfo=r;var i=function(e){this.version=e,this.name="node",this.os=t.platform};e.NodeInfo=i;var o=function(){this.bot=!0,this.name="bot",this.version=null,this.os=null};e.BotInfo=o;var s=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["vivaldi",/Vivaldi\/([0-9\.]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/Edg\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FBAV\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],a=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/],["Search Bot",/(nuhk)|(Googlebot)|(Yammybot)|(Openbot)|(Slurp)|(MSNBot)|(Ask Jeeves\/Teoma)|(ia_archiver)/]];function l(t){var e=""!==t&&s.reduce(function(e,n){var r=n[0],i=n[1];if(e)return e;var o=i.exec(t);return!!o&&[r,o]},!1);if(!e)return null;var i=e[0],a=e[1];if("searchbot"===i)return new o;var l=a[1]&&a[1].split(/[._]/).slice(0,3);return l?l.length<3&&(l=n(l,function(t){for(var e=[],n=0;n<t;n++)e.push("0");return e}(3-l.length))):l=[],new r(i,l.join("."),c(t))}function c(t){for(var e=0,n=a.length;e<n;e++){var r=a[e],i=r[0];if(r[1].test(t))return i}return null}function d(){return void 0!==t&&t.version?new i(t.version.slice(1)):null}e.detect=function(t){return t?l(t):"undefined"!=typeof navigator?l(navigator.userAgent):d()},e.parseUserAgent=l,e.detectOS=c,e.getNodeVersion=d}).call(this,n(4))},function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(t){r=s}}();var l,c=[],d=!1,h=-1;function p(){d&&l&&(d=!1,l.length?c=l.concat(c):h=-1,c.length&&f())}function f(){if(!d){var t=a(p);d=!0;for(var e=c.length;e;){for(l=c,c=[];++h<e;)l&&l[h].run();h=-1,e=c.length}l=null,d=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function m(t,e){this.fun=t,this.array=e}function E(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new m(t,e)),1!==c.length||d||a(f)},m.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=E,i.addListener=E,i.once=E,i.off=E,i.removeListener=E,i.removeAllListeners=E,i.emit=E,i.prependListener=E,i.prependOnceListener=E,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}}])},"object"==typeof t&&"object"==typeof e?e.exports=r():"function"==typeof define&&define.amd?define([],r):"object"==typeof t?t.OpusMediaRecorder=r():n.OpusMediaRecorder=r()}),PR=h(MR(),1);const xR='var wn = (lt, pt) => () => (pt || (lt((pt = { exports: {} }).exports, pt), lt = null), pt.exports), Cn = (/* @__PURE__ */ wn(((lt, pt) => {\n\t(function(R, d) {\n\t\ttypeof WorkerGlobalScope != "undefined" && self instanceof WorkerGlobalScope ? d()() : typeof lt == "object" && typeof pt == "object" ? pt.exports = d() : typeof define == "function" && define.amd ? define([], d) : typeof lt == "object" ? lt.encoderWorker = d() : R.encoderWorker = d();\n\t})(typeof OpusMediaRecorder != "undefined" ? OpusMediaRecorder : typeof self != "undefined" ? self : lt, function() {\n\t\treturn function() {\n\t\t\t(function(T) {\n\t\t\t\tvar R = {};\n\t\t\t\tfunction d(v) {\n\t\t\t\t\tif (R[v]) return R[v].exports;\n\t\t\t\t\tvar p = R[v] = {\n\t\t\t\t\t\ti: v,\n\t\t\t\t\t\tl: !1,\n\t\t\t\t\t\texports: {}\n\t\t\t\t\t};\n\t\t\t\t\treturn T[v].call(p.exports, p, p.exports, d), p.l = !0, p.exports;\n\t\t\t\t}\n\t\t\t\td.m = T, d.c = R, d.d = function(v, p, B) {\n\t\t\t\t\td.o(v, p) || Object.defineProperty(v, p, {\n\t\t\t\t\t\tenumerable: !0,\n\t\t\t\t\t\tget: B\n\t\t\t\t\t});\n\t\t\t\t}, d.r = function(v) {\n\t\t\t\t\ttypeof Symbol != "undefined" && Symbol.toStringTag && Object.defineProperty(v, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(v, "__esModule", { value: !0 });\n\t\t\t\t}, d.t = function(v, p) {\n\t\t\t\t\tif (1 & p && (v = d(v)), 8 & p || 4 & p && typeof v == "object" && v && v.__esModule) return v;\n\t\t\t\t\tvar B = /* @__PURE__ */ Object.create(null);\n\t\t\t\t\tif (d.r(B), Object.defineProperty(B, "default", {\n\t\t\t\t\t\tenumerable: !0,\n\t\t\t\t\t\tvalue: v\n\t\t\t\t\t}), 2 & p && typeof v != "string") for (var O in v) d.d(B, O, function(l) {\n\t\t\t\t\t\treturn v[l];\n\t\t\t\t\t}.bind(null, O));\n\t\t\t\t\treturn B;\n\t\t\t\t}, d.n = function(v) {\n\t\t\t\t\tvar p = v && v.__esModule ? function() {\n\t\t\t\t\t\treturn v.default;\n\t\t\t\t\t} : function() {\n\t\t\t\t\t\treturn v;\n\t\t\t\t\t};\n\t\t\t\t\treturn d.d(p, "a", p), p;\n\t\t\t\t}, d.o = function(v, p) {\n\t\t\t\t\treturn Object.prototype.hasOwnProperty.call(v, p);\n\t\t\t\t}, d.p = "", d(d.s = 5);\n\t\t\t})([\n\t\t\t\tfunction(T, R, d) {\n\t\t\t\t\t(function(v) {\n\t\t\t\t\t\tfunction p(l, u) {\n\t\t\t\t\t\t\tfor (var c = 0, a = l.length - 1; a >= 0; a--) {\n\t\t\t\t\t\t\t\tvar b = l[a];\n\t\t\t\t\t\t\t\tb === "." ? l.splice(a, 1) : b === ".." ? (l.splice(a, 1), c++) : c && (l.splice(a, 1), c--);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (u) for (; c--;) l.unshift("..");\n\t\t\t\t\t\t\treturn l;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfunction B(l, u) {\n\t\t\t\t\t\t\tif (l.filter) return l.filter(u);\n\t\t\t\t\t\t\tfor (var c = [], a = 0; a < l.length; a++) u(l[a], a, l) && c.push(l[a]);\n\t\t\t\t\t\t\treturn c;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tR.resolve = function() {\n\t\t\t\t\t\t\tfor (var l = "", u = !1, c = arguments.length - 1; c >= -1 && !u; c--) {\n\t\t\t\t\t\t\t\tvar a = c >= 0 ? arguments[c] : v.cwd();\n\t\t\t\t\t\t\t\tif (typeof a != "string") throw new TypeError("Arguments to path.resolve must be strings");\n\t\t\t\t\t\t\t\ta && (l = a + "/" + l, u = a.charAt(0) === "/");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn (u ? "/" : "") + (l = p(B(l.split("/"), (function(b) {\n\t\t\t\t\t\t\t\treturn !!b;\n\t\t\t\t\t\t\t})), !u).join("/")) || ".";\n\t\t\t\t\t\t}, R.normalize = function(l) {\n\t\t\t\t\t\t\tvar u = R.isAbsolute(l), c = O(l, -1) === "/";\n\t\t\t\t\t\t\treturn (l = p(B(l.split("/"), (function(a) {\n\t\t\t\t\t\t\t\treturn !!a;\n\t\t\t\t\t\t\t})), !u).join("/")) || u || (l = "."), l && c && (l += "/"), (u ? "/" : "") + l;\n\t\t\t\t\t\t}, R.isAbsolute = function(l) {\n\t\t\t\t\t\t\treturn l.charAt(0) === "/";\n\t\t\t\t\t\t}, R.join = function() {\n\t\t\t\t\t\t\tvar l = Array.prototype.slice.call(arguments, 0);\n\t\t\t\t\t\t\treturn R.normalize(B(l, (function(u, c) {\n\t\t\t\t\t\t\t\tif (typeof u != "string") throw new TypeError("Arguments to path.join must be strings");\n\t\t\t\t\t\t\t\treturn u;\n\t\t\t\t\t\t\t})).join("/"));\n\t\t\t\t\t\t}, R.relative = function(l, u) {\n\t\t\t\t\t\t\tfunction c(w) {\n\t\t\t\t\t\t\t\tfor (var i = 0; i < w.length && w[i] === ""; i++);\n\t\t\t\t\t\t\t\tfor (var s = w.length - 1; s >= 0 && w[s] === ""; s--);\n\t\t\t\t\t\t\t\treturn i > s ? [] : w.slice(i, s - i + 1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tl = R.resolve(l).substr(1), u = R.resolve(u).substr(1);\n\t\t\t\t\t\t\tfor (var a = c(l.split("/")), b = c(u.split("/")), y = Math.min(a.length, b.length), x = y, t = 0; t < y; t++) if (a[t] !== b[t]) {\n\t\t\t\t\t\t\t\tx = t;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tvar _ = [];\n\t\t\t\t\t\t\tfor (t = x; t < a.length; t++) _.push("..");\n\t\t\t\t\t\t\treturn (_ = _.concat(b.slice(x))).join("/");\n\t\t\t\t\t\t}, R.sep = "/", R.delimiter = ":", R.dirname = function(l) {\n\t\t\t\t\t\t\tif (typeof l != "string" && (l += ""), l.length === 0) return ".";\n\t\t\t\t\t\t\tfor (var u = l.charCodeAt(0), c = u === 47, a = -1, b = !0, y = l.length - 1; y >= 1; --y) if ((u = l.charCodeAt(y)) === 47) {\n\t\t\t\t\t\t\t\tif (!b) {\n\t\t\t\t\t\t\t\t\ta = y;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else b = !1;\n\t\t\t\t\t\t\treturn a === -1 ? c ? "/" : "." : c && a === 1 ? "/" : l.slice(0, a);\n\t\t\t\t\t\t}, R.basename = function(l, u) {\n\t\t\t\t\t\t\tvar c = (function(a) {\n\t\t\t\t\t\t\t\ttypeof a != "string" && (a += "");\n\t\t\t\t\t\t\t\tvar b, y = 0, x = -1, t = !0;\n\t\t\t\t\t\t\t\tfor (b = a.length - 1; b >= 0; --b) if (a.charCodeAt(b) === 47) {\n\t\t\t\t\t\t\t\t\tif (!t) {\n\t\t\t\t\t\t\t\t\t\ty = b + 1;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else x === -1 && (t = !1, x = b + 1);\n\t\t\t\t\t\t\t\treturn x === -1 ? "" : a.slice(y, x);\n\t\t\t\t\t\t\t})(l);\n\t\t\t\t\t\t\treturn u && c.substr(-1 * u.length) === u && (c = c.substr(0, c.length - u.length)), c;\n\t\t\t\t\t\t}, R.extname = function(l) {\n\t\t\t\t\t\t\ttypeof l != "string" && (l += "");\n\t\t\t\t\t\t\tfor (var u = -1, c = 0, a = -1, b = !0, y = 0, x = l.length - 1; x >= 0; --x) {\n\t\t\t\t\t\t\t\tvar t = l.charCodeAt(x);\n\t\t\t\t\t\t\t\tif (t !== 47) a === -1 && (b = !1, a = x + 1), t === 46 ? u === -1 ? u = x : y !== 1 && (y = 1) : u !== -1 && (y = -1);\n\t\t\t\t\t\t\t\telse if (!b) {\n\t\t\t\t\t\t\t\t\tc = x + 1;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn u === -1 || a === -1 || y === 0 || y === 1 && u === a - 1 && u === c + 1 ? "" : l.slice(u, a);\n\t\t\t\t\t\t};\n\t\t\t\t\t\tvar O = "ab".substr(-1) === "b" ? function(l, u, c) {\n\t\t\t\t\t\t\treturn l.substr(u, c);\n\t\t\t\t\t\t} : function(l, u, c) {\n\t\t\t\t\t\t\treturn u < 0 && (u = l.length + u), l.substr(u, c);\n\t\t\t\t\t\t};\n\t\t\t\t\t}).call(this, d(2));\n\t\t\t\t},\n\t\t\t\tfunction(T, R) {\n\t\t\t\t\tfunction d(i) {\n\t\t\t\t\t\treturn (d = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(s) {\n\t\t\t\t\t\t\treturn typeof s;\n\t\t\t\t\t\t} : function(s) {\n\t\t\t\t\t\t\treturn s && typeof Symbol == "function" && s.constructor === Symbol && s !== Symbol.prototype ? "symbol" : typeof s;\n\t\t\t\t\t\t})(i);\n\t\t\t\t\t}\n\t\t\t\t\tfunction v(i, s) {\n\t\t\t\t\t\tif (typeof s != "function" && s !== null) throw new TypeError("Super expression must either be null or a function");\n\t\t\t\t\t\ti.prototype = Object.create(s && s.prototype, { constructor: {\n\t\t\t\t\t\t\tvalue: i,\n\t\t\t\t\t\t\twritable: !0,\n\t\t\t\t\t\t\tconfigurable: !0\n\t\t\t\t\t\t} }), s && p(i, s);\n\t\t\t\t\t}\n\t\t\t\t\tfunction p(i, s) {\n\t\t\t\t\t\treturn (p = Object.setPrototypeOf || function(h, C) {\n\t\t\t\t\t\t\treturn h.__proto__ = C, h;\n\t\t\t\t\t\t})(i, s);\n\t\t\t\t\t}\n\t\t\t\t\tfunction B(i) {\n\t\t\t\t\t\tvar s = (function() {\n\t\t\t\t\t\t\tif (typeof Reflect == "undefined" || !Reflect.construct || Reflect.construct.sham) return !1;\n\t\t\t\t\t\t\tif (typeof Proxy == "function") return !0;\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\treturn Date.prototype.toString.call(Reflect.construct(Date, [], (function() {}))), !0;\n\t\t\t\t\t\t\t} catch (h) {\n\t\t\t\t\t\t\t\treturn !1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})();\n\t\t\t\t\t\treturn function() {\n\t\t\t\t\t\t\tvar h, C = l(i);\n\t\t\t\t\t\t\tif (s) {\n\t\t\t\t\t\t\t\tvar E = l(this).constructor;\n\t\t\t\t\t\t\t\th = Reflect.construct(C, arguments, E);\n\t\t\t\t\t\t\t} else h = C.apply(this, arguments);\n\t\t\t\t\t\t\treturn O(this, h);\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t\tfunction O(i, s) {\n\t\t\t\t\t\treturn !s || d(s) !== "object" && typeof s != "function" ? (function(h) {\n\t\t\t\t\t\t\tif (h === void 0) throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");\n\t\t\t\t\t\t\treturn h;\n\t\t\t\t\t\t})(i) : s;\n\t\t\t\t\t}\n\t\t\t\t\tfunction l(i) {\n\t\t\t\t\t\treturn (l = Object.setPrototypeOf ? Object.getPrototypeOf : function(s) {\n\t\t\t\t\t\t\treturn s.__proto__ || Object.getPrototypeOf(s);\n\t\t\t\t\t\t})(i);\n\t\t\t\t\t}\n\t\t\t\t\tfunction u(i, s) {\n\t\t\t\t\t\tif (!(i instanceof s)) throw new TypeError("Cannot call a class as a function");\n\t\t\t\t\t}\n\t\t\t\t\tfunction c(i, s) {\n\t\t\t\t\t\tfor (var h = 0; h < s.length; h++) {\n\t\t\t\t\t\t\tvar C = s[h];\n\t\t\t\t\t\t\tC.enumerable = C.enumerable || !1, C.configurable = !0, "value" in C && (C.writable = !0), Object.defineProperty(i, C.key, C);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tfunction a(i, s, h) {\n\t\t\t\t\t\treturn s && c(i.prototype, s), h && c(i, h), i;\n\t\t\t\t\t}\n\t\t\t\t\tvar b = (function() {\n\t\t\t\t\t\tfunction i(s, h, C, E) {\n\t\t\t\t\t\t\tswitch (u(this, i), this._size = h, this._module = s, this._size) {\n\t\t\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t\t\tthis._heapArray = C ? this._module.HEAP8 : this._module.HEAPU8;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\t\tthis._heapArray = C ? this._module.HEAP16 : this._module.HEAPU16;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 4:\n\t\t\t\t\t\t\t\t\tthis._heapArray = C ? this._module.HEAP32 : this._module.HEAPU32;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tdefault: this._heapArray = this._module.HEAPU8;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tE && (this._size = 4, this._heapArray = this._module.HEAPF32), this._pointer = this._module._malloc(h);\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn a(i, [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tkey: "free",\n\t\t\t\t\t\t\t\tvalue: function() {\n\t\t\t\t\t\t\t\t\tthis._module._free(this.pointer);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tkey: "pointer",\n\t\t\t\t\t\t\t\tget: function() {\n\t\t\t\t\t\t\t\t\treturn this._pointer;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tkey: "value",\n\t\t\t\t\t\t\t\tget: function() {\n\t\t\t\t\t\t\t\t\tvar s = 0;\n\t\t\t\t\t\t\t\t\tswitch (this._size) {\n\t\t\t\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\t\t\t\ts = 1;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase 4:\n\t\t\t\t\t\t\t\t\t\t\ts = 2;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tdefault: throw new Error("Pointer can be only deferenced as integer-sized");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\treturn this._heapArray[this.pointer >> s];\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tset: function(s) {\n\t\t\t\t\t\t\t\t\tvar h = 0;\n\t\t\t\t\t\t\t\t\tswitch (this._size) {\n\t\t\t\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\t\t\t\th = 1;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase 4:\n\t\t\t\t\t\t\t\t\t\t\th = 2;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tdefault: throw new Error("Pointer can be only deferenced as integer-sized");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tthis._heapArray[this.pointer >> h] = s;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t]), i;\n\t\t\t\t\t})(), y = (function(i) {\n\t\t\t\t\t\tv(h, i);\n\t\t\t\t\t\tvar s = B(h);\n\t\t\t\t\t\tfunction h(C, E) {\n\t\t\t\t\t\t\tvar M;\n\t\t\t\t\t\t\treturn u(this, h), M = s.call(this, C, 4, !0, !1), E !== void 0 && (M.value = E), M;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn h;\n\t\t\t\t\t})(b), x = (function(i) {\n\t\t\t\t\t\tv(h, i);\n\t\t\t\t\t\tvar s = B(h);\n\t\t\t\t\t\tfunction h(C, E) {\n\t\t\t\t\t\t\tvar M;\n\t\t\t\t\t\t\treturn u(this, h), M = s.call(this, C, 4, !1, !1), E !== void 0 && (M.value = E), M;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn h;\n\t\t\t\t\t})(b), t = (function(i) {\n\t\t\t\t\t\tv(h, i);\n\t\t\t\t\t\tvar s = B(h);\n\t\t\t\t\t\tfunction h(C, E, M, J, Y) {\n\t\t\t\t\t\t\tvar j;\n\t\t\t\t\t\t\tu(this, h), j = s.call(this, C, E * M, J, Y);\n\t\t\t\t\t\t\tvar k = 0;\n\t\t\t\t\t\t\tswitch (M) {\n\t\t\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t\t\tj._heapArray = J ? j._module.HEAP8 : j._module.HEAPU8, k = 0;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\t\tj._heapArray = J ? j._module.HEAP16 : j._module.HEAPU16, k = 1;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 4:\n\t\t\t\t\t\t\t\t\tj._heapArray = J ? j._module.HEAP32 : j._module.HEAPU32, k = 2;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tdefault: throw new Error("Unit size must be an integer-size");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tY && (j._heapArray = j._module.HEAPF32, k = 2);\n\t\t\t\t\t\t\tvar N = j._pointer >> k;\n\t\t\t\t\t\t\treturn j._buffer = j._heapArray.subarray(N, N + E), j._length = E, j;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn a(h, [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tkey: "set",\n\t\t\t\t\t\t\t\tvalue: function(C, E) {\n\t\t\t\t\t\t\t\t\tthis._buffer.set(C, E);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tkey: "subarray",\n\t\t\t\t\t\t\t\tvalue: function(C, E) {\n\t\t\t\t\t\t\t\t\treturn this._buffer.subarray(C, E);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tkey: "length",\n\t\t\t\t\t\t\t\tget: function() {\n\t\t\t\t\t\t\t\t\treturn this._length;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t]), h;\n\t\t\t\t\t})(b), _ = (function(i) {\n\t\t\t\t\t\tv(h, i);\n\t\t\t\t\t\tvar s = B(h);\n\t\t\t\t\t\tfunction h(C, E) {\n\t\t\t\t\t\t\treturn u(this, h), s.call(this, C, E, 4, !0, !0);\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn h;\n\t\t\t\t\t})(t), w = (function(i) {\n\t\t\t\t\t\tv(h, i);\n\t\t\t\t\t\tvar s = B(h);\n\t\t\t\t\t\tfunction h(C, E) {\n\t\t\t\t\t\t\treturn u(this, h), s.call(this, C, E, 1, !1, !1);\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn h;\n\t\t\t\t\t})(t);\n\t\t\t\t\tT.exports = {\n\t\t\t\t\t\twriteString: function(i, s, h) {\n\t\t\t\t\t\t\tfor (var C = 0; C < h.length; C++) i.setUint8(s + C, h.charCodeAt(C));\n\t\t\t\t\t\t},\n\t\t\t\t\t\tEmscriptenMemoryAllocator: (function() {\n\t\t\t\t\t\t\tfunction i(s) {\n\t\t\t\t\t\t\t\tu(this, i), this._module = s;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn a(i, [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tkey: "mallocInt32",\n\t\t\t\t\t\t\t\t\tvalue: function(s) {\n\t\t\t\t\t\t\t\t\t\treturn new y(this._module, s);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tkey: "mallocUint32",\n\t\t\t\t\t\t\t\t\tvalue: function(s) {\n\t\t\t\t\t\t\t\t\t\treturn new x(this._module, s);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tkey: "mallocUint8Buffer",\n\t\t\t\t\t\t\t\t\tvalue: function(s) {\n\t\t\t\t\t\t\t\t\t\treturn new w(this._module, s);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tkey: "mallocFloat32Buffer",\n\t\t\t\t\t\t\t\t\tvalue: function(s) {\n\t\t\t\t\t\t\t\t\t\treturn new _(this._module, s);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t]), i;\n\t\t\t\t\t\t})()\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\tfunction(T, R) {\n\t\t\t\t\tvar d, v, p = T.exports = {};\n\t\t\t\t\tfunction B() {\n\t\t\t\t\t\tthrow new Error("setTimeout has not been defined");\n\t\t\t\t\t}\n\t\t\t\t\tfunction O() {\n\t\t\t\t\t\tthrow new Error("clearTimeout has not been defined");\n\t\t\t\t\t}\n\t\t\t\t\tfunction l(w) {\n\t\t\t\t\t\tif (d === setTimeout) return setTimeout(w, 0);\n\t\t\t\t\t\tif ((d === B || !d) && setTimeout) return d = setTimeout, setTimeout(w, 0);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\treturn d(w, 0);\n\t\t\t\t\t\t} catch (i) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\treturn d.call(null, w, 0);\n\t\t\t\t\t\t\t} catch (s) {\n\t\t\t\t\t\t\t\treturn d.call(this, w, 0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t(function() {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\td = typeof setTimeout == "function" ? setTimeout : B;\n\t\t\t\t\t\t} catch (w) {\n\t\t\t\t\t\t\td = B;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tv = typeof clearTimeout == "function" ? clearTimeout : O;\n\t\t\t\t\t\t} catch (w) {\n\t\t\t\t\t\t\tv = O;\n\t\t\t\t\t\t}\n\t\t\t\t\t})();\n\t\t\t\t\tvar u, c = [], a = !1, b = -1;\n\t\t\t\t\tfunction y() {\n\t\t\t\t\t\ta && u && (a = !1, u.length ? c = u.concat(c) : b = -1, c.length && x());\n\t\t\t\t\t}\n\t\t\t\t\tfunction x() {\n\t\t\t\t\t\tif (!a) {\n\t\t\t\t\t\t\tvar w = l(y);\n\t\t\t\t\t\t\ta = !0;\n\t\t\t\t\t\t\tfor (var i = c.length; i;) {\n\t\t\t\t\t\t\t\tfor (u = c, c = []; ++b < i;) u && u[b].run();\n\t\t\t\t\t\t\t\tb = -1, i = c.length;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tu = null, a = !1, (function(s) {\n\t\t\t\t\t\t\t\tif (v === clearTimeout) return clearTimeout(s);\n\t\t\t\t\t\t\t\tif ((v === O || !v) && clearTimeout) return v = clearTimeout, clearTimeout(s);\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tv(s);\n\t\t\t\t\t\t\t\t} catch (h) {\n\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\treturn v.call(null, s);\n\t\t\t\t\t\t\t\t\t} catch (C) {\n\t\t\t\t\t\t\t\t\t\treturn v.call(this, s);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})(w);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tfunction t(w, i) {\n\t\t\t\t\t\tthis.fun = w, this.array = i;\n\t\t\t\t\t}\n\t\t\t\t\tfunction _() {}\n\t\t\t\t\tp.nextTick = function(w) {\n\t\t\t\t\t\tvar i = new Array(arguments.length - 1);\n\t\t\t\t\t\tif (arguments.length > 1) for (var s = 1; s < arguments.length; s++) i[s - 1] = arguments[s];\n\t\t\t\t\t\tc.push(new t(w, i)), c.length !== 1 || a || l(x);\n\t\t\t\t\t}, t.prototype.run = function() {\n\t\t\t\t\t\tthis.fun.apply(null, this.array);\n\t\t\t\t\t}, p.title = "browser", p.browser = !0, p.env = {}, p.argv = [], p.version = "", p.versions = {}, p.on = _, p.addListener = _, p.once = _, p.off = _, p.removeListener = _, p.removeAllListeners = _, p.emit = _, p.prependListener = _, p.prependOnceListener = _, p.listeners = function(w) {\n\t\t\t\t\t\treturn [];\n\t\t\t\t\t}, p.binding = function(w) {\n\t\t\t\t\t\tthrow new Error("process.binding is not supported");\n\t\t\t\t\t}, p.cwd = function() {\n\t\t\t\t\t\treturn "/";\n\t\t\t\t\t}, p.chdir = function(w) {\n\t\t\t\t\t\tthrow new Error("process.chdir is not supported");\n\t\t\t\t\t}, p.umask = function() {\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\tfunction(T, R) {\n\t\t\t\t\tT.exports = function(d) {\n\t\t\t\t\t\treturn d.webpackPolyfill || (d.deprecate = function() {}, d.paths = [], d.children || (d.children = []), Object.defineProperty(d, "loaded", {\n\t\t\t\t\t\t\tenumerable: !0,\n\t\t\t\t\t\t\tget: function() {\n\t\t\t\t\t\t\t\treturn d.l;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}), Object.defineProperty(d, "id", {\n\t\t\t\t\t\t\tenumerable: !0,\n\t\t\t\t\t\t\tget: function() {\n\t\t\t\t\t\t\t\treturn d.i;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}), d.webpackPolyfill = 1), d;\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\tfunction(T, R) {},\n\t\t\t\tfunction(T, R, d) {\n\t\t\t\t\tfunction v(p) {\n\t\t\t\t\t\tvar B, O = d(6), l = d(7), u = d(8);\n\t\t\t\t\t\tp.onmessage = function(c) {\n\t\t\t\t\t\t\tvar a = c.data.command;\n\t\t\t\t\t\t\tswitch (a) {\n\t\t\t\t\t\t\t\tcase "loadEncoder":\n\t\t\t\t\t\t\t\t\tvar b, y = c.data, x = y.mimeType, t = y.wasmPath;\n\t\t\t\t\t\t\t\t\tswitch (x) {\n\t\t\t\t\t\t\t\t\t\tcase "audio/wav":\n\t\t\t\t\t\t\t\t\t\tcase "audio/wave":\n\t\t\t\t\t\t\t\t\t\t\tb = O;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase "audio/webm":\n\t\t\t\t\t\t\t\t\t\t\tb = l;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase "audio/ogg": b = u;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tvar _ = {};\n\t\t\t\t\t\t\t\t\tt && (_.locateFile = function(Y, j) {\n\t\t\t\t\t\t\t\t\t\treturn Y.match(/.wasm/) ? t : j + Y;\n\t\t\t\t\t\t\t\t\t}), b(_).then((function(Y) {\n\t\t\t\t\t\t\t\t\t\tB = Y, self.postMessage({ command: "readyToInit" });\n\t\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase "init":\n\t\t\t\t\t\t\t\t\tvar w = c.data, i = w.sampleRate, s = w.channelCount, h = w.bitsPerSecond;\n\t\t\t\t\t\t\t\t\tB.init(i, s, h);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase "pushInputData":\n\t\t\t\t\t\t\t\t\tfor (var C = c.data, E = C.channelBuffers, M = (C.length, C.duration, 0); M < E.length; M++) E[M] = new Float32Array(E[M].buffer);\n\t\t\t\t\t\t\t\t\tB.encode(E);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase "getEncodedData":\n\t\t\t\t\t\t\t\tcase "done":\n\t\t\t\t\t\t\t\t\ta === "done" && B.close();\n\t\t\t\t\t\t\t\t\tvar J = B.flush();\n\t\t\t\t\t\t\t\t\tself.postMessage({\n\t\t\t\t\t\t\t\t\t\tcommand: a === "done" ? "lastEncodedData" : "encodedData",\n\t\t\t\t\t\t\t\t\t\tbuffers: J\n\t\t\t\t\t\t\t\t\t}, J), a === "done" && self.close();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t\ttypeof WorkerGlobalScope != "undefined" && self instanceof WorkerGlobalScope && v(self), T.exports = v;\n\t\t\t\t},\n\t\t\t\tfunction(T, R, d) {\n\t\t\t\t\tfunction v(c) {\n\t\t\t\t\t\treturn (function(a) {\n\t\t\t\t\t\t\tif (Array.isArray(a)) return p(a);\n\t\t\t\t\t\t})(c) || (function(a) {\n\t\t\t\t\t\t\tif (typeof Symbol != "undefined" && Symbol.iterator in Object(a)) return Array.from(a);\n\t\t\t\t\t\t})(c) || (function(a, b) {\n\t\t\t\t\t\t\tif (a) {\n\t\t\t\t\t\t\t\tif (typeof a == "string") return p(a, b);\n\t\t\t\t\t\t\t\tvar y = Object.prototype.toString.call(a).slice(8, -1);\n\t\t\t\t\t\t\t\tif (y === "Object" && a.constructor && (y = a.constructor.name), y === "Map" || y === "Set") return Array.from(a);\n\t\t\t\t\t\t\t\tif (y === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(y)) return p(a, b);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})(c) || (function() {\n\t\t\t\t\t\t\tthrow new TypeError(`Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);\n\t\t\t\t\t\t})();\n\t\t\t\t\t}\n\t\t\t\t\tfunction p(c, a) {\n\t\t\t\t\t\t(a == null || a > c.length) && (a = c.length);\n\t\t\t\t\t\tfor (var b = 0, y = new Array(a); b < a; b++) y[b] = c[b];\n\t\t\t\t\t\treturn y;\n\t\t\t\t\t}\n\t\t\t\t\tfunction B(c, a) {\n\t\t\t\t\t\tfor (var b = 0; b < a.length; b++) {\n\t\t\t\t\t\t\tvar y = a[b];\n\t\t\t\t\t\t\ty.enumerable = y.enumerable || !1, y.configurable = !0, "value" in y && (y.writable = !0), Object.defineProperty(c, y.key, y);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tvar O = d(1).writeString, l = Int16Array.BYTES_PER_ELEMENT, u = (function() {\n\t\t\t\t\t\tfunction c(x, t, _) {\n\t\t\t\t\t\t\t(function(w, i) {\n\t\t\t\t\t\t\t\tif (!(w instanceof i)) throw new TypeError("Cannot call a class as a function");\n\t\t\t\t\t\t\t})(this, c), this.config = {\n\t\t\t\t\t\t\t\tinputSampleRate: x,\n\t\t\t\t\t\t\t\tchannelCount: t\n\t\t\t\t\t\t\t}, this.encodedBuffers = [];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvar a, b, y;\n\t\t\t\t\t\treturn a = c, (b = [{\n\t\t\t\t\t\t\tkey: "encode",\n\t\t\t\t\t\t\tvalue: function(x) {\n\t\t\t\t\t\t\t\tfor (var t = x[0].length, _ = new ArrayBuffer(t * l * this.config.channelCount), w = new DataView(_), i = 0; i < this.config.channelCount; i++) for (var s = x[i], h = 0; h < t; h++) {\n\t\t\t\t\t\t\t\t\tvar C = 32767 * s[h] | 0;\n\t\t\t\t\t\t\t\t\tC > 32767 ? C = 32767 : C < -32768 && (C = -32768);\n\t\t\t\t\t\t\t\t\tvar E = (h * this.config.channelCount + i) * l;\n\t\t\t\t\t\t\t\t\tw.setInt16(E, 0 | C, !0);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tthis.encodedBuffers.push(_);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, {\n\t\t\t\t\t\t\tkey: "getHeader",\n\t\t\t\t\t\t\tvalue: function() {\n\t\t\t\t\t\t\t\tvar x = this.encodedBuffers.reduce((function(w, i) {\n\t\t\t\t\t\t\t\t\treturn w + i.byteLength;\n\t\t\t\t\t\t\t\t}), 0), t = /* @__PURE__ */ new ArrayBuffer(44), _ = new DataView(t);\n\t\t\t\t\t\t\t\treturn O(_, 0, "RIFF"), _.setUint32(4, 36 + x, !0), O(_, 8, "WAVE"), O(_, 12, "fmt "), _.setUint32(16, 16, !0), _.setUint16(20, 1, !0), _.setUint16(22, this.config.channelCount, !0), _.setUint32(24, this.config.inputSampleRate, !0), _.setUint32(28, this.config.inputSampleRate * l * this.config.channelCount, !0), _.setUint16(32, l * this.config.channelCount, !0), _.setUint16(34, 8 * l, !0), O(_, 36, "data"), _.setUint32(40, x, !0), t;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}]) && B(a.prototype, b), y && B(a, y), c;\n\t\t\t\t\t})();\n\t\t\t\t\tT.exports = function(c) {\n\t\t\t\t\t\treturn new Promise((function(a, b) {\n\t\t\t\t\t\t\t(c = c !== void 0 && c || {}).init = function(y, x, t) {\n\t\t\t\t\t\t\t\tc.encoder = new u(y, x, t);\n\t\t\t\t\t\t\t}, c.encode = function(y) {\n\t\t\t\t\t\t\t\tc.encoder.encode(y);\n\t\t\t\t\t\t\t}, c.flush = function() {\n\t\t\t\t\t\t\t\tvar y = c.encoder.getHeader(), x = c.encoder.encodedBuffers.splice(0, c.encoder.encodedBuffers.length);\n\t\t\t\t\t\t\t\treturn [y].concat(v(x));\n\t\t\t\t\t\t\t}, c.close = function() {}, a(c);\n\t\t\t\t\t\t}));\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\tfunction(T, R, d) {\n\t\t\t\t\t(function(v, p, B, O) {\n\t\t\t\t\t\tvar l;\n\t\t\t\t\t\tfunction u(t) {\n\t\t\t\t\t\t\treturn (u = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(_) {\n\t\t\t\t\t\t\t\treturn typeof _;\n\t\t\t\t\t\t\t} : function(_) {\n\t\t\t\t\t\t\t\treturn _ && typeof Symbol == "function" && _.constructor === Symbol && _ !== Symbol.prototype ? "symbol" : typeof _;\n\t\t\t\t\t\t\t})(t);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfunction c(t, _) {\n\t\t\t\t\t\t\tif (!(t instanceof _)) throw new TypeError("Cannot call a class as a function");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfunction a(t, _) {\n\t\t\t\t\t\t\tfor (var w = 0; w < _.length; w++) {\n\t\t\t\t\t\t\t\tvar i = _[w];\n\t\t\t\t\t\t\t\ti.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(t, i.key, i);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfunction b(t, _, w) {\n\t\t\t\t\t\t\treturn _ && a(t.prototype, _), w && a(t, w), t;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvar y, x = (y = (y = typeof document != "undefined" && document.currentScript ? document.currentScript.src : void 0) || v, function(t) {\n\t\t\t\t\t\t\tt = (t = t || {}) !== void 0 ? t : {};\n\t\t\t\t\t\t\tvar _ = d(1).EmscriptenMemoryAllocator, w = 2049, i = 48e3, s = 4e3, h = 20, C = 6, E = 4096, M = 0, J = 4002, Y = 0, j = (function() {\n\t\t\t\t\t\t\t\tfunction n(r, f) {\n\t\t\t\t\t\t\t\t\tvar g = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : void 0;\n\t\t\t\t\t\t\t\t\tc(this, n), this.config = {\n\t\t\t\t\t\t\t\t\t\tinputSampleRate: r,\n\t\t\t\t\t\t\t\t\t\tchannelCount: f\n\t\t\t\t\t\t\t\t\t}, this.memory = new _(t), this._opus_encoder_create = t._opus_encoder_create, this._opus_encoder_ctl = t._opus_encoder_ctl, this._opus_encode_float = t._opus_encode_float, this._opus_encoder_destroy = t._opus_encoder_destroy, this._speex_resampler_init = t._speex_resampler_init, this._speex_resampler_process_interleaved_float = t._speex_resampler_process_interleaved_float, this._speex_resampler_destroy = t._speex_resampler_destroy, this._container = new t.Container(), this._container.init(i, f, Math.floor(4294967295 * Math.random())), this.OpusInitCodec(i, f, g), this.SpeexInitResampler(r, i, f), this.inputSamplesPerChannel = r * h / 1e3, this.outputSamplePerChannel = i * h / 1e3, this.inputBufferIndex = 0, this.mInputBuffer = this.memory.mallocFloat32Buffer(this.inputSamplesPerChannel * f), this.mResampledBuffer = this.memory.mallocFloat32Buffer(this.outputSamplePerChannel * f), this.mOutputBuffer = this.memory.mallocUint8Buffer(s), this.interleavedBuffers = f !== 1 ? new Float32Array(E * f) : void 0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn b(n, [\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tkey: "encode",\n\t\t\t\t\t\t\t\t\t\tvalue: function(r) {\n\t\t\t\t\t\t\t\t\t\t\tfor (var f = this.interleave(r), g = 0; g < f.length;) {\n\t\t\t\t\t\t\t\t\t\t\t\tvar P = Math.min(this.mInputBuffer.length - this.inputBufferIndex, f.length - g);\n\t\t\t\t\t\t\t\t\t\t\t\tif (this.mInputBuffer.set(f.subarray(g, g + P), this.inputBufferIndex), this.inputBufferIndex += P, this.inputBufferIndex >= this.mInputBuffer.length) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tvar I = this.memory.mallocUint32(this.inputSamplesPerChannel), W = this.memory.mallocUint32(this.outputSamplePerChannel), ft = this._speex_resampler_process_interleaved_float(this.resampler, this.mInputBuffer.pointer, I.pointer, this.mResampledBuffer.pointer, W.pointer);\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (I.free(), W.free(), ft !== Y) throw new Error("Resampling error.");\n\t\t\t\t\t\t\t\t\t\t\t\t\tvar st = this._opus_encode_float(this.encoder, this.mResampledBuffer.pointer, this.outputSamplePerChannel, this.mOutputBuffer.pointer, this.mOutputBuffer.length);\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (st < 0) throw new Error("Opus encoding error.");\n\t\t\t\t\t\t\t\t\t\t\t\t\tthis._container.writeFrame(this.mOutputBuffer.pointer, st, this.outputSamplePerChannel), this.inputBufferIndex = 0;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tg += P;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tkey: "close",\n\t\t\t\t\t\t\t\t\t\tvalue: function() {\n\t\t\t\t\t\t\t\t\t\t\tfor (var r = this.config.channelCount, f = [], g = 0; g < r; ++g) f.push(new Float32Array(E - this.inputBufferIndex / r));\n\t\t\t\t\t\t\t\t\t\t\tthis.encode(f), t.destroy(this._container), this.mInputBuffer.free(), this.mResampledBuffer.free(), this.mOutputBuffer.free(), this._opus_encoder_destroy(this.encoder), this._speex_resampler_destroy(this.resampler);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tkey: "interleave",\n\t\t\t\t\t\t\t\t\t\tvalue: function(r) {\n\t\t\t\t\t\t\t\t\t\t\tvar f = r.length;\n\t\t\t\t\t\t\t\t\t\t\tif (f === 1) return r[0];\n\t\t\t\t\t\t\t\t\t\t\tfor (var g = 0; g < f; g++) for (var P = r[g], I = 0; I < P.length; I++) this.interleavedBuffers[I * f + g] = P[I];\n\t\t\t\t\t\t\t\t\t\t\treturn this.interleavedBuffers;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tkey: "OpusInitCodec",\n\t\t\t\t\t\t\t\t\t\tvalue: function(r, f) {\n\t\t\t\t\t\t\t\t\t\t\tvar g = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : void 0, P = this.memory.mallocUint32(void 0);\n\t\t\t\t\t\t\t\t\t\t\tthis.encoder = this._opus_encoder_create(r, f, w, P.pointer);\n\t\t\t\t\t\t\t\t\t\t\tvar I = P.value;\n\t\t\t\t\t\t\t\t\t\t\tif (P.free(), I !== M) throw new Error("Opus encodor initialization failed.");\n\t\t\t\t\t\t\t\t\t\t\tg && this.OpusSetOpusControl(J, g);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tkey: "OpusSetOpusControl",\n\t\t\t\t\t\t\t\t\t\tvalue: function(r, f) {\n\t\t\t\t\t\t\t\t\t\t\tvar g = this.memory.mallocInt32(f);\n\t\t\t\t\t\t\t\t\t\t\tthis._opus_encoder_ctl(this.encoder, r, g.pointer), g.free();\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tkey: "SpeexInitResampler",\n\t\t\t\t\t\t\t\t\t\tvalue: function(r, f, g) {\n\t\t\t\t\t\t\t\t\t\t\tvar P = this.memory.mallocUint32(void 0);\n\t\t\t\t\t\t\t\t\t\t\tthis.resampler = this._speex_resampler_init(g, r, f, C, P.pointer);\n\t\t\t\t\t\t\t\t\t\t\tvar I = P.value;\n\t\t\t\t\t\t\t\t\t\t\tif (P.free(), I !== Y) throw new Error("Initializing resampler failed.");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t]), n;\n\t\t\t\t\t\t\t})();\n\t\t\t\t\t\t\tt.init = function(n, r, f) {\n\t\t\t\t\t\t\t\tt.encodedBuffers = [], t.encoder = new j(n, r, f);\n\t\t\t\t\t\t\t}, t.encode = function(n) {\n\t\t\t\t\t\t\t\tt.encoder.encode(n);\n\t\t\t\t\t\t\t}, t.flush = function() {\n\t\t\t\t\t\t\t\treturn t.encodedBuffers.splice(0, t.encodedBuffers.length);\n\t\t\t\t\t\t\t}, t.close = function() {\n\t\t\t\t\t\t\t\tt.encoder.close();\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tvar k, N = {};\n\t\t\t\t\t\t\tfor (k in t) t.hasOwnProperty(k) && (N[k] = t[k]);\n\t\t\t\t\t\t\tvar $ = [], et = !1, D = !1, _t = !1, xt = !1;\n\t\t\t\t\t\t\tet = (typeof window == "undefined" ? "undefined" : u(window)) === "object", D = typeof importScripts == "function", _t = (p === void 0 ? "undefined" : u(p)) === "object" && u(p.versions) === "object" && typeof p.versions.node == "string", xt = !et && !_t && !D;\n\t\t\t\t\t\t\tvar rt, K, dt, mt, U = "";\n\t\t\t\t\t\t\tfunction Xt(n) {\n\t\t\t\t\t\t\t\treturn t.locateFile ? t.locateFile(n, U) : U + n;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t_t ? (U = D ? d(0).dirname(U) + "/" : B + "/", rt = function(n, r) {\n\t\t\t\t\t\t\t\treturn dt || (dt = d(4)), mt || (mt = d(0)), n = mt.normalize(n), dt.readFileSync(n, r ? null : "utf8");\n\t\t\t\t\t\t\t}, K = function(n) {\n\t\t\t\t\t\t\t\tvar r = rt(n, !0);\n\t\t\t\t\t\t\t\treturn r.buffer || (r = new Uint8Array(r)), Rt(r.buffer), r;\n\t\t\t\t\t\t\t}, p.argv.length > 1 && p.argv[1].replace(/\\\\/g, "/"), $ = p.argv.slice(2), p.on("uncaughtException", (function(n) {\n\t\t\t\t\t\t\t\tif (!(n instanceof bn)) throw n;\n\t\t\t\t\t\t\t})), p.on("unhandledRejection", V), t.inspect = function() {\n\t\t\t\t\t\t\t\treturn "[Emscripten Module object]";\n\t\t\t\t\t\t\t}) : xt ? (typeof read != "undefined" && (rt = function(n) {\n\t\t\t\t\t\t\t\treturn read(n);\n\t\t\t\t\t\t\t}), K = function(n) {\n\t\t\t\t\t\t\t\tvar r;\n\t\t\t\t\t\t\t\treturn typeof readbuffer == "function" ? new Uint8Array(readbuffer(n)) : (Rt(u(r = read(n, "binary")) === "object"), r);\n\t\t\t\t\t\t\t}, typeof scriptArgs != "undefined" ? $ = scriptArgs : arguments !== void 0 && ($ = arguments), typeof print != "undefined" && (typeof console == "undefined" && (console = {}), console.log = print, console.warn = console.error = typeof printErr != "undefined" ? printErr : print)) : (et || D) && (D ? U = self.location.href : document.currentScript && (U = document.currentScript.src), y && (U = y), U = U.indexOf("blob:") !== 0 ? U.substr(0, U.lastIndexOf("/") + 1) : "", rt = function(n) {\n\t\t\t\t\t\t\t\tvar r = new XMLHttpRequest();\n\t\t\t\t\t\t\t\treturn r.open("GET", n, !1), r.send(null), r.responseText;\n\t\t\t\t\t\t\t}, D && (K = function(n) {\n\t\t\t\t\t\t\t\tvar r = new XMLHttpRequest();\n\t\t\t\t\t\t\t\treturn r.open("GET", n, !1), r.responseType = "arraybuffer", r.send(null), new Uint8Array(r.response);\n\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\tvar Q, ht, Pt = t.print || console.log.bind(console), z = t.printErr || console.warn.bind(console);\n\t\t\t\t\t\t\tfor (k in N) N.hasOwnProperty(k) && (t[k] = N[k]);\n\t\t\t\t\t\t\tN = null, t.arguments && ($ = t.arguments), t.thisProgram && t.thisProgram, t.quit && t.quit, t.wasmBinary && (Q = t.wasmBinary), t.noExitRuntime && t.noExitRuntime, (typeof WebAssembly == "undefined" ? "undefined" : u(WebAssembly)) !== "object" && z("no native wasm support detected");\n\t\t\t\t\t\t\tvar Yt = new WebAssembly.Table({\n\t\t\t\t\t\t\t\tinitial: 60,\n\t\t\t\t\t\t\t\tmaximum: 60,\n\t\t\t\t\t\t\t\telement: "anyfunc"\n\t\t\t\t\t\t\t}), Et = !1;\n\t\t\t\t\t\t\tfunction Rt(n, r) {\n\t\t\t\t\t\t\t\tn || V("Assertion failed: " + r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tvar Bt = typeof TextDecoder != "undefined" ? new TextDecoder("utf8") : void 0;\n\t\t\t\t\t\t\tfunction It(n, r, f) {\n\t\t\t\t\t\t\t\tfor (var g = r + f, P = r; n[P] && !(P >= g);) ++P;\n\t\t\t\t\t\t\t\tif (P - r > 16 && n.subarray && Bt) return Bt.decode(n.subarray(r, P));\n\t\t\t\t\t\t\t\tfor (var I = ""; r < P;) {\n\t\t\t\t\t\t\t\t\tvar W = n[r++];\n\t\t\t\t\t\t\t\t\tif (128 & W) {\n\t\t\t\t\t\t\t\t\t\tvar ft = 63 & n[r++];\n\t\t\t\t\t\t\t\t\t\tif ((224 & W) != 192) {\n\t\t\t\t\t\t\t\t\t\t\tvar st = 63 & n[r++];\n\t\t\t\t\t\t\t\t\t\t\tif ((W = (240 & W) == 224 ? (15 & W) << 12 | ft << 6 | st : (7 & W) << 18 | ft << 12 | st << 6 | 63 & n[r++]) < 65536) I += String.fromCharCode(W);\n\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\tvar gn = W - 65536;\n\t\t\t\t\t\t\t\t\t\t\t\tI += String.fromCharCode(55296 | gn >> 10, 56320 | 1023 & gn);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else I += String.fromCharCode((31 & W) << 6 | ft);\n\t\t\t\t\t\t\t\t\t} else I += String.fromCharCode(W);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn I;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction ot(n, r) {\n\t\t\t\t\t\t\t\treturn n ? It(ut, n, r) : "";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttypeof TextDecoder != "undefined" && new TextDecoder("utf-16le");\n\t\t\t\t\t\t\tvar it, ut, L, Ot = 65536;\n\t\t\t\t\t\t\tfunction Jt(n) {\n\t\t\t\t\t\t\t\tit = n, t.HEAP8 = new Int8Array(n), t.HEAP16 = new Int16Array(n), t.HEAP32 = L = new Int32Array(n), t.HEAPU8 = ut = new Uint8Array(n), t.HEAPU16 = new Uint16Array(n), t.HEAPU32 = new Uint32Array(n), t.HEAPF32 = new Float32Array(n), t.HEAPF64 = new Float64Array(n);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tvar $t = 5289024, Kt = 45984, yt = t.INITIAL_MEMORY || 16777216;\n\t\t\t\t\t\t\tfunction at(n) {\n\t\t\t\t\t\t\t\tfor (; n.length > 0;) {\n\t\t\t\t\t\t\t\t\tvar r = n.shift();\n\t\t\t\t\t\t\t\t\tif (typeof r != "function") {\n\t\t\t\t\t\t\t\t\t\tvar f = r.func;\n\t\t\t\t\t\t\t\t\t\ttypeof f == "number" ? r.arg === void 0 ? t.dynCall_v(f) : t.dynCall_vi(f, r.arg) : f(r.arg === void 0 ? null : r.arg);\n\t\t\t\t\t\t\t\t\t} else r();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t(ht = t.wasmMemory ? t.wasmMemory : new WebAssembly.Memory({\n\t\t\t\t\t\t\t\tinitial: yt / Ot,\n\t\t\t\t\t\t\t\tmaximum: yt / Ot\n\t\t\t\t\t\t\t})) && (it = ht.buffer), yt = it.byteLength, Jt(it), L[Kt >> 2] = $t;\n\t\t\t\t\t\t\tvar jt = [], kt = [], Qt = [], Ut = [];\n\t\t\t\t\t\t\tfunction Zt() {\n\t\t\t\t\t\t\t\tif (t.preRun) for (typeof t.preRun == "function" && (t.preRun = [t.preRun]); t.preRun.length;) rn(t.preRun.shift());\n\t\t\t\t\t\t\t\tat(jt);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction tn() {\n\t\t\t\t\t\t\t\tat(kt);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction nn() {\n\t\t\t\t\t\t\t\tat(Qt);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction en() {\n\t\t\t\t\t\t\t\tif (t.postRun) for (typeof t.postRun == "function" && (t.postRun = [t.postRun]); t.postRun.length;) on(t.postRun.shift());\n\t\t\t\t\t\t\t\tat(Ut);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction rn(n) {\n\t\t\t\t\t\t\t\tjt.unshift(n);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction on(n) {\n\t\t\t\t\t\t\t\tUt.unshift(n);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tvar q = 0, vt = null, Z = null;\n\t\t\t\t\t\t\tfunction un(n) {\n\t\t\t\t\t\t\t\tq++, t.monitorRunDependencies && t.monitorRunDependencies(q);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction an(n) {\n\t\t\t\t\t\t\t\tif (q--, t.monitorRunDependencies && t.monitorRunDependencies(q), q == 0 && (vt !== null && (clearInterval(vt), vt = null), Z)) {\n\t\t\t\t\t\t\t\t\tvar r = Z;\n\t\t\t\t\t\t\t\t\tZ = null, r();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction V(n) {\n\t\t\t\t\t\t\t\tthrow t.onAbort && t.onAbort(n), Pt(n += ""), z(n), Et = !0, n = "abort(" + n + "). Build with -s ASSERTIONS=1 for more info.", new WebAssembly.RuntimeError(n);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tt.preloadedImages = {}, t.preloadedAudios = {};\n\t\t\t\t\t\t\tvar Tt = "data:application/octet-stream;base64,";\n\t\t\t\t\t\t\tfunction Mt(n) {\n\t\t\t\t\t\t\t\treturn String.prototype.startsWith ? n.startsWith(Tt) : n.indexOf(Tt) === 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tvar F = "WebMOpusEncoder.wasm";\n\t\t\t\t\t\t\tfunction Ft() {\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tif (Q) return new Uint8Array(Q);\n\t\t\t\t\t\t\t\t\tif (K) return K(F);\n\t\t\t\t\t\t\t\t\tthrow "both async and sync fetching of the wasm failed";\n\t\t\t\t\t\t\t\t} catch (n) {\n\t\t\t\t\t\t\t\t\tV(n);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction sn() {\n\t\t\t\t\t\t\t\treturn Q || !et && !D || typeof fetch != "function" ? new Promise((function(n, r) {\n\t\t\t\t\t\t\t\t\tn(Ft());\n\t\t\t\t\t\t\t\t})) : fetch(F, { credentials: "same-origin" }).then((function(n) {\n\t\t\t\t\t\t\t\t\tif (!n.ok) throw "failed to load wasm binary file at \'" + F + "\'";\n\t\t\t\t\t\t\t\t\treturn n.arrayBuffer();\n\t\t\t\t\t\t\t\t})).catch((function() {\n\t\t\t\t\t\t\t\t\treturn Ft();\n\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction cn() {\n\t\t\t\t\t\t\t\tvar n = { a: Gt };\n\t\t\t\t\t\t\t\tfunction r(P, I) {\n\t\t\t\t\t\t\t\t\tvar W = P.exports;\n\t\t\t\t\t\t\t\t\tt.asm = W, an();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfunction f(P) {\n\t\t\t\t\t\t\t\t\tr(P.instance);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfunction g(P) {\n\t\t\t\t\t\t\t\t\treturn sn().then((function(I) {\n\t\t\t\t\t\t\t\t\t\treturn WebAssembly.instantiate(I, n);\n\t\t\t\t\t\t\t\t\t})).then(P, (function(I) {\n\t\t\t\t\t\t\t\t\t\tz("failed to asynchronously prepare wasm: " + I), V(I);\n\t\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (un(), t.instantiateWasm) try {\n\t\t\t\t\t\t\t\t\treturn t.instantiateWasm(n, r);\n\t\t\t\t\t\t\t\t} catch (P) {\n\t\t\t\t\t\t\t\t\treturn z("Module.instantiateWasm callback failed with error: " + P), !1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn (function() {\n\t\t\t\t\t\t\t\t\tif (Q || typeof WebAssembly.instantiateStreaming != "function" || Mt(F) || typeof fetch != "function") return g(f);\n\t\t\t\t\t\t\t\t\tfetch(F, { credentials: "same-origin" }).then((function(P) {\n\t\t\t\t\t\t\t\t\t\treturn WebAssembly.instantiateStreaming(P, n).then(f, (function(I) {\n\t\t\t\t\t\t\t\t\t\t\tz("wasm streaming compile failed: " + I), z("falling back to ArrayBuffer instantiation"), g(f);\n\t\t\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\t})(), {};\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction fn(n, r) {\n\t\t\t\t\t\t\t\tvar f = new Uint8Array(t.HEAPU8.buffer, n, r);\n\t\t\t\t\t\t\t\tt.encodedBuffers.push(new Uint8Array(f).buffer);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction ln(n, r, f, g) {\n\t\t\t\t\t\t\t\tV("Assertion failed: " + ot(n) + ", at: " + [\n\t\t\t\t\t\t\t\t\tr ? ot(r) : "unknown filename",\n\t\t\t\t\t\t\t\t\tf,\n\t\t\t\t\t\t\t\t\tg ? ot(g) : "unknown function"\n\t\t\t\t\t\t\t\t]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tMt(F) || (F = Xt(F)), kt.push({ func: function() {\n\t\t\t\t\t\t\t\tHt();\n\t\t\t\t\t\t\t} });\n\t\t\t\t\t\t\tvar tt = {\n\t\t\t\t\t\t\t\tmappings: {},\n\t\t\t\t\t\t\t\tbuffers: [\n\t\t\t\t\t\t\t\t\tnull,\n\t\t\t\t\t\t\t\t\t[],\n\t\t\t\t\t\t\t\t\t[]\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\tprintChar: function(n, r) {\n\t\t\t\t\t\t\t\t\tvar f = tt.buffers[n];\n\t\t\t\t\t\t\t\t\tr === 0 || r === 10 ? ((n === 1 ? Pt : z)(It(f, 0)), f.length = 0) : f.push(r);\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tvarargs: void 0,\n\t\t\t\t\t\t\t\tget: function() {\n\t\t\t\t\t\t\t\t\treturn tt.varargs += 4, L[tt.varargs - 4 >> 2];\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tgetStr: function(n) {\n\t\t\t\t\t\t\t\t\treturn ot(n);\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tget64: function(n, r) {\n\t\t\t\t\t\t\t\t\treturn n;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tfunction pn(n, r, f) {\n\t\t\t\t\t\t\t\treturn tt.varargs = f, 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction _n(n, r, f) {\n\t\t\t\t\t\t\t\ttt.varargs = f;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction dn(n, r, f) {\n\t\t\t\t\t\t\t\treturn tt.varargs = f, 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction wt() {\n\t\t\t\t\t\t\t\tV();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction mn(n, r, f) {\n\t\t\t\t\t\t\t\tut.copyWithin(n, r, r + f);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction hn(n) {\n\t\t\t\t\t\t\t\tV("OOM");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction yn(n) {\n\t\t\t\t\t\t\t\thn();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction vn(n) {\n\t\t\t\t\t\t\t\treturn 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction Lt(n, r, f, g) {\n\t\t\t\t\t\t\t\tvar P = tt.getStreamFromFD(n), I = tt.doReadv(P, r, f);\n\t\t\t\t\t\t\t\treturn L[g >> 2] = I, 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction bt(n, r, f, g, P) {}\n\t\t\t\t\t\t\tfunction qt(n, r, f, g) {\n\t\t\t\t\t\t\t\tfor (var P = 0, I = 0; I < f; I++) {\n\t\t\t\t\t\t\t\t\tfor (var W = L[r + 8 * I >> 2], ft = L[r + (8 * I + 4) >> 2], st = 0; st < ft; st++) tt.printChar(n, ut[W + st]);\n\t\t\t\t\t\t\t\t\tP += ft;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn L[g >> 2] = P, 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction Vt(n) {\n\t\t\t\t\t\t\t\tvar r = Date.now() / 1e3 | 0;\n\t\t\t\t\t\t\t\treturn n && (L[n >> 2] = r), r;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tvar Gt = {\n\t\t\t\t\t\t\t\ta: ln,\n\t\t\t\t\t\t\t\te: pn,\n\t\t\t\t\t\t\t\th: _n,\n\t\t\t\t\t\t\t\tg: dn,\n\t\t\t\t\t\t\t\tb: wt,\n\t\t\t\t\t\t\t\tm: fn,\n\t\t\t\t\t\t\t\tk: mn,\n\t\t\t\t\t\t\t\tl: yn,\n\t\t\t\t\t\t\t\tc: vn,\n\t\t\t\t\t\t\t\tf: Lt,\n\t\t\t\t\t\t\t\tj: bt,\n\t\t\t\t\t\t\t\td: qt,\n\t\t\t\t\t\t\t\tmemory: ht,\n\t\t\t\t\t\t\t\ttable: Yt,\n\t\t\t\t\t\t\t\ti: Vt\n\t\t\t\t\t\t\t}, Wt = cn();\n\t\t\t\t\t\t\tt.asm = Wt;\n\t\t\t\t\t\t\tvar ct, Ht = t.___wasm_call_ctors = function() {\n\t\t\t\t\t\t\t\treturn (Ht = t.___wasm_call_ctors = t.asm.n).apply(null, arguments);\n\t\t\t\t\t\t\t}, Nt = (t.___em_js__emscriptenPushBuffer = function() {\n\t\t\t\t\t\t\t\treturn (t.___em_js__emscriptenPushBuffer = t.asm.o).apply(null, arguments);\n\t\t\t\t\t\t\t}, t._emscripten_bind_VoidPtr___destroy___0 = function() {\n\t\t\t\t\t\t\t\treturn (Nt = t._emscripten_bind_VoidPtr___destroy___0 = t.asm.p).apply(null, arguments);\n\t\t\t\t\t\t\t}), At = t._emscripten_bind_Container_Container_0 = function() {\n\t\t\t\t\t\t\t\treturn (At = t._emscripten_bind_Container_Container_0 = t.asm.q).apply(null, arguments);\n\t\t\t\t\t\t\t}, G = t._emscripten_bind_Container_init_3 = function() {\n\t\t\t\t\t\t\t\treturn (G = t._emscripten_bind_Container_init_3 = t.asm.r).apply(null, arguments);\n\t\t\t\t\t\t\t}, gt = t._emscripten_bind_Container_writeFrame_3 = function() {\n\t\t\t\t\t\t\t\treturn (gt = t._emscripten_bind_Container_writeFrame_3 = t.asm.s).apply(null, arguments);\n\t\t\t\t\t\t\t}, Ct = t._emscripten_bind_Container___destroy___0 = function() {\n\t\t\t\t\t\t\t\treturn (Ct = t._emscripten_bind_Container___destroy___0 = t.asm.t).apply(null, arguments);\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tfunction bn(n) {\n\t\t\t\t\t\t\t\tthis.name = "ExitStatus", this.message = "Program terminated with exit(" + n + ")", this.status = n;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction Dt(n) {\n\t\t\t\t\t\t\t\tfunction r() {\n\t\t\t\t\t\t\t\t\tct || (ct = !0, t.calledRun = !0, Et || (tn(), nn(), t.onRuntimeInitialized && t.onRuntimeInitialized(), en()));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tn = n || $, q > 0 || (Zt(), q > 0 || (t.setStatus ? (t.setStatus("Running..."), setTimeout((function() {\n\t\t\t\t\t\t\t\t\tsetTimeout((function() {\n\t\t\t\t\t\t\t\t\t\tt.setStatus("");\n\t\t\t\t\t\t\t\t\t}), 1), r();\n\t\t\t\t\t\t\t\t}), 1)) : r()));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (t._opus_encoder_create = function() {\n\t\t\t\t\t\t\t\treturn (t._opus_encoder_create = t.asm.u).apply(null, arguments);\n\t\t\t\t\t\t\t}, t._opus_encode_float = function() {\n\t\t\t\t\t\t\t\treturn (t._opus_encode_float = t.asm.v).apply(null, arguments);\n\t\t\t\t\t\t\t}, t._opus_encoder_ctl = function() {\n\t\t\t\t\t\t\t\treturn (t._opus_encoder_ctl = t.asm.w).apply(null, arguments);\n\t\t\t\t\t\t\t}, t._opus_encoder_destroy = function() {\n\t\t\t\t\t\t\t\treturn (t._opus_encoder_destroy = t.asm.x).apply(null, arguments);\n\t\t\t\t\t\t\t}, t._speex_resampler_init = function() {\n\t\t\t\t\t\t\t\treturn (t._speex_resampler_init = t.asm.y).apply(null, arguments);\n\t\t\t\t\t\t\t}, t._speex_resampler_destroy = function() {\n\t\t\t\t\t\t\t\treturn (t._speex_resampler_destroy = t.asm.z).apply(null, arguments);\n\t\t\t\t\t\t\t}, t._speex_resampler_process_interleaved_float = function() {\n\t\t\t\t\t\t\t\treturn (t._speex_resampler_process_interleaved_float = t.asm.A).apply(null, arguments);\n\t\t\t\t\t\t\t}, t._free = function() {\n\t\t\t\t\t\t\t\treturn (t._free = t.asm.B).apply(null, arguments);\n\t\t\t\t\t\t\t}, t._malloc = function() {\n\t\t\t\t\t\t\t\treturn (t._malloc = t.asm.C).apply(null, arguments);\n\t\t\t\t\t\t\t}, t.dynCall_vi = function() {\n\t\t\t\t\t\t\t\treturn (t.dynCall_vi = t.asm.D).apply(null, arguments);\n\t\t\t\t\t\t\t}, t.dynCall_v = function() {\n\t\t\t\t\t\t\t\treturn (t.dynCall_v = t.asm.E).apply(null, arguments);\n\t\t\t\t\t\t\t}, t.asm = Wt, t.then = function(n) {\n\t\t\t\t\t\t\t\tif (ct) n(t);\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tvar r = t.onRuntimeInitialized;\n\t\t\t\t\t\t\t\t\tt.onRuntimeInitialized = function() {\n\t\t\t\t\t\t\t\t\t\tr && r(), n(t);\n\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn t;\n\t\t\t\t\t\t\t}, Z = function n() {\n\t\t\t\t\t\t\t\tct || Dt(), ct || (Z = n);\n\t\t\t\t\t\t\t}, t.run = Dt, t.preInit) for (typeof t.preInit == "function" && (t.preInit = [t.preInit]); t.preInit.length > 0;) t.preInit.pop()();\n\t\t\t\t\t\t\tfunction X() {}\n\t\t\t\t\t\t\tfunction St(n) {\n\t\t\t\t\t\t\t\treturn (n || X).__cache__;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction zt(n, r) {\n\t\t\t\t\t\t\t\tvar f = St(r), g = f[n];\n\t\t\t\t\t\t\t\treturn g || ((g = Object.create((r || X).prototype)).ptr = n, f[n] = g);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction nt(n, r) {\n\t\t\t\t\t\t\t\treturn zt(n.ptr, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction H(n) {\n\t\t\t\t\t\t\t\tif (!n.__destroy__) throw "Error: Cannot destroy object. (Did you create it yourself?)";\n\t\t\t\t\t\t\t\tn.__destroy__(), delete St(n.__class__)[n.ptr];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction e(n, r) {\n\t\t\t\t\t\t\t\treturn n.ptr === r.ptr;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction o(n) {\n\t\t\t\t\t\t\t\treturn n.ptr;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction m(n) {\n\t\t\t\t\t\t\t\treturn n.__class__;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction A() {\n\t\t\t\t\t\t\t\tthrow "cannot construct a VoidPtr, no constructor in IDL";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction S() {\n\t\t\t\t\t\t\t\tthis.ptr = At(), St(S)[this.ptr] = this;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn Dt(), X.prototype = Object.create(X.prototype), X.prototype.constructor = X, X.prototype.__class__ = X, X.__cache__ = {}, t.WrapperObject = X, t.getCache = St, t.wrapPointer = zt, t.castObject = nt, t.NULL = zt(0), t.destroy = H, t.compare = e, t.getPointer = o, t.getClass = m, A.prototype = Object.create(X.prototype), A.prototype.constructor = A, A.prototype.__class__ = A, A.__cache__ = {}, t.VoidPtr = A, A.prototype.__destroy__ = A.prototype.__destroy__ = function() {\n\t\t\t\t\t\t\t\tvar n = this.ptr;\n\t\t\t\t\t\t\t\tNt(n);\n\t\t\t\t\t\t\t}, S.prototype = Object.create(X.prototype), S.prototype.constructor = S, S.prototype.__class__ = S, S.__cache__ = {}, t.Container = S, S.prototype.init = S.prototype.init = function(n, r, f) {\n\t\t\t\t\t\t\t\tvar g = this.ptr;\n\t\t\t\t\t\t\t\tn && u(n) === "object" && (n = n.ptr), r && u(r) === "object" && (r = r.ptr), f && u(f) === "object" && (f = f.ptr), G(g, n, r, f);\n\t\t\t\t\t\t\t}, S.prototype.writeFrame = S.prototype.writeFrame = function(n, r, f) {\n\t\t\t\t\t\t\t\tvar g = this.ptr;\n\t\t\t\t\t\t\t\tn && u(n) === "object" && (n = n.ptr), r && u(r) === "object" && (r = r.ptr), f && u(f) === "object" && (f = f.ptr), gt(g, n, r, f);\n\t\t\t\t\t\t\t}, S.prototype.__destroy__ = S.prototype.__destroy__ = function() {\n\t\t\t\t\t\t\t\tvar n = this.ptr;\n\t\t\t\t\t\t\t\tCt(n);\n\t\t\t\t\t\t\t}, t;\n\t\t\t\t\t\t});\n\t\t\t\t\t\tu(R) === "object" && u(O) === "object" ? O.exports = x : (l = function() {\n\t\t\t\t\t\t\treturn x;\n\t\t\t\t\t\t}.apply(R, [])) === void 0 || (O.exports = l);\n\t\t\t\t\t}).call(this, "/index.js", d(2), "/", d(3)(T));\n\t\t\t\t},\n\t\t\t\tfunction(T, R, d) {\n\t\t\t\t\t(function(v, p, B, O) {\n\t\t\t\t\t\tvar l;\n\t\t\t\t\t\tfunction u(t) {\n\t\t\t\t\t\t\treturn (u = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(_) {\n\t\t\t\t\t\t\t\treturn typeof _;\n\t\t\t\t\t\t\t} : function(_) {\n\t\t\t\t\t\t\t\treturn _ && typeof Symbol == "function" && _.constructor === Symbol && _ !== Symbol.prototype ? "symbol" : typeof _;\n\t\t\t\t\t\t\t})(t);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfunction c(t, _) {\n\t\t\t\t\t\t\tif (!(t instanceof _)) throw new TypeError("Cannot call a class as a function");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfunction a(t, _) {\n\t\t\t\t\t\t\tfor (var w = 0; w < _.length; w++) {\n\t\t\t\t\t\t\t\tvar i = _[w];\n\t\t\t\t\t\t\t\ti.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(t, i.key, i);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfunction b(t, _, w) {\n\t\t\t\t\t\t\treturn _ && a(t.prototype, _), w && a(t, w), t;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvar y, x = (y = (y = typeof document != "undefined" && document.currentScript ? document.currentScript.src : void 0) || v, function(t) {\n\t\t\t\t\t\t\tt = (t = t || {}) !== void 0 ? t : {};\n\t\t\t\t\t\t\tvar _ = d(1).EmscriptenMemoryAllocator, w = 2049, i = 48e3, s = 4e3, h = 20, C = 6, E = 4096, M = 0, J = 4002, Y = 0, j = (function() {\n\t\t\t\t\t\t\t\tfunction e(o, m) {\n\t\t\t\t\t\t\t\t\tvar A = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : void 0;\n\t\t\t\t\t\t\t\t\tc(this, e), this.config = {\n\t\t\t\t\t\t\t\t\t\tinputSampleRate: o,\n\t\t\t\t\t\t\t\t\t\tchannelCount: m\n\t\t\t\t\t\t\t\t\t}, this.memory = new _(t), this._opus_encoder_create = t._opus_encoder_create, this._opus_encoder_ctl = t._opus_encoder_ctl, this._opus_encode_float = t._opus_encode_float, this._opus_encoder_destroy = t._opus_encoder_destroy, this._speex_resampler_init = t._speex_resampler_init, this._speex_resampler_process_interleaved_float = t._speex_resampler_process_interleaved_float, this._speex_resampler_destroy = t._speex_resampler_destroy, this._container = new t.Container(), this._container.init(i, m, Math.floor(4294967295 * Math.random())), this.OpusInitCodec(i, m, A), this.SpeexInitResampler(o, i, m), this.inputSamplesPerChannel = o * h / 1e3, this.outputSamplePerChannel = i * h / 1e3, this.inputBufferIndex = 0, this.mInputBuffer = this.memory.mallocFloat32Buffer(this.inputSamplesPerChannel * m), this.mResampledBuffer = this.memory.mallocFloat32Buffer(this.outputSamplePerChannel * m), this.mOutputBuffer = this.memory.mallocUint8Buffer(s), this.interleavedBuffers = m !== 1 ? new Float32Array(E * m) : void 0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn b(e, [\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tkey: "encode",\n\t\t\t\t\t\t\t\t\t\tvalue: function(o) {\n\t\t\t\t\t\t\t\t\t\t\tfor (var m = this.interleave(o), A = 0; A < m.length;) {\n\t\t\t\t\t\t\t\t\t\t\t\tvar S = Math.min(this.mInputBuffer.length - this.inputBufferIndex, m.length - A);\n\t\t\t\t\t\t\t\t\t\t\t\tif (this.mInputBuffer.set(m.subarray(A, A + S), this.inputBufferIndex), this.inputBufferIndex += S, this.inputBufferIndex >= this.mInputBuffer.length) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tvar n = this.memory.mallocUint32(this.inputSamplesPerChannel), r = this.memory.mallocUint32(this.outputSamplePerChannel), f = this._speex_resampler_process_interleaved_float(this.resampler, this.mInputBuffer.pointer, n.pointer, this.mResampledBuffer.pointer, r.pointer);\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (n.free(), r.free(), f !== Y) throw new Error("Resampling error.");\n\t\t\t\t\t\t\t\t\t\t\t\t\tvar g = this._opus_encode_float(this.encoder, this.mResampledBuffer.pointer, this.outputSamplePerChannel, this.mOutputBuffer.pointer, this.mOutputBuffer.length);\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (g < 0) throw new Error("Opus encoding error.");\n\t\t\t\t\t\t\t\t\t\t\t\t\tthis._container.writeFrame(this.mOutputBuffer.pointer, g, this.outputSamplePerChannel), this.inputBufferIndex = 0;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tA += S;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tkey: "close",\n\t\t\t\t\t\t\t\t\t\tvalue: function() {\n\t\t\t\t\t\t\t\t\t\t\tfor (var o = this.config.channelCount, m = [], A = 0; A < o; ++A) m.push(new Float32Array(E - this.inputBufferIndex / o));\n\t\t\t\t\t\t\t\t\t\t\tthis.encode(m), t.destroy(this._container), this.mInputBuffer.free(), this.mResampledBuffer.free(), this.mOutputBuffer.free(), this._opus_encoder_destroy(this.encoder), this._speex_resampler_destroy(this.resampler);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tkey: "interleave",\n\t\t\t\t\t\t\t\t\t\tvalue: function(o) {\n\t\t\t\t\t\t\t\t\t\t\tvar m = o.length;\n\t\t\t\t\t\t\t\t\t\t\tif (m === 1) return o[0];\n\t\t\t\t\t\t\t\t\t\t\tfor (var A = 0; A < m; A++) for (var S = o[A], n = 0; n < S.length; n++) this.interleavedBuffers[n * m + A] = S[n];\n\t\t\t\t\t\t\t\t\t\t\treturn this.interleavedBuffers;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tkey: "OpusInitCodec",\n\t\t\t\t\t\t\t\t\t\tvalue: function(o, m) {\n\t\t\t\t\t\t\t\t\t\t\tvar A = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : void 0, S = this.memory.mallocUint32(void 0);\n\t\t\t\t\t\t\t\t\t\t\tthis.encoder = this._opus_encoder_create(o, m, w, S.pointer);\n\t\t\t\t\t\t\t\t\t\t\tvar n = S.value;\n\t\t\t\t\t\t\t\t\t\t\tif (S.free(), n !== M) throw new Error("Opus encodor initialization failed.");\n\t\t\t\t\t\t\t\t\t\t\tA && this.OpusSetOpusControl(J, A);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tkey: "OpusSetOpusControl",\n\t\t\t\t\t\t\t\t\t\tvalue: function(o, m) {\n\t\t\t\t\t\t\t\t\t\t\tvar A = this.memory.mallocInt32(m);\n\t\t\t\t\t\t\t\t\t\t\tthis._opus_encoder_ctl(this.encoder, o, A.pointer), A.free();\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tkey: "SpeexInitResampler",\n\t\t\t\t\t\t\t\t\t\tvalue: function(o, m, A) {\n\t\t\t\t\t\t\t\t\t\t\tvar S = this.memory.mallocUint32(void 0);\n\t\t\t\t\t\t\t\t\t\t\tthis.resampler = this._speex_resampler_init(A, o, m, C, S.pointer);\n\t\t\t\t\t\t\t\t\t\t\tvar n = S.value;\n\t\t\t\t\t\t\t\t\t\t\tif (S.free(), n !== Y) throw new Error("Initializing resampler failed.");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t]), e;\n\t\t\t\t\t\t\t})();\n\t\t\t\t\t\t\tt.init = function(e, o, m) {\n\t\t\t\t\t\t\t\tt.encodedBuffers = [], t.encoder = new j(e, o, m);\n\t\t\t\t\t\t\t}, t.encode = function(e) {\n\t\t\t\t\t\t\t\tt.encoder.encode(e);\n\t\t\t\t\t\t\t}, t.flush = function() {\n\t\t\t\t\t\t\t\treturn t.encodedBuffers.splice(0, t.encodedBuffers.length);\n\t\t\t\t\t\t\t}, t.close = function() {\n\t\t\t\t\t\t\t\tt.encoder.close();\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tvar k, N = {};\n\t\t\t\t\t\t\tfor (k in t) t.hasOwnProperty(k) && (N[k] = t[k]);\n\t\t\t\t\t\t\tvar $ = [], et = !1, D = !1, _t = !1, xt = !1;\n\t\t\t\t\t\t\tet = (typeof window == "undefined" ? "undefined" : u(window)) === "object", D = typeof importScripts == "function", _t = (p === void 0 ? "undefined" : u(p)) === "object" && u(p.versions) === "object" && typeof p.versions.node == "string", xt = !et && !_t && !D;\n\t\t\t\t\t\t\tvar rt, K, dt, mt, U = "";\n\t\t\t\t\t\t\tfunction Xt(e) {\n\t\t\t\t\t\t\t\treturn t.locateFile ? t.locateFile(e, U) : U + e;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t_t ? (U = D ? d(0).dirname(U) + "/" : B + "/", rt = function(e, o) {\n\t\t\t\t\t\t\t\treturn dt || (dt = d(4)), mt || (mt = d(0)), e = mt.normalize(e), dt.readFileSync(e, o ? null : "utf8");\n\t\t\t\t\t\t\t}, K = function(e) {\n\t\t\t\t\t\t\t\tvar o = rt(e, !0);\n\t\t\t\t\t\t\t\treturn o.buffer || (o = new Uint8Array(o)), Rt(o.buffer), o;\n\t\t\t\t\t\t\t}, p.argv.length > 1 && p.argv[1].replace(/\\\\/g, "/"), $ = p.argv.slice(2), p.on("uncaughtException", (function(e) {\n\t\t\t\t\t\t\t\tif (!(e instanceof Nt)) throw e;\n\t\t\t\t\t\t\t})), p.on("unhandledRejection", V), t.inspect = function() {\n\t\t\t\t\t\t\t\treturn "[Emscripten Module object]";\n\t\t\t\t\t\t\t}) : xt ? (typeof read != "undefined" && (rt = function(e) {\n\t\t\t\t\t\t\t\treturn read(e);\n\t\t\t\t\t\t\t}), K = function(e) {\n\t\t\t\t\t\t\t\tvar o;\n\t\t\t\t\t\t\t\treturn typeof readbuffer == "function" ? new Uint8Array(readbuffer(e)) : (Rt(u(o = read(e, "binary")) === "object"), o);\n\t\t\t\t\t\t\t}, typeof scriptArgs != "undefined" ? $ = scriptArgs : arguments !== void 0 && ($ = arguments), typeof print != "undefined" && (typeof console == "undefined" && (console = {}), console.log = print, console.warn = console.error = typeof printErr != "undefined" ? printErr : print)) : (et || D) && (D ? U = self.location.href : document.currentScript && (U = document.currentScript.src), y && (U = y), U = U.indexOf("blob:") !== 0 ? U.substr(0, U.lastIndexOf("/") + 1) : "", rt = function(e) {\n\t\t\t\t\t\t\t\tvar o = new XMLHttpRequest();\n\t\t\t\t\t\t\t\treturn o.open("GET", e, !1), o.send(null), o.responseText;\n\t\t\t\t\t\t\t}, D && (K = function(e) {\n\t\t\t\t\t\t\t\tvar o = new XMLHttpRequest();\n\t\t\t\t\t\t\t\treturn o.open("GET", e, !1), o.responseType = "arraybuffer", o.send(null), new Uint8Array(o.response);\n\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\tvar Q, ht, Pt = t.print || console.log.bind(console), z = t.printErr || console.warn.bind(console);\n\t\t\t\t\t\t\tfor (k in N) N.hasOwnProperty(k) && (t[k] = N[k]);\n\t\t\t\t\t\t\tN = null, t.arguments && ($ = t.arguments), t.thisProgram && t.thisProgram, t.quit && t.quit, t.wasmBinary && (Q = t.wasmBinary), t.noExitRuntime && t.noExitRuntime, (typeof WebAssembly == "undefined" ? "undefined" : u(WebAssembly)) !== "object" && z("no native wasm support detected");\n\t\t\t\t\t\t\tvar Yt = new WebAssembly.Table({\n\t\t\t\t\t\t\t\tinitial: 36,\n\t\t\t\t\t\t\t\tmaximum: 36,\n\t\t\t\t\t\t\t\telement: "anyfunc"\n\t\t\t\t\t\t\t}), Et = !1;\n\t\t\t\t\t\t\tfunction Rt(e, o) {\n\t\t\t\t\t\t\t\te || V("Assertion failed: " + o);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tvar Bt = typeof TextDecoder != "undefined" ? new TextDecoder("utf8") : void 0;\n\t\t\t\t\t\t\tfunction It(e, o, m) {\n\t\t\t\t\t\t\t\tfor (var A = o + m, S = o; e[S] && !(S >= A);) ++S;\n\t\t\t\t\t\t\t\tif (S - o > 16 && e.subarray && Bt) return Bt.decode(e.subarray(o, S));\n\t\t\t\t\t\t\t\tfor (var n = ""; o < S;) {\n\t\t\t\t\t\t\t\t\tvar r = e[o++];\n\t\t\t\t\t\t\t\t\tif (128 & r) {\n\t\t\t\t\t\t\t\t\t\tvar f = 63 & e[o++];\n\t\t\t\t\t\t\t\t\t\tif ((224 & r) != 192) {\n\t\t\t\t\t\t\t\t\t\t\tvar g = 63 & e[o++];\n\t\t\t\t\t\t\t\t\t\t\tif ((r = (240 & r) == 224 ? (15 & r) << 12 | f << 6 | g : (7 & r) << 18 | f << 12 | g << 6 | 63 & e[o++]) < 65536) n += String.fromCharCode(r);\n\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\tvar P = r - 65536;\n\t\t\t\t\t\t\t\t\t\t\t\tn += String.fromCharCode(55296 | P >> 10, 56320 | 1023 & P);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else n += String.fromCharCode((31 & r) << 6 | f);\n\t\t\t\t\t\t\t\t\t} else n += String.fromCharCode(r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn n;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction ot(e, o) {\n\t\t\t\t\t\t\t\treturn e ? It(ut, e, o) : "";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttypeof TextDecoder != "undefined" && new TextDecoder("utf-16le");\n\t\t\t\t\t\t\tvar it, ut, L, Ot = 65536;\n\t\t\t\t\t\t\tfunction Jt(e) {\n\t\t\t\t\t\t\t\tit = e, t.HEAP8 = new Int8Array(e), t.HEAP16 = new Int16Array(e), t.HEAP32 = L = new Int32Array(e), t.HEAPU8 = ut = new Uint8Array(e), t.HEAPU16 = new Uint16Array(e), t.HEAPU32 = new Uint32Array(e), t.HEAPF32 = new Float32Array(e), t.HEAPF64 = new Float64Array(e);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tvar $t = 5289728, Kt = 46688, yt = t.INITIAL_MEMORY || 16777216;\n\t\t\t\t\t\t\tfunction at(e) {\n\t\t\t\t\t\t\t\tfor (; e.length > 0;) {\n\t\t\t\t\t\t\t\t\tvar o = e.shift();\n\t\t\t\t\t\t\t\t\tif (typeof o != "function") {\n\t\t\t\t\t\t\t\t\t\tvar m = o.func;\n\t\t\t\t\t\t\t\t\t\ttypeof m == "number" ? o.arg === void 0 ? t.dynCall_v(m) : t.dynCall_vi(m, o.arg) : m(o.arg === void 0 ? null : o.arg);\n\t\t\t\t\t\t\t\t\t} else o();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t(ht = t.wasmMemory ? t.wasmMemory : new WebAssembly.Memory({\n\t\t\t\t\t\t\t\tinitial: yt / Ot,\n\t\t\t\t\t\t\t\tmaximum: yt / Ot\n\t\t\t\t\t\t\t})) && (it = ht.buffer), yt = it.byteLength, Jt(it), L[Kt >> 2] = $t;\n\t\t\t\t\t\t\tvar jt = [], kt = [], Qt = [], Ut = [];\n\t\t\t\t\t\t\tfunction Zt() {\n\t\t\t\t\t\t\t\tif (t.preRun) for (typeof t.preRun == "function" && (t.preRun = [t.preRun]); t.preRun.length;) rn(t.preRun.shift());\n\t\t\t\t\t\t\t\tat(jt);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction tn() {\n\t\t\t\t\t\t\t\tat(kt);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction nn() {\n\t\t\t\t\t\t\t\tat(Qt);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction en() {\n\t\t\t\t\t\t\t\tif (t.postRun) for (typeof t.postRun == "function" && (t.postRun = [t.postRun]); t.postRun.length;) on(t.postRun.shift());\n\t\t\t\t\t\t\t\tat(Ut);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction rn(e) {\n\t\t\t\t\t\t\t\tjt.unshift(e);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction on(e) {\n\t\t\t\t\t\t\t\tUt.unshift(e);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tvar q = 0, vt = null, Z = null;\n\t\t\t\t\t\t\tfunction un(e) {\n\t\t\t\t\t\t\t\tq++, t.monitorRunDependencies && t.monitorRunDependencies(q);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction an(e) {\n\t\t\t\t\t\t\t\tif (q--, t.monitorRunDependencies && t.monitorRunDependencies(q), q == 0 && (vt !== null && (clearInterval(vt), vt = null), Z)) {\n\t\t\t\t\t\t\t\t\tvar o = Z;\n\t\t\t\t\t\t\t\t\tZ = null, o();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction V(e) {\n\t\t\t\t\t\t\t\tthrow t.onAbort && t.onAbort(e), Pt(e += ""), z(e), Et = !0, e = "abort(" + e + "). Build with -s ASSERTIONS=1 for more info.", new WebAssembly.RuntimeError(e);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tt.preloadedImages = {}, t.preloadedAudios = {};\n\t\t\t\t\t\t\tvar Tt = "data:application/octet-stream;base64,";\n\t\t\t\t\t\t\tfunction Mt(e) {\n\t\t\t\t\t\t\t\treturn String.prototype.startsWith ? e.startsWith(Tt) : e.indexOf(Tt) === 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tvar F = "OggOpusEncoder.wasm";\n\t\t\t\t\t\t\tfunction Ft() {\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tif (Q) return new Uint8Array(Q);\n\t\t\t\t\t\t\t\t\tif (K) return K(F);\n\t\t\t\t\t\t\t\t\tthrow "both async and sync fetching of the wasm failed";\n\t\t\t\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\t\t\t\tV(e);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction sn() {\n\t\t\t\t\t\t\t\treturn Q || !et && !D || typeof fetch != "function" ? new Promise((function(e, o) {\n\t\t\t\t\t\t\t\t\te(Ft());\n\t\t\t\t\t\t\t\t})) : fetch(F, { credentials: "same-origin" }).then((function(e) {\n\t\t\t\t\t\t\t\t\tif (!e.ok) throw "failed to load wasm binary file at \'" + F + "\'";\n\t\t\t\t\t\t\t\t\treturn e.arrayBuffer();\n\t\t\t\t\t\t\t\t})).catch((function() {\n\t\t\t\t\t\t\t\t\treturn Ft();\n\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction cn() {\n\t\t\t\t\t\t\t\tvar e = { a: vn };\n\t\t\t\t\t\t\t\tfunction o(S, n) {\n\t\t\t\t\t\t\t\t\tvar r = S.exports;\n\t\t\t\t\t\t\t\t\tt.asm = r, an();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfunction m(S) {\n\t\t\t\t\t\t\t\t\to(S.instance);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfunction A(S) {\n\t\t\t\t\t\t\t\t\treturn sn().then((function(n) {\n\t\t\t\t\t\t\t\t\t\treturn WebAssembly.instantiate(n, e);\n\t\t\t\t\t\t\t\t\t})).then(S, (function(n) {\n\t\t\t\t\t\t\t\t\t\tz("failed to asynchronously prepare wasm: " + n), V(n);\n\t\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (un(), t.instantiateWasm) try {\n\t\t\t\t\t\t\t\t\treturn t.instantiateWasm(e, o);\n\t\t\t\t\t\t\t\t} catch (S) {\n\t\t\t\t\t\t\t\t\treturn z("Module.instantiateWasm callback failed with error: " + S), !1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn (function() {\n\t\t\t\t\t\t\t\t\tif (Q || typeof WebAssembly.instantiateStreaming != "function" || Mt(F) || typeof fetch != "function") return A(m);\n\t\t\t\t\t\t\t\t\tfetch(F, { credentials: "same-origin" }).then((function(S) {\n\t\t\t\t\t\t\t\t\t\treturn WebAssembly.instantiateStreaming(S, e).then(m, (function(n) {\n\t\t\t\t\t\t\t\t\t\t\tz("wasm streaming compile failed: " + n), z("falling back to ArrayBuffer instantiation"), A(m);\n\t\t\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t\t})(), {};\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction fn(e, o) {\n\t\t\t\t\t\t\t\tvar m = new Uint8Array(t.HEAPU8.buffer, e, o);\n\t\t\t\t\t\t\t\tt.encodedBuffers.push(new Uint8Array(m).buffer);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction ln(e, o, m, A) {\n\t\t\t\t\t\t\t\tV("Assertion failed: " + ot(e) + ", at: " + [\n\t\t\t\t\t\t\t\t\to ? ot(o) : "unknown filename",\n\t\t\t\t\t\t\t\t\tm,\n\t\t\t\t\t\t\t\t\tA ? ot(A) : "unknown function"\n\t\t\t\t\t\t\t\t]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction tt() {\n\t\t\t\t\t\t\t\tV();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction pn(e, o, m) {\n\t\t\t\t\t\t\t\tut.copyWithin(e, o, o + m);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction _n(e) {\n\t\t\t\t\t\t\t\tV("OOM");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction dn(e) {\n\t\t\t\t\t\t\t\t_n();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tMt(F) || (F = Xt(F)), kt.push({ func: function() {\n\t\t\t\t\t\t\t\tqt();\n\t\t\t\t\t\t\t} });\n\t\t\t\t\t\t\tvar wt = {\n\t\t\t\t\t\t\t\tmappings: {},\n\t\t\t\t\t\t\t\tbuffers: [\n\t\t\t\t\t\t\t\t\tnull,\n\t\t\t\t\t\t\t\t\t[],\n\t\t\t\t\t\t\t\t\t[]\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\tprintChar: function(e, o) {\n\t\t\t\t\t\t\t\t\tvar m = wt.buffers[e];\n\t\t\t\t\t\t\t\t\to === 0 || o === 10 ? ((e === 1 ? Pt : z)(It(m, 0)), m.length = 0) : m.push(o);\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tvarargs: void 0,\n\t\t\t\t\t\t\t\tget: function() {\n\t\t\t\t\t\t\t\t\treturn wt.varargs += 4, L[wt.varargs - 4 >> 2];\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tgetStr: function(e) {\n\t\t\t\t\t\t\t\t\treturn ot(e);\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tget64: function(e, o) {\n\t\t\t\t\t\t\t\t\treturn e;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tfunction mn(e) {\n\t\t\t\t\t\t\t\treturn 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction hn(e, o, m, A, S) {}\n\t\t\t\t\t\t\tfunction yn(e, o, m, A) {\n\t\t\t\t\t\t\t\tfor (var S = 0, n = 0; n < m; n++) {\n\t\t\t\t\t\t\t\t\tfor (var r = L[o + 8 * n >> 2], f = L[o + (8 * n + 4) >> 2], g = 0; g < f; g++) wt.printChar(e, ut[r + g]);\n\t\t\t\t\t\t\t\t\tS += f;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn L[A >> 2] = S, 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tvar vn = {\n\t\t\t\t\t\t\t\ta: ln,\n\t\t\t\t\t\t\t\tc: tt,\n\t\t\t\t\t\t\t\td: fn,\n\t\t\t\t\t\t\t\tf: pn,\n\t\t\t\t\t\t\t\tg: dn,\n\t\t\t\t\t\t\t\th: mn,\n\t\t\t\t\t\t\t\te: hn,\n\t\t\t\t\t\t\t\tb: yn,\n\t\t\t\t\t\t\t\tmemory: ht,\n\t\t\t\t\t\t\t\ttable: Yt\n\t\t\t\t\t\t\t}, Lt = cn();\n\t\t\t\t\t\t\tt.asm = Lt;\n\t\t\t\t\t\t\tvar bt, qt = t.___wasm_call_ctors = function() {\n\t\t\t\t\t\t\t\treturn (qt = t.___wasm_call_ctors = t.asm.i).apply(null, arguments);\n\t\t\t\t\t\t\t}, Vt = (t.___em_js__emscriptenPushBuffer = function() {\n\t\t\t\t\t\t\t\treturn (t.___em_js__emscriptenPushBuffer = t.asm.j).apply(null, arguments);\n\t\t\t\t\t\t\t}, t._emscripten_bind_VoidPtr___destroy___0 = function() {\n\t\t\t\t\t\t\t\treturn (Vt = t._emscripten_bind_VoidPtr___destroy___0 = t.asm.k).apply(null, arguments);\n\t\t\t\t\t\t\t}), Gt = t._emscripten_bind_Container_Container_0 = function() {\n\t\t\t\t\t\t\t\treturn (Gt = t._emscripten_bind_Container_Container_0 = t.asm.l).apply(null, arguments);\n\t\t\t\t\t\t\t}, Wt = t._emscripten_bind_Container_init_3 = function() {\n\t\t\t\t\t\t\t\treturn (Wt = t._emscripten_bind_Container_init_3 = t.asm.m).apply(null, arguments);\n\t\t\t\t\t\t\t}, ct = t._emscripten_bind_Container_writeFrame_3 = function() {\n\t\t\t\t\t\t\t\treturn (ct = t._emscripten_bind_Container_writeFrame_3 = t.asm.n).apply(null, arguments);\n\t\t\t\t\t\t\t}, Ht = t._emscripten_bind_Container___destroy___0 = function() {\n\t\t\t\t\t\t\t\treturn (Ht = t._emscripten_bind_Container___destroy___0 = t.asm.o).apply(null, arguments);\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tfunction Nt(e) {\n\t\t\t\t\t\t\t\tthis.name = "ExitStatus", this.message = "Program terminated with exit(" + e + ")", this.status = e;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction At(e) {\n\t\t\t\t\t\t\t\tfunction o() {\n\t\t\t\t\t\t\t\t\tbt || (bt = !0, t.calledRun = !0, Et || (tn(), nn(), t.onRuntimeInitialized && t.onRuntimeInitialized(), en()));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\te = e || $, q > 0 || (Zt(), q > 0 || (t.setStatus ? (t.setStatus("Running..."), setTimeout((function() {\n\t\t\t\t\t\t\t\t\tsetTimeout((function() {\n\t\t\t\t\t\t\t\t\t\tt.setStatus("");\n\t\t\t\t\t\t\t\t\t}), 1), o();\n\t\t\t\t\t\t\t\t}), 1)) : o()));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (t._opus_encoder_create = function() {\n\t\t\t\t\t\t\t\treturn (t._opus_encoder_create = t.asm.p).apply(null, arguments);\n\t\t\t\t\t\t\t}, t._opus_encode_float = function() {\n\t\t\t\t\t\t\t\treturn (t._opus_encode_float = t.asm.q).apply(null, arguments);\n\t\t\t\t\t\t\t}, t._opus_encoder_ctl = function() {\n\t\t\t\t\t\t\t\treturn (t._opus_encoder_ctl = t.asm.r).apply(null, arguments);\n\t\t\t\t\t\t\t}, t._opus_encoder_destroy = function() {\n\t\t\t\t\t\t\t\treturn (t._opus_encoder_destroy = t.asm.s).apply(null, arguments);\n\t\t\t\t\t\t\t}, t._malloc = function() {\n\t\t\t\t\t\t\t\treturn (t._malloc = t.asm.t).apply(null, arguments);\n\t\t\t\t\t\t\t}, t._free = function() {\n\t\t\t\t\t\t\t\treturn (t._free = t.asm.u).apply(null, arguments);\n\t\t\t\t\t\t\t}, t._speex_resampler_init = function() {\n\t\t\t\t\t\t\t\treturn (t._speex_resampler_init = t.asm.v).apply(null, arguments);\n\t\t\t\t\t\t\t}, t._speex_resampler_destroy = function() {\n\t\t\t\t\t\t\t\treturn (t._speex_resampler_destroy = t.asm.w).apply(null, arguments);\n\t\t\t\t\t\t\t}, t._speex_resampler_process_interleaved_float = function() {\n\t\t\t\t\t\t\t\treturn (t._speex_resampler_process_interleaved_float = t.asm.x).apply(null, arguments);\n\t\t\t\t\t\t\t}, t.dynCall_vi = function() {\n\t\t\t\t\t\t\t\treturn (t.dynCall_vi = t.asm.y).apply(null, arguments);\n\t\t\t\t\t\t\t}, t.dynCall_v = function() {\n\t\t\t\t\t\t\t\treturn (t.dynCall_v = t.asm.z).apply(null, arguments);\n\t\t\t\t\t\t\t}, t.asm = Lt, t.then = function(e) {\n\t\t\t\t\t\t\t\tif (bt) e(t);\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tvar o = t.onRuntimeInitialized;\n\t\t\t\t\t\t\t\t\tt.onRuntimeInitialized = function() {\n\t\t\t\t\t\t\t\t\t\to && o(), e(t);\n\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn t;\n\t\t\t\t\t\t\t}, Z = function e() {\n\t\t\t\t\t\t\t\tbt || At(), bt || (Z = e);\n\t\t\t\t\t\t\t}, t.run = At, t.preInit) for (typeof t.preInit == "function" && (t.preInit = [t.preInit]); t.preInit.length > 0;) t.preInit.pop()();\n\t\t\t\t\t\t\tfunction G() {}\n\t\t\t\t\t\t\tfunction gt(e) {\n\t\t\t\t\t\t\t\treturn (e || G).__cache__;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction Ct(e, o) {\n\t\t\t\t\t\t\t\tvar m = gt(o), A = m[e];\n\t\t\t\t\t\t\t\treturn A || ((A = Object.create((o || G).prototype)).ptr = e, m[e] = A);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction bn(e, o) {\n\t\t\t\t\t\t\t\treturn Ct(e.ptr, o);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction Dt(e) {\n\t\t\t\t\t\t\t\tif (!e.__destroy__) throw "Error: Cannot destroy object. (Did you create it yourself?)";\n\t\t\t\t\t\t\t\te.__destroy__(), delete gt(e.__class__)[e.ptr];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction X(e, o) {\n\t\t\t\t\t\t\t\treturn e.ptr === o.ptr;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction St(e) {\n\t\t\t\t\t\t\t\treturn e.ptr;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction zt(e) {\n\t\t\t\t\t\t\t\treturn e.__class__;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction nt() {\n\t\t\t\t\t\t\t\tthrow "cannot construct a VoidPtr, no constructor in IDL";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfunction H() {\n\t\t\t\t\t\t\t\tthis.ptr = Gt(), gt(H)[this.ptr] = this;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn At(), G.prototype = Object.create(G.prototype), G.prototype.constructor = G, G.prototype.__class__ = G, G.__cache__ = {}, t.WrapperObject = G, t.getCache = gt, t.wrapPointer = Ct, t.castObject = bn, t.NULL = Ct(0), t.destroy = Dt, t.compare = X, t.getPointer = St, t.getClass = zt, nt.prototype = Object.create(G.prototype), nt.prototype.constructor = nt, nt.prototype.__class__ = nt, nt.__cache__ = {}, t.VoidPtr = nt, nt.prototype.__destroy__ = nt.prototype.__destroy__ = function() {\n\t\t\t\t\t\t\t\tvar e = this.ptr;\n\t\t\t\t\t\t\t\tVt(e);\n\t\t\t\t\t\t\t}, H.prototype = Object.create(G.prototype), H.prototype.constructor = H, H.prototype.__class__ = H, H.__cache__ = {}, t.Container = H, H.prototype.init = H.prototype.init = function(e, o, m) {\n\t\t\t\t\t\t\t\tvar A = this.ptr;\n\t\t\t\t\t\t\t\te && u(e) === "object" && (e = e.ptr), o && u(o) === "object" && (o = o.ptr), m && u(m) === "object" && (m = m.ptr), Wt(A, e, o, m);\n\t\t\t\t\t\t\t}, H.prototype.writeFrame = H.prototype.writeFrame = function(e, o, m) {\n\t\t\t\t\t\t\t\tvar A = this.ptr;\n\t\t\t\t\t\t\t\te && u(e) === "object" && (e = e.ptr), o && u(o) === "object" && (o = o.ptr), m && u(m) === "object" && (m = m.ptr), ct(A, e, o, m);\n\t\t\t\t\t\t\t}, H.prototype.__destroy__ = H.prototype.__destroy__ = function() {\n\t\t\t\t\t\t\t\tvar e = this.ptr;\n\t\t\t\t\t\t\t\tHt(e);\n\t\t\t\t\t\t\t}, t;\n\t\t\t\t\t\t});\n\t\t\t\t\t\tu(R) === "object" && u(O) === "object" ? O.exports = x : (l = function() {\n\t\t\t\t\t\t\treturn x;\n\t\t\t\t\t\t}.apply(R, [])) === void 0 || (O.exports = l);\n\t\t\t\t\t}).call(this, "/index.js", d(2), "/", d(3)(T));\n\t\t\t\t}\n\t\t\t]);\n\t\t};\n\t});\n})))();\nexport { Cn as default };\n',FR="undefined"!=typeof self&&self.Blob&&new Blob(["URL.revokeObjectURL(import.meta.url);",xR],{type:"text/javascript;charset=utf-8"});function HR(t){let e;try{if(e=FR&&(self.URL||self.webkitURL).createObjectURL(FR),!e)throw"";const n=new Worker(e,{type:"module",name:null==t?void 0:t.name});return n.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e)}),n}catch(e){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(xR),{type:"module",name:null==t?void 0:t.name})}}Xe();const UR="audio/webm;codecs=opus",BR="undefined"!=typeof MediaRecorder&&"function"==typeof MediaRecorder.isTypeSupported;function jR(t){const e=ft(),n=ft(),r=ft(),i=ft(!1),o=t.mediaRecorder;ht(()=>{"recording"===t.recordingState?s():o.current&&null===t.recordingState&&(i.current=!0,o.current.stop())},[t.recordingState]);const s=async()=>{var s;n.current=LR.create({scrollingWaveform:!0,scrollingWaveformWindow:10}),e.current=wa({...t.wavesurferOptions,interact:!1,barHeight:null!==(s=t.wavesurferOptions.barHeight)&&void 0!==s?s:4,plugins:[n.current],container:t.wavesurferContainer.current});const a=await n.current.startMic();a.getAudioTracks().forEach(e=>{e.onmute=()=>t.onStopRecording()}),BR&&MediaRecorder.isTypeSupported(UR)?o.current=new MediaRecorder(a,{mimeType:UR}):o.current=new PR.default(a,{mimeType:UR},{encoderWorkerFactory:()=>new HR,WebMOpusEncoderWasmPath:qA}),o.current.onerror=t=>{WA.error("[TalkJS] Unexpected error while recording audio: ",t)},o.current.onstart=()=>r.current=Date.now(),o.current.ondataavailable=s=>{if(!i.current){const e=Date.now(),n=Math.floor((e-r.current)/1e3),i=new File([s.data],`talkjs_audio_message_${e}_${n}.webm`,{type:"audio/webm"});t.onSendRecording(i,n)}i.current=!1,(()=>{var t;o.current=void 0,null===(t=n.current)||void 0===t||t.stopMic(),e.current=void 0,n.current=void 0})()},o.current.start()};return null}function VR(t){const e=An(),n=Cn(),r=aD(),i=yo(n.referencedMessage$),o=yo(n.state$.userPermissions),s=Sn(),{sendMessage:a}=yn(),{voiceRecorder:l,recordVoiceMessage:c,voiceRecorderControlsProps:d}=function(){const t=Cn(),e=bn(),n=On(),r=Vo({...nD}),{state:i,duration:o,recordingUrl:s,uploadState:a,fileToken:l}=yo(r),c=ft(void 0),d=ft(null),h=ft(),p=_t(()=>n.runWithPermissionCheck("microphone",async e=>{const n=t.state$.currentConversation.peek();if(n&&"Read"!==n.access){try{(await navigator.mediaDevices.getUserMedia({audio:!0})).getTracks().forEach(t=>t.stop()),e("granted")}catch(t){throw e("denied"),t}r.assign({state:"recording",duration:0}),h.current=setInterval(()=>{r.duration.set(t=>t+1)},1e3)}}),[r,t,n]),f=_t(()=>{var t;h.current&&(clearInterval(h.current),h.current=void 0),null===(t=c.current)||void 0===t||t.stop()},[]),m=_t(()=>{h.current&&(clearInterval(h.current),h.current=void 0),r.assign(nD)},[r]),E=_t((n,i)=>{const o=URL.createObjectURL(new Blob([n])),s=n.size+","+n.name;t.state$.localFileBlobUrls.child(t.state$.currentConversationId.peek()).child(s).set({url:o,fetching:!1});const a={duration:i,filename:n.name};r.assign({state:"previewing",uploadState:"pending",recordingUrl:o+"?name="+n.name}),e.uploadVoice(n,a).then(e=>{t.fileUploads[e]={type:"voice",file:n,metadata:a,temporaryBlobUrl:o,state:"uploaded"},r.assign({uploadState:"done",fileToken:e})})},[e,r,t]),_=_t(()=>{l&&e.sendFileMessage({fileToken:l}),r.assign(nD)},[e,l,r]);return{voiceRecorder:Et(()=>{if(!i)return;const t={state:i,duration:o,recordingUrl:s,uploadState:a,stop:f,cancel:m,send:_};return rD.set(t,d),t},[i,o,s,a,f,m,_]),recordVoiceMessage:p,voiceRecorderControlsProps:Et(()=>({onStopRecording:f,onSendRecording:E,recordingState:i,mediaRecorder:c,wavesurferOptions:eD,wavesurferContainer:d}),[f,E,i])}}(),h=Et(()=>function(t){const e=OR(!1,()=>!!t.sendBlocked.get()&&vR(50).then(()=>!0));return Ao(()=>({...t.get(),sendBlocked:e.get()}))}(s.state$),[s.state$]),p=yo(Vo(()=>{const e=h.get();return void 0===t.editMessageId?new gR(e,a,t.attachFile,t.shareLocation,s.toggleEmojiPicker,c):new gR(e,t.onEditMessage,()=>{},()=>{},()=>{},()=>{})},[h,s.toggleEmojiPicker,t.attachFile,t.editMessageId,t.onEditMessage,t.shareLocation,a])),f=_t(t=>s.setText(t),[s]);return function({appId:t,conversationId:e,meId:n,setText:r,enabled:i}){const o=Et(()=>IR(e,n,t),[t,e,n]);ht(()=>{var t;!o||!i||r(null!==(t=JSON.parse(RR.getItem("talkjs_drafts")||"{}")[o])&&void 0!==t?t:"")},[o,i,r])}({appId:r.app.id,conversationId:r.conversation.id,meId:r.currentUser.id,setText:f,enabled:!t.editMessageId}),Gs(xn.Provider,{value:{onClose:()=>s.toggleEmojiPicker(!1),onEmojiSelected:t=>s.selectEmoji(t)},children:[Gs(jR,{...d}),Gs(e.MessageField,{common:r,referencedMessage:i,permissions:o,editor:p,voiceRecorder:l,editMessageId:t.editMessageId})]})}function zR({message:t}){const e=Cn(),n=bn(),r=yo(e.state$.editingMessageId),i=Et(()=>AR(t.content[0].children),[t]),o=Vo({isEmpty:0===i.length,atTextLimit:!1,sendBlocked:!1,characterCount:i.length,showEmojiPicker:!1,suggestEmojiQuery:void 0,suggestMentionQuery:void 0}),s=Et(()=>new DR(o,e.device$,e.state$.userPermissions),[o,e]),a=_t(async()=>{const r=s.state$;if(r.isEmpty.peek()||r.atTextLimit.peek())return;const i=s.getText();i&&await n.editMessage(t.id,{text:i}),e.state$.editingMessageId.set(null)},[e,n,s,t.id]);return ht(()=>{s.onEnter=a},[s,a]),ht(()=>{s.focus(),s.setText(AR(t.content[0].children,!0))},[s,t]),Gs(gn.Provider,{value:s,children:Gs(VR,{editMessageId:r,onEditMessage:a})})}function $R(t){const e=An(),n=aD();return Gs(e.MessageDivider,{common:n,...t})}function YR({message:t}){const e=An(),n=Cn(),r=yo(()=>n.messagePermissions$(t)),i=aD(),[o,s]=ut("sent");return $o(e=>{if(t.id.startsWith("ephemeral-"))return s("sending");const r=n.state$.currentConversation.everyoneReadUntil.get();return void 0!==r?t.createdAt<=r?s("everyoneRead"):s("sent"):void 0}),Gs(e.Message,{common:i,message:t,messageStatus:o,permissions:r})}function GR(){const t=An(),e=aD();return Gs(t.BeforeMessages,{common:e})}function WR(){const t=An(),e=aD();return Gs(t.AfterMessages,{common:e})}function XR(t){const e=Cn(),n=Tn();ht(()=>function(t,e,n){const r=t.state$.currentConversation;let i=!1;function o(){if(!i){const n=t.state$.currentConversationId.peek();En.defined(n),e.conversation(n).markAsRead()}}function s(){t.newMessageMarker$.peek()||t.newMessageMarker$.set(r.readUntil.peek())}function a(){r.isUnread.get()&&0===r.unreadMessageCount.peek()&&(i=!0,s())}let l=null;function c(){var e;const a=t.state$.currentConversation.lastMessage.id.get(),c=t.state$.currentConversationId.peek(),h=c!==l;l=c,h&&(d.stop(),i=!1,t.newMessageMarker$.set(void 0)),a&&c&&(r.isUnread.peek()&&(n()?(h&&s(),o()):(s(),d.start())),(null===(e=r.lastMessage.sender)||void 0===e?void 0:e.id.peek())===t.extUserId$.peek()&&(t.newMessageMarker$.set(void 0),i=!1))}const d={handle:void 0,start(){this.handle||(this.handle=setInterval(()=>this.tick(),2e3))},tick(){n()&&(o(),this.stop())},stop(){clearInterval(this.handle),this.handle=void 0}};window.__talkjsE2E&&(window.__talkjsE2E.foregroundCheck=()=>{En.defined(d.handle),d.tick()});const h=Hi(a),p=Hi(c);return()=>{t.newMessageMarker$.set(void 0),h(),p(),d.stop()}}(e,n,t),[e,n,t])}function KR({conversationId:t}){const e=Cn(),n=bn(),r=ft(!0),i=ft(null),o=yo(()=>!!e.state$.messages.child(t).loadedAll.get());return ht(()=>n.setScrollableDiv(i),[n]),XR(_t(()=>{if(!i.current)return!1;const t=!document.hidden,e=function(t){if(t.checkVisibility)return t.checkVisibility({contentVisibilityAuto:!0,opacityProperty:!0,visibilityProperty:!0,checkOpacity:!0,checkVisibilityCSS:!0});{const e=window.getComputedStyle(t),n=e.visibility,r=e.opacity;return!(0===t.getClientRects().length||"hidden"===n||"0"===r)}}(i.current),n=i.current.getBoundingClientRect(),r=n.top<window.innerHeight&&n.bottom>0&&n.left<window.innerWidth&&n.right>0;return t&&e&&r},[])),pt(()=>{r.current=i.current.scrollTop>-30}),ht(()=>{r.current&&(i.current.scrollTop=0)}),Gs("div",{className:"t-message-list",ref:i,"t-menu-boundary":"",onScroll:_t(n=>{const r=n.currentTarget,i=r.scrollHeight-r.clientHeight+r.scrollTop,o=e.messageSubscriptions[t];if(i<90&&o){const t=o.state;("pending"===t.type||"active"===t.type&&!t.loadedAll)&&o.loadMore(10)}},[e.messageSubscriptions,t]),children:[Gs(WR,{}),Gs(Lo,{each:e.chatItems$,children:e=>Gs("div",{className:"t-message-group","t-group-type":e.type.get(),children:Gs(Lo,{each:e.items,item:qR,itemProps:{controller:n,conversationId:t}})},e.id.get())}),o&&Gs(GR,{})]})}function qR({item$:t}){const e=Cn(),n=yo(t),r=yo(e.state$.editingMessageId);return n?n instanceof _R?Gs($R,{timestamp:n.timestamp,isReadMarker:n.isReadMarker,isDayMarker:n.isDayMarker}):r===n.id?Gs(zR,{message:n}):Gs(YR,{message:n}):null}Xe(),Xe(),Xe(),Xe(),Xe(),Xe();const JR=new Set(["ByV39eoc","B1FxElnd","aW4c49tW","qGfuGtx","SbERe5ee","ilaVEa15","FOlWOSaH","dao5gGmT","DLUgAhzL","fqXFumr6","FtiWHMYT","66iWOyWt","1375amYi","mWbJgzpt","jO7GqAvL","SkFIKxo5","2z4ILc3y","aDr8oPL1","Hku1c4Pt"]);function ZR({appId:t,chatboxState:e}){const n="t"===t.charAt(0)||JR.has(t);return ht(()=>{switch(e.type){case"auth-failed":WA.error("Could not authenticate user. Check if you are authenticating correctly.");break;case"unknown-user":WA.error(`User \`${e.userId}\` not found. Please verify that you synchronized this user's data with TalkJS, either using the JS SDK or through the REST API.`);break;case"unexpected-error":WA.error(e.error);break;case"wrong-app-id":WA.error(`Could not find given appId: "${e.appId}". You can find your appId on https://talkjs.com/dashboard.`);break;case"server-error":break;default:En.never(e)}},[e]),Gs("div",{className:"t-panel t-error-panel",children:[Gs("span",{className:"t-heading",children:"Something went wrong"}),Gs("p",{children:"Please reload the page and try again."}),n?Gs(O,{children:[Gs("p",{children:"Developer note: check your browser's developer tools console for messages that may help solve the problem."}),Gs("p",{children:"This message only shows up in test mode."})]}):Gs("p",{children:"If things keep not working, do not hesitate to get in touch with us."})]})}function QR(){return Gs("div",{className:"t-panel t-error-panel",children:Gs("span",{className:"t-heading",children:yo(Cn().t$).CHAT_NOT_FOUND})})}function ty(){return Gs("div",{className:"t-panel t-loading-panel",children:Gs($A,{})})}function ey(){const t=yo(Cn().t$);return Gs("div",{className:"t-panel t-error-panel",children:[Gs("span",{className:"t-heading",children:t.AUTH_EXPIRED_OVERLAY_TITLE}),Gs("p",{children:t.AUTH_EXPIRED_OVERLAY_DESCRIPTION})]})}function ny({children:t,className:e,...n}){return Gs("div",{className:"t-attach-overlay "+e,...n,children:t})}function ry(){const t=kn();zA(()=>t.cancelUpload(),".t-upload-preview");const e=yo(t.uploads$),n=e.every(t=>"uploaded"===t.state),r=ft(null);ht(()=>{n&&r.current.focus()},[n]);const i=yo(Cn().t$),[o,s]=ut(0),a=ft(null),[l,c]=ut({left:!1,right:!1}),d=_t(()=>{const t=a.current;if(!t)return;const e=t.scrollWidth-t.clientWidth,n={left:t.scrollLeft>1,right:t.scrollLeft<e-1};c(t=>t.left===n.left&&t.right===n.right?t:n)},[]);ht(()=>{const t=a.current;if(!t)return;d();const e=new ResizeObserver(d);return e.observe(t),t.addEventListener("scroll",d),()=>{e.disconnect(),t.removeEventListener("scroll",d)}},[e.length,d]);const h=_t(t=>{const e=a.current;if(!e||e.scrollWidth<=e.clientWidth)return;const n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),i=n.left+n.width/2,o=r.left+r.width/2,s=e.scrollWidth-e.clientWidth,l=cn(e.scrollLeft+i-o,0,s),c=window.matchMedia("(prefers-reduced-motion: reduce)").matches;e.scrollTo({left:l,behavior:c?"auto":"smooth"}),d()},[d]),p=_t(t=>{let e;if("number"==typeof t){var n;e=t;const r=null===(n=a.current)||void 0===n?void 0:n.querySelector(`button[data-index="${e}"]`);r&&h(r)}else e=+t.currentTarget.dataset.index,h(t.currentTarget);s(e)},[h]),f=_t(t=>{const n={ArrowLeft:-1,ArrowRight:1}[t.key];if(n){const t=e.length-1;p(cn(o+n,0,t))}},[e.length,p,o]);ht(()=>(window.addEventListener("keydown",f,!0),()=>{window.removeEventListener("keydown",f,!0)}),[f]);const m=e[o],E="error"===m.state;return Gs(ny,{className:"t-upload-preview",children:Gs("div",{className:"t-preview",children:[!E&&Gs(iy,{upload:m},o),E&&Gs(O,{children:[Gs("div",{className:"t-error-row",children:i.UPLOAD_ERROR}),"location"!==m.type&&Gs(ly,{upload:m})]}),Gs("div",{className:"t-send-row",children:[e.length>1&&Gs("div",{className:"t-thumbnails-wrap","t-overflow-left":l.left?"":void 0,"t-overflow-right":l.right?"":void 0,children:Gs("div",{className:"t-thumbnails",ref:a,children:e.map((t,e)=>Gs("button",{className:"t-thumbnail","data-index":e,onClick:p,"t-selected":o===e?"":void 0,"t-error":"error"===t.state?"":void 0,children:Gs(dy,{upload:t})},e))})}),Gs("div",{className:"t-actions",children:[Gs("button",{className:"t-cancel",onClick:t.cancelUpload,children:i.CANCEL}),n&&Gs("button",{className:"t-confirm-send",onClick:t.confirmUpload,ref:r,children:i.SEND_BUTTON_TEXT})]})]})]})})}function iy({upload:t}){return"location"!==t.type?Gs(O,{children:[Gs(sy,{upload:t}),Gs(ly,{upload:t})]}):"uploaded"===t.state?Gs(oy,{location:t.location}):Gs("div",{className:"t-loading",children:Gs($A,{})})}function oy({location:t}){const{imageUrl:e,linkUrl:n}=ED(t);return Gs("a",{href:n,target:"_blank",rel:"noreferrer",className:"t-location-upload-preview",style:{background:`url(${JSON.stringify(e)}) center center / cover no-repeat`}})}function sy({upload:t}){const[e,n]=function(t){const e=t.file;switch(t.type){case"video":{const n=/[.]ts/i.test(e.name)?"mpegts":"native";return[Gs(cy,{src:t.temporaryBlobUrl,videoType:n,playsInline:!0,controls:!0,preload:"auto"}),ay(t.metadata)]}case"image":return[Gs("img",{src:t.temporaryBlobUrl}),ay(t.metadata)];case"audio":return[Gs(ka,{src:t.temporaryBlobUrl,filename:e.name})];case"file":return[Gs("img",{src:hy(t.file.name,"error"===t.state)})];case"voice":En.unreachable()}}(t);return Gs("div",{className:"t-preview-container",style:n,children:e})}function ay(t){return{"--img-w":t.width,"--img-h":t.height}}function ly({upload:t}){const e=yo(Cn().t$),n=(()=>{switch(t.state){case"uploaded":case"error":return t.metadata.filename;case"uploading":return e.UPLOAD_IN_PROGRESS;default:En.unreachable()}})();let r="",i="";return"file"===t.type&&(r="is-file","uploaded"===t.state&&(i="file-block")),Gs("div",{className:`t-filename-row ${r}`,children:Gs("div",{className:i,children:n})})}function cy(t){const{videoType:e,...n}=t;return Gs("video",{...n})}Xe();const uy="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==";function dy({upload:t}){var e;const n="error"===t.state,r=Et(()=>"video"===t.type?uy:"image"===t.type?t.temporaryBlobUrl:hy(t.metadata.filename,n),[t,n]),[i,o]=ut(null);return ht(()=>{let e=!0;return"video"===t.type&&async function(t){return new Promise((e,n)=>{const r=document.createElement("video");r.preload="metadata",r.muted=!0,r.playsInline=!0,r.src=t,r.onloadeddata=async()=>{r.currentTime=.1},r.onseeked=()=>{const t=document.createElement("canvas");t.width=r.videoWidth,t.height=r.videoHeight,t.getContext("2d").drawImage(r,0,0,t.width,t.height);const n=t.toDataURL("image/png");r.pause(),r.src="",r.load(),e(n)},r.onerror=()=>n("Error loading video")})}(t.temporaryBlobUrl).then(t=>{e&&o(t)}),()=>{e=!1}},[t]),Gs("img",{src:null!==(e=null!=i?i:r)&&void 0!==e?e:void 0})}function hy(t,e){const n=t.match(/\.([-_a-zA-Z0-9]+)$/),r=(n?n[1].toUpperCase():"?").slice(0,6),i=`\n <svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 64 64">\n <rect width="100%" height="100%" rx="10" fill="${e?"#ffdbdb":"#ececec"}"/>\n <text\n x="50%"\n y="54%"\n text-anchor="middle"\n alignment-baseline="middle"\n font-size="${[22,22,22,22,18,13,10][r.length]}"\n font-family="Inter,Roboto,Arial,sans-serif"\n font-weight="bold"\n fill="${e?"#880000":"#444"}"\n letter-spacing="2"\n dominant-baseline="middle"\n >${r}</text>\n </svg>\n `.replace(/\s+/g," ");return`data:image/svg+xml;utf8,${encodeURIComponent(i)}`}function py(){var t;const e=An(),n=Cn(),r=aD(),i=null!==(t=yo(()=>n.state$.isUserConnected.child(n.state$.currentConversationId.get())))&&void 0!==t?t:{},o=yo(n.state$.userPermissions),s=yo(n.searchQuery$);return Gs(e.ChatHeader,{common:r,isUserConnected:i,permissions:o,searchQuery:s})}function fy(){const t=An(),e=aD();return Gs(t.MessageListHeader,{common:e})}function my(){const t=An(),e=aD();return Gs(t.MessageListFooter,{common:e})}function Ey(){const t=An(),e=aD();return Gs(t.NoConversationSelected,{common:e})}function _y({containerRef:t}){const[e,n]=ut(null),[r,i]=ut(null),[o,s]=ut(!1);ht(()=>{const e=t.current;let r=null;const i=t=>{if("mouse"!==t.pointerType)return;r&&(clearTimeout(r),r=null);const e=t.target.closest("[t-tooltip-text]");e&&(r=setTimeout(()=>{r=null,n(e),s(!1)},500))};return null==e||e.addEventListener("pointerover",i),()=>{null==e||e.removeEventListener("pointerover",i)}},[t]),ht(()=>{const e=t.current;let r,i=!1;function o(t){i=!1,"mouse"!==t.pointerType&&(r=setTimeout(()=>{const e=t.target.closest("[t-tooltip-text]");e&&(i=!0,n(e),s(!0))},300))}function a(){clearTimeout(r)}function l(t){i&&(t.stopPropagation(),t.preventDefault())}return e.addEventListener("pointerdown",o),e.addEventListener("pointerup",a),e.addEventListener("pointerleave",a),e.addEventListener("click",l,!0),e.addEventListener("contextmenu",l,!0),()=>{e.removeEventListener("pointerdown",o),e.removeEventListener("pointerup",a),e.removeEventListener("pointerleave",a),e.removeEventListener("click",l,!0),e.removeEventListener("contextmenu",l,!0)}},[t]);const{refs:a,floatingStyles:l}=mv({placement:"top",middleware:[Av(),o&&Ev(10)],whileElementsMounted:iv});return ht(()=>{if(e){a.setReference(e);const t=()=>{const t=e.getAttribute("t-tooltip-text");null===t?s():i(t.trim())},r=new MutationObserver(t);r.observe(e,{attributes:!0}),t();const s=()=>{o?setTimeout(()=>n(null),1e3):n(null)};return e.addEventListener("pointerleave",s),()=>{e.removeEventListener("pointerleave",s),r.disconnect(),a.setReference(null),i(null)}}},[e,o,a]),r?Gs("div",{className:"t-tooltip",role:"tooltip",style:l,ref:a.setFloating,children:r}):null}function Ay({appId:t,chatHeaderVisible:e,messageFieldVisible:n}){const r=Sn(),i=function(){const t=Cn(),e=Vo(()=>{const e=t.errors$.get(),n=t.authTokenState$.get(),r=t.state$.loadingConversationId.get(),i=t.state$.currentConversationId.get();return e.serverError?"server-error":e.wrongAppId?"wrong-app-id":"loading"===n||"idle"===n?"loading-token":"invalid"===n?"invalid-token":"expired"===n?"expired-token":"valid"===n?e.unknownUser?"unknown-user":r&&t.state$.unknownConversations.child(r).get()?"loading-conv-failed":t.canRenderUi(r)||i!==r&&t.canRenderUi(i)?"loaded":"loading-data":void En.unreachable()}),n=Vo({type:"loading"});$o(r=>{const i=e.get(),o=t.state$.currentConversationId.get(),s=t.extUserId$.get(),a=t.appId$.get();function l(t){n.set({type:"loading"});const e=setTimeout(()=>{n.set(t)},5e3);return()=>clearTimeout(e)}switch(i){case"invalid-token":n.set({type:"auth-failed"});break;case"expired-token":n.set({type:"expired-token"});break;case"wrong-app-id":n.set({type:"wrong-app-id",appId:a});break;case"server-error":n.set({type:"server-error"});break;case"loading-data":case"loading-token":n.set({type:"loading"});break;case"loaded":n.set({type:"loaded",conversationId:o,userId:s});break;case"loading-conv-failed":r.onCleanup=l({type:"inaccessible-conversation",userId:s,conversationId:o});break;case"unknown-user":r.onCleanup=l({type:"unknown-user",userId:s});break;default:En.never(i)}});const r=Vo({type:"loading"});return $o(t=>{if("loading"===n.type.get()){r.set({type:"invisible-loading"});const e=setTimeout(()=>{r.set({type:"loading"})},1e3);t.onCleanup=()=>{clearTimeout(e)}}else r.set(n.get())}),yo(r)}(),o=kn(),s=ft(null);ht(()=>{const t=s.current;return o.setInputElement(t),null==t||t.addEventListener("change",o.onInputChange),null==t||t.addEventListener("cancel",o.onInputCancel),()=>{o.setInputElement(null),null==t||t.removeEventListener("change",o.onInputChange),null==t||t.removeEventListener("cancel",o.onInputCancel)}}),ht(()=>{r.uploadFile=o.startFileUpload,o.onClose=()=>{r.focus()}},[r,o]);const[a,l]=ut(!1),c=Cn(),d=yo(()=>!!c.app$.get()&&c.state$.userPermissions.canShareFile.get()),h=yo(()=>o.uploads$.get().length>0),p=d&&!h;ht(()=>{"loaded"===i.type?c.renderedConversationId$.set(i.conversationId):c.renderedConversationId$.set(void 0)},[i,c]);const f=_t(t=>{o.startFileUpload([...t.dataTransfer.files]),t.preventDefault(),l(!1)},[o]),m=_t(t=>{t.preventDefault(),t.dataTransfer.types.includes("Files")&&l(!0)},[]),E=_t(t=>{t.preventDefault(),l(!1)},[]),_=ft(null);return QA(),"invisible-loading"===i.type?Gs(O,{}):"loading"===i.type?Gs(ty,{}):"inaccessible-conversation"===i.type?Gs(QR,{}):"unknown-user"===i.type||"auth-failed"===i.type||"wrong-app-id"===i.type||"server-error"===i.type||"unexpected-error"===i.type?Gs(ZR,{appId:t,chatboxState:i}):"expired-token"==i.type?Gs(ey,{}):"loaded"===i.type?null===i.conversationId?Gs(Ey,{}):Gs("div",{className:"t-chatbox-content",onDragOver:p?m:void 0,onDragLeave:p?E:void 0,onDrop:p?f:void 0,"t-menu-boundary":"root",ref:_,children:[e&&Gs(py,{}),Gs(fy,{}),Gs(KR,{conversationId:i.conversationId}),Gs(my,{}),n&&Gs(VR,{attachFile:o.startFileUpload,shareLocation:o.startLocationUpload}),h&&Gs(ry,{}),a&&Gs(ny,{className:"t-drop-overlay",children:Gs(Na,{type:"attachment"})}),Gs("input",{ref:s,type:"file",multiple:!0,style:{display:"none"}}),Gs(_y,{containerRef:_})]}):Gs(O,{})}Xe(),Xe();const gy=()=>!0;async function Sy(t,e,{initialDelay:n,maxDelay:r,log:i,shouldRetry:o=gy}){return e().catch(async s=>{if(i&&i(`[TalkJS] Retries left: ${t}. Error: ${JSON.stringify(s)}.`),0===t||!await o(s))throw s;const a=1e3*n*1.2,l=function(t,e){return t*(1-e+2*Math.random()*e)}(r?Math.min(1e3*r,a):a,.05);return function(t){return t<=0?Promise.resolve():new Promise(e=>setTimeout(e,t))}(l).then(()=>Sy(t-1,e,{initialDelay:l/1e3,maxDelay:r,log:i,shouldRetry:o}))})}function vy(){const t={};return t.promise=new Promise(function(e,n){t.resolve=e,t.reject=n}),t}const Oy=new Uint8Array(31);function Dy(){if(void 0!==globalThis.crypto)crypto.getRandomValues(Oy);else for(let t=0;t<Oy.length;t++)Oy[t]=Math.floor(256*Math.random());let t=0;return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,e=>(+e^Oy[t++]&15>>+e/4).toString(16))}var Ty=class{constructor(t,e,n,r,i,o,s,a,l){this.store=t,this.talkSession=e,this.editorInternals=n,this.beforeSendMessageRef=r,this.onSendMessage=i,this.onDeleteMessage=o,this.onMessageAction=s,this.onFocusMessage=a,this.onBackButtonClick=l,this.loadMoreUntil=async t=>{const e=this.store.state$.currentConversationId.peek(),n=this.store.state$.messages.child(e).loadedAll;let r;do{const i=this.store.messageSubscriptions[e];i&&!n.peek()&&await i.loadMore(30),r=t()}while(!n.peek()&&!r);return r}}setScrollableDiv(t){this.scrollable=t}toggleSearchBox(t){if(this.store.state$.userPermissions.canSearch.peek())if(void 0!==t)this.store.chatSearchState$.set(t?"visible":"hidden");else{const t=this.store.chatSearchState$.peek();this.store.chatSearchState$.set("hidden"===t?"visible":"hidden")}else WA.error("In-conversation message search is only available to customers on Growth plan and above.")}async deleteMessage(t){const e=this.store.state$.currentConversation.peek();if(!e||"Read"===e.access)return;const n=e.id,r=this.store.state$.messages.child(n).lookup.child(t).peek(),i=this.talkSession.conversation(n).message(t),[o]=await Promise.all([null!=r?r:i.get(),i.delete()]);if(o){const t={currentUser:this.store.currentUser$.peek(),conversation:this.store.state$.currentConversation.peek(),message:r};this.onDeleteMessage(t)}}setEditing(t){const e=this.store.state$.currentConversation.peek();!e||"Read"===e.access||this.store.state$.editingMessageId.set(t)}async editMessage(t,e){const n=this.store.state$.currentConversation.peek();if(!n||"Read"===n.access)return;const r=n.id;await this.talkSession.conversation(r).message(t).edit(e)}setReferencedMessage(t){const e=this.store.state$.currentConversation.peek();!e||"Read"===e.access||(this.store.state$.referencedMessageId.set(t),setTimeout(()=>this.editorInternals.focus({skipProseMirrorStuff:!0}),100))}async focusMessage(t,e=!0){var n;if(null==t)return this.store.focusedMessage$.set(null),null;if(await ji(()=>this.store.state$.loadingConversationId.get()===this.store.renderedConversationId$.get()),null===this.store.state$.currentConversationId.peek())return WA.error("Cannot focus message because current conversation is `null`."),null;const r=()=>{const e=this.store.state$.currentConversationId.peek();return this.store.state$.messages.child(e).lookup.child(t).peek()||null};let i=r();if(i||(i=await this.loadMoreUntil(r)),!i)return WA.error(`Message with id: \`${t}\` could not be found in this conversation`),i;const o=null===(n=this.scrollable)||void 0===n?void 0:n.current;En.defined(o);const s=o.querySelector(`[t-message-id="${t}"]`);return s?this.scrollToAndHighlight(s,i,e):WA.error(`Could not find HTMLElement with attribute: t-message-id="${t}"`),i}async jumpToHighlight(t){if(!this.store.state$.userPermissions.canSearch.peek())return WA.error("In-conversation message search is only available to customers on Growth plan and above."),null;if(0===this.store.highlightedStrings$.peek().length||"searching"===this.store.chatSearchState$.peek())return null;let e=this.findHighlight(t);return!e&&"up"===t&&(this.store.chatSearchState$.set("searching"),e=await this.loadMoreUntil(()=>this.findHighlight("up"))),e}findHighlight(t){var e;const n=null===(e=this.scrollable)||void 0===e?void 0:e.current;En.defined(n);const r=[],i=Array.from(n.querySelectorAll("[t-message-id]")),o=this.store.state$.currentConversationId.peek(),s=this.store.state$.messages.child(o).state.peek();if(0===i.length&&0!==s.length)return WA.error("Could not find HTMLElements with the attribute: t-message-id. This attribute is required for In-Conversation search to work."),null;let a;if(Array.from(n.getElementsByClassName("t-highlighted-text")).forEach(t=>{const e=i.findIndex(e=>e.contains(t));if(-1===e)return;const n=i.splice(e,1)[0],o=n.getAttribute("t-message-id");r.push([o,n])}),"up"===t){const t=n.getBoundingClientRect().top;a=r.find(([e,n])=>n.getBoundingClientRect().top-t<-5)}else{const t=.05*n.getBoundingClientRect().height,e=n.getBoundingClientRect().bottom;for(let n=r.length-1;n>=0;n--){const i=r[n],[o,s]=i;if(e-s.getBoundingClientRect().top<=t){a=i;break}}}const l=this.store.chatSearchState$;if(a){const[t,e]=a,n=this.store.state$.messages.child(o).lookup.child(t).peek();return this.scrollToAndHighlight(e,n),l.set("visible"),n}return 0===r.length?l.set("noResults"):l.set("noMoreResults"),null}scrollToAndHighlight(t,e,n=!0){const r=this.scrollable.current.getBoundingClientRect(),i=t.getBoundingClientRect();let o="start";-1===Math.sign(r.top-i.top)&&i.height<r.height&&(o="end"),t instanceof HTMLElement&&(t.style.scrollSnapAlign=o),t.scrollIntoView({behavior:"instant"}),t instanceof HTMLElement&&(t.style.scrollSnapAlign="none"),this.store.focusedMessage$.set(e),n&&this.onFocusMessage({message:e})}setHighlightedStrings(t){this.store.state$.userPermissions.canSearch.peek()?this.store.highlightedStrings$.set(t):WA.error("In-conversation message search and by extension highlighting of strings are only available to customers on Growth plan and above.")}setSearchQuery(t){this.store.setSearchQuery(t)}async sendMessage(t){const e=this.store.state$.currentConversationId.peek();if(!e)return;const n=this.beforeSendMessageRef.current;let r=t;if(n&&await this.editorInternals.blockSend(async()=>{r=await async function(t,e,n,r){try{const i=Iy(t,r),o=await n({plaintext:cD(i),content:i,referencedMessage:await yy(t,e,r.referencedMessage)});return null===o?null:o?function(t,e){const n={...t,...e};return e.content&&delete n.text,null===n.referencedMessage&&delete n.referencedMessage,n}(r,o):r}catch(t){return WA.error("Your beforeSendMessage callback threw an error: ",t),null}}(this.store,this.talkSession,n,t)}),!r)return;if(this.store.state$.currentConversationId.peek()!==e)return void WA.warn("The conversation changed while beforeSendMessage was running. The message was not sent.");const i=await async function(t,e,n){var r;const i=await yy(t,e,n.referencedMessage),o=Iy(t,n),s="text"in n?n.text:cD(o),a=Math.max(Date.now(),Ry+1);return Ry=a,{id:"ephemeral-"+Dy(),type:"UserMessage",sender:t.currentUser$.peek(),createdAt:a,editedAt:null,custom:null!==(r=n.custom)&&void 0!==r?r:{},origin:"web",referencedMessage:i,reactions:[],content:o,plaintext:s}}(this.store,this.talkSession,r);this.store.state$.ephemeralMessages.child(e).child(i.id).set(i);const o=vy();this.store.readyForNewMessagesPromise=o.promise;const s=await this.talkSession.conversation(e).send(r);this.store.state$.ephemeralMessageIdMapping.child(e).child(s.id).set(i.id),o.resolve(),this.onSendMessage({message:await s.get(),currentUser:this.store.currentUser$.peek(),conversation:this.store.state$.currentConversation.peek()})}sendFileMessage(t){const e={type:"file",fileToken:t.fileToken};return this.sendMessage({content:[e],custom:t.custom})}async uploadVoice(t,e){return await this.talkSession.uploadVoice(t,e)}sendLocationMessage(t){const e={type:"location",latitude:t.location.latitude,longitude:t.location.longitude};return this.sendMessage({content:[e],custom:t.custom})}markAsTyping(){const t=this.store.state$.currentConversationId.peek();t&&this.talkSession.conversation(t).markAsTyping()}async toggleReaction(t,e,n){"string"!=typeof e&&(e=e.emoji);const r=this.store.state$.currentConversationId.peek();if(!r)return;const i=this.store.state$.messages.child(r).lookup.child(t).peek().reactions.find(t=>t.emoji===e),o=this._getReactionRef(t,e);null!=i&&i.currentUserReacted&&!0!==n?await o.remove():!1!==n&&await o.add()}async addReaction(t,e){this.store.state$.currentConversationId.peek()&&await this._getReactionRef(t,e).add()}triggerMessageAction(t,e,n){const r=this.store.state$.currentConversation.peek();r&&("string"==typeof t&&(t=this.store.state$.messages.child(r.id).lookup.child(t).peek()),this.onMessageAction({action:e,params:n,message:t,conversation:r}))}clickBackButton(){const t=this.store.currentUser$.peek();En.defined(t),this.onBackButtonClick({currentUser:t})}storeDraft(t){const e=this.store.state$.currentConversationId.peek(),n=this.store.currentUser$.peek(),r=this.store.appId$.peek();!e||!n||!r||yR(e,n.id,r,t)}_getReactionRef(t,e){const n=this.store.state$.currentConversationId.peek();return this.talkSession.conversation(n).message(t).reaction(e)}};let Ry=0;async function yy(t,e,n){var r;if(!n)return null;const i=t.state$.currentConversationId.peek(),o=t.state$.messages.child(i),s="string"==typeof n?n:n.id;let a=null!==(r=o.lookup.child(s).peek())&&void 0!==r?r:null;return a||(a=await e.conversation(i).message(s).get()),a?function(t){var e,n;const{referencedMessage:r,type:i,sender:o,...s}=t;return En.defined(o),En("UserMessage"===i),{...s,type:i,sender:o,referencedMessageId:null!==(e=null===(n=t.referencedMessage)||void 0===n?void 0:n.id)&&void 0!==e?e:null}}(a):null}function Iy(t,e){return"content"in e?[Ny(t,e.content[0])]:[Cy(e.text)]}const Cy=t=>({type:"text",children:F_(t)});function Ny(t,e){switch(e.type){case"text":case"location":return e;case"file":return function(t,e){const n=t.fileUploads[e.fileToken];return En.defined(n),{type:"file",subtype:"file"===n.type?void 0:n.type,...n.metadata,size:n.file.size,filename:n.file.name,fileToken:e.fileToken,url:n.temporaryBlobUrl}}(t,e)}}var by=class extends Error{constructor(t,e){const n=function(t){if("string"==typeof t)return t;if(Array.isArray(t))return t.join("\n");try{return JSON.stringify(t)}catch(e){return String(t)}}(t);super(n),this.userMessage=null!=e?e:n,Object.setPrototypeOf&&Object.setPrototypeOf(this,new.target.prototype)}};const wy=console;var ky=class{constructor(t,e,n,r){this.apiUrls=t,this.appId=e,this.sessionId=n,this.authProvider=r,this._lastPutPromise=Promise.resolve()}async get(t,e={}){const n=this.endpointUrl(t,e),r=await My(()=>this.fetchWithReauth(n),{retries:11});return await this.handleResponse(r,n)}async queuedPut(t,e){await this._lastPutPromise;const n=My(()=>this._doPut(t,e));return this._lastPutPromise=n,n}put(t,e,n){const r=()=>this._doPut(t,e);return n?Py(r,n):My(r,{retries:5})}post(t,e,n){const r=()=>this._doPost(t,e);return n?Py(r,n):My(r,{retries:5})}delete(t,e={}){return My(()=>this._doDelete(t,e),{retries:11})}endpointUrl(t,e={}){const n=new URL(this.apiUrls.internalHttpApiUrl);n.pathname+=`/${this.appId}/${t}`,n.searchParams.set("sessionId",this.sessionId);for(const[t,r]of Object.entries(e))n.searchParams.set(t,r);return n}async _doPut(t,e){const n=this.endpointUrl(t),r=await this.fetchWithReauth(n,{method:"PUT",body:JSON.stringify(e)});return await this.handleResponse(r,n)}async _doPost(t,e){const n=this.endpointUrl(t),r=await this.fetchWithReauth(n,{method:"POST",body:JSON.stringify(e)});return await this.handleResponse(r,n)}async _doDelete(t,e){const n=this.endpointUrl(t,e),r=await this.fetchWithReauth(n,{method:"DELETE"});return await this.handleResponse(r,n)}async handleResponse(t,e){if(t.status>=300){if(404===t.status)throw GA.error(`[${this.appId}][BackendRestClient] Couldn't find resource.`),new by("Could not find app.",`Could not find given appId: "${this.appId}". You can find your appId on https://talkjs.com/dashboard.`);if(401===t.status){const t=await this.authProvider.getToken();throw GA.error(`[${this.appId}][BackendRestClient] Couldn't authenticate ${e} with token ${t}.`),new by("User not authenticated.","Could not authenticate user. Check if your signature is calculated correctly.")}if(t.status>=300&&t.status<500){const{error:e}=await t.json();throw new by(e)}{const n=await t.text();throw new Error(`Got non-success response (${n}) from the server for url: ${e}.`)}}return await t.json()}async fetchWithReauth(t,e){function n(n){const r={Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${n}`};return fetch(t,{...e,headers:r})}const r=await this.authProvider.getToken(),i=await n(r);return 401!==i.status?i:(wy.error(`401 error from ${null==e?void 0:e.method} ${t}, ${r}`),this.authProvider.refreshToken(),n(await this.authProvider.getToken()))}};function Ly(t){return!t.userMessage}function My(t,{retries:e=30}={}){return Sy(e,t,{shouldRetry:Ly,log:wy.warn.bind(wy),maxDelay:30,initialDelay:.2})}async function Py(t,e){try{return await t()}catch(t){if(!Ly(t))throw t}let n=!1;return e.then(()=>{n=!0}),Sy(1e3,t,{initialDelay:.2,maxDelay:30,shouldRetry:()=>!n,log:wy.warn.bind(wy)})}var xy=l((t,e)=>{var n="__lodash_hash_undefined__",r=9007199254740991,i="[object Arguments]",o="[object Function]",s="[object Object]",a=/^\[object .+?Constructor\]$/,l=/^(?:0|[1-9]\d*)$/,c={};c["[object Float32Array]"]=c["[object Float64Array]"]=c["[object Int8Array]"]=c["[object Int16Array]"]=c["[object Int32Array]"]=c["[object Uint8Array]"]=c["[object Uint8ClampedArray]"]=c["[object Uint16Array]"]=c["[object Uint32Array]"]=!0,c[i]=c["[object Array]"]=c["[object ArrayBuffer]"]=c["[object Boolean]"]=c["[object DataView]"]=c["[object Date]"]=c["[object Error]"]=c[o]=c["[object Map]"]=c["[object Number]"]=c[s]=c["[object RegExp]"]=c["[object Set]"]=c["[object String]"]=c["[object WeakMap]"]=!1;var d="object"==typeof global&&global&&global.Object===Object&&global,h="object"==typeof self&&self&&self.Object===Object&&self,p=d||h||Function("return this")(),f="object"==typeof t&&t&&!t.nodeType&&t,m=f&&"object"==typeof e&&e&&!e.nodeType&&e,E=m&&m.exports===f,_=E&&d.process,A=function(){try{return m&&m.require&&m.require("util").types||_&&_.binding&&_.binding("util")}catch(t){}}(),g=A&&A.isTypedArray;var S,v=Array.prototype,O=Function.prototype,D=Object.prototype,T=p["__core-js_shared__"],R=O.toString,y=D.hasOwnProperty,I=(S=/[^.]+$/.exec(T&&T.keys&&T.keys.IE_PROTO||""))?"Symbol(src)_1."+S:"",C=D.toString,N=R.call(Object),b=RegExp("^"+R.call(y).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),w=E?p.Buffer:void 0,k=p.Symbol,L=p.Uint8Array,M=w?w.allocUnsafe:void 0,P=function(t,e){return function(n){return t(e(n))}}(Object.getPrototypeOf,Object),x=Object.create,F=D.propertyIsEnumerable,H=v.splice,U=k?k.toStringTag:void 0,B=function(){try{var t=dt(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),j=w?w.isBuffer:void 0,V=Math.max,z=Date.now,$=dt(p,"Map"),Y=dt(Object,"create"),G=function(){function t(){}return function(e){if(!Dt(e))return{};if(x)return x(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function W(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function X(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function K(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function q(t){var e=this.__data__=new X(t);this.size=e.size}function J(t,e){var n=At(t),r=!n&&_t(t),i=!n&&!r&&St(t),o=!n&&!r&&!i&&Rt(t),s=n||r||i||o,a=s?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],l=a.length;for(var c in t)(e||y.call(t,c))&&(!s||!("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||ht(c,l)))&&a.push(c);return a}function Z(t,e,n){(void 0!==n&&!Et(t[e],n)||void 0===n&&!(e in t))&&et(t,e,n)}function Q(t,e,n){var r=t[e];(!y.call(t,e)||!Et(r,n)||void 0===n&&!(e in t))&&et(t,e,n)}function tt(t,e){for(var n=t.length;n--;)if(Et(t[n][0],e))return n;return-1}function et(t,e,n){"__proto__"==e&&B?B(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}W.prototype.clear=function(){this.__data__=Y?Y(null):{},this.size=0},W.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},W.prototype.get=function(t){var e=this.__data__;if(Y){var r=e[t];return r===n?void 0:r}return y.call(e,t)?e[t]:void 0},W.prototype.has=function(t){var e=this.__data__;return Y?void 0!==e[t]:y.call(e,t)},W.prototype.set=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Y&&void 0===e?n:e,this},X.prototype.clear=function(){this.__data__=[],this.size=0},X.prototype.delete=function(t){var e=this.__data__,n=tt(e,t);return!(n<0)&&(n==e.length-1?e.pop():H.call(e,n,1),--this.size,!0)},X.prototype.get=function(t){var e=this.__data__,n=tt(e,t);return n<0?void 0:e[n][1]},X.prototype.has=function(t){return tt(this.__data__,t)>-1},X.prototype.set=function(t,e){var n=this.__data__,r=tt(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},K.prototype.clear=function(){this.size=0,this.__data__={hash:new W,map:new($||X),string:new W}},K.prototype.delete=function(t){var e=ut(this,t).delete(t);return this.size-=e?1:0,e},K.prototype.get=function(t){return ut(this,t).get(t)},K.prototype.has=function(t){return ut(this,t).has(t)},K.prototype.set=function(t,e){var n=ut(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},q.prototype.clear=function(){this.__data__=new X,this.size=0},q.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},q.prototype.get=function(t){return this.__data__.get(t)},q.prototype.has=function(t){return this.__data__.has(t)},q.prototype.set=function(t,e){var n=this.__data__;if(n instanceof X){var r=n.__data__;if(!$||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new K(r)}return n.set(t,e),this.size=n.size,this};var nt=function(t){return function(e,n,r){for(var i=-1,o=Object(e),s=r(e),a=s.length;a--;){var l=s[t?a:++i];if(!1===n(o[l],l,o))break}return e}}();function rt(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":U&&U in Object(t)?function(t){var e=y.call(t,U),n=t[U];try{t[U]=void 0;var r=!0}catch(t){}var i=C.call(t);return r&&(e?t[U]=n:delete t[U]),i}(t):function(t){return C.call(t)}(t)}function it(t){return Tt(t)&&rt(t)==i}function ot(t){return!(!Dt(t)||function(t){return!!I&&I in t}(t))&&(vt(t)?b:a).test(function(t){if(null!=t){try{return R.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t))}function st(t){if(!Dt(t))return function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}(t);var e=pt(t),n=[];for(var r in t)"constructor"==r&&(e||!y.call(t,r))||n.push(r);return n}function at(t,e,n,r,i){t!==e&&nt(e,function(o,a){if(i||(i=new q),Dt(o))!function(t,e,n,r,i,o,a){var l=ft(t,n),c=ft(e,n),d=a.get(c);if(d)return void Z(t,n,d);var h=o?o(l,c,n+"",t,e,a):void 0,p=void 0===h;if(p){var f=At(c),m=!f&&St(c),E=!f&&!m&&Rt(c);h=c,f||m||E?At(l)?h=l:function(t){return Tt(t)&>(t)}(l)?h=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}(l):m?(p=!1,h=function(t,e){if(e)return t.slice();var n=t.length,r=M?M(n):new t.constructor(n);return t.copy(r),r}(c,!0)):E?(p=!1,h=function(t,e){var n=e?function(t){var e=new t.constructor(t.byteLength);return new L(e).set(new L(t)),e}(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}(c,!0)):h=[]:function(t){if(!Tt(t)||rt(t)!=s)return!1;var e=P(t);if(null===e)return!0;var n=y.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&R.call(n)==N}(c)||_t(c)?(h=l,_t(l)?h=function(t){return function(t,e,n,r){var i=!n;n||(n={});for(var o=-1,s=e.length;++o<s;){var a=e[o],l=r?r(n[a],t[a],a,n,t):void 0;void 0===l&&(l=t[a]),i?et(n,a,l):Q(n,a,l)}return n}(t,yt(t))}(l):(!Dt(l)||vt(l))&&(h=function(t){return"function"!=typeof t.constructor||pt(t)?{}:G(P(t))}(c))):p=!1}p&&(a.set(c,h),i(h,c,r,o,a),a.delete(c)),Z(t,n,h)}(t,e,a,n,at,r,i);else{var l=r?r(ft(t,a),o,a+"",t,e,i):void 0;void 0===l&&(l=o),Z(t,a,l)}},yt)}function lt(t,e){return mt(function(t,e,n){return e=V(void 0===e?t.length-1:e,0),function(){for(var r=arguments,i=-1,o=V(r.length-e,0),s=Array(o);++i<o;)s[i]=r[e+i];i=-1;for(var a=Array(e+1);++i<e;)a[i]=r[i];return a[e]=n(s),function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}(t,this,a)}}(t,e,Nt),t+"")}var ct=B?function(t,e){return B(t,"toString",{configurable:!0,enumerable:!1,value:Ct(e),writable:!0})}:Nt;function ut(t,e){var n=t.__data__;return function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}(e)?n["string"==typeof e?"string":"hash"]:n.map}function dt(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return ot(n)?n:void 0}function ht(t,e){var n=typeof t;return!!(e=null==e?r:e)&&("number"==n||"symbol"!=n&&l.test(t))&&t>-1&&t%1==0&&t<e}function pt(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||D)}function ft(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var mt=function(t){var e=0,n=0;return function(){var r=z(),i=16-(r-n);if(n=r,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(ct);function Et(t,e){return t===e||t!=t&&e!=e}var _t=it(function(){return arguments}())?it:function(t){return Tt(t)&&y.call(t,"callee")&&!F.call(t,"callee")},At=Array.isArray;function gt(t){return null!=t&&Ot(t.length)&&!vt(t)}var St=j||function(){return!1};function vt(t){if(!Dt(t))return!1;var e=rt(t);return e==o||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Ot(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=r}function Dt(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Tt(t){return null!=t&&"object"==typeof t}var Rt=g?function(t){return function(e){return t(e)}}(g):function(t){return Tt(t)&&Ot(t.length)&&!!c[rt(t)]};function yt(t){return gt(t)?J(t,!0):st(t)}var It=function(t){return lt(function(e,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(o=t.length>3&&"function"==typeof o?(i--,o):void 0,s&&function(t,e,n){if(!Dt(n))return!1;var r=typeof e;return!!("number"==r?gt(n)&&ht(e,n.length):"string"==r&&e in n)&&Et(n[e],t)}(n[0],n[1],s)&&(o=i<3?void 0:o,i=1),e=Object(e);++r<i;){var a=n[r];a&&t(e,a,r,o)}return e})}(function(t,e,n){at(t,e,n)});function Ct(t){return function(){return t}}function Nt(t){return t}e.exports=It}),Fy=h(xy(),1),Hy=class{constructor(t,e,n,r){this.backendRestClient=new ky(t,e,n,r)}async getApp(t){return function(t){const e=function(t,e){return(0,Fy.default)({general:{enableFileTransfers:e.includes("file_sharing"),enableLocation:e.includes("location_sharing"),enableMentions:!1,showTypingIndicators:!0,enablePresence:!1,enableVoiceRecording:!1},theme:{version:"v2",name:"default"},permissions:{messages:{delete:"own",edit:"own",reply:"all",emojiReactions:"all"},messagesCustom:{},conversations:{leave:"none",markAsUnread:"none"},conversationsCustom:{}},generalNotificationSettings:{timeout:"15"},emailSettings:{enabled:!0,subject:"{{sender.name}} wants to chat with you on {{app.name}}",replySeparator:"--- Write ABOVE THIS LINE to post a reply via email ---",unsubscribeText:"Unsubscribe from all chat emails",senderName:"{{sender.name}} (via {{app.name}})",header:"Hi {{recipient.name}},\n {{sender.name}} wants to chat with you on {{app.name}}:",includeMessages:!0,inboxUrl:"{{app.custom.websiteUrl}}",inboxLinkText:"Join the chat",footer:"On behalf of {{sender.name}},\n The {{app.name}} team",enableReplyToEmail:e.includes("reply_via_email"),emailThemeType:e.includes("email_templates")?"custom":"standard",emailTheme:"default_email",emailAttachmentMode:"enabledExcludingImages",htmlTemplate:'<div>\n Hi {{recipient.name}}, <br/>\n <br/>\n {{sender.name}} wants to chat with you on {{app.name}}:<br/>\n <br/>\n {{messages.all}}\n <br/>\n <a href="{{app.custom.websiteUrl}}">Join the chat</a>\n <br/>\n <br/>\n On behalf of {{sender.name}},<br/>\n The {{app.name}} team<br/>\n <br/>\n</div>',textTemplate:"Hi {{recipient.name}},\n\n{{sender.name}} wants to chat with you on {{app.name}}:\n\n{{messages.all}}\n\n{{app.custom.websiteUrl}} Join the chat\n\nOn behalf of {{sender.name}},\nThe {{app.name}} team"},smsSettings:{enabled:e.includes("sms_notifications"),smsTemplate:'({{app.name}}) {{sender.name}}: "{{messages}}". Reply here: {{app.custom.websiteUrl}}',maximumSegments:"1",enableAutoOptOutText:!1,optOutText:"To stop receiving these messages, reply STOP."},suppressContactInfo:JSON.stringify({mode:"off",suppressLinks:!0,suppressEmailAddresses:!0,suppressPhoneNumbers:!0}),sameTabLinkRules:[]},null!=t?t:{})}(t.configuration,t.features),n=JSON.parse(e.suppressContactInfo),r={...e,suppressContactInfo:new gA(n)};return{appMetadata:{...t.appMetadata,id:t.appMetadata.id},features:t.features,role:r}}(await this.backendRestClient.get("/app",null===t?{}:{role_name:t}))}async checkIfAppExists(){return this.backendRestClient.get("/app").then(()=>!0).catch(t=>{if("Could not find app."===t.message)return!1;throw t})}};var Uy=class Ni{constructor(t,e,n){this.realtimeWsApiUrl=t,this.internalHttpApiUrl=e,this.restApiHttpUrl=n}getBokensUrl(t,e,n){return this.internalHttpApiUrl+`/${t}/bokens/${encodeURIComponent(e)}?signature=${encodeURIComponent(null!=n?n:"")}`}getRealtimeWsUrl(t,e,n,r,i){const o=encodeURIComponent(e);return this.realtimeWsApiUrl+`/${t}/realtime/${o}?talkjs-client-build=${null!=i?i:"standalone"}&talkjs-core=${n}&talkjs-client-id=${r}`}static fromHost(t){const e=new Ni("wss://realtime.talkjs.com/v1","https://app.talkjs.com/api/v0","https://api.talkjs.com/v1");if(!t)return e;if("@currentHost"===t){var n;if("undefined"==typeof location)throw new Error("You can only use @currentHost in a browser.");t=(null!==(n=window.top)&&void 0!==n?n:window).location.host}if(t.endsWith("talkjs.com")){const n=t.match(/^(?:\w+-)?([^.]+)\.talkjs\.com$/);if(n){const t=n[1];return["app","cdn","api","realtime"].includes(t)?e:new Ni(`wss://realtime-${t}.talkjs.com/v1`,`https://app-${t}.talkjs.com/api/v0`,`https://api-${t}.talkjs.com/v1`)}return e}return t.includes("localhost")||t.includes("localtest.me")||/^\d+\.\d+\.\d+\.\d+(:\d+)?$/.test(t)?new Ni(`ws://${t}/public_api/v1`,`http://${t}/api/v0`,`http://${t}/public_api/v1`):new Ni(`wss://${t}/public_api/v1`,`https://${t}/api/v0`,`https://${t}/public_api/v1`)}};function By(t){return Object.values(t)}var jy=class{subscribeToConversationListBaseData(){const t=[this.listenForErrors(),this.listenForAuth(),this.listenForUserAndApp(),this.listenForConversationSearch(),this.listenForMessageSearch()];return()=>t.forEach(t=>t())}subscribeToConversationList(t){var e;const{store:n,session:r}=this;En("ConversationListStore"===n.type),null===(e=n.conversationListSubscription)||void 0===e||e.unsubscribe(),n.conversationListSubscription=null,n.conversationFilter$.set(t);const i=r.subscribeConversations({filter:t},t=>{si(()=>{n.conversationsArray$.set(t);const e={};for(const n of t)e[n.id]=n;n.conversationsMap$.set(e)})});return n.conversationListSubscription=i,()=>{n.conversationListSubscription===i&&(i.unsubscribe(),n.conversationListSubscription=null)}}subscribeToChatboxData(){const t=[this.listenForErrors(),this.listenForAuth(),this.listenForUserAndApp(),()=>this.unsubscribeAllConversations()];return()=>t.forEach(t=>t())}constructor(t,e,n){this.subscribedConversations={},this.store=t,this.session=e,this.restApi=n}listenForErrors(){const{store:t,session:e}=this;t.errors$.assign({unknownUser:!1,wrongAppId:!1,serverError:!1});const n=e.onError(e=>{WA.error(e.message),t.errors$.serverError.set(!0)}),r=e.currentUser.subscribe(e=>{t.errors$.unknownUser.set(null===e)});return()=>{n.unsubscribe(),r.unsubscribe()}}listenForAuth(){const{store:t,session:e}=this;return Hi(n=>{let r=!0;const i=t.hasTokenFetcher$.get();"loading"!==t.authTokenState$.peek()&&t.authTokenState$.set("loading"),e._authProvider.getToken().then(()=>{r&&t.authTokenState$.set("valid")});const o=e._authProvider.onTokenRefreshFailed(()=>{r&&t.authTokenState$.set(i?"invalid":"expired")});n.onCleanup=()=>{r=!1,o()}})}listenForUserAndApp(){const{store:t,session:e,restApi:n}=this;return Hi(r=>{let i=!0;const o=Symbol("ROLE_NOT_LOADED");let s=o;const a=e.currentUser.subscribe(async e=>{if(i&&e){var r;t.currentUser$.set(e);const a=null!==(r=e.role)&&void 0!==r?r:null;if(s===o||a!==s){s=a;try{const e=await n.getApp(a);if(!i)return;t.app$.set(e)}catch(e){if(!i)return;s=o,WA.error(`Failed to load app settings: ${e.message}`),t.errors$.serverError.set(!0)}}}});r.onCleanup=()=>{i=!1,a.unsubscribe()}})}subscribeTypingAndPresence(t){var e;if(null===(e=this.unsubscribeTypingAndPresence)||void 0===e||e.call(this),!t)return;const n=[this.listenForTyping(t),this.listenForPresence(t)];this.unsubscribeTypingAndPresence=()=>{n.forEach(t=>t()),this.unsubscribeTypingAndPresence=void 0}}subscribeConversation(t){if(this.subscribedConversations[t])return void(this.subscribedConversations[t].touchedAt=Date.now());const e=[this.listenForConversation(t),this.listenForMessages(t),this.listenForParticipants(t)];this.subscribedConversations[t]={unsubscribe:()=>{e.forEach(t=>t()),delete this.subscribedConversations[t]},touchedAt:Date.now()};const n=By(this.subscribedConversations);n.length>10&&function(t,e){return t.reduce((t,n)=>n[e]<t[e]?n:t,t[0])}(n,"touchedAt").unsubscribe()}unsubscribeAllConversations(){var t;for(const t of By(this.subscribedConversations))t.unsubscribe();null===(t=this.unsubscribeTypingAndPresence)||void 0===t||t.call(this),this.subscribedConversations={}}listenForMessages(t){const{store:e,session:n}=this;En("ChatboxStore"===e.type);const r=n.conversation(t).subscribeMessages(async(n,r)=>{n&&(await e.readyForNewMessagesPromise,e.storeMessages(t,n,r))});return e.messageSubscriptions[t]=r,()=>null==r?void 0:r.unsubscribe()}listenForParticipants(t){const{store:e,session:n}=this;En("ChatboxStore"===e.type);const r=n.conversation(t).subscribeParticipants(n=>{n&&e.state$.participants.child(t).set(n)});return()=>null==r?void 0:r.unsubscribe()}listenForConversation(t){const{store:e,session:n}=this;En("ChatboxStore"===e.type);const r=n.conversation(t).subscribe(async n=>{si(()=>{n?(e.state$.unknownConversations.child(t).delete(),e.state$.conversations.child(t).set(n)):(e.state$.conversations.child(t).delete(),e.state$.unknownConversations.child(t).set(!0))})});return()=>null==r?void 0:r.unsubscribe()}listenForTyping(t){const{store:e,session:n}=this;En("ChatboxStore"===e.type);const r=n.conversation(t).subscribeTyping(n=>{n&&e.storeTyping(t,n)});return()=>null==r?void 0:r.unsubscribe()}listenForPresence(t){const{store:e,session:n}=this;En("ChatboxStore"===e.type);const r=e.state$.participants.child(t),i=e.state$.isUserConnected.child(t),o=Hi(t=>{var e;const o=(null!==(e=r.get())&&void 0!==e?e:[]).map(({user:t})=>t.id),s=o.map(t=>n.user(t).subscribeOnline(e=>{var n;i.child(t).set(null!==(n=null==e?void 0:e.isConnected)&&void 0!==n&&n)}));si(()=>{var t;const e=new Set(o),n=function(t){return Object.keys(t)}(null!==(t=i.peek())&&void 0!==t?t:{});for(const t of n)e.has(t)||i.child(t).delete()}),t.onCleanup=()=>{s.forEach(t=>t.unsubscribe())}});return()=>{null==o||o(),e.state$.isUserConnected.child(t).delete(),i.delete()}}listenForConversationSearch(){const{store:t,session:e}=this;En("ConversationListStore"===t.type);const n=e.searchConversations((e,n)=>{t.globalSearchState$.assign({conversationResults:e,conversationStatus:n})});t.conversationSearch=n;const r=SR((t,e)=>{const r={conversation:e},i=t.trim();i.length?i.length>=3&&n.setQuery(i,r):n.setQuery("",r)},500),i=Hi(()=>{r(t.globalSearchState$.query.get(),t.conversationFilter$.get())});return()=>{t.conversationSearch=null,i()}}listenForMessageSearch(){const{store:t,session:e}=this;En("ConversationListStore"===t.type);const n=e.searchMessages((e,n)=>{t.globalSearchState$.assign({messageResults:e,messageStatus:n})});t.messageSearch=n;const r=SR((t,e)=>{const r={conversation:e},i=t.trim();i.length?i.length>=3&&n.setQuery(i,r):n.setQuery("",r)},500),i=Hi(()=>{r(t.globalSearchState$.query.get(),t.conversationFilter$.get())});return()=>{t.messageSearch=null,i()}}};function Vy(e,n){const r=n.appId,i=n.userId,o=ft(void 0),s=Et(()=>{const t=o.current,e=typeof t!=typeof n.tokenFetcher?n.tokenFetcher:t;return o.current=e,e},[n.tokenFetcher]);pt(()=>{e.updateThemeCustom(n.themeCustom)},[e,n.themeCustom]),pt(()=>{var t;e.colorScheme$.set(null!==(t=n.colorScheme)&&void 0!==t?t:"light")},[e,n.colorScheme]);const a=Et(()=>Dy(),[n.appId,n.userId,n.token,s]);ht(()=>{e.hasTokenFetcher$.set(!!s)},[e,s]);const l=t({host:n.host,appId:r,userId:i,token:n.token,tokenFetcher:s}),c=Et(()=>new Hy(Uy.fromHost(n.host),r,a,l._authProvider),[r,a,l,n.host]);return{session:l,restApi:c,fetcher:Et(()=>new jy(e,l,c),[e,l,c])}}Xe();var zy=class{constructor(t,e,n,r){this.state={type:"idle"},this.inputElement=null,this.latestTicketId=0,this.uploads$=Ao([]),this.onClose=null,this.onInputChange=()=>{this.resolveFiles([...this.inputElement.files])},this.onInputCancel=()=>{this.resolveFiles([])},this.startFileUpload=async t=>{const e=this.latestTicketId;let n;if(this.state={type:"uploading",ticketId:e,content:{kind:"file",uploads:[],fileTokens:[]}},n=t?Array.isArray(t)?t:[t]:await new Promise(t=>{var e;this.resolveFiles=t,null===(e=this.inputElement)||void 0===e||e.click()}),!n[0])return void this.cancelUpload();if(n.sort((t,e)=>t.lastModified!==e.lastModified?t.lastModified-e.lastModified:t.name.localeCompare(e.name)),!this.isTicketValid(e))return;const r=await Promise.all(n.map($y));if(!this.isTicketValid(e))return;this.state={type:"uploading",ticketId:e,content:{kind:"file",uploads:r,fileTokens:[]}},si(()=>{this.uploads$.set(r);for(const t of r){const e=t.file.size+","+t.file.name;this.store.state$.localFileBlobUrls.child(this.store.state$.currentConversationId.peek()).child(e).set({url:t.temporaryBlobUrl,fetching:!1})}});const i=await Promise.all(r.map((t,n)=>async function(t,e){switch(t.type){case"video":return e.uploadVideo(t.file,t.metadata);case"audio":return e.uploadAudio(t.file,t.metadata);case"image":return e.uploadImage(t.file,t.metadata);case"file":return e.uploadFile(t.file,t.metadata);case"voice":En.unreachable()}}(t,this.session).then(t=>(this.isTicketValid(e)&&this.uploads$.child(n).state.set("uploaded"),t)).catch(()=>(this.isTicketValid(e)&&this.uploads$.child(n).state.set("error"),null))));this.isTicketValid(e)&&(this.state={type:"waitingForConfirmation",ticketId:e,content:{kind:"file",uploads:r,fileTokens:i}})},this.startLocationUpload=async()=>{const t=this.latestTicketId,e={type:"location",state:"uploading",location:null};this.state={type:"uploading",ticketId:t,content:{kind:"location",upload:e}},this.uploads$.set([e]);const n=await this.browserPermissionController.runWithPermissionCheck("geolocation",async t=>{const{permissionResult:e,location:n}=await new Promise(t=>{navigator.geolocation.getCurrentPosition(e=>{t({permissionResult:"granted",location:{latitude:e.coords.latitude,longitude:e.coords.longitude}})},e=>{e.code===GeolocationPositionError.PERMISSION_DENIED?t({permissionResult:"denied",location:null}):t({permissionResult:"granted",location:null})})});return t(e),{permissionResult:e,location:n}});if(!this.isTicketValid(t))return;if(!n)return void this.cancelUpload();const{permissionResult:r,location:i}=n,o={type:"location",state:"granted"===r&&i?"uploaded":"error",location:i};this.state={type:"waitingForConfirmation",ticketId:t,content:{kind:"location",upload:o}},this.uploads$.set([o])},this.confirmUpload=()=>{if("waitingForConfirmation"===this.state.type&&this.isTicketValid(this.state.ticketId)){if("file"===this.state.content.kind){const t=this.state.content.fileTokens.filter(t=>null!==t);this.state.content.fileTokens.length===t.length&&this.sendFileMessages(this.state.content.uploads,t)}else"location"===this.state.content.kind&&this.state.content.upload.location&&this.sendLocationMessage(this.state.content.upload.location);this.terminate()}},this.cancelUpload=()=>{this.terminate()},this.session=t,this.store=e,this.controller=n,this.browserPermissionController=r}isTicketValid(t){return t===this.latestTicketId}sendFileMessages(t,e){for(const[n,r]of function(t,e){return En(t.length===e.length),t.map((t,n)=>[t,e[n]])}(e,t))this.store.fileUploads[n]=r,this.controller.sendFileMessage({fileToken:n})}sendLocationMessage(t){this.controller.sendLocationMessage({location:t})}setInputElement(t){this.inputElement=t}terminate(){const t="idle"===this.state.type;var e;(this.latestTicketId+=1,this.state={type:"idle"},this.uploads$.set([]),t)||(null===(e=this.onClose)||void 0===e||e.call(this))}};async function $y(t){const e=t.name;if(function(t){return/\.(mp4|ts|mov|webm|ogv)$/i.test(t)}(t.name)){const n=await Yy("video",t,t=>({width:t.videoWidth,height:t.videoHeight,duration:t.duration,filename:e})),r=function(t){switch(t.name.split(".").pop()){case"ts":return"video/MP2T";case"mov":return"video/quicktime";case"webm":return"video/webm";case"ogv":return"video/ogg";default:return"video/mp4"}}(t);return{type:"video",file:t,metadata:n,temporaryBlobUrl:URL.createObjectURL(new Blob([t],{type:r})),state:"uploading"}}const n=URL.createObjectURL(t);return function(t){return/\.(mp3|m4a|ogg|oga|opus|flac|wav)$/i.test(t)}(t.name)?{type:"audio",file:t,metadata:await Yy("audio",t,t=>({duration:t.duration,filename:e})),temporaryBlobUrl:n,state:"uploading"}:function(t){return/(gif|png|jpg|jpeg|svg|bmp|webp)$/i.test(t)}(t.name)?{type:"image",file:t,metadata:await Yy("img",t,t=>({width:t.naturalWidth,height:t.naturalHeight,filename:e})),temporaryBlobUrl:n,state:"uploading"}:{type:"file",file:t,metadata:{filename:e},temporaryBlobUrl:n,state:"uploading"}}async function Yy(t,e,n){const r=document.createElement(t);try{return r.src=URL.createObjectURL(e),await new Promise((e,i)=>{const o="img"===t?"load":"loadedmetadata";r.addEventListener(o,()=>{try{e(n(r))}catch(t){i(t)}},{once:!0})})}finally{URL.revokeObjectURL(r.src)}}var Gy=class{constructor(t){this.init=t}async runWithPermissionCheck(t,e){const{beforeBrowserPermissionPrompt:n,onMissingBrowserPermission:r}=this.init;function i(e){"denied"===e&&r({type:t})}if(!n||!await async function(t){if(!("permissions"in navigator))return!1;try{return"prompt"===(await navigator.permissions.query({name:t})).state}catch(t){return!1}}(t))return e(t=>{i(t)});const o=vy(),s=vy(),a={type:t,showPrompt:async()=>(s.resolve({cancelled:!1}),await o.promise),cancel:()=>{s.resolve({cancelled:!0})}};try{n(a)}catch(t){WA.error("Your beforeBrowserPermissionPrompt callback threw an error: ",t),s.resolve({cancelled:!0})}const{cancelled:l}=await s.promise;return l?null:e(t=>{o.resolve(t),i(t)})}};function Wy(t,e,n){const r=ft(t),i=ft(n);return pt(()=>{r.current=t,i.current=n}),_t(t=>{r.current&&r.current(t),e&&function(t,e,n){for(const r of n){const n=new Event(r);Object.assign(n,e),t.dispatchEvent(n)}}(e,t,i.current)},[e])}function Xy(t){ht(()=>{const e=window,n=t.current;if(e.cordova&&n){const t=t=>{t.target instanceof HTMLAnchorElement&&(t.preventDefault(),function(t){const e=window;e.cordova.InAppBrowser?e.cordova.InAppBrowser.open(t,"_system"):window.open(t,"_system","location=yes")}(t.target.href))};return n.addEventListener("click",t),()=>n.removeEventListener("click",t)}},[t])}function Ky(){const[t,e]=ut(!0);return ht(()=>{e(!1)},[]),t}Xe(),Xe(),Xe(),Xe(),Xe();const qy=Qt(function(t,e){var n,r,i;const{onSendMessage:o,onDeleteMessage:s,onMessageAction:a,onFocusMessage:l,onBackButtonClick:c,onMissingBrowserPermission:d,beforeSendMessage:h,transformMentions:p,messageFieldPlaceholder:f,messageFieldSpellcheck:m,__hostElement:E}=t;ht(()=>{var e;null===(e=t.__internalOnLoaded)||void 0===e||e.call(t)},[]);const _=Ky(),A=ft(null!=E?E:null);Xy(A);const g=Wy(s,E,["deleteMessage","delete-message","deletemessage","DeleteMessage"]),S=Wy(o,E,["sendMessage","send-message","sendmessage","SendMessage"]),{store:v,controller:O,browserPermissionController:D,uploadController:T,editorInternals:R,session:y}=function(t,e,n,r,i,o,s,a){const l=Et(()=>new mR(t.appId,t.userId),[]),{session:c,fetcher:d}=Vy(l,t);pt(()=>{var e;l.messageFieldVisible$.set(null===(e=t.messageFieldVisible)||void 0===e||e)},[l,t.messageFieldVisible]),ht(()=>{const t=d.subscribeToChatboxData();return()=>t()},[d]);const h=Et(()=>new DR(l.state$.editor,l.device$,l.state$.userPermissions),[l]),p=Et(()=>new Ty(l,c,h,e,n,r,i,o,s),[c,l,h,e,n,r,o,i,s]);h.controller=p;const f=Et(()=>new Gy({beforeBrowserPermissionPrompt:t.beforeBrowserPermissionPrompt,onMissingBrowserPermission:a}),[t.beforeBrowserPermissionPrompt,a]),m=Et(()=>new zy(c,l,p,f),[c,l,p,f]);return pt(()=>{let e=!0;const n=t.conversationId||null;return l.state$.loadingConversationId.set(n),n&&d.subscribeConversation(n),d.subscribeTypingAndPresence(n),ji(()=>l.canRenderUi(n)).then(()=>{e&&si(()=>{l.state$.currentConversationId.set(n),l.state$.referencedMessageId.set(null),l.chatSearchState$.set("hidden")})}),()=>{e=!1}},[l,d,t.conversationId]),{store:l,controller:p,browserPermissionController:f,uploadController:m,editorInternals:h,session:c}}(t,QO(h),S,g,Wy(a,E,["messageAction","message-action","messageaction","MessageAction"]),Wy(l,E,["focusMessage","focus-message","focusmessage","FocusMessage"]),Wy(c,E,["backButtonClick","back-button-click","backbuttonclick","BackButtonClick"]),Wy(d,E,["browserPermissionDenied","browser-permission-denied","browserpermissiondenied","BrowserPermissionDenied"])),I=_t(async()=>{const t=R.state$;if(t.isEmpty.peek()||t.atTextLimit.peek()||t.sendBlocked.peek())return;const e=R.getText(),n=v.state$.referencedMessageId.peek();n&&O.setReferencedMessage(null),R.clearText(),v.state$.editor.showEmojiPicker.set(!1),await O.sendMessage({text:e,referencedMessage:null!=n?n:void 0})},[O,R,v]);ht(()=>{var e;const n=null===(e=t.enterSendsMessage)||void 0===e||e;v.state$.enterSendsMessage.set(n),R.onEnter=n?I:void 0},[R,t.enterSendsMessage,I,v]);const C=ft(void 0);ht(()=>{var e;const n=null===(e=v.focusedMessage$.peek())||void 0===e?void 0:e.id;t.focusedMessageId!==C.current&&n!==t.focusedMessageId&&(C.current=t.focusedMessageId,O.focusMessage(t.focusedMessageId||null,!1))},[v,O,t.focusedMessageId]),ht(()=>{const e=t.__hostElement;if(e)return v.focusedMessage$.onChange(({value:t})=>{var n;e.focusedMessageId=null!==(n=null==t?void 0:t.id)&&void 0!==n?n:null})},[v,t.__hostElement]),ht(()=>{R.spellcheck$.set(m)},[R,m]),ht(()=>{R.placeholder$.set(f)},[R,f]),mt(e,()=>({controller:O,editorInternals:R}));const N=null!==(n=t.colorScheme)&&void 0!==n?n:"light";pt(()=>{null==E||E.setAttribute("t-color-scheme",N)},[E,N]);const b=_t(({error:e})=>Gs(ZR,{appId:t.appId,chatboxState:{type:"unexpected-error",error:e}}),[t.appId]),w=_?null:Gs(dR,{fallbackRender:b,children:Gs(gn.Provider,{value:R,children:Gs(In.Provider,{value:v,children:Gs(_n.Provider,{value:t.theme,children:Gs(vn.Provider,{value:D,children:Gs(Nn.Provider,{value:O,children:Gs(wn.Provider,{value:T,children:Gs(Dn.Provider,{value:y,children:Gs(Rn.Provider,{value:{sendMessage:I,transformMentions:p},children:Gs(Ay,{appId:t.appId,chatHeaderVisible:null===(r=t.chatHeaderVisible)||void 0===r||r,messageFieldVisible:null===(i=t.messageFieldVisible)||void 0===i||i})})})})})})})})})});return E?w:Gs("div",{className:"t-chatbox"+(t.className?` ${t.className}`:""),style:t.style,"t-color-scheme":null!==(k=t.colorScheme)&&void 0!==k?k:"light",ref:A,children:w});var k});function Jy(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Zy(t,e){Jy(t,e),e.add(t)}function Qy(t,e,n){Jy(t,e),e.set(t,n)}function tI(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}function eI(t,e,n){return t.set(tI(t,e),n),n}function nI(t,e){return t.get(tI(t,e))}Xe(),lt(),function(t="Twemoji Country Flags",e="https://cdn.jsdelivr.net/npm/country-flag-emoji-polyfill@0.1/dist/TwemojiCountryFlags.woff2"){if(typeof window<"u"&&lR("😊")&&!lR("🇨🇭")){const n=document.createElement("style");return n.textContent=`@font-face {\n font-family: "${t}";\n unicode-range: U+1F1E6-1F1FF, U+1F3F4, U+E0062-E0063, U+E0065, U+E0067,\n U+E006C, U+E006E, U+E0073-E0074, U+E0077, U+E007F;\n src: url('${e}') format('woff2');\n font-display: swap;\n }`,document.head.appendChild(n),!0}}(),function({observableFunctions:t,observableProperties:e,jsonReplacer:n,jsonReviver:r}){if(t)for(const e in t){const n=t[e];rR.set(e,n),iR.prototype[e]=function(...t){return n.call(this,this._node,...t)}}if(e)for(const t in e){const n=e[t];nR.set(t,n),Object.defineProperty(iR.prototype,t,{configurable:!0,get(){return n.get.call(this,this._node)},set(t){return n.set.call(this,this._node,t)}})}n&&(eR.replacer=n),r&&(eR.reviver=r)}({observableFunctions:{child:(t,e)=>go.getProxy(t,e)}}),WA.registerHandler(({level:t,data:e})=>{console[t]("[TalkJS]",...e)});const rI=Qt(function(t,e){const n=ft(null),r=Et(()=>new sI(n),[]);mt(e,()=>r,[r]);const{theme:i,baseTheme:o,...s}=t,a=Et(()=>sR(o,i,"Chatbox"),[o,i]),l=`chatbox|${t.userId}|${t.appId}`;return Gs(Ln.Provider,{value:r,children:g(qy,{...s,key:l,theme:a,ref:n})})});var iI=new WeakMap,oI=new WeakSet,sI=class{constructor(t){Zy(this,oI),Qy(this,iI,void 0),eI(iI,this,t)}deleteMessage(t){return aI.call(tI(oI,this)).deleteMessage(t)}setEditing(t){aI.call(tI(oI,this)).setEditing(t)}editMessage(t,e){return aI.call(tI(oI,this)).editMessage(t,e)}sendMessage(t){return aI.call(tI(oI,this)).sendMessage(t)}sendFileMessage(t){return aI.call(tI(oI,this)).sendFileMessage(t)}sendLocationMessage(t){return aI.call(tI(oI,this)).sendLocationMessage(t)}setReferencedMessage(t){aI.call(tI(oI,this)).setReferencedMessage(t)}toggleReaction(t,e,n){return aI.call(tI(oI,this)).toggleReaction(t,e,n)}getMessageFieldText(){return lI.call(tI(oI,this)).getText()}setMessageFieldText(t){lI.call(tI(oI,this)).setText(t)}focusMessageField(){lI.call(tI(oI,this)).focus()}toggleSearchBox(t){aI.call(tI(oI,this)).toggleSearchBox(t)}async focusMessage(t){return aI.call(tI(oI,this)).focusMessage(t)}setHighlightedStrings(t){aI.call(tI(oI,this)).setHighlightedStrings(t)}setSearchQuery(t){aI.call(tI(oI,this)).setSearchQuery(t)}async jumpToPreviousHighlight(){return aI.call(tI(oI,this)).jumpToHighlight("up")}async jumpToNextHighlight(){return aI.call(tI(oI,this)).jumpToHighlight("down")}clickBackButton(){aI.call(tI(oI,this)).clickBackButton()}};function aI(){return nI(iI,this).current.controller}function lI(){return nI(iI,this).current.editorInternals}function cI({conversation:t}){const e=Cn(),n=An(),r=lD(),i=yo(e.currentConversationId$),o=jn(i);return Gs("li",{className:"t-conversation-list-item-wrapper",children:Gs(n.ConversationListItem,{common:r,conversation:t,participants:o,isSelected:i===t.id})})}Xe(),tO();const uI="[t-keyboard-nav-list-item]",dI=`${uI}[t-selected]`,hI="t-keyboard-navigation-active";function pI(t){const{as:e="ul",children:n,onKeyDown:r,onPointerDown:i,...o}=t,s=ft(null),a=ft(null);ht(()=>{const t=s.current;fI(t,a,{preferSelectedItem:!0});const e=new MutationObserver(e=>{const n=e.some(t=>"attributes"===t.type&&"t-selected"===t.attributeName);fI(t,a,{preferSelectedItem:n})});return e.observe(t,{attributes:!0,attributeFilter:["t-selected","t-keyboard-nav-list-item"],childList:!0,subtree:!0}),()=>{e.disconnect()}},[]);const l=_t(t=>{null==r||r(t),!t.defaultPrevented&&s.current&&function(t,e,n){let r;switch(t.key){case"ArrowDown":r=1;break;case"ArrowUp":r=-1;break;default:return}const i=EI(e),o=mI(e,n,i),s=document.activeElement;if(!o||!(s instanceof HTMLElement)||s!==o&&!o.contains(s))return;const a=i.indexOf(o),l=i[Math.max(0,Math.min(a+r,i.length-1))];l&&(t.preventDefault(),l!==o&&(n.current=l,_I(i,l),e.setAttribute(hI,""),l.focus()))}(t,s.current,a)},[r]),c=_t(t=>{null==i||i(t),s.current&&s.current.removeAttribute(hI)},[i]);return g(e,{...o,ref:s,onKeyDown:l,onPointerDown:c},n)}function fI(t,e,n){var r,i;const o=EI(t),s=mI(t,e,o),a=t.querySelector(dI);e.current=n.preferSelectedItem&&a?a:null!==(r=null!==(i=null!=s?s:a)&&void 0!==i?i:o[0])&&void 0!==r?r:null,_I(o,e.current)}function mI(t,e,n){const r=e.current;return r&&t.contains(r)&&n.includes(r)?r:null}function EI(t){return Array.from(t.querySelectorAll(uI))}function _I(t,e){for(const n of t){const t=n===e?0:-1;n.tabIndex=t;for(const e of Kv(n))e.tabIndex=t}}Xe();function AI(){const t=Cn(),e=ft(null);return ht(()=>{let n=!0;const r=e.current;return async function(){let e=0;for(;n&&t.conversationListSubscription&&r.scrollHeight===r.clientHeight&&e<2;){var i;await(null===(i=t.conversationListSubscription)||void 0===i?void 0:i.loadMore(20)),e+=1}}(),()=>{n=!1}},[t]),Gs("nav",{className:"t-conversation-list-scrollable",ref:e,"t-menu-boundary":"",onScroll:_t(e=>{const n=e.currentTarget;n.scrollHeight-n.clientHeight-n.scrollTop<15&&t.conversationListSubscription&&t.conversationListSubscription.loadMore(20)},[t]),children:Gs(pI,{children:Gs(Lo,{each:t.conversationsArray$,children:t=>Gs(cI,{conversation:t.get()})})})})}function gI(){const t=Cn(),e=An(),n=lD(),r=yo(t.globalSearchState$.query),i=_t(e=>{t.setGlobalSearchQuery(e)},[t]),o=_t(()=>{t.cancelGlobalSearch()},[t]);return Gs(e.GlobalSearchBox,{common:n,query:r,setQuery:i,cancel:o})}Xe();function SI({appId:t}){const e=Cn(),n=function(){const t=Cn(),e=Vo(()=>{const e=t.currentUser$.get(),n=t.app$.get(),r=t.errors$.get(),i=t.authTokenState$.get();return r.serverError?"server-error":r.wrongAppId?"wrong-app-id":"loading"===i||"idle"===i?"loading-token":"invalid"===i?"invalid-token":"expired"===i?"expired-token":"valid"===i?r.unknownUser?"unknown-user":e&&n?"loaded":"loading-data":void En.unreachable()}),n=Vo({type:"loading"});$o(r=>{const i=e.get(),o=t.extUserId$.peek(),s=t.appId$.peek();switch(i){case"invalid-token":n.set({type:"auth-failed"});break;case"expired-token":n.set({type:"expired-token"});break;case"wrong-app-id":n.set({type:"wrong-app-id",appId:s});break;case"server-error":n.set({type:"server-error"});break;case"loading-data":case"loading-token":n.set({type:"loading"});break;case"loaded":n.set({type:"loaded",currentUser:t.currentUser$.peek()});break;case"unknown-user":r.onCleanup=function(t){n.set({type:"loading"});const e=setTimeout(()=>{n.set(t)},5e3);return()=>clearTimeout(e)}({type:"unknown-user",userId:o});break;default:En.never(i)}});const r=Vo({type:"loading"});return $o(t=>{if("loading"===n.type.get()){r.set({type:"invisible-loading"});const e=setTimeout(()=>{r.set({type:"loading"})},1e3);t.onCleanup=()=>{clearTimeout(e)}}else r.set(n.get())}),yo(r)}(),r=yo(e.globalSearchEnabled$),i=yo(e.globalSearchActive$),o=ft(null);return"invisible-loading"===n.type?Gs(O,{}):"loading"===n.type?Gs(ty,{}):"unknown-user"===n.type||"auth-failed"===n.type||"wrong-app-id"===n.type||"server-error"===n.type||"unexpected-error"===n.type?Gs(ZR,{appId:t,chatboxState:n}):"expired-token"===n.type?Gs(ey,{}):"loaded"===n.type?Gs("div",{className:"t-conversation-list-content","t-menu-boundary":"root",ref:o,children:[r&&Gs(gI,{}),Gs(i?vI:AI,{}),Gs(_y,{containerRef:o})]}):Gs(O,{})}function vI(){const t=Cn(),e=An(),n=lD(),r=yo(t.t$),i=yo(t.globalSearchState$.messageStatus),o=yo(t.globalSearchState$.conversationStatus),s=yo(t.globalSearchStatus$);return Gs("div","searching"===s?{className:"t-global-search-results","t-status":"loading",children:r.SEARCH_SEARCHING}:"noResults"===s?{className:"t-global-search-results","t-status":"empty",children:r.SEARCH_NO_RESULTS}:{className:"t-global-search-results","t-status":"loaded",children:[Gs(xo,{if:()=>t.globalSearchState$.conversationResults.get().length,children:()=>Gs(O,{children:[Gs(e.GlobalSearchResultHeader,{common:n,type:"conversations",canLoadMore:"canLoadMore"===o,loadMore:()=>t.conversationSearch.loadMore()}),Gs(Lo,{each:t.globalSearchState$.conversationResults,children:r=>Gs(e.GlobalSearchResultItem,{common:n,conversation:r.get(),isSelected:r.id.get()===t.globalSearchState$.selectedResultId.get()})})]})}),Gs(xo,{if:()=>t.globalSearchState$.messageResults.get().length,children:()=>Gs(O,{children:[Gs(e.GlobalSearchResultHeader,{common:n,type:"messages",canLoadMore:"canLoadMore"===i,loadMore:()=>t.messageSearch.loadMore()}),Gs(Lo,{each:t.globalSearchState$.messageResults,children:r=>Gs(e.GlobalSearchResultItem,{common:n,conversation:r.conversation.get(),message:r.message.get(),isSelected:r.message.id.get()===t.globalSearchState$.selectedResultId.get()})})]})})]})}Xe();var OI=class extends pR{constructor(...t){super(...t),this.type="ConversationListStore",this.conversationListSubscription=null,this.conversationFilter$=Ao(void 0),this.currentConversationId$=Ao(null),this.conversationsArray$=Ao([]),this.conversationsMap$=Ao({}),this.globalSearchState$=Ao({query:"",selectedResultId:null,conversationResults:[],conversationStatus:"idle",messageResults:[],messageStatus:"idle"}),this.globalSearchStatus$=OR("idle",()=>{const t=this.globalSearchState$.conversationStatus.get(),e=this.globalSearchState$.messageStatus.get(),n=this.globalSearchState$.conversationResults.get(),r=this.globalSearchState$.messageResults.get(),i=n.length>0||r.length>0;return"searching"===t||"searching"===e?i?vR(1e3).then(()=>"searching"):"searching":i||"loadedAll"!==t||"loadedAll"!==e?"idle":"noResults"}),this.globalSearchEnabled$=Ao(()=>{var t;const e=this.app$.features.get();return null!==(t=null==e?void 0:e.includes("search_conv_and_messages"))&&void 0!==t&&t}),this.globalSearchActive$=Ao(()=>{const t=this.globalSearchEnabled$.get(),e=this.globalSearchState$.query.get().trim();return t&&e.length>=3}),this.highlightedStrings$=Ao(()=>{const t=this.globalSearchActive$.get(),e=this.globalSearchState$.query.get();return t?e.split(/\s+/).map(t=>t.trim()).filter(t=>t.length):[]})}setGlobalSearchQuery(t){this.globalSearchEnabled$.peek()?si(()=>{this.globalSearchState$.query.set(t),this.globalSearchActive$.peek()||this.globalSearchState$.selectedResultId.set(null)}):WA.error('The "Search messages & conversations" feature is only available to customers on Growth plan and above.')}cancelGlobalSearch(){this.globalSearchEnabled$.peek()?this.setGlobalSearchQuery(""):WA.error('The "Search messages & conversations" feature is only available to customers on Growth plan and above.')}},DI=class{constructor(t,e,n){this.session=t,this.store=e,this.onSelectConversation=n}async selectConversation(t,e){var n;if(t===this.store.currentConversationId$.peek()&&!e)return;si(()=>{if(this.store.globalSearchActive$.peek()){const n=null!=e?e:t;this.store.globalSearchState$.selectedResultId.set(n)}this.store.currentConversationId$.set(t)});const r=t&&e&&await this.session.conversation(t).message(e).get(),i=t&&(null!==(n=this.store.conversationsMap$.child(t).peek())&&void 0!==n?n:await this.session.conversation(t).get()),o={currentUser:this.store.currentUser$.peek(),conversation:i,...r&&{focusedMessage:r}};this.onSelectConversation(o)}jumpToHighlight(t){}},TI=l((t,e)=>{e.exports=function t(e,n){if(e===n)return!0;if(e&&n&&"object"==typeof e&&"object"==typeof n){if(e.constructor!==n.constructor)return!1;var r,i,o;if(Array.isArray(e)){if((r=e.length)!=n.length)return!1;for(i=r;0!==i--;)if(!t(e[i],n[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if((r=(o=Object.keys(e)).length)!==Object.keys(n).length)return!1;for(i=r;0!==i--;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;0!==i--;){var s=o[i];if(!("_owner"===s&&e.$$typeof||t(e[s],n[s])))return!1}return!0}return e!=e&&n!=n}});Xe();var RI=h(TI(),1);function yI(t,e){ht(t,function(t){const e=ft(void 0);return(0,RI.default)(t,e.current)||(e.current=t),e.current}(e))}Xe();const II=Qt(function(t,e){var n;const{__hostElement:r,onSelectConversation:i}=t;ht(()=>{var e;null===(e=t.__internalOnLoaded)||void 0===e||e.call(t)},[]);const o=Ky(),s=ft(null!=r?r:null);Xy(s);const a=Wy(i,r,["selectConversation","select-conversation","selectconversation","SelectConversation"]),l=Et(()=>new OI(t.appId,t.userId),[]);ht(()=>{si(()=>{l.extUserId$.set(t.userId),l.appId$.set(t.appId)})},[l,t.appId,t.userId]);const{session:c,fetcher:d}=Vy(l,t);ht(()=>{const t=d.subscribeToConversationListBaseData();return()=>t()},[d]),yI(()=>{const e=d.subscribeToConversationList(t.conversationFilter);return()=>e()},[d,t.conversationFilter]);const h=Et(()=>new DI(c,l,a),[c,l,a]),p=ft(void 0);ht(()=>{t.selectedConversationId!==p.current&&(p.current=t.selectedConversationId,l.currentConversationId$.set(t.selectedConversationId||null))},[l,t.selectedConversationId]),ht(()=>{const e=t.__hostElement;if(e)return l.currentConversationId$.onChange(({value:t})=>{e.selectedConversationId=t})},[l,t.__hostElement]),mt(e,()=>({controller:h}));const f=null!==(n=t.colorScheme)&&void 0!==n?n:"light";pt(()=>{null==r||r.setAttribute("t-color-scheme",f)},[r,f]);const m=_t(({error:e})=>Gs(ZR,{appId:t.appId,chatboxState:{type:"unexpected-error",error:e}}),[t.appId]),E=o?null:Gs(dR,{fallbackRender:m,children:Gs(In.Provider,{value:l,children:Gs(_n.Provider,{value:t.theme,children:Gs(Nn.Provider,{value:h,children:Gs(Dn.Provider,{value:c,children:Gs(SI,{appId:t.appId})})})})})});return r?E:Gs("div",{className:"t-conversation-list"+(t.className?` ${t.className}`:""),style:t.style,"t-color-scheme":f,ref:s,children:E})});Xe(),lt();var CI=new WeakMap,NI=new WeakSet,bI=class{constructor(t){Zy(this,NI),Qy(this,CI,void 0),eI(CI,this,t)}selectConversation(t,e){return wI.call(tI(NI,this)).selectConversation(t,e)}};function wI(){return nI(CI,this).current.controller}const kI=Qt(function(t,e){const n=ft(null),r=Et(()=>new bI(n),[]);mt(e,()=>r,[r]);const{theme:i,baseTheme:o,...s}=t,a=Et(()=>sR(o,i,"ConversationList"),[o,i]),l=`conversation-list|${t.userId}|${t.appId}`;return Gs(Ln.Provider,{value:r,children:g(II,{...s,key:l,theme:a,ref:n})})});function LI(t){return{render:function(e){!function(t,e,n){null==e.__k&&(e.textContent=""),V(t,e),"function"==typeof n&&n(),t&&t.__c}(e,t)},unmount:function(){!function(t){!!t.__k&&V(null,t)}(t)}}}Xe();const MI=new Promise(t=>{"undefined"!=typeof document&&"loading"===document.readyState?document.addEventListener("DOMContentLoaded",t,{once:!0}):t(void 0)});function PI(t,e,n,r){const i=new Map,o=[],s=[];for(const[t,e]of function(t){return Object.entries(t)}(n)){const n=[t,t.toLowerCase(),xI(t)];for(const e of n)i.set(e,t);["string","boolean","number"].includes(e.type)&&o.push(...n),!1!==e.required&&s.push(t)}class u extends HTMLElement{constructor(){super(),this._renderRequested=!1,this._props={},this._renderRoot=null,this._ref={current:null};for(const[t,e]of i)if(Object.hasOwnProperty.call(this,t)){const n=this[t];this.updateProp(e,n),delete this[t]}else this.hasAttribute(t)&&this.syncAttributeToProp(t)}updateProp(t,e){const{type:r}=n[t];if("boolean"===r&&"string"==typeof e?e="false"!==e:"number"===r&&"string"==typeof e&&(e=Number(e)),void 0===e){const e=t in this._props;return delete this._props[t],e}{const n=this._props[t]!==e;return this._props[t]=e,n}}syncAttributeToProp(t){const e=i.get(t);En(e,`Attribute "${t}" should have matching prop`);const n=this.getAttribute(t);return this.updateProp(e,n)}async requestRender(){this.isConnected&&!this._renderRequested&&(this._renderRequested=!0,this._renderRequested=await!1,this.render())}render(){this._renderRoot||(this._renderRoot=LI(this));const e=s.filter(t=>!(t in this._props));if(e.length>0)return r(e),void this._renderRoot.render(null);const n=Object.assign({},this._props),i=t=>{const e=[...Object.getOwnPropertyNames(t.current),...Object.getOwnPropertyNames(Object.getPrototypeOf(t.current))];for(const n of e)"constructor"!==n&&("function"==typeof t.current[n]?this[n]=(...e)=>(this._renderRequested&&this.render(),t.current[n](...e)):Object.defineProperty(this,n,{enumerable:!0,configurable:!0,get:()=>t.current[n]}))},o=t;$e(()=>{this._renderRoot.render(Gs(o,{...n,ref:this._ref,__hostElement:this,__internalOnLoaded:()=>{i(this._ref)}}))})}async connectedCallback(){await MI;for(const t of o)this.hasAttribute(t)&&this.syncAttributeToProp(t);this.requestRender()}disconnectedCallback(){this._renderRoot&&setTimeout(()=>{this._renderRoot&&(this._renderRoot.unmount(),this._renderRoot=null)})}attributeChangedCallback(t,e,n){e!==n&&this.syncAttributeToProp(t)&&this.requestRender()}}u.observedAttributes=o;const a={};for(const[t,e]of i)a[t]={set(t){this.updateProp(e,t)&&this.requestRender()},get(){return this._props[e]}};return Object.defineProperties(u.prototype,a),Object.defineProperty(u,"name",{value:e}),u}function xI(t){return t.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,e)=>(e?"-":"")+t.toLowerCase())}function FI(t){const{selectedConversationId:e,focusedMessageId:n,chatboxProps:r,conversationListProps:i,style:o,__hostElement:s}=t,{onDeleteMessage:a,onSendMessage:l,onMessageAction:c,onFocusMessage:d,onMissingBrowserPermission:h,...p}=r,{onSelectConversation:f,...m}=i,[E,_]=ut(e||null),[A,g]=ut(t.focusedMessageId||null);ht(()=>{_(e||null)},[e]),ht(()=>{g(t.focusedMessageId||null)},[t.focusedMessageId]);const S=Wy(a,s,["deleteMessage","delete-message","deletemessage","DeleteMessage"]),v=Wy(l,s,["sendMessage","send-message","sendmessage","SendMessage"]),D=Wy(c,s,["messageAction","message-action","messageaction","MessageAction"]),T=Wy(d,s,["focusMessage","focus-message","focusmessage","FocusMessage"]),R=Wy(h,s,["browserPermissionDenied","browser-permission-denied","browserpermissiondenied","BrowserPermissionDenied"]),y=Wy(f,s,["selectConversation","select-conversation","selectconversation","SelectConversation"]),I=_t(t=>{var e,n,i;(_(null!==(e=null===(n=t.conversation)||void 0===n?void 0:n.id)&&void 0!==e?e:null),t.conversation)&&(null===(i=r.ref.current)||void 0===i||i.focusMessageField());y(t)},[r.ref,y]),C=_t(t=>{var e,n;g(null!==(e=null===(n=t.message)||void 0===n?void 0:n.id)&&void 0!==e?e:null),T(t)},[T]);ht(()=>{var e;null===(e=t.__internalOnLoaded)||void 0===e||e.call(t)},[]);const N=ft(null!=s?s:null),[b,w]=ut(void 0);pt(()=>{var e;const n=null!==(e=t.mobileBreakPoint)&&void 0!==e?e:700,r=new ResizeObserver(t=>{const e=t[0].contentRect.width;w(e>=n)});return r.observe(N.current),()=>r.disconnect()},[t.mobileBreakPoint]);const k=_t(t=>{_(null),y({conversation:null,currentUser:t.currentUser})},[y]),L=E?"chatbox":"conversation-list";ht(()=>{s&&(b?s.removeAttribute("t-mobile-inbox"):s.setAttribute("t-mobile-inbox",L))},[b,s,L]);const M=void 0===b?null:Gs(O,{children:[Gs(kI,{...m,onSelectConversation:I,selectedConversationId:null!=E?E:void 0}),Gs(rI,{...p,onDeleteMessage:S,onSendMessage:v,onMessageAction:D,onFocusMessage:C,onMissingBrowserPermission:R,onBackButtonClick:k,conversationId:E,focusedMessageId:null!=A?A:void 0})]});return s?M:Gs("div",{ref:N,style:o,className:"t-inbox"+(t.className?` ${t.className}`:""),"t-mobile-inbox":b?void 0:L,children:M})}Xe(),Xe();var HI=new WeakMap,UI=class{constructor(t){Qy(this,HI,void 0),eI(HI,this,t)}get chatbox(){return nI(HI,this).current}};const BI=Qt(function(t,e){const n=ft(null),r=ft(null),i=Et(()=>new UI(n),[]);mt(e,()=>i,[i]);const{theme:o,baseTheme:s,colorScheme:a,appId:l,userId:c,__hostElement:d,__internalOnLoaded:h,beforeSendMessage:p,beforeBrowserPermissionPrompt:f,chatHeaderVisible:m,className:E,style:_,enterSendsMessage:A,messageFieldVisible:g,messageFieldSpellcheck:S,messageFieldPlaceholder:v,onDeleteMessage:O,onSendMessage:D,onMessageAction:T,onFocusMessage:R,onMissingBrowserPermission:y,onSelectConversation:I,themeCustom:C,host:N,focusedMessageId:b,selectedConversationId:w,conversationFilter:k,mobileBreakPoint:L,transformMentions:M}=t,P=Et(()=>sR(s,o,"Inbox"),[s,o]);return Gs(FI,{style:_,className:E,selectedConversationId:w,focusedMessageId:b,chatboxProps:{appId:l,userId:c,theme:P,colorScheme:a,host:N,focusedMessageId:b,enterSendsMessage:A,chatHeaderVisible:m,messageFieldVisible:g,messageFieldSpellcheck:S,messageFieldPlaceholder:v,beforeSendMessage:p,beforeBrowserPermissionPrompt:f,onDeleteMessage:O,onSendMessage:D,onMessageAction:T,onFocusMessage:R,onMissingBrowserPermission:y,themeCustom:C,transformMentions:M,ref:n},conversationListProps:{appId:l,userId:c,theme:P,colorScheme:a,host:N,onSelectConversation:I,conversationFilter:k,themeCustom:C,ref:r},mobileBreakPoint:L,__hostElement:d,__internalOnLoaded:h},`inbox|${t.userId}|${t.appId}`)});function jI(t,e){const n=JSON.stringify(e).replace(",",", ");WA.error(`Could not initialize ${t} because the following required props are missing: ${n}.`)}const VI=PI(rI,"ChatboxElement",{__internalOnLoaded:{type:"function",required:!1},appId:{type:"string"},userId:{type:"string"},conversationId:{type:"string"},baseTheme:{type:"string",required:!1},theme:{type:"object",required:!1},colorScheme:{type:"string",required:!1},token:{type:"string",required:!1},tokenFetcher:{type:"function",required:!1},host:{type:"string",required:!1},focusedMessageId:{type:"string",required:!1},enterSendsMessage:{type:"boolean",required:!1},chatHeaderVisible:{type:"boolean",required:!1},messageFieldVisible:{type:"boolean",required:!1},messageFieldSpellcheck:{type:"boolean",required:!1},messageFieldPlaceholder:{type:"string",required:!1},transformMentions:{type:"function",required:!1},onSendMessage:{type:"function",required:!1},beforeSendMessage:{type:"function",required:!1},onDeleteMessage:{type:"function",required:!1},onMessageAction:{type:"function",required:!1},onFocusMessage:{type:"function",required:!1},beforeBrowserPermissionPrompt:{type:"function",required:!1},onMissingBrowserPermission:{type:"function",required:!1},themeCustom:{type:"object",required:!1}},t=>jI("<t-chatbox>",t)),zI=PI(kI,"ConversationListElement",{__internalOnLoaded:{type:"function",required:!1},appId:{type:"string"},userId:{type:"string"},selectedConversationId:{type:"string",required:!1},baseTheme:{type:"string",required:!1},theme:{type:"object",required:!1},colorScheme:{type:"string",required:!1},token:{type:"string",required:!1},tokenFetcher:{type:"function",required:!1},host:{type:"string",required:!1},onSelectConversation:{type:"function",required:!1},conversationFilter:{type:"object",required:!1},themeCustom:{type:"object",required:!1}},t=>jI("<t-conversation-list>",t)),$I=PI(BI,"InboxElement",{__internalOnLoaded:{type:"function",required:!1},appId:{type:"string"},userId:{type:"string"},selectedConversationId:{type:"string",required:!1},focusedMessageId:{type:"string",required:!1},mobileBreakPoint:{type:"number",required:!1},baseTheme:{type:"string",required:!1},theme:{type:"object",required:!1},colorScheme:{type:"string",required:!1},host:{type:"string",required:!1},enterSendsMessage:{type:"boolean",required:!1},chatHeaderVisible:{type:"boolean",required:!1},messageFieldVisible:{type:"boolean",required:!1},messageFieldSpellcheck:{type:"boolean",required:!1},messageFieldPlaceholder:{type:"string",required:!1},transformMentions:{type:"function",required:!1},onSendMessage:{type:"function",required:!1},beforeSendMessage:{type:"function",required:!1},onDeleteMessage:{type:"function",required:!1},onMessageAction:{type:"function",required:!1},onFocusMessage:{type:"function",required:!1},beforeBrowserPermissionPrompt:{type:"function",required:!1},onMissingBrowserPermission:{type:"function",required:!1},onSelectConversation:{type:"function",required:!1},conversationFilter:{type:"object",required:!1},themeCustom:{type:"object",required:!1}},t=>jI("<t-inbox>",t)),YI=fT,GI=tR;customElements.get("t-chatbox")||customElements.define("t-chatbox",VI),customElements.get("t-conversation-list")||customElements.define("t-conversation-list",zI),customElements.get("t-inbox")||customElements.define("t-inbox",$I);export{ka as AudioPlayer,VI as ChatboxElement,zI as ConversationListElement,J_ as Editor,rg as EmojiPicker,bg as EmojiSuggestBar,UA as Highlightable,Na as Icon,$I as InboxElement,ZO as KeyboardNavigationListItem,$O as MentionSuggestList,JO as MenuItem,BA as MessageContent,KO as PopoverButton,zt as Preact,ig as ReactionPicker,tD as SearchInput,HA as Text,dD as VirtualMessage,iD as Waveform,GI as classicTheme,YI as defaultTheme,AD as formatDuration,mD as formatFilesize,ED as getGoogleMapsUrls,pD as getPhotoUrlWithFallback,hD as getRandomColor,fD as getSVGForInitials,yD as html,ID as useParticipants,CD as useReactions,_D as useTimeAgo,SD as userFriendlyDate};
|