@talkjs/web-components 0.3.2 → 0.3.3

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.
Files changed (3) hide show
  1. package/default.cjs +24 -24
  2. package/default.js +2345 -2345
  3. package/package.json +1 -1
package/default.cjs CHANGED
@@ -1,24 +1,24 @@
1
- "use client";"use strict";var Yu=t=>{throw TypeError(t)};var Gu=(t,e,n)=>e.has(t)||Yu("Cannot "+n);var _e=(t,e,n)=>(Gu(t,e,"read from private field"),n?n.call(t):e.get(t)),Cr=(t,e,n)=>e.has(t)?Yu("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),Io=(t,e,n,r)=>(Gu(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const nA=require("@talkjs/core"),Mf=Object.freeze(Object.defineProperty({__proto__:null,get AfterMessages(){return Ey},get AudioBlock(){return vy},get Avatar(){return Cy},get BeforeMessages(){return my},get ChatHeader(){return iy},get ChatSearchBox(){return Sy},get CompactMessageContent(){return gy},get ConversationImage(){return Ny},get ConversationListItem(){return My},get FileBlock(){return Oy},get GlobalSearchBox(){return Fy},get GlobalSearchResultHeader(){return Hy},get GlobalSearchResultItem(){return xy},get GroupChatImage(){return by},get ImageBlock(){return Dy},get LocationBlock(){return Ty},get Message(){return ay},get MessageActionMenu(){return dy},get MessageDivider(){return py},get MessageField(){return hy},get MessageListFooter(){return fy},get MessageListHeader(){return sy},get NoConversationSelected(){return jy},get RecordingPreview(){return Uy},get ReferencedMessage(){return wy},get ReplyBar(){return ky},get TextBlock(){return Ry},get TimeAgo(){return Ly},get VideoBlock(){return yy},get VoiceBlock(){return Iy},get VoiceRecorder(){return By}},Symbol.toStringTag,{value:"Module"}));var lo,ne,Pf,Jn,Wu,xf,Ff,Hf,Ec,gl,Al,Uf,Hi={},Bf=[],rA=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Ui=Array.isArray;function Gt(t,e){for(var n in e)t[n]=e[n];return t}function Sl(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function me(t,e,n){var r,i,o,s={};for(o in e)o=="key"?r=e[o]:o=="ref"?i=e[o]:s[o]=e[o];if(arguments.length>2&&(s.children=arguments.length>3?lo.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(o in t.defaultProps)s[o]===void 0&&(s[o]=t.defaultProps[o]);return Ci(t,s,r,i,null)}function Ci(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:i==null?++Pf:i,__i:-1,__u:0};return i==null&&ne.vnode!=null&&ne.vnode(o),o}function jf(){return{current:null}}function ie(t){return t.children}function bt(t,e){this.props=t,this.context=e}function Kr(t,e){if(e==null)return t.__?Kr(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null)return n.__e;return typeof t.type=="function"?Kr(t):null}function Vf(t){var e,n;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null){t.__e=t.__c.base=n.__e;break}return Vf(t)}}function vl(t){(!t.__d&&(t.__d=!0)&&Jn.push(t)&&!rs.__r++||Wu!=ne.debounceRendering)&&((Wu=ne.debounceRendering)||xf)(rs)}function rs(){for(var t,e,n,r,i,o,s,a=1;Jn.length;)Jn.length>a&&Jn.sort(Ff),t=Jn.shift(),a=Jn.length,t.__d&&(n=void 0,r=void 0,i=(r=(e=t).__v).__e,o=[],s=[],e.__P&&((n=Gt({},r)).__v=r.__v+1,ne.vnode&&ne.vnode(n),_c(e.__P,n,r,e.__n,e.__P.namespaceURI,32&r.__u?[i]:null,o,i==null?Kr(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&&Vf(n)));rs.__r=0}function Xu(t,e,n,r,i,o,s,a,l,u,c){var d,h,p,m,_,E,g,A=r&&r.__k||Bf,S=e.length;for(l=(function(v,D,y,R,I){var O,T,C,N,k,b=y.length,L=b,x=0;for(v.__k=new Array(I),O=0;O<I;O++)(T=D[O])!=null&&typeof T!="boolean"&&typeof T!="function"?(typeof T=="string"||typeof T=="number"||typeof T=="bigint"||T.constructor==String?T=v.__k[O]=Ci(null,T,null,null,null):Ui(T)?T=v.__k[O]=Ci(ie,{children:T},null,null,null):T.constructor==null&&T.__b>0?T=v.__k[O]=Ci(T.type,T.props,T.key,T.ref?T.ref:null,T.__v):v.__k[O]=T,N=O+x,T.__=v,T.__b=v.__b+1,C=null,(k=T.__i=iA(T,y,N,L))!=-1&&(L--,(C=y[k])&&(C.__u|=2)),C==null||C.__v==null?(k==-1&&(I>b?x--:I<b&&x++),typeof T.type!="function"&&(T.__u|=4)):k!=N&&(k==N-1?x--:k==N+1?x++:(k>N?x--:x++,T.__u|=4))):v.__k[O]=null;if(L)for(O=0;O<b;O++)(C=y[O])!=null&&!(2&C.__u)&&(C.__e==R&&(R=Kr(C)),Gf(C,C));return R})(n,e,A,l,S),d=0;d<S;d++)(p=n.__k[d])!=null&&(h=p.__i==-1?Hi:A[p.__i]||Hi,p.__i=d,E=_c(t,p,h,i,o,s,a,l,u,c),m=p.__e,p.ref&&h.ref!=p.ref&&(h.ref&&gc(h.ref,null,p),c.push(p.ref,p.__c||m,p)),_==null&&m!=null&&(_=m),(g=!!(4&p.__u))||h.__k===p.__k?l=zf(p,l,t,g):typeof p.type=="function"&&E!==void 0?l=E:m&&(l=m.nextSibling),p.__u&=-7);return n.__e=_,l}function zf(t,e,n,r){var i,o;if(typeof t.type=="function"){for(i=t.__k,o=0;i&&o<i.length;o++)i[o]&&(i[o].__=t,e=zf(i[o],e,n,r));return e}t.__e!=e&&(r&&(e&&t.type&&!e.parentNode&&(e=Kr(t)),n.insertBefore(t.__e,e||null)),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function mn(t,e){return e=e||[],t==null||typeof t=="boolean"||(Ui(t)?t.some(function(n){mn(n,e)}):e.push(t)),e}function iA(t,e,n,r){var i,o,s,a=t.key,l=t.type,u=e[n],c=u!=null&&!(2&u.__u);if(u===null&&a==null||c&&a==u.key&&l==u.type)return n;if(r>(c?1:0)){for(i=n-1,o=n+1;i>=0||o<e.length;)if((u=e[s=i>=0?i--:o++])!=null&&!(2&u.__u)&&a==u.key&&l==u.type)return s}return-1}function Ku(t,e,n){e[0]=="-"?t.setProperty(e,n==null?"":n):t[e]=n==null?"":typeof n!="number"||rA.test(e)?n:n+"px"}function Co(t,e,n,r,i){var o,s;e:if(e=="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof r=="string"&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||Ku(t.style,e,"");if(n)for(e in n)r&&n[e]==r[e]||Ku(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")o=e!=(e=e.replace(Hf,"$1")),s=e.toLowerCase(),e=s in t||e=="onFocusOut"||e=="onFocusIn"?s.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+o]=n,n?r?n.u=r.u:(n.u=Ec,t.addEventListener(e,o?Al:gl,o)):t.removeEventListener(e,o?Al:gl,o);else{if(i=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=n==null?"":n;break e}catch(a){}typeof n=="function"||(n==null||n===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&n==1?"":n))}}function qu(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e.t==null)e.t=Ec++;else if(e.t<n.u)return;return n(ne.event?ne.event(e):e)}}}function _c(t,e,n,r,i,o,s,a,l,u){var c,d,h,p,m,_,E,g,A,S,v,D,y,R,I,O,T,C=e.type;if(e.constructor!=null)return null;128&n.__u&&(l=!!(32&n.__u),o=[a=e.__e=n.__e]),(c=ne.__b)&&c(e);e:if(typeof C=="function")try{if(g=e.props,A="prototype"in C&&C.prototype.render,S=(c=C.contextType)&&r[c.__c],v=c?S?S.props.value:c.__:r,n.__c?E=(d=e.__c=n.__c).__=d.__E:(A?e.__c=d=new C(g,v):(e.__c=d=new bt(g,v),d.constructor=C,d.render=oA),S&&S.sub(d),d.state||(d.state={}),d.__n=r,h=d.__d=!0,d.__h=[],d._sb=[]),A&&d.__s==null&&(d.__s=d.state),A&&C.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=Gt({},d.__s)),Gt(d.__s,C.getDerivedStateFromProps(g,d.__s))),p=d.props,m=d.state,d.__v=e,h)A&&C.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),A&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(A&&C.getDerivedStateFromProps==null&&g!==p&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(g,v),e.__v==n.__v||!d.__e&&d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(g,d.__s,v)===!1){for(e.__v!=n.__v&&(d.props=g,d.state=d.__s,d.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(N){N&&(N.__=e)}),D=0;D<d._sb.length;D++)d.__h.push(d._sb[D]);d._sb=[],d.__h.length&&s.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(g,d.__s,v),A&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(p,m,_)})}if(d.context=v,d.props=g,d.__P=t,d.__e=!1,y=ne.__r,R=0,A){for(d.state=d.__s,d.__d=!1,y&&y(e),c=d.render(d.props,d.state,d.context),I=0;I<d._sb.length;I++)d.__h.push(d._sb[I]);d._sb=[]}else do d.__d=!1,y&&y(e),c=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++R<25);d.state=d.__s,d.getChildContext!=null&&(r=Gt(Gt({},r),d.getChildContext())),A&&!h&&d.getSnapshotBeforeUpdate!=null&&(_=d.getSnapshotBeforeUpdate(p,m)),O=c,c!=null&&c.type===ie&&c.key==null&&(O=Yf(c.props.children)),a=Xu(t,Ui(O)?O:[O],e,n,r,i,o,s,a,l,u),d.base=e.__e,e.__u&=-161,d.__h.length&&s.push(d),E&&(d.__E=d.__=null)}catch(N){if(e.__v=null,l||o!=null)if(N.then){for(e.__u|=l?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;o[o.indexOf(a)]=null,e.__e=a}else{for(T=o.length;T--;)Sl(o[T]);Ol(e)}else e.__e=n.__e,e.__k=n.__k,N.then||Ol(e);ne.__e(N,e,n)}else o==null&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):a=e.__e=(function(N,k,b,L,x,M,U,V,W){var $,oe,le,ce,he,tt,Vt,nt=b.props||Hi,Oe=k.props,Te=k.type;if(Te=="svg"?x="http://www.w3.org/2000/svg":Te=="math"?x="http://www.w3.org/1998/Math/MathML":x||(x="http://www.w3.org/1999/xhtml"),M!=null){for($=0;$<M.length;$++)if((he=M[$])&&"setAttribute"in he==!!Te&&(Te?he.localName==Te:he.nodeType==3)){N=he,M[$]=null;break}}if(N==null){if(Te==null)return document.createTextNode(Oe);N=document.createElementNS(x,Te,Oe.is&&Oe),V&&(ne.__m&&ne.__m(k,M),V=!1),M=null}if(Te==null)nt===Oe||V&&N.data==Oe||(N.data=Oe);else{if(M=M&&lo.call(N.childNodes),!V&&M!=null)for(nt={},$=0;$<N.attributes.length;$++)nt[(he=N.attributes[$]).name]=he.value;for($ in nt)if(he=nt[$],$!="children"){if($=="dangerouslySetInnerHTML")le=he;else if(!($ in Oe)){if($=="value"&&"defaultValue"in Oe||$=="checked"&&"defaultChecked"in Oe)continue;Co(N,$,null,he,x)}}for($ in Oe)he=Oe[$],$=="children"?ce=he:$=="dangerouslySetInnerHTML"?oe=he:$=="value"?tt=he:$=="checked"?Vt=he:V&&typeof he!="function"||nt[$]===he||Co(N,$,he,nt[$],x);if(oe)V||le&&(oe.__html==le.__html||oe.__html==N.innerHTML)||(N.innerHTML=oe.__html),k.__k=[];else if(le&&(N.innerHTML=""),Xu(k.type=="template"?N.content:N,Ui(ce)?ce:[ce],k,b,L,Te=="foreignObject"?"http://www.w3.org/1999/xhtml":x,M,U,M?M[0]:b.__k&&Kr(b,0),V,W),M!=null)for($=M.length;$--;)Sl(M[$]);V||($="value",Te=="progress"&&tt==null?N.removeAttribute("value"):tt!=null&&(tt!==N[$]||Te=="progress"&&!tt||Te=="option"&&tt!=nt[$])&&Co(N,$,tt,nt[$],x),$="checked",Vt!=null&&Vt!=N[$]&&Co(N,$,Vt,nt[$],x))}return N})(n.__e,e,n,r,i,o,s,l,u);return(c=ne.diffed)&&c(e),128&e.__u?void 0:a}function Ol(t){t&&t.__c&&(t.__c.__e=!0),t&&t.__k&&t.__k.forEach(Ol)}function $f(t,e,n){for(var r=0;r<n.length;r++)gc(n[r],n[++r],n[++r]);ne.__c&&ne.__c(e,t),t.some(function(i){try{t=i.__h,i.__h=[],t.some(function(o){o.call(i)})}catch(o){ne.__e(o,i.__v)}})}function Yf(t){return typeof t!="object"||t==null||t.__b&&t.__b>0?t:Ui(t)?t.map(Yf):Gt({},t)}function gc(t,e,n){try{if(typeof t=="function"){var r=typeof t.__u=="function";r&&t.__u(),r&&e==null||(t.__u=t(e))}else t.current=e}catch(i){ne.__e(i,n)}}function Gf(t,e,n){var r,i;if(ne.unmount&&ne.unmount(t),(r=t.ref)&&(r.current&&r.current!=t.__e||gc(r,null,e)),(r=t.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){ne.__e(o,e)}r.base=r.__P=null}if(r=t.__k)for(i=0;i<r.length;i++)r[i]&&Gf(r[i],e,n||typeof t.type!="function");n||Sl(t.__e),t.__c=t.__=t.__e=void 0}function oA(t,e,n){return this.constructor(t,n)}function Bi(t,e,n){var r,i,o,s;e==document&&(e=document.documentElement),ne.__&&ne.__(t,e),i=(r=typeof n=="function")?null:n&&n.__k||e.__k,o=[],s=[],_c(e,t=(!r&&n||e).__k=me(ie,null,[t]),i||Hi,Hi,e.namespaceURI,!r&&n?[n]:i?null:e.firstChild?lo.call(e.childNodes):null,o,!r&&n?n:i?i.__e:e.firstChild,r,s),$f(o,t,s)}function Wf(t,e){Bi(t,e,Wf)}function sA(t,e,n){var r,i,o,s,a=Gt({},t.props);for(o in t.type&&t.type.defaultProps&&(s=t.type.defaultProps),e)o=="key"?r=e[o]:o=="ref"?i=e[o]:a[o]=e[o]===void 0&&s!=null?s[o]:e[o];return arguments.length>2&&(a.children=arguments.length>3?lo.call(arguments,2):n),Ci(t.type,a,r||t.key,i||t.ref,null)}function si(t){function e(n){var r,i;return this.getChildContext||(r=new Set,(i={})[e.__c]=this,this.getChildContext=function(){return i},this.componentWillUnmount=function(){r=null},this.shouldComponentUpdate=function(o){this.props.value!=o.value&&r.forEach(function(s){s.__e=!0,vl(s)})},this.sub=function(o){r.add(o);var s=o.componentWillUnmount;o.componentWillUnmount=function(){r&&r.delete(o),s&&s.call(o)}}),n.children}return e.__c="__cC"+Uf++,e.__=t,e.Provider=e.__l=(e.Consumer=function(n,r){return n.children(r)}).contextType=e,e}lo=Bf.slice,ne={__e:function(t,e,n,r){for(var i,o,s;e=e.__;)if((i=e.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(t)),s=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(t,r||{}),s=i.__d),s)return i.__E=i}catch(a){t=a}throw t}},Pf=0,bt.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=Gt({},this.state),typeof t=="function"&&(t=t(Gt({},n),this.props)),t&&Gt(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),vl(this))},bt.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),vl(this))},bt.prototype.render=ie,Jn=[],xf=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Ff=function(t,e){return t.__v.__b-e.__v.__b},rs.__r=0,Hf=/(PointerCapture)$|Capture$/i,Ec=0,gl=qu(!1),Al=qu(!0),Uf=0;var aA=0;function f(t,e,n,r,i,o){e||(e={});var s,a,l=e;if("ref"in l)for(a in l={},e)a=="ref"?s=e[a]:l[a]=e[a];var u={type:t,props:l,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--aA,__i:-1,__u:0,__source:i,__self:o};if(typeof t=="function"&&(s=t.defaultProps))for(a in s)l[a]===void 0&&(l[a]=s[a]);return ne.vnode&&ne.vnode(u),u}var gn,Ee,Sa,Ju,qr=0,Xf=[],Se=ne,Zu=Se.__b,Qu=Se.__r,ed=Se.diffed,td=Se.__c,nd=Se.unmount,rd=Se.__;function Ar(t,e){Se.__h&&Se.__h(Ee,t,qr||e),qr=0;var n=Ee.__H||(Ee.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function ee(t){return qr=1,Ps(Kf,t)}function Ps(t,e,n){var r=Ar(gn++,2);if(r.t=t,!r.__c&&(r.__=[n?n(e):Kf(void 0,e),function(a){var l=r.__N?r.__N[0]:r.__[0],u=r.t(l,a);l!==u&&(r.__N=[u,r.__[1]],r.__c.setState({}))}],r.__c=Ee,!Ee.__f)){var i=function(a,l,u){if(!r.__c.__H)return!0;var c=r.__c.__H.__.filter(function(h){return!!h.__c});if(c.every(function(h){return!h.__N}))return!o||o.call(this,a,l,u);var d=r.__c.props!==a;return c.forEach(function(h){if(h.__N){var p=h.__[0];h.__=h.__N,h.__N=void 0,p!==h.__[0]&&(d=!0)}}),o&&o.call(this,a,l,u)||d};Ee.__f=!0;var o=Ee.shouldComponentUpdate,s=Ee.componentWillUpdate;Ee.componentWillUpdate=function(a,l,u){if(this.__e){var c=o;o=void 0,i(a,l,u),o=c}s&&s.call(this,a,l,u)},Ee.shouldComponentUpdate=i}return r.__N||r.__}function z(t,e){var n=Ar(gn++,3);!Se.__s&&Sc(n.__H,e)&&(n.__=t,n.u=e,Ee.__H.__h.push(n))}function We(t,e){var n=Ar(gn++,4);!Se.__s&&Sc(n.__H,e)&&(n.__=t,n.u=e,Ee.__h.push(n))}function X(t){return qr=5,Z(function(){return{current:t}},[])}function Sn(t,e,n){qr=6,We(function(){if(typeof t=="function"){var r=t(e());return function(){t(null),r&&typeof r=="function"&&r()}}if(t)return t.current=e(),function(){return t.current=null}},n==null?n:n.concat(t))}function Z(t,e){var n=Ar(gn++,7);return Sc(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function q(t,e){return qr=8,Z(function(){return t},e)}function Sr(t){var e=Ee.context[t.__c],n=Ar(gn++,9);return n.c=t,e?(n.__==null&&(n.__=!0,e.sub(Ee)),e.props.value):t.__}function Ac(t,e){Se.useDebugValue&&Se.useDebugValue(e?e(t):t)}function xs(){var t=Ar(gn++,11);if(!t.__){for(var e=Ee.__v;e!==null&&!e.__m&&e.__!==null;)e=e.__;var n=e.__m||(e.__m=[0,0]);t.__="P"+n[0]+"-"+n[1]++}return t.__}function lA(){for(var t;t=Xf.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach($o),t.__H.__h.forEach(Dl),t.__H.__h=[]}catch(e){t.__H.__h=[],Se.__e(e,t.__v)}}Se.__b=function(t){Ee=null,Zu&&Zu(t)},Se.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),rd&&rd(t,e)},Se.__r=function(t){Qu&&Qu(t),gn=0;var e=(Ee=t.__c).__H;e&&(Sa===Ee?(e.__h=[],Ee.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(e.__h.forEach($o),e.__h.forEach(Dl),e.__h=[],gn=0)),Sa=Ee},Se.diffed=function(t){ed&&ed(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(Xf.push(e)!==1&&Ju===Se.requestAnimationFrame||((Ju=Se.requestAnimationFrame)||cA)(lA)),e.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),Sa=Ee=null},Se.__c=function(t,e){e.some(function(n){try{n.__h.forEach($o),n.__h=n.__h.filter(function(r){return!r.__||Dl(r)})}catch(r){e.some(function(i){i.__h&&(i.__h=[])}),e=[],Se.__e(r,n.__v)}}),td&&td(t,e)},Se.unmount=function(t){nd&&nd(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{$o(r)}catch(i){e=i}}),n.__H=void 0,e&&Se.__e(e,n.__v))};var id=typeof requestAnimationFrame=="function";function cA(t){var e,n=function(){clearTimeout(r),id&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,35);id&&(e=requestAnimationFrame(n))}function $o(t){var e=Ee,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),Ee=e}function Dl(t){var e=Ee;t.__c=t.__(),Ee=e}function Sc(t,e){return!t||t.length!==e.length||e.some(function(n,r){return n!==t[r]})}function Kf(t,e){return typeof e=="function"?e(t):e}function qf(t,e){for(var n in e)t[n]=e[n];return t}function Tl(t,e){for(var n in t)if(n!=="__source"&&!(n in e))return!0;for(var r in e)if(r!=="__source"&&t[r]!==e[r])return!0;return!1}function vc(t,e){var n=e(),r=ee({t:{__:n,u:e}}),i=r[0].t,o=r[1];return We(function(){i.__=n,i.u=e,va(i)&&o({t:i})},[t,n,e]),z(function(){return va(i)&&o({t:i}),t(function(){va(i)&&o({t:i})})},[t]),n}function va(t){var e,n,r=t.u,i=t.__;try{var o=r();return!((e=i)===(n=o)&&(e!==0||1/e==1/n)||e!=e&&n!=n)}catch(s){return!0}}function Oc(t){t()}function Dc(t){return t}function Tc(){return[!1,Oc]}var Rc=We;function is(t,e){this.props=t,this.context=e}function ur(t,e){function n(i){var o=this.props.ref,s=o==i.ref;return!s&&o&&(o.call?o(null):o.current=null),e?!e(this.props,i)||!s:Tl(this.props,i)}function r(i){return this.shouldComponentUpdate=n,me(t,i)}return r.displayName="Memo("+(t.displayName||t.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r.type=t,r}(is.prototype=new bt).isPureReactComponent=!0,is.prototype.shouldComponentUpdate=function(t,e){return Tl(this.props,t)||Tl(this.state,e)};var od=ne.__b;ne.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),od&&od(t)};var uA=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function _t(t){function e(n){var r=qf({},n);return delete r.ref,t(r,n.ref||null)}return e.$$typeof=uA,e.render=t,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var sd=function(t,e){return t==null?null:mn(mn(t).map(e))},Jf={map:sd,forEach:sd,count:function(t){return t?mn(t).length:0},only:function(t){var e=mn(t);if(e.length!==1)throw"Children.only";return e[0]},toArray:mn},dA=ne.__e;ne.__e=function(t,e,n,r){if(t.then){for(var i,o=e;o=o.__;)if((i=o.__c)&&i.__c)return e.__e==null&&(e.__e=n.__e,e.__k=n.__k),i.__c(t,e)}dA(t,e,n,r)};var ad=ne.unmount;function Zf(t,e,n){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),t.__c.__H=null),(t=qf({},t)).__c!=null&&(t.__c.__P===n&&(t.__c.__P=e),t.__c.__e=!0,t.__c=null),t.__k=t.__k&&t.__k.map(function(r){return Zf(r,e,n)})),t}function Qf(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(r){return Qf(r,e,n)}),t.__c&&t.__c.__P===e&&(t.__e&&n.appendChild(t.__e),t.__c.__e=!0,t.__c.__P=n)),t}function Ni(){this.__u=0,this.o=null,this.__b=null}function em(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function tm(t){var e,n,r,i=null;function o(s){if(e||(e=t()).then(function(a){a&&(i=a.default||a),r=!0},function(a){n=a,r=!0}),n)throw n;if(!r)throw e;return i?me(i,s):null}return o.displayName="Lazy",o.__f=!0,o}function Pr(){this.i=null,this.l=null}ne.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),ad&&ad(t)},(Ni.prototype=new bt).__c=function(t,e){var n=e.__c,r=this;r.o==null&&(r.o=[]),r.o.push(n);var i=em(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 l=r.state.__a;r.__v.__k[0]=Qf(l,l.__c.__P,l.__c.__O)}var u;for(r.setState({__a:r.__b=null});u=r.o.pop();)u.forceUpdate()}};r.__u++||32&e.__u||r.setState({__a:r.__b=r.__v.__k[0]}),t.then(s,s)},Ni.prototype.componentWillUnmount=function(){this.o=[]},Ni.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]=Zf(this.__b,n,r.__O=r.__P)}this.__b=null}var i=e.__a&&me(ie,null,t.fallback);return i&&(i.__u&=-33),[me(ie,null,e.__a?null:t.children),i]};var ld=function(t,e,n){if(++n[1]===n[0]&&t.l.delete(e),t.props.revealOrder&&(t.props.revealOrder[0]!=="t"||!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]}};function hA(t){return this.getChildContext=function(){return t.context},t.children}function pA(t){var e=this,n=t.h;if(e.componentWillUnmount=function(){Bi(null,e.v),e.v=null,e.h=null},e.h&&e.h!==n&&e.componentWillUnmount(),!e.v){for(var r=e.__v;r!==null&&!r.__m&&r.__!==null;)r=r.__;e.h=n,e.v={nodeType:1,parentNode:n,childNodes:[],__k:{__m:r.__m},contains:function(){return!0},insertBefore:function(i,o){this.childNodes.push(i),e.h.insertBefore(i,o)},removeChild:function(i){this.childNodes.splice(this.childNodes.indexOf(i)>>>1,1),e.h.removeChild(i)}}}Bi(me(hA,{context:e.context},t.__v),e.v)}function yc(t,e){var n=me(pA,{__v:t,h:e});return n.containerInfo=e,n}(Pr.prototype=new bt).__a=function(t){var e=this,n=em(e.__v),r=e.l.get(t);return r[0]++,function(i){var o=function(){e.props.revealOrder?(r.push(i),ld(e,t,r)):i()};n?n(o):o()}},Pr.prototype.render=function(t){this.i=null,this.l=new Map;var e=mn(t.children);t.revealOrder&&t.revealOrder[0]==="b"&&e.reverse();for(var n=e.length;n--;)this.l.set(e[n],this.i=[1,0,this.i]);return t.children},Pr.prototype.componentDidUpdate=Pr.prototype.componentDidMount=function(){var t=this;this.l.forEach(function(e,n){ld(t,n,e)})};var nm=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.element")||60103,fA=/^(?: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]/,mA=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,EA=/[A-Z0-9]/g,_A=typeof document!="undefined",gA=function(t){return(typeof Symbol!="undefined"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(t)};function Ic(t,e,n){return e.__k==null&&(e.textContent=""),Bi(t,e),typeof n=="function"&&n(),t?t.__c:null}function rm(t,e,n){return Wf(t,e),typeof n=="function"&&n(),t?t.__c:null}bt.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(bt.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})});var cd=ne.event;function AA(){}function SA(){return this.cancelBubble}function vA(){return this.defaultPrevented}ne.event=function(t){return cd&&(t=cd(t)),t.persist=AA,t.isPropagationStopped=SA,t.isDefaultPrevented=vA,t.nativeEvent=t};var Cc,OA={enumerable:!1,configurable:!0,get:function(){return this.class}},ud=ne.vnode;ne.vnode=function(t){typeof t.type=="string"&&(function(e){var n=e.props,r=e.type,i={},o=r.indexOf("-")===-1;for(var s in n){var a=n[s];if(!(s==="value"&&"defaultValue"in n&&a==null||_A&&s==="children"&&r==="noscript"||s==="class"||s==="className")){var l=s.toLowerCase();s==="defaultValue"&&"value"in n&&n.value==null?s="value":s==="download"&&a===!0?a="":l==="translate"&&a==="no"?a=!1:l[0]==="o"&&l[1]==="n"?l==="ondoubleclick"?s="ondblclick":l!=="onchange"||r!=="input"&&r!=="textarea"||gA(n.type)?l==="onfocus"?s="onfocusin":l==="onblur"?s="onfocusout":mA.test(s)&&(s=l):l=s="oninput":o&&fA.test(s)?s=s.replace(EA,"-$&").toLowerCase():a===null&&(a=void 0),l==="oninput"&&i[s=l]&&(s="oninputCapture"),i[s]=a}}r=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=mn(n.children).forEach(function(u){u.props.selected=i.value.indexOf(u.props.value)!=-1})),r=="select"&&i.defaultValue!=null&&(i.value=mn(n.children).forEach(function(u){u.props.selected=i.multiple?i.defaultValue.indexOf(u.props.value)!=-1:i.defaultValue==u.props.value})),n.class&&!n.className?(i.class=n.class,Object.defineProperty(i,"className",OA)):(n.className&&!n.class||n.class&&n.className)&&(i.class=i.className=n.className),e.props=i})(t),t.$$typeof=nm,ud&&ud(t)};var dd=ne.__r;ne.__r=function(t){dd&&dd(t),Cc=t.__c};var hd=ne.diffed;ne.diffed=function(t){hd&&hd(t);var e=t.props,n=t.__e;n!=null&&t.type==="textarea"&&"value"in e&&e.value!==n.value&&(n.value=e.value==null?"":e.value),Cc=null};var im={ReactCurrentDispatcher:{current:{readContext:function(t){return Cc.__n[t.__c].props.value},useCallback:q,useContext:Sr,useDebugValue:Ac,useDeferredValue:Dc,useEffect:z,useId:xs,useImperativeHandle:Sn,useInsertionEffect:Rc,useLayoutEffect:We,useMemo:Z,useReducer:Ps,useRef:X,useState:ee,useSyncExternalStore:vc,useTransition:Tc}}};function om(t){return me.bind(null,t)}function co(t){return!!t&&t.$$typeof===nm}function sm(t){return co(t)&&t.type===ie}function am(t){return!!t&&!!t.displayName&&(typeof t.displayName=="string"||t.displayName instanceof String)&&t.displayName.startsWith("Memo(")}function lm(t){return co(t)?sA.apply(null,arguments):t}function Nc(t){return!!t.__k&&(Bi(null,t),!0)}function cm(t){return t&&(t.base||t.nodeType===1&&t)||null}var um=function(t,e){return t(e)},Fs=function(t,e){return t(e)},dm=ie,hm=co,F={useState:ee,useId:xs,useReducer:Ps,useEffect:z,useLayoutEffect:We,useInsertionEffect:Rc,useTransition:Tc,useDeferredValue:Dc,useSyncExternalStore:vc,startTransition:Oc,useRef:X,useImperativeHandle:Sn,useMemo:Z,useCallback:q,useContext:Sr,useDebugValue:Ac,version:"18.3.1",Children:Jf,render:Ic,hydrate:rm,unmountComponentAtNode:Nc,createPortal:yc,createElement:me,createContext:si,createFactory:om,cloneElement:lm,createRef:jf,Fragment:ie,isValidElement:co,isElement:hm,isFragment:sm,isMemo:am,findDOMNode:cm,Component:bt,PureComponent:is,memo:ur,forwardRef:_t,flushSync:Fs,unstable_batchedUpdates:um,StrictMode:dm,Suspense:Ni,SuspenseList:Pr,lazy:tm,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:im};const bc=Object.freeze(Object.defineProperty({__proto__:null,Children:Jf,Component:bt,Fragment:ie,PureComponent:is,StrictMode:dm,Suspense:Ni,SuspenseList:Pr,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:im,cloneElement:lm,createContext:si,createElement:me,createFactory:om,createPortal:yc,createRef:jf,default:F,findDOMNode:cm,flushSync:Fs,forwardRef:_t,hydrate:rm,isElement:hm,isFragment:sm,isMemo:am,isValidElement:co,lazy:tm,memo:ur,render:Ic,startTransition:Oc,unmountComponentAtNode:Nc,unstable_batchedUpdates:um,useCallback:q,useContext:Sr,useDebugValue:Ac,useDeferredValue:Dc,useEffect:z,useErrorBoundary:function(t){var e=Ar(gn++,10),n=ee();return e.__=t,Ee.componentDidCatch||(Ee.componentDidCatch=function(r,i){e.__&&e.__(r,i),n[1](r)}),[n[0],function(){n[1](void 0)}]},useId:xs,useImperativeHandle:Sn,useInsertionEffect:Rc,useLayoutEffect:We,useMemo:Z,useReducer:Ps,useRef:X,useState:ee,useSyncExternalStore:vc,useTransition:Tc,version:"18.3.1"},Symbol.toStringTag,{value:"Module"}));var wc=Object.prototype.hasOwnProperty;function Le(t){return Array.isArray(t)}function Kt(t){return!(!t||typeof t!="object"||t instanceof Date||Le(t))}function DA(t){return Kt(t)&&t.constructor===Object}function te(t){return typeof t=="function"}function Ze(t){const e=typeof t;return t!==void 0&&(Rl(t)||e!=="object"&&e!=="function")}function Rl(t){return t instanceof Date}function pm(t){return typeof t=="boolean"}function Wt(t){return t instanceof Promise}function Be(t){return t instanceof Map||t instanceof WeakMap}function An(t){return t instanceof Set||t instanceof WeakSet}function ss(t){if(!t)return!1;if(Le(t))return t.length===0;if(Be(t)||An(t))return t.size===0;for(const e in t)if(wc.call(t,e))return!1;return!0}var TA=new Set(["boolean","string","number"]);function Hs(t){return!!t.parent}var fm=Symbol.toPrimitive,RA=Symbol.iterator,Jr=Symbol("getNode"),Us=Symbol("delete"),mm=Symbol("opaque"),yA=Symbol("plain"),kc=Symbol("optimized"),ji=Symbol("linked"),we={pendingNodes:new Map,dirtyNodes:new Set};function Vi(t){return t&&(t[mm]||t.$$typeof)}function Em(t){return t&&t[yA]}function _m(t){return Le(t)?"array":Be(t)?"map":t instanceof Set?"set":"object"}function IA(t,e){return Be(e)?{__LSType:"Map",value:Array.from(e.entries())}:e instanceof Set?{__LSType:"Set",value:Array.from(e)}:(we.replacer&&(e=we.replacer(t,e)),e)}var CA=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z$/;function NA(t,e){if(e){if(typeof e=="string"&&CA.test(e))return new Date(e);if(typeof e=="object"){if(e.__LSType==="Map")return new Map(e.value);if(e.__LSType==="Set")return new Set(e.value)}we.reviver&&(e=we.reviver(t,e))}return e}function gm(t){return t&&JSON.stringify(t,IA)}function Am(t){return t&&JSON.parse(t,NA)}function Sm(t){return Am(gm(t))}function Ne(t){return!!t&&!!t[Jr]}function uo(t){return t&&t[Jr]}function vm(t,e,n,r,i){return r?t.add(n):i?t.set(e,n):t[e]=n,n}function En(t,e){var n;const r=(n=t.parent)!=null?n:t,i=t.parent?t.key:"_",o=e===Us;o&&(e=void 0);const s=t.parent?Lc(r):r.root,a=An(s),l=Be(s),u=a?i:l?s.get(i):s[i],c=te(e);if((e=r.isAssigning||!c||te(u)?e:e(u))!==u)try{r.isSetting=(r.isSetting||0)+1,o?l||a?s.delete(i):delete s[i]:vm(s,i,e,a,l)}finally{r.isSetting--}return{prevValue:u,newValue:e,parentValue:s}}var pd=[];function ge(t){let e=0,n=t;for(;Hs(n);)pd[e++]=n.key,n=n.parent;let r=t.root._;for(let i=e-1;r&&i>=0;i--){const o=pd[i];r=o!=="size"&&Be(r)?r.get(o):r[o]}return r}function Bt(t,e,n){var r,i;let o=(r=t.children)==null?void 0:r.get(e);return o||(o={root:t.root,parent:t,key:e,lazy:!0,numListenersRecursive:0},((i=t.lazyFn)==null?void 0:i.length)===1&&(n=t.lazyFn.bind(t,e)),te(n)&&(o=Object.assign(()=>{},o),o.lazyFn=n),t.children||(t.children=new Map),t.children.set(e,o)),o}function Lc(t){let e=ge(t);if(!e||te(e))if(Hs(t)){const n=Lc(t.parent),r=An(n),i=Be(n);e=vm(n,t.key,{},r,i)}else e=t.root._={};return e}function Om(t,e){var n,r;let i=Ne(t)?void 0:Kt(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 o=e.key+"_keyExtractor",s=(r=(n=e.functions)==null?void 0:n.get(o))!=null?r:ge(e.parent)[e.key+"_keyExtractor"];s&&te(s)&&(i=s)}return i}function fd(t,e,n){t.functions||(t.functions=new Map),t.functions.set(e,n)}function Dm(t,e){return t===e||Rl(t)&&Rl(e)&&+t==+e}function yl(t,e,n,r){return e?void 0:t?r?Array.from(t):n?Array.from(t.keys()):Object.keys(t):[]}function bA(t,e){return t&&Object.defineProperty(t,e,{value:!0,enumerable:!1,writable:!0,configurable:!0}),t}var md=function(t){return bA(t,mm)};function Tm(t,e){var n;t.isPlain||!((n=t.parent)!=null&&n.isPlain)&&!Em(e)||(t.isPlain=!0)}function qt(t,e,n,r){let i=t;return!Ne(i)&&te(i)&&(i=n?i(n):i()),Ne(i)&&!r?i.get(e):i}var bi,wA=(t,e)=>t&&t[e];function Rm(t,e,n,r,i,o,s){let a,l=t;if(e.length>0){let u=o;for(let c=0;c<e.length;c++){a=e[c];const d=Be(l);let h=l?d?l.get(a):l[a]:void 0;const p=u?d?u.get(a):u[a]:void 0;if(h===Us)return u&&(d?l.set(a,p):l[a]=p,s==null||s(e.slice(0,c+1),p)),t;if(h===void 0&&r===void 0&&c===e.length-1)return t;c<e.length-1&&h==null&&(h=Mc(n[c]),Be(l)?l.set(a,h):l[a]=h),c<e.length-1&&(l=h,u&&(u=p))}}return a===void 0?t=i==="merge"?as(t,r):r:i==="merge"?l[a]=as(l[a],r):Be(l)?l.set(a,r):l[a]=r,t}function Ed(t,e,n){let r=n;for(let i=0;i<t.length;i++){const o=t[i];r=r?r[o]:Mc(e[i])}return r}function Il(t){return!(!t||(Kt(t)||Le(t))&&ss(t))}function Mc(t){switch(t){case"array":return[];case"map":return new Map;case"set":return new Set;default:return{}}}function kA(t,e,n){const{path:r,valueAtPath:i,prevAtPath:o,pathTypes:s}=e;return Rm(t,r,s,o)}function as(t,...e){if(Ze(t))return e[e.length-1];let n=Le(t)?[...t]:{...t};for(let r=0;r<e.length;r++){const i=e[r];if(DA(i)||Le(i)){const o=i;for(const s in o)wc.call(o,s)&&(o[s]instanceof Object&&!Ne(o[s])&&Object.keys(o[s]).length>0?n[s]=as(n[s]||(Le(o[s])?[]:{}),o[s]):n[s]=o[s])}else n=i}return n}var ls=0,Oa=!1,Da=!1,jr=new Map;function LA(){jr.size>0&&ai(!0)}function ym(t,e){for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function MA(t,e){try{return(function(n,r){for(let i=0;i<r.length;i++)n=kA(n,r[i]);return n})(t?Sm(t):{},e)}catch(n){return}}function Pc(t,e){return function(){return MA(t,e)}}function zi(t,e,n,r,i){const o=new Map;cs(o,t,!!we.isLoadingLocal,!!we.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:!!we.isLoadingRemote,isFromPersist:!!we.isLoadingLocal}),o.size&&Im(o,!0),ls<=0&&Cm()}function cs(t,e,n,r,i,o,s,a,l,u,c,d){if(e.numListenersRecursive>0&&((function(h,p,m,_,E,g,A,S,v,D,y,R){if(D?p.listenersImmediate:p.listeners){const I={path:g,pathTypes:A,valueAtPath:S,prevAtPath:v},O=h.get(p);if(O&&g.length>0){const{changes:T}=O;ym(T[0].path,I.path)||(T.push(I),O.level=Math.min(O.level,y),O.whenOptimizedOnlyIf||(O.whenOptimizedOnlyIf=R))}else h.set(p,{level:y,value:E,isFromSync:_,isFromPersist:m,whenOptimizedOnlyIf:R,changes:[I]})}})(t,e,n,r,i,o,s,a,l,u,c,d),e.linkedFromNodes))for(const h of e.linkedFromNodes)cs(t,PA(h,o),n,r,a,[],[],a,l,u,0,d);if(e.parent){const h=e.parent;h&&cs(t,h,n,r,ge(h),[e.key].concat(o),[_m(i)].concat(s),a,l,u,c+1,d)}}function Im(t,e){const n=new Set;t.forEach(({changes:r,level:i,value:o,isFromPersist:s,isFromSync:a,whenOptimizedOnlyIf:l},u)=>{const c=e?u.listenersImmediate:u.listeners;if(c){let d;const h=Array.from(c);for(let p=0;p<h.length;p++){const m=h[p],{track:_,noArgs:E,listener:g}=m;n.has(g)||(_===!0?i<=0:_!==kc||l&&i<=0)&&(E||d||(d={value:o,isFromPersist:s,isFromSync:a,getPrevious:Pc(o,r),changes:r}),_||n.add(g),g(d))}}})}function Cm(){const t=Array.from(we.dirtyNodes);we.dirtyNodes.clear(),t.forEach(r=>{const i=r.dirtyFn;i&&(r.dirtyFn=void 0,i())});const e=jr;jr=new Map;const n=new Map;e.forEach(({value:r,prev:i,level:o,isFromPersist:s,isFromSync:a,whenOptimizedOnlyIf:l},u)=>{cs(n,u,s,a,r,[],[],r,i,!1,o,l)}),n.size&&Im(n,!1)}function wt(t){Bs();try{t()}finally{ai()}}function Bs(){ls++,bi||(bi=setTimeout(LA,0))}function ai(t){(--ls<=0||t)&&(Oa?Da=!0:(bi&&(clearTimeout(bi),bi=void 0),ls=0,Oa=!0,Cm(),Oa=!1,Da&&(Da=!1,ai(!0))))}function PA(t,e){let n=t;for(let r=0;r<e.length;r++)n=Bt(n,e[r]);return n}function xc(t,e,n,r,i){if(Ne(t))return t;const o=Wt(t);let s={root:{_:t},lazy:!0,numListenersRecursive:0};te(t)&&(s=Object.assign(()=>{},s),s.lazyFn=t);var a;const l=e||(a=t,TA.has(typeof a))?new i(s):r(s);return o&&(En(s,void 0),n(s,t)),l}var xr=new WeakMap,Nm=[],bm=[],wm=[],Fr=0,Cl=!1;function mi(t,e,n){const r=xr.get(t);if(!r||!r.has(n))return;const i=r.get(n);i&&i.size!==0&&(Nm[Fr]=t,bm[Fr]=e,wm[Fr]=n,Fr++,Cl||(Cl=!0,queueMicrotask(xA)))}var Ei={type:"listener-added",node:null,listener:void 0,timestamp:0};function xA(){Cl=!1;const t=typeof performance!="undefined"?performance.now():Date.now();Ei.timestamp=t;for(let e=0;e<Fr;e++){const n=Nm[e],r=bm[e],i=wm[e],o=xr.get(n);if(!o)continue;const s=o.get(i);if(!s||s.size===0)continue;const a=n.listeners,l=n.listenersImmediate;if(!a&&!l&&n.numListenersRecursive&&(i!=="listener-added"||r))continue;let u=!1;if(i==="listener-added")r?u=!!(a!=null&&a.has(r))||!!(l!=null&&l.has(r)):u=!(!(!(a!=null&&a.size)&&!(l!=null&&l.size))||typeof n.numListenersRecursive!="number")&&n.numListenersRecursive>0;else if(i==="listener-removed")u=!(a!=null&&a.has(r))&&!(l!=null&&l.has(r));else{const c=a&&a.size>0||l&&l.size>0;u=typeof n.numListenersRecursive=="number"?!c&&n.numListenersRecursive===0:!c}if(u){Ei.type=i,Ei.node=n,Ei.listener=r;const c=Array.from(s);for(let d=0;d<c.length;d++)try{c[d](Ei)}catch(h){console.error(`Error in middleware handler for ${i}:`,h)}}}Fr=0}function _d(t){var e,n;return!((e=t.listeners)!=null&&e.size)&&!((n=t.listenersImmediate)!=null&&n.size)&&(function(r){var i;return((i=r.activationState)==null?void 0:i.synced)||!1})(t)}function Bn(t,e,n={},r){var i;const{initial:o,immediate:s,noArgs:a}=n,{trackingType:l}=n;let u=s?t.listenersImmediate:t.listeners;u||(u=new Set,s?t.listenersImmediate=u:t.listeners=u);const c={listener:e,track:l,noArgs:a};if(u.add(c),o){const _=ge(t);e({value:_,isFromPersist:!0,isFromSync:!1,changes:[{path:[],pathTypes:[],prevAtPath:_,valueAtPath:_}],getPrevious:()=>{}})}let d;function h(_,E=e,g){if(!(r!=null&&r.has(_))){r||(r=new Set),r.add(g||t),E||(E=e);const A={trackingType:!0,...n};d=[...d||[],Bn(_,E,A,r)]}}t.linkedToNode&&h(t.linkedToNode),(i=t.linkedFromNodes)==null||i.forEach(_=>h(_)),t.numListenersRecursive++;let p=t.parent,m=[t.key];for(;p;){if(p.linkedFromNodes)for(const _ of p.linkedFromNodes)r!=null&&r.has(_)||h(_,FA(_,m,e),p);p.numListenersRecursive++,_d(p)&&mi(p,void 0,"listener-added"),m=[p.key,...m],p=p.parent}return mi(t,c,"listener-added"),()=>{u.delete(c),d==null||d.forEach(g=>g());const _=[];let E=t;for(;E;)E.numListenersRecursive--,E.numListenersRecursive===0&&_.push(E),E=E.parent;mi(t,c,"listener-removed"),u.size===0&&mi(t,void 0,"listeners-cleared");for(const g of _)g!==t&&_d(g)&&mi(g,void 0,"listeners-cleared")}}function FA(t,e,n){let r=Ed(e,[],ge(t));return function({value:i,isFromPersist:o,isFromSync:s}){const a=Ed(e,[],i);a!==r&&n({value:a,isFromPersist:o,isFromSync:s,changes:[{path:[],pathTypes:[],prevAtPath:r,valueAtPath:a}],getPrevious:()=>r}),r=a}}function gd(t,e,n,r){let i=[];return t==null||t.forEach(o=>{const{node:s,track:a}=o;i.push(Bn(s,e,{trackingType:a,immediate:r,noArgs:n}))}),()=>{if(i){for(let o=0;o<i.length;o++)i[o]();i=void 0}}}var Yo=0,Ad=[],Hr={current:void 0};function Go(t,e){if(Yo){const n=Hr.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 km(t,e,n,r,i,o){let s,a,l=e;Ad.push(Hr.current),Yo++,Hr.current={};const u=t&&qt(t,n,r,i==null?void 0:i.fromComputed),c=Hr.current.nodes;return--Yo<0&&(Yo=0),Hr.current=Ad.pop(),r!=null&&r.cancel||(s=gd(c,l,!1,i==null?void 0:i.immediate),a=o?()=>(s==null||s(),s=gd(c,l),s):void 0),{nodes:c,value:u,dispose:s,resubscribe:a}}function mt(t,e,n){let r,i;te(e)?r=e:n=e;let o=!1;const s={num:0},a=function(){if(o)return;s.onCleanup&&(s.onCleanup(),s.onCleanup=void 0),o=!0,Bs(),delete s.value,i==null||i();const{dispose:l,value:u,nodes:c}=km(t,a,void 0,s,n);var d,h;i=l,s.value=u,s.nodes=c,s.refresh=a,s.onCleanupReaction&&(s.onCleanupReaction(),s.onCleanupReaction=void 0),ai(),o=!1,!r||!(n!=null&&n.fromComputed)&&(!(s.num>0)&&(d=t)&&((h=d[Jr])!=null&&h.isEvent)||s.previous===s.value&&typeof s.value!="object")||r(s),s.previous=s.value,s.num++};return a(),()=>{var l,u;(l=s.onCleanup)==null||l.call(s),s.onCleanup=void 0,(u=s.onCleanupReaction)==null||u.call(s),s.onCleanupReaction=void 0,i==null||i()}}function Lm(t,e){const n=vr(t);if(n==null||Ze(n))return n;const r=e==="string"?te(n.toString)?n.toString:n.valueOf:te(n.valueOf)?n.valueOf:n.toString;return te(r)?r.call(n):n}function Mm(t,e,n){if(Wt(t))return e?t.then(e):t;const r=Le(t);let i,o;return mt(function(s){const a=r?t.map(l=>qt(l)):qt(t);if(!Wt(a)){{let l=!0;if(Le(a))for(let u=0;u<a.length;u++){let c=a[u];Ne(c)?c=qt(c):te(c)&&(c=c()),l=l&&!!(n?Il(c):c)}else l=n?Il(a):a;l&&(i=a,s.cancel=!0)}return i}i=a},function(){o=e==null?void 0:e(i)}),Wt(i)?e?i.then(e):i:i!==void 0?e?o:Promise.resolve(i):new Promise(s=>{if(e){const a=e;e=l=>{const u=a(l);s(Wt(u)?u.then(c=>c):u)}}else e=s})}function js(t,e){return Mm(t,e,!1)}var Ta=new Set(["copyWithin","fill","from","pop","push","reverse","shift","sort","splice","unshift"]),Sd=new Set(["every","filter","find","findIndex","flatMap","forEach","join","map","reduce","some"]),HA=new Set(["filter","find"]),Nl=new Map,bl=new Map([["get",Vs],["set",kt],["peek",vr],["onChange",Bn],["assign",function(t,e){const n=ft(t);if(Bs(),Ze(t.root._)&&(t.root._={}),Be(e)){const r=ge(t);Be(r)?e.forEach((i,o)=>r.set(o,i)):kt(t,e)}else{t.isAssigning=(t.isAssigning||0)+1;try{Object.assign(n,e)}finally{t.isAssigning--}}return ai(),n}],["delete",Fm],["toggle",function(t){const e=ge(t);(e==null||pm(e))&&kt(t,!e)}]]);function Pm(t,e,n,...r){var i;if(n!=="push"||r.length!==1){const o=e.slice(),s=e[n].apply(e,r);if(t){const a=Hs(t),l=a?t.key:"_";(a?ge(t.parent):t.root)[l]=o,Zr((i=t.parent)!=null?i:t,l,e)}return s}Zr(t,e.length+"",r[0])}function Fc(t,e,n){var r,i,o;if(Kt(e)&&Vi(e)||Kt(n)&&Vi(n)){const D=e!==n;return D&&(t.listeners||t.listenersImmediate)&&zi(t,e,n,0),D}const s=Le(e);let a,l;const u=Be(e),c=An(e),d=Be(n),h=An(n),p=yl(e,s,u,c),m=yl(n,s,d,h),_=((r=p||e)==null?void 0:r.length)||0,E=((i=m||n)==null?void 0:i.length)||0;let g,A,S,v=!1;if(s&&Le(n)){if(n.length>0){const D=n[0];if(D!==void 0&&(g=Om(D,t),g&&(A=te(g),a=new Map,l=[]),t.children))for(let y=0;y<n.length;y++){const R=n[y];if(R){const I=t.children.get(y+"");if(I&&(e[y]||vd(I,R),g)){const O=A?g(R):R[g];a.set(O,I)}}}}}else if(n&&(!e||Kt(e))){const D=m.length;for(let y=0;y<D;y++){const R=m[y];if(!p.includes(R)){v=!0;const I=Bt(t,R),O=d?n.get(R):n[R];O!==void 0&&vd(I,O)}}}if(e&&!Ze(e)){v=v||_!==E;const D=v;let y=!1;for(let R=0;R<_;R++){const I=s?R+"":p[R];let O=u?e.get(I):e[I];const T=d?n==null?void 0:n.get(I):n==null?void 0:n[I];let C=!Dm(O,T);if(C){const N=g&&O?A?g(O):O[g]:void 0,k=(o=t.children)==null?void 0:o.get(I);if(Ne(O)){const L=uo(O);if((k==null?void 0:k.linkedToNode)===L){const M=ge(L);u?e.set(I,M):e[I]=M;continue}const x=O;O=()=>x}let b=Bt(t,I,O);if(b.lazy||!te(O)&&!Ne(O)||(Bm(b,O),Mn(b)),s&&N!==void 0){const L=N!==void 0?a==null?void 0:a.get(N):void 0;if(L){if(L!==void 0&&L.key!==I){const x=n[L.key];D&&(b=L,t.children.delete(b.key),b.key=I,l.push([I,b])),y=!0,C=x!==O}}else v=!0}if(C)if(te(O)||Ne(O))ei(t,I,O);else if(Ze(O))v=!0;else{const L=Fc(b,O,T);v=v||L,C=L}(C||s&&!D)&&(b.listeners||b.listenersImmediate)&&zi(b,O,T,0,!D)}}if(l)for(let R=0;R<l.length;R++){const[I,O]=l[R];t.children.set(I,O)}S=v||y}else n!==void 0&&(S=!0);return S!=null&&S}function vd(t,e){var n,r;(n=t.linkedToNodeDispose)==null||n.call(t),(r=t.activatedObserveDispose)==null||r.call(t),Ze(e)||Fc(t,void 0,e),(t.listeners||t.listenersImmediate)&&zi(t,void 0,e,0)}function ft(t,e,n){return e!==void 0&&(t=Bt(t,e,n)),t.proxy||(t.proxy=new Proxy(t,xm))}function wl(){if(we.pendingNodes.size>0){const t=Array.from(we.pendingNodes.values());we.pendingNodes.clear(),t.forEach(e=>e())}}var xm={get(t,e,n){var r,i,o;if(e===fm)return h=>Lm(t,h);if(e===Jr)return t;if(e==="apply"||e==="call"){const h=ge(t);if(te(h))return h[e]}if(e==="constructor"){const h=(r=Mn(t))==null?void 0:r.constructor;return typeof h=="function"?h:Object}let s=Mn(t,e==="get"||e==="peek");if(e===RA)return!s||Ze(s)?void 0:s[e];const a=t.linkedToNode||(s==null?void 0:s[Jr]);if(a&&e!=="onChange")return xm.get(a,e,n);if(Be(s)||An(s)){const h=(function(p,m,_){const E=_==null?void 0:_[m];if(m==="size")return Go(p,!0),_[m];if(te(E))return function(g,A,S){const v=arguments.length,D=_;if(m==="get"){if(v>0&&typeof g!="boolean"&&g!==kc)return ft(p,g)}else{if(m==="set")return v===2?kt(Bt(p,g),A):v===1&&Be(_)&&kt(p,g),ft(p);if(m==="delete"){if(v>0){const R=_.get?D.get(g):g;return Fm(p,g),R!==void 0}}else{if(m==="clear"){const R=An(D)?new Set(D):new Map(D),I=D.size;return D.clear(),void(I&&Hm(p,_,R))}if(m==="add"){const R=new Set(_),I=_.add(g);return _.has(m)||zi(p,I,R,0),ft(p)}}}const y=bl.get(m);if(!y)return _[m](g,A);switch(v){case 0:return y(p);case 1:return y(p,g);case 2:return y(p,g,A);default:return y(p,g,A,S)}}})(t,e,s);if(h!==void 0)return h}const l=bl.get(e);if(l)return e!=="get"&&e!=="peek"||wl(),function(h,p,m){switch(arguments.length){case 0:return l(t);case 1:return l(t,h);case 2:return l(t,h,p);default:return l(t,h,p,m)}};const u=Nl.get(e);if(u)return u.get(t);let c=s==null?void 0:s[e];if(Kt(s)&&Vi(s))return c;const d=(i=t.functions)==null?void 0:i.get(e);if(d)return Ne(d)?d:ft(t,e,d);if(c=(function(h,p){if(h){const m=Object.getOwnPropertyDescriptor(h,p);return m!=null&&m.get&&(delete h[p],h[p]=m.set?(function(_){te(_)&&(_={get:_});const E=function(){return{[ji]:_}};return E.prototype[ji]=_,E})({get:m.get,set:({value:_})=>m.set(_)}):m.get),h[p]}})(s,e),(function(h){return h==null})(s)&&c===void 0&&(Ta.has(e)||Sd.has(e))&&(s=[],Ta.has(e)&&En(t,s),c=s[e]),te(c)){if(Le(s)){if(Ta.has(e))return(...p)=>Pm(t,s,e,...p);if(Sd.has(e))return Go(t,!0),function(p,m){const _=e==="reduce",E=_?(S,v,D,y)=>p(S,ft(t,D+"",v),D,y):(S,v,D)=>p(ft(t,v+"",S),v,D);if(_||!HA.has(e))return s[e](E,m);const g=e==="find",A=[];for(let S=0;S<s.length;S++)if(E(s[S],S,s)){const v=ft(t,S+"");if(g)return v;A.push(v)}return g?void 0:A}}ei(t,e,c);const h=(o=t.functions)==null?void 0:o.get(e);return h?ft(t,e,h):c.bind(s)}return Ze(c)&&e==="length"&&Le(s)?(Go(t,!0),c):ft(t,e)},getPrototypeOf(t){const e=ge(t);return e!==null&&typeof e=="object"?Reflect.getPrototypeOf(e):null},ownKeys(t){Mn(t);const e=Vs(t,!0);if(Ze(e))return[];const n=e?Reflect.ownKeys(e):[];if(Le(e)&&n[n.length-1]==="length"&&n.splice(n.length-1,1),te(t)){const r=Reflect.ownKeys(t);["caller","arguments","prototype"].forEach(i=>r.includes(i)&&n.push(i))}return n},getOwnPropertyDescriptor(t,e){if(e==="caller"||e==="arguments"||e==="prototype")return{configurable:!1,enumerable:!1};const n=ge(t);if(Ze(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 Zr(t,e,n),!0;const r=Nl.get(e);return!!r&&(r.set(t,n),!0)},deleteProperty:(t,e)=>!!t.isSetting&&Reflect.deleteProperty(t,e),has(t,e){const n=ge(t);return n!=null&&(typeof n=="object"||typeof n=="function")&&Reflect.has(n,e)},apply(t,e,n){Ne(e)&&(e=e.peek());const r=ge(t),i=te(r)?r:t.lazyFn||t;return Reflect.apply(i,e,n)}};function kt(t,e){t.parent?Zr(t.parent,t.key,e):Zr(t,"_",e)}function Zr(t,e,n,r){const i=!t.parent&&e==="_";!t.parent||ge(t)||te(n)||kt(t,{[e]:n});const o=i?t:Bt(t,e,n);if(Tm(o,n),Ne(n))us(o,n);else{const{newValue:s,prevValue:a,parentValue:l}=En(o,n),u=Ze(a)||a instanceof Date||Ze(s)||s instanceof Date;if(!u){let h=o;do h.needsExtract=!0,h.recursivelyAutoActivated=!1;while(h=h.parent)}const c=!Dm(s,a),d=!c&&o.isComputing&&!u&&!o.isPlain;!c&&!d||o.isComputing&&o.isPlain&&t.numListenersRecursive===0||Hm(t,s,a,o,l,u,i,r,d),ei(t,e,s)}}function Fm(t,e){e===void 0&&Hs(t)&&(e=t.key,t=t.parent);const n=ge(t);Le(n)?Pm(t,n,"splice",e,1):Zr(t,e!=null?e:"_",Us,-1)}function Hm(t,e,n,r,i,o,s,a,l){r||(r=t),Bs(),o===void 0&&(o=Ze(e));let u,c,d=l||o,h=!1;(!o||n&&!Ze(n))&&(d=d||Fc(r,e,n),Le(e)?u=e:(Be(e)||An(e))&&(c=e)),Le(i)?u=i:(Be(i)||An(i))&&(c=i),u?h=(u==null?void 0:u.length)!==(n==null?void 0:n.length):c&&(h=(c==null?void 0:c.size)!==(n==null?void 0:n.size)),(o||!e||ss(e)&&!ss(n)?e!==n:d)&&zi(o&&s?t:r,e,n,(a!=null?a:n===void 0)?-1:d?0:1,h),ai()}function Qr(t,e,n){const r=t.numGets=(t.numGets||0)+1;t.state||(t.state=xc({isLoaded:!1},!1,Qr,ft)),e.then(i=>{r>=(t.getNumResolved||0)&&(t.getNumResolved=t.numGets,n?n({value:i}):kt(t,i),t.state.assign({isLoaded:!0,error:void 0}))}).catch(i=>{t.state.error.set(i)})}function ei(t,e,n){if(Wt(n)){const r=Bt(t,e);return Qr(r,n),void En(r,void 0)}if(Ne(n)){const r=()=>n;fd(t,e,r);const i=Bt(t,e,r),o=vr(uo(n));return us(i,n),En(i,o),ge(i)}if(typeof n=="function")return fd(t,e,n),e}function Vs(t,e){return Go(t,e?Kt(e)?e.shallow:e:void 0),vr(t)}function vr(t){return Mn(t,!0)}var No=!1;function Mn(t,e){var n;if(No=!0,e&&((n=t.dirtyChildren)==null?void 0:n.size)){const i=Array.from(t.dirtyChildren);t.dirtyChildren.clear(),i.forEach(o=>o.dirtyFn&&Mn(o))}if(t.dirtyFn){const i=t.dirtyFn;t.dirtyFn=void 0,we.dirtyNodes.delete(t),i()}No=!1;let r=ge(t);return t.root.isLoadingLocal||t.isPlain||(r=(function(i,o,s){const a=o,l=i.lazy;if(l){const u=i.lazyFn;if(delete i.lazy,te(u))if(u.length===1)o={};else{if(i.parent){const c=ge(i.parent);te(o)&&(c?delete c[i.key]:i.root._=void 0)}o=(function(c,d){let h,p,m,_=!0;const E=d;let g,A,S=[];function v(){c.dirtyFn=A,we.dirtyNodes.add(c)}const D=mt(()=>{var y,R,I,O;if(_)_=!1,te(ge(c))&&En(c,void 0);else if(!No&&A&&(function(b,L){if(!No&&!(function(M){var U,V;let W=M,$=M.numListenersRecursive>0;for(;W&&!$;)((U=W.listeners)!=null&&U.size||(V=W.listenersImmediate)!=null&&V.size)&&($=!0),W=W.parent;return $})(b)){L&&(b.dirtyFn=L);let M=b;for(;M;)M.dirtyChildren||(M.dirtyChildren=new Set),M.dirtyChildren.add(b),M=M.parent;return!0}})(c,A))return void(m=!0);let T=E(),C=!1;const N=Ne(T);(N||c.linkedToNode)&&(C=N,T=us(c,T)),te(T)&&T.length===0&&(T=T());const k=N||T==null?void 0:T[ji];if(k&&(c.activationState=k,T=void 0),m=!1,p=Wt(T),c.activated){if(c.activationState){const b=c.activationState;(R=(y=c.state)==null?void 0:y.peek())!=null&&R.sync?(c.state.sync(),m=!0):T=(O=(I=b.get)==null?void 0:I.call(b))!=null?O:b.initial}}else{c.activated=!0;let b=UA;k!=null&&k.synced&&(b=we.activateSyncedNode,m=!0);const L=b(c,T);h=L.update;let x=L.value;!C&&Ne(x)&&(x=us(c,x)),T=x!=null?x:k==null?void 0:k.initial}return m&&(g=T),p=p||Wt(T),T},y=>{const{value:R,nodes:I,refresh:O}=y;if(A=O,!m){if(!p||!we.isLoadingRemote)if(p)if(c.activationState){const{initial:T}=c.activationState;R&&Wt(R)&&Qr(c,R,h),te(ge(c))&&En(c,T!=null?T:void 0)}else c.activated&&(Qr(c,R,h),te(ge(c))&&En(c,void 0));else{g=R;const T=c.state.isLoaded.peek();!T&&te(R)||(c.isComputing=!0,kt(c,R),c.isComputing=!1),T||c.state.assign({isLoaded:!0,error:void 0})}S.forEach(T=>T()),S=[],I==null||I.forEach(({node:T,track:C})=>{S.push(Bn(T,v,{immediate:!0,trackingType:C}))})}y.cancel=!0},{fromComputed:!0});return c.activatedObserveDispose=()=>{D==null||D(),S.forEach(y=>y())},g})(i,u)}else Ne(o)&&(o=ei(i.parent,i.key,o))}return Tm(i,o),!l&&!i.needsExtract||i.isPlain||Ne(o)||Ze(o)||(s&&(function(u,c){if(!c.recursivelyAutoActivated&&(Kt(u)||Le(u))&&!Vi(u)){c.recursivelyAutoActivated=!0;const d=[];jm(u,d,()=>{var p;let m=c;for(let _=0;_<d.length;_++){const E=d[_],g=(p=ge(m))==null?void 0:p[E];m=Bt(m,E,te(g)?g:void 0),Mn(m)}return m})}})(o,i),i.parent&&ei(i.parent,i.key,a)),o})(t,r,!!e)),r}function Um(t){var e,n;(e=t.activatedObserveDispose)==null||e.call(t),(n=t.linkedToNodeDispose)==null||n.call(t),t.activatedObserveDispose=t.linkedToNodeDispose=t.linkedToNode=void 0}function Bm(t,e){Um(t),t.lazyFn=e,t.lazy=!0}function UA(t,e){if(t.state||(t.state=xc({isLoaded:!1},!1,Qr,ft)),t.activationState){const{set:n,get:r,initial:i}=t.activationState;if((e=r==null?void 0:r())!=null&&e!==null||(e=i),n){let o,s=[],a=0;const l=u=>{if(s.length>0){let c,d,h,p=!1,m=!1;u?(c=u.changes,d=u.value,p=u.isFromPersist,m=u.isFromSync,h=u.getPrevious):(c=s,d=o,h=Pc(d,c)),s=[],o=void 0,we.pendingNodes.delete(t),a++;const _=a,E=()=>{_===a&&(t.isComputing=!0,n({value:d,changes:c,isFromPersist:p,isFromSync:m,getPrevious:h}),t.isComputing=!1)};Mm(t.state.isLoaded,E,!0)}};Bn(t,({value:u,changes:c})=>{t.isComputing||(c.length>1||!te(c[0].prevAtPath))&&(o=u,s.length>0&&(c=c.filter(d=>!ym(s[0].path,d.path))),s.push(...c),we.pendingNodes.set(t,l))},{immediate:!0}),Bn(t,l)}}return{update:({value:n})=>{t.isComputing||(t.isComputing=!0,kt(t,n),t.isComputing=!1)},value:e}}function us(t,e){var n;const r=e?uo(e):void 0;return r!==t&&(r==null?void 0:r.linkedToNode)!==t&&(t.linkedToNode=r,(n=t.linkedToNodeDispose)==null||n.call(t),r&&(r.linkedFromNodes||(r.linkedFromNodes=new Set),r.linkedFromNodes.add(t),t.linkedToNodeDispose=Bn(r,()=>{te(e=Mn(r))||kt(t,e)},{initial:!0},new Set([t])))),e}function jm(t,e,n){var r;if((Kt(t)||Le(t))&&!Vi(t)&&!Em(t)){for(const i in t)if(wc.call(t,i)){const o=t[i];if(Ne(o)){const s=n();ei(s,i,o),delete s.lazy}else{const s=te(o)&&((r=o.prototype)==null?void 0:r[ji]);if(s){const a=s.activate;(!a||a==="auto")&&vr(Bt(n(),i,o))}}typeof o=="object"&&(e.push(i),jm(o,e,n),e.pop())}}}var Od=["get","set","peek","onChange","toggle"];function er(t){this._node=t;for(let e=0;e<Od.length;e++){const n=Od[e];this[n]=this[n].bind(this)}}function bo(t,e){er.prototype[t]=function(...n){return e.call(this,this._node,...n)}}function se(t){return xc(t,!1,Qr,ft,er)}bo("peek",t=>(wl(),vr(t))),bo("get",(t,e)=>(wl(),Vs(t,e))),bo("set",kt),bo("onChange",Bn),Object.defineProperty(er.prototype,Jr,{configurable:!0,get(){return this._node}}),Object.defineProperty(er.prototype,fm,{configurable:!0,value(t){return Lm(this._node,t)}}),er.prototype.toggle=function(){const t=this.peek();(t==null||pm(t))&&this.set(!t)},er.prototype.delete=function(){return this.set(void 0),this};var zs={createPreviousHandler:Pc,clone:Sm,deactivateNode:Um,deepMerge:as,ensureNodeValue:Lc,findIDKey:Om,get:Vs,getChildNode:Bt,getKeys:yl,getNode:uo,getNodeValue:ge,getPathType:_m,getProxy:ft,getValueAtPath:function(t,e){return e.reduce(wA,t)},globalState:we,initializePathType:Mc,ObservablePrimitiveClass:er,observableProperties:Nl,observableFns:bl,optimized:kc,peek:vr,reactivateNode:Bm,registerMiddleware:function(t,e,n){let r=xr.get(t);r||(r=new Map,xr.set(t,r));let i=r.get(e);return i||(i=new Set,r.set(e,i)),i.add(n),()=>{const o=xr.get(t);if(!o)return;const s=o.get(e);s&&(s.delete(n),s.size===0&&(o.delete(e),o.size===0&&xr.delete(t)))}},safeParse:Am,safeStringify:gm,set:kt,setAtPath:Rm,setNodeValue:En,symbolLinked:ji,symbolDelete:Us,tracking:Hr},{globalState:Dd,observableProperties:BA,observableFns:jA,ObservablePrimitiveClass:Td}=zs;class $s{constructor(e={}){this._handlers=new Set,this._meta=e}meta(e){return new $s(e)}_emit(e,n){for(const r of this._handlers)r({level:e,data:n,timestamp:Date.now(),meta:this._meta})}error(...e){return this._emit("error",e)}warn(...e){return this._emit("warn",e)}info(...e){return this._emit("info",e)}log(...e){return this._emit("log",e)}trace(...e){return this._emit("trace",e)}registerHandler(e){return this._handlers.add(e),()=>this._handlers.delete(e)}}const kl=new $s,Ce=new $s;function Hc(t,e,n){return{...(function(i,o){return i===void 0||i==="default"?"default":i==="classic"?"classic":(Ce.warn(`Invalid \`baseTheme\` value '${i}' for ${o}; expected "classic" or "default", falling back to "default".`),"default")})(t,n)==="classic"?ry:ny,...e!=null?e:{}}}function Rd(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 yd(t){const e=(function(){const i=document.createElement("canvas");i.width=i.height=1;const o=i.getContext("2d",{willReadFrequently:!0});return o.textBaseline="top",o.font='100px "Twemoji Mozilla","Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji","EmojiOne Color","Android Emoji",sans-serif',o.scale(.01,.01),o})(),n=Rd(e,t,"#fff"),r=Rd(e,t,"#000");return r===n&&!r.startsWith("0,0,0,")}const VA=si(null),Ra={didCatch:!1,error:null};class Vm extends bt{constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=Ra}static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(){const{error:e}=this.state;if(e!==null){for(var n,r,i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];(n=(r=this.props).onReset)===null||n===void 0||n.call(r,{args:o,reason:"imperative-api"}),this.setState(Ra)}}componentDidCatch(e,n){var r,i;(r=(i=this.props).onError)===null||r===void 0||r.call(i,e,n)}componentDidUpdate(e,n){const{didCatch:r}=this.state,{resetKeys:i}=this.props;var o,s;r&&n.error!==null&&(function(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return a.length!==l.length||a.some((u,c)=>!Object.is(u,l[c]))})(e.resetKeys,i)&&((o=(s=this.props).onReset)===null||o===void 0||o.call(s,{next:i,prev:e.resetKeys,reason:"keys"}),this.setState(Ra))}render(){const{children:e,fallbackRender:n,FallbackComponent:r,fallback:i}=this.props,{didCatch:o,error:s}=this.state;let a=e;if(o){const l={error:s,resetErrorBoundary:this.resetErrorBoundary};if(typeof n=="function")a=n(l);else if(r)a=me(r,l);else{if(i===void 0)throw s;a=i}}return me(VA.Provider,{value:{didCatch:o,error:s,resetErrorBoundary:this.resetErrorBoundary}},a)}}var wo=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Ys(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Uc(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}),n}var Id={exports:{}},ya={};const zm=Uc(bc);var Cd,Nd,zA=(Nd||(Nd=1,Id.exports=(function(){if(Cd)return ya;Cd=1;var t=zm,e=typeof Object.is=="function"?Object.is:function(l,u){return l===u&&(l!==0||1/l==1/u)||l!=l&&u!=u},n=t.useState,r=t.useEffect,i=t.useLayoutEffect,o=t.useDebugValue;function s(l){var u=l.getSnapshot;l=l.value;try{var c=u();return!e(l,c)}catch(d){return!0}}var a=typeof window=="undefined"||window.document===void 0||window.document.createElement===void 0?function(l,u){return u()}:function(l,u){var c=u(),d=n({inst:{value:c,getSnapshot:u}}),h=d[0].inst,p=d[1];return i(function(){h.value=c,h.getSnapshot=u,s(h)&&p({inst:h})},[l,c,u]),r(function(){return s(h)&&p({inst:h}),l(function(){s(h)&&p({inst:h})})},[l]),o(c),c};return ya.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:a,ya})()),Id.exports),bd=!1,Ll={inObserver:!1},wd=void 0,$A=()=>wd||(wd=si(null));function kd(t){const e=js(t);if(!F.use)throw e;F.use(e)}function J(t,e){let n;if(Ll.inObserver&&Ne(t)&&!(e!=null&&e.suspense))return n=qt(t,e),e!=null&&e.suspense&&n===void 0&&kd(t),n;try{const r=Sr($A()),i=Z(()=>(function(l,u){let c,d,h,p,m,_,E=0;const g=()=>{d==null||d();const{value:S,dispose:v,resubscribe:D}=km(p,A,l,void 0,void 0,!0);return d=v,h=D,S},A=({value:S})=>{if(u!=null&&u.peek()){const v=_;_=S,v===void 0&&js(()=>!u.get(),()=>{const D=_;_=void 0,A({value:D})})}else{let v=l==null?void 0:l.skipCheck;if(!v){const D=g();(D!==m||!Ze(D)&&D===S)&&(v=!0)}v&&(E++,c==null||c())}};return{subscribe:S=>(c=S,!d&&h&&(d=h()),()=>{d==null||d(),d=void 0}),getVersion:()=>E,run:S=>(p=S,m=g())}})(e,r),[]),{subscribe:o,getVersion:s,run:a}=i;n=a(t),zA.useSyncExternalStore(o,s,s)}catch(r){throw r}return e!=null&&e.suspense&&n===void 0&&kd(t),n}var Ld=typeof Symbol=="function"&&Symbol.for;function $m(t,e,n,r,i){const o=Ld?Symbol.for("react.forward_ref"):_t(m=>null).$$typeof,s=Ld?Symbol.for("react.memo"):ur(m=>null).$$typeof;if(t.__legend_proxied)return t;let a=!1,l=!1,u=t;s&&u.$$typeof===s&&u.type&&(l=!0,u=u.type),o&&u.$$typeof===o&&(a=!0,u=u.render);const c=r?new Set(r):void 0,d={apply(m,_,E){if(n){const g=E[0],A={},S=Object.keys(g);for(let v=0;v<S.length;v++){const D=S[v],y=g[D],R=c&&c.has(D);if(D==="children"&&(te(y)||Ne(y)))A[D]=J(y,{skipCheck:!0});else if(R||D.startsWith("$")||D.endsWith("$")){const I=R?D:D.endsWith("$")?D.slice(0,-1):D.slice(1),O=i==null?void 0:i[I],T=O&&Ne(y);if(A[I]=T&&(O!=null&&O.selector)?O.selector(A,y):J(y),T&&(O.defaultValue!==void 0&&A[I]===void 0&&(A[I]=O.defaultValue),O.handler&&O.getValue)){const C=N=>{var k;y.set(O.getValue(N)),(k=g[O.handler])==null||k.call(g,N)};A[O.handler]=q(C,[g[O.handler],i])}R||delete A[D]}else A[D]===void 0&&(A[D]=y)}E[0]=A}return e?J(()=>{Ll.inObserver=!0;try{return Reflect.apply(m,_,E)}finally{Ll.inObserver=!1}},{skipCheck:!0}):Reflect.apply(m,_,E)}},h=new Proxy(u,d);let p;return a?(p=_t(h),p.__legend_proxied=!0):p=h,e||l?ur(p):p}var{findIDKey:YA,getNode:GA,optimized:WA}=zs,Md=new Map;function $i({each:t,optimized:e,item:n,itemProps:r,sortValues:i,children:o}){var s;if(!t)return null;const a=J(()=>t.get(!e||WA));if(!n&&o){const u=X(void 0);u.current=o,n=Z(()=>{return c=({item$:d,id:h})=>u.current(d,h),$m(c,!0);var c},[])}else if(n.$$typeof!==Symbol.for("react.memo")){let u=Md.get(n);u||(u=ur(n),Md.set(n,u)),n=u}if(!a)return null;const l=[];if(Le(a)){const u=a[0],c=GA(t),d=a.length,h=d>0?c&&YA(u,c)||(u.id!==void 0?"id":u.key!==void 0?"key":void 0):void 0,p=te(h);for(let m=0;m<d;m++)if(a[m]){const _=a[m],E=(s=p?h(_):_[h])!=null?s:m,g=t[m],A={key:E,id:E,item$:g,item:g};l.push(me(n,r?Object.assign(A,r):A))}}else{const u=Be(a),c=u?Array.from(a.keys()):Object.keys(a);i&&c.sort((d,h)=>i(u?a.get(d):a[d],u?a.get(h):a[h],d,h));for(let d=0;d<c.length;d++){const h=c[d];if(u?a.get(h):a[h]){const p=u?t.get(h):t[h],m={key:h,id:h,item$:p,item:p};l.push(me(n,r?Object.assign(m,r):m))}}}return l}ur(function({children:t}){return J(()=>qt(qt(t)),{skipCheck:!0})},(t,e)=>!e.scoped||t.children===e.children);var Pd=new Map,xd=new Map;function Fd({if:t,ifReady:e,else:n,$value:r,wrap:i,children:o}){const s=J(t!=null?t:e),a=J((e!==void 0?Il(s):s)?te(o)?()=>o(r?r.get():s):o:n!=null?n:null,{skipCheck:!0});return i?me(i,void 0,a):a}new Proxy({},{get(t,e){if(!t[e]){const n=Pd.get(e)||e,r=_t((i,o)=>{const s={...i};return!o||!te(o)&&ss(o)||(s.ref=o),me(n,s)});t[e]=(function(i,o,s){return $m(i,!1,!0,o,s)})(r,[],xd.get(e))}return t[e]}}),(function(t){(function(e){if(bd)return;bd=!0;const n={value:{handler:"onChange",getValue:i=>i.target.value,defaultValue:""}},r=Object.assign({checked:{handler:"onChange",getValue:i=>i.target.checked}},n);e({binders:{input:r,textarea:n,select:n}})})(t)})(function({components:t,binders:e}){if(t)for(const n in t)Pd.set(n,t[n]);if(e)for(const n in e)xd.set(n,e[n])});var XA=(t,e)=>{{const n=X({num:0});z(()=>{var r;const{current:i}=n;i.num++;const o=()=>{i.dispose&&i.num<2&&(i.dispose(),i.dispose=void 0),i.num--};if(i.dispose!==void 0)return o;{const s=(r=t())!=null?r:null;if(s&&te(s))return i.dispose=s,()=>queueMicrotask(o)}},e)}};function Ym(t){return XA(()=>{const e=t();if(!Wt(e))return e},[])}var KA=Ym;function Gm(t){return Ym(()=>t)}var qA=Gm,{deactivateNode:JA}=zs;function ct(t,e){var n;const r=X({});r.current.value=t;const i=e?ct(e):void 0;if(!((n=r.current)!=null&&n.obs$)){const o=i?te(t)&&t.length===1?s=>(i.get(),r.current.value(s)):()=>(i.get(),qt(r.current.value)):t;r.current.obs$=se(o)}return i&&i.set(e),Gm(()=>{const o=r.current.obs$;if(o){const s=uo(o);JA(s)}}),r.current.obs$}function Wm(t,e,n,r){let i;te(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||(n==null?void 0:n.deps))?ct(r):void 0,s=X({});return s.current.selector=t,s.current.reaction=i,o&&o.set(r),s.current.dispose||(s.current.dispose=mt(a=>{var l;return o==null||o.get(),qt((l=s.current)==null?void 0:l.selector,void 0,a)},a=>{var l,u;return(u=(l=s.current).reaction)==null?void 0:u.call(l,a)},n)),qA(()=>{var a,l;(l=(a=s.current)==null?void 0:a.dispose)==null||l.call(a)}),s.current.dispose}function Yi(t,e,n,r){let i;te(e)?i=e:Array.isArray(e)?(r=e,n=void 0):n=e,i&&Array.isArray(n)&&(r=n,n=void 0),r=r||(n==null?void 0:n.deps);const o=X({}),s=r?ct(r):void 0;o.current.selector=t,o.current.reaction=i,s&&s.set(r),KA(()=>mt(a=>{var l;return s==null||s.get(),qt((l=o.current)==null?void 0:l.selector,void 0,a)},a=>{var l,u;return(u=(l=o.current).reaction)==null?void 0:u.call(l,a)},n))}class Xm extends Error{}function Hd(t,e){if(!t)throw new Xm(e!=null?e:"Assertion failed")}const re=Object.assign(Hd,{is:function(t,e,n){return Hd(e,n)},unreachable:function(){throw new Error("Unreachable code")},never:function(t){throw new Error("Unreachable")},defined:function(t){if(t==null)throw new Xm("Value is not defined")}}),[Km,Qe]=jt(),[qm,ho]=jt(),[ZA,QA]=jt(),[Bc,po]=jt(),[eS,tS]=jt(),[Jm,ae]=jt(),[Zm,li]=jt(),[nS,Qm]=jt(),[eE,tE]=jt(),[nE,rS]=jt(),[iS,jc]=jt();function jt(){const t=si(void 0);return[t,()=>{const e=Sr(t);return re(e!==void 0),e}]}const Vr={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"}},Ud={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:Vr,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"}},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:"選擇對話"}}},rE=()=>{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},Bd=(t,e)=>{const n=rE();return n.fillStyle=e,n.fillText(t,0,0),n.getImageData(0,0,1,1).data},oS=t=>!t.includes("‍")||rE().measureText(t).width<160,sS=(t,e)=>{const n=[...t].join(",");return n===[...e].join(",")&&!n.startsWith("0,0,0,")};function iE(t){try{return(function(e){const n=Bd(e,"#000"),r=Bd(e,"#fff"),i=oS(e);return n&&r&&i&&sS(n,r)})(t)}catch(e){return!0}}var Lf;const oE=(Lf=globalThis.window)!=null&&Lf.document?(function(){if(typeof window=="undefined"||window.E2E||window.__talkjsE2E)return 16;const t={"🫩":16,"🚶‍➡️":15.1,"🫨":15,"🫠":14,"😵‍💫":13.1,"🥲":13,"🧑‍🦰":12.1,"🥻":12,"🥰":11,"🤩":5,"👱‍♀️":4,"🤣":3,"👁️‍🗨️":2,"😀":1,"😐️":.7,"😃":.6};for(const[e,n]of Object.entries(t))if(iE(e))return n})():0;class sE{constructor(e,n){this.currentUser$=se(null),this.app$=se(null),this.appId$=se(null),this.extUserId$=se(null),this.hasTokenFetcher$=se(!1),this.authTokenState$=se("idle"),this.themeCustom$=se(md({value:void 0})),this.highlightedStrings$=se([]),this.device$=se({supportsEmojiPicker:!!oE,isMobile:typeof window!="undefined"&&/Mobi/i.test(window.navigator.userAgent)}),this.errors$=se({unknownUser:!1,wrongAppId:!1,serverError:!1}),this.conversationSearch=null,this.messageSearch=null,this.locale$=se(()=>{var s,a;const r=this.extUserId$.get(),i=this.app$.appMetadata.defaultLocale.get(),o=this.currentUser$.locale.get();return(a=(s=r&&o)!=null?s:i)!=null?a:"en-US"}),this.translationData$=se(()=>(function(r){const i=r.replace(/_/g,"-").toLowerCase(),o=Ud[i];if(o)return{strings:{...o.translation,locale:i},emojiPickerTranslationUrl:o.emojiPickerTranslationUrl,emojiDataUrl:o.emojiDataUrl};const s=i.slice(0,2),a=Ud[s];return a?{strings:{...a.translation,locale:s},emojiPickerTranslationUrl:a.emojiPickerTranslationUrl,emojiDataUrl:a.emojiDataUrl}:(Ce.warn(`User locale '${r}' not supported; falling back to English.`),{strings:{...Vr.translation,locale:"en-US"},emojiPickerTranslationUrl:Vr.emojiPickerTranslationUrl,emojiDataUrl:Vr.emojiDataUrl})})(this.locale$.get())),this.t$=se(()=>this.translationData$.strings.get()),wt(()=>{this.appId$.set(e),this.extUserId$.set(n)})}updateThemeCustom(e){this.themeCustom$.set(md({value:e}))}}const aS={canReplyToMessage:!1,canEditMessage:!1,canDeleteMessage:!1,canAddReaction:!1};class lS extends sE{constructor(e,n){super(e,n),this.type="ChatboxStore",this.messageSubscriptions={},this.readyForNewMessagesPromise=Promise.resolve(),this.fileUploads={},this.renderedConversationId$=se(void 0),this.focusedMessage$=se(null),this.chatSearchState$=se("hidden"),this.searchQuery$=se(""),this.newMessageMarker$=se(void 0),this.state$=se({loadingConversationId:null,currentConversationId:null,editor:{isEmpty:!0,atTextLimit:!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 r=this.state$.currentConversationId.get();return r&&this.state$.conversations.child(r).get()},userPermissions:()=>{var s;const r=((s=this.app$.features.get())!=null?s:[]).includes("search_in_conv"),i=this.app$.role.general.get(),o=this.app$.role.permissions.get();return re.defined(i),re.defined(o),{canSearch:r,showTypingIndicator:i.showTypingIndicators,canShareFile:i.enableFileTransfers,canShareLocation:i.enableLocation,canMention:i.enableMentions,showOnlineStatus:i.enablePresence!==!1,canSendVoiceMessage:i.enableVoiceRecording,canLeaveConversation:o.conversations.leave==="all",canMarkConversationAsUnread:o.conversations.markAsUnread==="all"}},messagePermissions:()=>{const r=this.app$.role.permissions.get();re.defined(r);const i=this.state$.userPermissions.get(),o={...aS,...i},s={canReplyToMessage:On(r.messages.reply,!0),canEditMessage:On(r.messages.edit,!0),canDeleteMessage:On(r.messages.delete,!0),canAddReaction:On(r.messages.emojiReactions,!0),...i},a={...s,canEditMessage:!1},l={canReplyToMessage:On(r.messages.reply,!1),canEditMessage:On(r.messages.edit,!1),canDeleteMessage:On(r.messages.delete,!1),canAddReaction:On(r.messages.emojiReactions,!1),...i};return{system:o,own:s,ownWithoutEditing:a,other:l,otherWithoutEditing:{...l,canEditMessage:!1}}}}),this.referencedMessage$=se(()=>{const r=this.state$.currentConversationId.get(),i=this.state$.referencedMessageId.get();return r&&i?this.state$.messages.child(r).lookup.child(i).get():null}),this.chatItems$=se(()=>{var m,_,E;const r=this.state$.currentConversationId.get();if(!r)return[];const i=(m=this.newMessageMarker$.get())!=null?m:1/0,o=(_=this.state$.messages.child(r).state.get())!=null?_:[],s=Object.values((E=this.state$.ephemeralMessages.child(r).get())!=null?E:{}),a=s.length===0?o:s.sort((g,A)=>A.createdAt-g.createdAt).concat(o),l=a.map(g=>{const A=g.content[0],S=A==null?void 0:A.type;if(!A||S!=="file")return g;const v=A.size+","+A.filename,D=this.state$.localFileBlobUrls.child(r).child(v).url.get();return D?{...g,content:[{...A,url:D}]}:g});let u=null,c=0,d=!1;const h=[];for(const g of l){const A=new Date(g.createdAt),S=new Date(A).setHours(0,0,0,0),v=c&&S!==c,D=A.getTime()>i,y=!(!d||D||u!=null&&u.id.startsWith("ephemeral"));(y||v)&&h.push(new Wn({id:"border-before-"+g.id,isDayMarker:!!v,isReadMarker:!!y,timestamp:v?c:void 0})),h.push(g),d=D,c=S,u=g}const p=this.extUserId$.peek();return(function(g,A){const S=[];let v=[],D=null;for(const y of g)D===null||A(D,y)?v.push(y):(S.push(v),v=[y]),D=y;return v.length!==0&&S.push(v),S})(h,(g,A)=>{var S,v;return g instanceof Wn&&A instanceof Wn?g.id===A.id:g instanceof Wn||A instanceof Wn?!1:Math.abs(g.createdAt-A.createdAt)<=6e4&&((S=g.sender)==null?void 0:S.id)===((v=A.sender)==null?void 0:v.id)}).map(g=>{var S;const A=g[g.length-1];return{items:g,id:A.id,type:A instanceof Wn?"divider":A.sender?((S=A.sender)==null?void 0:S.id)===p?"own":"other":"system"}})})}storeTyping(e,n){this.state$.typing.child(e).set(n)}setSearchQuery(e){const n=e.trim().split(/\s+/).map(r=>r.trim()).filter(Boolean);wt(()=>{this.searchQuery$.set(e),this.highlightedStrings$.set(n)})}messagePermissions$(e){const n=this.currentUser$.get();if(!n)throw new Error("Unreachable");const r=e.content[0];return e.sender?n.id===e.sender.id?r.type==="text"?this.state$.messagePermissions.own:this.state$.messagePermissions.ownWithoutEditing:r.type==="text"?this.state$.messagePermissions.other:this.state$.messagePermissions.otherWithoutEditing:this.state$.messagePermissions.system}canRenderUi(e){const n=this.app$.get(),r=this.currentUser$.get();if(e===null)return!!(n&&r);const i=this.state$.conversations.child(e).get(),o=this.state$.participants.child(e).get();return!!(n&&r&&i&&o)}storeMessages(e,n,r){wt(()=>{const i=n.reduce((a,l)=>(a[l.id]=l,a),{}),o=this.extUserId$.peek();re(o),this.state$.messages.child(e).set({state:n,lookup:i,loadedAll:r});const s=this.state$.ephemeralMessages.child(e);for(const a of n){const l=this.state$.ephemeralMessageIdMapping.child(e).child(a.id).peek();if(!l)continue;s.child(l).delete();const u=a.content[0];if(u.type!=="file")continue;const c=u.size+","+u.filename,d=this.state$.localFileBlobUrls.child(e).child(c);if(d.fetching.peek()!==!1)continue;const h=()=>{URL.revokeObjectURL(d.url.peek()),d.delete()};if(u.subtype==="image"){d.fetching.set(!0);const p=document.createElement("img");p.addEventListener("load",h,{once:!0}),p.src=u.url}else if(u.subtype==="video"){d.fetching.set(!0);const p=document.createElement("video");p.addEventListener("loadeddata",h,{once:!0}),p.src=u.url}else if(u.subtype==="audio"||u.subtype==="voice"){d.fetching.set(!0);const p=document.createElement("audio");p.addEventListener("loadeddata",h,{once:!0}),p.src=u.url}}})}}function On(t,e){return t==="all"||t==="own"&&e||t==="other"&&!e}class Wn{constructor({id:e,isDayMarker:n,isReadMarker:r,timestamp:i}){this.id=e,this.isDayMarker=n,this.isReadMarker=r,this.timestamp=n?i:void 0}}function $t(t,e=!1){return(function(n,r=!1){return n.map(i=>{if(typeof i=="string")return i;switch(i.type){case"bold":return"*"+$t(i.children)+"*";case"italic":return"_"+$t(i.children)+"_";case"strikethrough":return"~"+$t(i.children)+"~";case"blockquote":return $t(i.children).split(`
1
+ "use client";"use strict";var Yu=t=>{throw TypeError(t)};var Gu=(t,e,n)=>e.has(t)||Yu("Cannot "+n);var _e=(t,e,n)=>(Gu(t,e,"read from private field"),n?n.call(t):e.get(t)),Cr=(t,e,n)=>e.has(t)?Yu("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),yo=(t,e,n,r)=>(Gu(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ng=require("@talkjs/core"),Mf=Object.freeze(Object.defineProperty({__proto__:null,get AfterMessages(){return EI},get AudioBlock(){return OI},get Avatar(){return CI},get BeforeMessages(){return mI},get ChatHeader(){return iI},get ChatSearchBox(){return SI},get CompactMessageContent(){return AI},get ConversationImage(){return NI},get ConversationListItem(){return MI},get FileBlock(){return vI},get GlobalSearchBox(){return FI},get GlobalSearchResultHeader(){return HI},get GlobalSearchResultItem(){return xI},get GroupChatImage(){return bI},get ImageBlock(){return DI},get LocationBlock(){return TI},get Message(){return aI},get MessageActionMenu(){return dI},get MessageDivider(){return pI},get MessageField(){return hI},get MessageListFooter(){return fI},get MessageListHeader(){return sI},get NoConversationSelected(){return jI},get RecordingPreview(){return UI},get ReferencedMessage(){return wI},get ReplyBar(){return LI},get TextBlock(){return RI},get TimeAgo(){return kI},get VideoBlock(){return II},get VoiceBlock(){return yI},get VoiceRecorder(){return BI}},Symbol.toStringTag,{value:"Module"}));var lo,ne,Pf,Jn,Wu,xf,Ff,Hf,Ec,Al,gl,Uf,Hi={},Bf=[],rg=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Ui=Array.isArray;function Gt(t,e){for(var n in e)t[n]=e[n];return t}function Sl(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function me(t,e,n){var r,i,o,s={};for(o in e)o=="key"?r=e[o]:o=="ref"?i=e[o]:s[o]=e[o];if(arguments.length>2&&(s.children=arguments.length>3?lo.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(o in t.defaultProps)s[o]===void 0&&(s[o]=t.defaultProps[o]);return Ci(t,s,r,i,null)}function Ci(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:i==null?++Pf:i,__i:-1,__u:0};return i==null&&ne.vnode!=null&&ne.vnode(o),o}function jf(){return{current:null}}function ie(t){return t.children}function bt(t,e){this.props=t,this.context=e}function Kr(t,e){if(e==null)return t.__?Kr(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null)return n.__e;return typeof t.type=="function"?Kr(t):null}function Vf(t){var e,n;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null){t.__e=t.__c.base=n.__e;break}return Vf(t)}}function Ol(t){(!t.__d&&(t.__d=!0)&&Jn.push(t)&&!rs.__r++||Wu!=ne.debounceRendering)&&((Wu=ne.debounceRendering)||xf)(rs)}function rs(){for(var t,e,n,r,i,o,s,a=1;Jn.length;)Jn.length>a&&Jn.sort(Ff),t=Jn.shift(),a=Jn.length,t.__d&&(n=void 0,r=void 0,i=(r=(e=t).__v).__e,o=[],s=[],e.__P&&((n=Gt({},r)).__v=r.__v+1,ne.vnode&&ne.vnode(n),_c(e.__P,n,r,e.__n,e.__P.namespaceURI,32&r.__u?[i]:null,o,i==null?Kr(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&&Vf(n)));rs.__r=0}function Xu(t,e,n,r,i,o,s,a,l,u,c){var d,h,p,m,_,E,A,g=r&&r.__k||Bf,S=e.length;for(l=(function(O,D,I,R,y){var v,T,C,N,L,b=I.length,k=b,x=0;for(O.__k=new Array(y),v=0;v<y;v++)(T=D[v])!=null&&typeof T!="boolean"&&typeof T!="function"?(typeof T=="string"||typeof T=="number"||typeof T=="bigint"||T.constructor==String?T=O.__k[v]=Ci(null,T,null,null,null):Ui(T)?T=O.__k[v]=Ci(ie,{children:T},null,null,null):T.constructor==null&&T.__b>0?T=O.__k[v]=Ci(T.type,T.props,T.key,T.ref?T.ref:null,T.__v):O.__k[v]=T,N=v+x,T.__=O,T.__b=O.__b+1,C=null,(L=T.__i=ig(T,I,N,k))!=-1&&(k--,(C=I[L])&&(C.__u|=2)),C==null||C.__v==null?(L==-1&&(y>b?x--:y<b&&x++),typeof T.type!="function"&&(T.__u|=4)):L!=N&&(L==N-1?x--:L==N+1?x++:(L>N?x--:x++,T.__u|=4))):O.__k[v]=null;if(k)for(v=0;v<b;v++)(C=I[v])!=null&&!(2&C.__u)&&(C.__e==R&&(R=Kr(C)),Gf(C,C));return R})(n,e,g,l,S),d=0;d<S;d++)(p=n.__k[d])!=null&&(h=p.__i==-1?Hi:g[p.__i]||Hi,p.__i=d,E=_c(t,p,h,i,o,s,a,l,u,c),m=p.__e,p.ref&&h.ref!=p.ref&&(h.ref&&Ac(h.ref,null,p),c.push(p.ref,p.__c||m,p)),_==null&&m!=null&&(_=m),(A=!!(4&p.__u))||h.__k===p.__k?l=zf(p,l,t,A):typeof p.type=="function"&&E!==void 0?l=E:m&&(l=m.nextSibling),p.__u&=-7);return n.__e=_,l}function zf(t,e,n,r){var i,o;if(typeof t.type=="function"){for(i=t.__k,o=0;i&&o<i.length;o++)i[o]&&(i[o].__=t,e=zf(i[o],e,n,r));return e}t.__e!=e&&(r&&(e&&t.type&&!e.parentNode&&(e=Kr(t)),n.insertBefore(t.__e,e||null)),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function mn(t,e){return e=e||[],t==null||typeof t=="boolean"||(Ui(t)?t.some(function(n){mn(n,e)}):e.push(t)),e}function ig(t,e,n,r){var i,o,s,a=t.key,l=t.type,u=e[n],c=u!=null&&!(2&u.__u);if(u===null&&a==null||c&&a==u.key&&l==u.type)return n;if(r>(c?1:0)){for(i=n-1,o=n+1;i>=0||o<e.length;)if((u=e[s=i>=0?i--:o++])!=null&&!(2&u.__u)&&a==u.key&&l==u.type)return s}return-1}function Ku(t,e,n){e[0]=="-"?t.setProperty(e,n==null?"":n):t[e]=n==null?"":typeof n!="number"||rg.test(e)?n:n+"px"}function Co(t,e,n,r,i){var o,s;e:if(e=="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof r=="string"&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||Ku(t.style,e,"");if(n)for(e in n)r&&n[e]==r[e]||Ku(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")o=e!=(e=e.replace(Hf,"$1")),s=e.toLowerCase(),e=s in t||e=="onFocusOut"||e=="onFocusIn"?s.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+o]=n,n?r?n.u=r.u:(n.u=Ec,t.addEventListener(e,o?gl:Al,o)):t.removeEventListener(e,o?gl:Al,o);else{if(i=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=n==null?"":n;break e}catch(a){}typeof n=="function"||(n==null||n===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&n==1?"":n))}}function qu(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e.t==null)e.t=Ec++;else if(e.t<n.u)return;return n(ne.event?ne.event(e):e)}}}function _c(t,e,n,r,i,o,s,a,l,u){var c,d,h,p,m,_,E,A,g,S,O,D,I,R,y,v,T,C=e.type;if(e.constructor!=null)return null;128&n.__u&&(l=!!(32&n.__u),o=[a=e.__e=n.__e]),(c=ne.__b)&&c(e);e:if(typeof C=="function")try{if(A=e.props,g="prototype"in C&&C.prototype.render,S=(c=C.contextType)&&r[c.__c],O=c?S?S.props.value:c.__:r,n.__c?E=(d=e.__c=n.__c).__=d.__E:(g?e.__c=d=new C(A,O):(e.__c=d=new bt(A,O),d.constructor=C,d.render=og),S&&S.sub(d),d.state||(d.state={}),d.__n=r,h=d.__d=!0,d.__h=[],d._sb=[]),g&&d.__s==null&&(d.__s=d.state),g&&C.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=Gt({},d.__s)),Gt(d.__s,C.getDerivedStateFromProps(A,d.__s))),p=d.props,m=d.state,d.__v=e,h)g&&C.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),g&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(g&&C.getDerivedStateFromProps==null&&A!==p&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(A,O),e.__v==n.__v||!d.__e&&d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(A,d.__s,O)===!1){for(e.__v!=n.__v&&(d.props=A,d.state=d.__s,d.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(N){N&&(N.__=e)}),D=0;D<d._sb.length;D++)d.__h.push(d._sb[D]);d._sb=[],d.__h.length&&s.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(A,d.__s,O),g&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(p,m,_)})}if(d.context=O,d.props=A,d.__P=t,d.__e=!1,I=ne.__r,R=0,g){for(d.state=d.__s,d.__d=!1,I&&I(e),c=d.render(d.props,d.state,d.context),y=0;y<d._sb.length;y++)d.__h.push(d._sb[y]);d._sb=[]}else do d.__d=!1,I&&I(e),c=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++R<25);d.state=d.__s,d.getChildContext!=null&&(r=Gt(Gt({},r),d.getChildContext())),g&&!h&&d.getSnapshotBeforeUpdate!=null&&(_=d.getSnapshotBeforeUpdate(p,m)),v=c,c!=null&&c.type===ie&&c.key==null&&(v=Yf(c.props.children)),a=Xu(t,Ui(v)?v:[v],e,n,r,i,o,s,a,l,u),d.base=e.__e,e.__u&=-161,d.__h.length&&s.push(d),E&&(d.__E=d.__=null)}catch(N){if(e.__v=null,l||o!=null)if(N.then){for(e.__u|=l?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;o[o.indexOf(a)]=null,e.__e=a}else{for(T=o.length;T--;)Sl(o[T]);vl(e)}else e.__e=n.__e,e.__k=n.__k,N.then||vl(e);ne.__e(N,e,n)}else o==null&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):a=e.__e=(function(N,L,b,k,x,M,U,V,W){var $,oe,le,ce,he,tt,Vt,nt=b.props||Hi,ve=L.props,Te=L.type;if(Te=="svg"?x="http://www.w3.org/2000/svg":Te=="math"?x="http://www.w3.org/1998/Math/MathML":x||(x="http://www.w3.org/1999/xhtml"),M!=null){for($=0;$<M.length;$++)if((he=M[$])&&"setAttribute"in he==!!Te&&(Te?he.localName==Te:he.nodeType==3)){N=he,M[$]=null;break}}if(N==null){if(Te==null)return document.createTextNode(ve);N=document.createElementNS(x,Te,ve.is&&ve),V&&(ne.__m&&ne.__m(L,M),V=!1),M=null}if(Te==null)nt===ve||V&&N.data==ve||(N.data=ve);else{if(M=M&&lo.call(N.childNodes),!V&&M!=null)for(nt={},$=0;$<N.attributes.length;$++)nt[(he=N.attributes[$]).name]=he.value;for($ in nt)if(he=nt[$],$!="children"){if($=="dangerouslySetInnerHTML")le=he;else if(!($ in ve)){if($=="value"&&"defaultValue"in ve||$=="checked"&&"defaultChecked"in ve)continue;Co(N,$,null,he,x)}}for($ in ve)he=ve[$],$=="children"?ce=he:$=="dangerouslySetInnerHTML"?oe=he:$=="value"?tt=he:$=="checked"?Vt=he:V&&typeof he!="function"||nt[$]===he||Co(N,$,he,nt[$],x);if(oe)V||le&&(oe.__html==le.__html||oe.__html==N.innerHTML)||(N.innerHTML=oe.__html),L.__k=[];else if(le&&(N.innerHTML=""),Xu(L.type=="template"?N.content:N,Ui(ce)?ce:[ce],L,b,k,Te=="foreignObject"?"http://www.w3.org/1999/xhtml":x,M,U,M?M[0]:b.__k&&Kr(b,0),V,W),M!=null)for($=M.length;$--;)Sl(M[$]);V||($="value",Te=="progress"&&tt==null?N.removeAttribute("value"):tt!=null&&(tt!==N[$]||Te=="progress"&&!tt||Te=="option"&&tt!=nt[$])&&Co(N,$,tt,nt[$],x),$="checked",Vt!=null&&Vt!=N[$]&&Co(N,$,Vt,nt[$],x))}return N})(n.__e,e,n,r,i,o,s,l,u);return(c=ne.diffed)&&c(e),128&e.__u?void 0:a}function vl(t){t&&t.__c&&(t.__c.__e=!0),t&&t.__k&&t.__k.forEach(vl)}function $f(t,e,n){for(var r=0;r<n.length;r++)Ac(n[r],n[++r],n[++r]);ne.__c&&ne.__c(e,t),t.some(function(i){try{t=i.__h,i.__h=[],t.some(function(o){o.call(i)})}catch(o){ne.__e(o,i.__v)}})}function Yf(t){return typeof t!="object"||t==null||t.__b&&t.__b>0?t:Ui(t)?t.map(Yf):Gt({},t)}function Ac(t,e,n){try{if(typeof t=="function"){var r=typeof t.__u=="function";r&&t.__u(),r&&e==null||(t.__u=t(e))}else t.current=e}catch(i){ne.__e(i,n)}}function Gf(t,e,n){var r,i;if(ne.unmount&&ne.unmount(t),(r=t.ref)&&(r.current&&r.current!=t.__e||Ac(r,null,e)),(r=t.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){ne.__e(o,e)}r.base=r.__P=null}if(r=t.__k)for(i=0;i<r.length;i++)r[i]&&Gf(r[i],e,n||typeof t.type!="function");n||Sl(t.__e),t.__c=t.__=t.__e=void 0}function og(t,e,n){return this.constructor(t,n)}function Bi(t,e,n){var r,i,o,s;e==document&&(e=document.documentElement),ne.__&&ne.__(t,e),i=(r=typeof n=="function")?null:n&&n.__k||e.__k,o=[],s=[],_c(e,t=(!r&&n||e).__k=me(ie,null,[t]),i||Hi,Hi,e.namespaceURI,!r&&n?[n]:i?null:e.firstChild?lo.call(e.childNodes):null,o,!r&&n?n:i?i.__e:e.firstChild,r,s),$f(o,t,s)}function Wf(t,e){Bi(t,e,Wf)}function sg(t,e,n){var r,i,o,s,a=Gt({},t.props);for(o in t.type&&t.type.defaultProps&&(s=t.type.defaultProps),e)o=="key"?r=e[o]:o=="ref"?i=e[o]:a[o]=e[o]===void 0&&s!=null?s[o]:e[o];return arguments.length>2&&(a.children=arguments.length>3?lo.call(arguments,2):n),Ci(t.type,a,r||t.key,i||t.ref,null)}function si(t){function e(n){var r,i;return this.getChildContext||(r=new Set,(i={})[e.__c]=this,this.getChildContext=function(){return i},this.componentWillUnmount=function(){r=null},this.shouldComponentUpdate=function(o){this.props.value!=o.value&&r.forEach(function(s){s.__e=!0,Ol(s)})},this.sub=function(o){r.add(o);var s=o.componentWillUnmount;o.componentWillUnmount=function(){r&&r.delete(o),s&&s.call(o)}}),n.children}return e.__c="__cC"+Uf++,e.__=t,e.Provider=e.__l=(e.Consumer=function(n,r){return n.children(r)}).contextType=e,e}lo=Bf.slice,ne={__e:function(t,e,n,r){for(var i,o,s;e=e.__;)if((i=e.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(t)),s=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(t,r||{}),s=i.__d),s)return i.__E=i}catch(a){t=a}throw t}},Pf=0,bt.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=Gt({},this.state),typeof t=="function"&&(t=t(Gt({},n),this.props)),t&&Gt(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),Ol(this))},bt.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),Ol(this))},bt.prototype.render=ie,Jn=[],xf=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Ff=function(t,e){return t.__v.__b-e.__v.__b},rs.__r=0,Hf=/(PointerCapture)$|Capture$/i,Ec=0,Al=qu(!1),gl=qu(!0),Uf=0;var ag=0;function f(t,e,n,r,i,o){e||(e={});var s,a,l=e;if("ref"in l)for(a in l={},e)a=="ref"?s=e[a]:l[a]=e[a];var u={type:t,props:l,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--ag,__i:-1,__u:0,__source:i,__self:o};if(typeof t=="function"&&(s=t.defaultProps))for(a in s)l[a]===void 0&&(l[a]=s[a]);return ne.vnode&&ne.vnode(u),u}var An,Ee,Sa,Ju,qr=0,Xf=[],Se=ne,Zu=Se.__b,Qu=Se.__r,ed=Se.diffed,td=Se.__c,nd=Se.unmount,rd=Se.__;function gr(t,e){Se.__h&&Se.__h(Ee,t,qr||e),qr=0;var n=Ee.__H||(Ee.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function ee(t){return qr=1,Ps(Kf,t)}function Ps(t,e,n){var r=gr(An++,2);if(r.t=t,!r.__c&&(r.__=[n?n(e):Kf(void 0,e),function(a){var l=r.__N?r.__N[0]:r.__[0],u=r.t(l,a);l!==u&&(r.__N=[u,r.__[1]],r.__c.setState({}))}],r.__c=Ee,!Ee.__f)){var i=function(a,l,u){if(!r.__c.__H)return!0;var c=r.__c.__H.__.filter(function(h){return!!h.__c});if(c.every(function(h){return!h.__N}))return!o||o.call(this,a,l,u);var d=r.__c.props!==a;return c.forEach(function(h){if(h.__N){var p=h.__[0];h.__=h.__N,h.__N=void 0,p!==h.__[0]&&(d=!0)}}),o&&o.call(this,a,l,u)||d};Ee.__f=!0;var o=Ee.shouldComponentUpdate,s=Ee.componentWillUpdate;Ee.componentWillUpdate=function(a,l,u){if(this.__e){var c=o;o=void 0,i(a,l,u),o=c}s&&s.call(this,a,l,u)},Ee.shouldComponentUpdate=i}return r.__N||r.__}function z(t,e){var n=gr(An++,3);!Se.__s&&Sc(n.__H,e)&&(n.__=t,n.u=e,Ee.__H.__h.push(n))}function We(t,e){var n=gr(An++,4);!Se.__s&&Sc(n.__H,e)&&(n.__=t,n.u=e,Ee.__h.push(n))}function X(t){return qr=5,Z(function(){return{current:t}},[])}function Sn(t,e,n){qr=6,We(function(){if(typeof t=="function"){var r=t(e());return function(){t(null),r&&typeof r=="function"&&r()}}if(t)return t.current=e(),function(){return t.current=null}},n==null?n:n.concat(t))}function Z(t,e){var n=gr(An++,7);return Sc(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function q(t,e){return qr=8,Z(function(){return t},e)}function Sr(t){var e=Ee.context[t.__c],n=gr(An++,9);return n.c=t,e?(n.__==null&&(n.__=!0,e.sub(Ee)),e.props.value):t.__}function gc(t,e){Se.useDebugValue&&Se.useDebugValue(e?e(t):t)}function xs(){var t=gr(An++,11);if(!t.__){for(var e=Ee.__v;e!==null&&!e.__m&&e.__!==null;)e=e.__;var n=e.__m||(e.__m=[0,0]);t.__="P"+n[0]+"-"+n[1]++}return t.__}function lg(){for(var t;t=Xf.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach($o),t.__H.__h.forEach(Dl),t.__H.__h=[]}catch(e){t.__H.__h=[],Se.__e(e,t.__v)}}Se.__b=function(t){Ee=null,Zu&&Zu(t)},Se.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),rd&&rd(t,e)},Se.__r=function(t){Qu&&Qu(t),An=0;var e=(Ee=t.__c).__H;e&&(Sa===Ee?(e.__h=[],Ee.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(e.__h.forEach($o),e.__h.forEach(Dl),e.__h=[],An=0)),Sa=Ee},Se.diffed=function(t){ed&&ed(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(Xf.push(e)!==1&&Ju===Se.requestAnimationFrame||((Ju=Se.requestAnimationFrame)||cg)(lg)),e.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),Sa=Ee=null},Se.__c=function(t,e){e.some(function(n){try{n.__h.forEach($o),n.__h=n.__h.filter(function(r){return!r.__||Dl(r)})}catch(r){e.some(function(i){i.__h&&(i.__h=[])}),e=[],Se.__e(r,n.__v)}}),td&&td(t,e)},Se.unmount=function(t){nd&&nd(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{$o(r)}catch(i){e=i}}),n.__H=void 0,e&&Se.__e(e,n.__v))};var id=typeof requestAnimationFrame=="function";function cg(t){var e,n=function(){clearTimeout(r),id&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,35);id&&(e=requestAnimationFrame(n))}function $o(t){var e=Ee,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),Ee=e}function Dl(t){var e=Ee;t.__c=t.__(),Ee=e}function Sc(t,e){return!t||t.length!==e.length||e.some(function(n,r){return n!==t[r]})}function Kf(t,e){return typeof e=="function"?e(t):e}function qf(t,e){for(var n in e)t[n]=e[n];return t}function Tl(t,e){for(var n in t)if(n!=="__source"&&!(n in e))return!0;for(var r in e)if(r!=="__source"&&t[r]!==e[r])return!0;return!1}function Oc(t,e){var n=e(),r=ee({t:{__:n,u:e}}),i=r[0].t,o=r[1];return We(function(){i.__=n,i.u=e,Oa(i)&&o({t:i})},[t,n,e]),z(function(){return Oa(i)&&o({t:i}),t(function(){Oa(i)&&o({t:i})})},[t]),n}function Oa(t){var e,n,r=t.u,i=t.__;try{var o=r();return!((e=i)===(n=o)&&(e!==0||1/e==1/n)||e!=e&&n!=n)}catch(s){return!0}}function vc(t){t()}function Dc(t){return t}function Tc(){return[!1,vc]}var Rc=We;function is(t,e){this.props=t,this.context=e}function ur(t,e){function n(i){var o=this.props.ref,s=o==i.ref;return!s&&o&&(o.call?o(null):o.current=null),e?!e(this.props,i)||!s:Tl(this.props,i)}function r(i){return this.shouldComponentUpdate=n,me(t,i)}return r.displayName="Memo("+(t.displayName||t.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r.type=t,r}(is.prototype=new bt).isPureReactComponent=!0,is.prototype.shouldComponentUpdate=function(t,e){return Tl(this.props,t)||Tl(this.state,e)};var od=ne.__b;ne.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),od&&od(t)};var ug=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function _t(t){function e(n){var r=qf({},n);return delete r.ref,t(r,n.ref||null)}return e.$$typeof=ug,e.render=t,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var sd=function(t,e){return t==null?null:mn(mn(t).map(e))},Jf={map:sd,forEach:sd,count:function(t){return t?mn(t).length:0},only:function(t){var e=mn(t);if(e.length!==1)throw"Children.only";return e[0]},toArray:mn},dg=ne.__e;ne.__e=function(t,e,n,r){if(t.then){for(var i,o=e;o=o.__;)if((i=o.__c)&&i.__c)return e.__e==null&&(e.__e=n.__e,e.__k=n.__k),i.__c(t,e)}dg(t,e,n,r)};var ad=ne.unmount;function Zf(t,e,n){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),t.__c.__H=null),(t=qf({},t)).__c!=null&&(t.__c.__P===n&&(t.__c.__P=e),t.__c.__e=!0,t.__c=null),t.__k=t.__k&&t.__k.map(function(r){return Zf(r,e,n)})),t}function Qf(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(r){return Qf(r,e,n)}),t.__c&&t.__c.__P===e&&(t.__e&&n.appendChild(t.__e),t.__c.__e=!0,t.__c.__P=n)),t}function Ni(){this.__u=0,this.o=null,this.__b=null}function em(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function tm(t){var e,n,r,i=null;function o(s){if(e||(e=t()).then(function(a){a&&(i=a.default||a),r=!0},function(a){n=a,r=!0}),n)throw n;if(!r)throw e;return i?me(i,s):null}return o.displayName="Lazy",o.__f=!0,o}function Pr(){this.i=null,this.l=null}ne.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),ad&&ad(t)},(Ni.prototype=new bt).__c=function(t,e){var n=e.__c,r=this;r.o==null&&(r.o=[]),r.o.push(n);var i=em(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 l=r.state.__a;r.__v.__k[0]=Qf(l,l.__c.__P,l.__c.__O)}var u;for(r.setState({__a:r.__b=null});u=r.o.pop();)u.forceUpdate()}};r.__u++||32&e.__u||r.setState({__a:r.__b=r.__v.__k[0]}),t.then(s,s)},Ni.prototype.componentWillUnmount=function(){this.o=[]},Ni.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]=Zf(this.__b,n,r.__O=r.__P)}this.__b=null}var i=e.__a&&me(ie,null,t.fallback);return i&&(i.__u&=-33),[me(ie,null,e.__a?null:t.children),i]};var ld=function(t,e,n){if(++n[1]===n[0]&&t.l.delete(e),t.props.revealOrder&&(t.props.revealOrder[0]!=="t"||!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]}};function hg(t){return this.getChildContext=function(){return t.context},t.children}function pg(t){var e=this,n=t.h;if(e.componentWillUnmount=function(){Bi(null,e.v),e.v=null,e.h=null},e.h&&e.h!==n&&e.componentWillUnmount(),!e.v){for(var r=e.__v;r!==null&&!r.__m&&r.__!==null;)r=r.__;e.h=n,e.v={nodeType:1,parentNode:n,childNodes:[],__k:{__m:r.__m},contains:function(){return!0},insertBefore:function(i,o){this.childNodes.push(i),e.h.insertBefore(i,o)},removeChild:function(i){this.childNodes.splice(this.childNodes.indexOf(i)>>>1,1),e.h.removeChild(i)}}}Bi(me(hg,{context:e.context},t.__v),e.v)}function Ic(t,e){var n=me(pg,{__v:t,h:e});return n.containerInfo=e,n}(Pr.prototype=new bt).__a=function(t){var e=this,n=em(e.__v),r=e.l.get(t);return r[0]++,function(i){var o=function(){e.props.revealOrder?(r.push(i),ld(e,t,r)):i()};n?n(o):o()}},Pr.prototype.render=function(t){this.i=null,this.l=new Map;var e=mn(t.children);t.revealOrder&&t.revealOrder[0]==="b"&&e.reverse();for(var n=e.length;n--;)this.l.set(e[n],this.i=[1,0,this.i]);return t.children},Pr.prototype.componentDidUpdate=Pr.prototype.componentDidMount=function(){var t=this;this.l.forEach(function(e,n){ld(t,n,e)})};var nm=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.element")||60103,fg=/^(?: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]/,mg=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Eg=/[A-Z0-9]/g,_g=typeof document!="undefined",Ag=function(t){return(typeof Symbol!="undefined"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(t)};function yc(t,e,n){return e.__k==null&&(e.textContent=""),Bi(t,e),typeof n=="function"&&n(),t?t.__c:null}function rm(t,e,n){return Wf(t,e),typeof n=="function"&&n(),t?t.__c:null}bt.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(bt.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})});var cd=ne.event;function gg(){}function Sg(){return this.cancelBubble}function Og(){return this.defaultPrevented}ne.event=function(t){return cd&&(t=cd(t)),t.persist=gg,t.isPropagationStopped=Sg,t.isDefaultPrevented=Og,t.nativeEvent=t};var Cc,vg={enumerable:!1,configurable:!0,get:function(){return this.class}},ud=ne.vnode;ne.vnode=function(t){typeof t.type=="string"&&(function(e){var n=e.props,r=e.type,i={},o=r.indexOf("-")===-1;for(var s in n){var a=n[s];if(!(s==="value"&&"defaultValue"in n&&a==null||_g&&s==="children"&&r==="noscript"||s==="class"||s==="className")){var l=s.toLowerCase();s==="defaultValue"&&"value"in n&&n.value==null?s="value":s==="download"&&a===!0?a="":l==="translate"&&a==="no"?a=!1:l[0]==="o"&&l[1]==="n"?l==="ondoubleclick"?s="ondblclick":l!=="onchange"||r!=="input"&&r!=="textarea"||Ag(n.type)?l==="onfocus"?s="onfocusin":l==="onblur"?s="onfocusout":mg.test(s)&&(s=l):l=s="oninput":o&&fg.test(s)?s=s.replace(Eg,"-$&").toLowerCase():a===null&&(a=void 0),l==="oninput"&&i[s=l]&&(s="oninputCapture"),i[s]=a}}r=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=mn(n.children).forEach(function(u){u.props.selected=i.value.indexOf(u.props.value)!=-1})),r=="select"&&i.defaultValue!=null&&(i.value=mn(n.children).forEach(function(u){u.props.selected=i.multiple?i.defaultValue.indexOf(u.props.value)!=-1:i.defaultValue==u.props.value})),n.class&&!n.className?(i.class=n.class,Object.defineProperty(i,"className",vg)):(n.className&&!n.class||n.class&&n.className)&&(i.class=i.className=n.className),e.props=i})(t),t.$$typeof=nm,ud&&ud(t)};var dd=ne.__r;ne.__r=function(t){dd&&dd(t),Cc=t.__c};var hd=ne.diffed;ne.diffed=function(t){hd&&hd(t);var e=t.props,n=t.__e;n!=null&&t.type==="textarea"&&"value"in e&&e.value!==n.value&&(n.value=e.value==null?"":e.value),Cc=null};var im={ReactCurrentDispatcher:{current:{readContext:function(t){return Cc.__n[t.__c].props.value},useCallback:q,useContext:Sr,useDebugValue:gc,useDeferredValue:Dc,useEffect:z,useId:xs,useImperativeHandle:Sn,useInsertionEffect:Rc,useLayoutEffect:We,useMemo:Z,useReducer:Ps,useRef:X,useState:ee,useSyncExternalStore:Oc,useTransition:Tc}}};function om(t){return me.bind(null,t)}function co(t){return!!t&&t.$$typeof===nm}function sm(t){return co(t)&&t.type===ie}function am(t){return!!t&&!!t.displayName&&(typeof t.displayName=="string"||t.displayName instanceof String)&&t.displayName.startsWith("Memo(")}function lm(t){return co(t)?sg.apply(null,arguments):t}function Nc(t){return!!t.__k&&(Bi(null,t),!0)}function cm(t){return t&&(t.base||t.nodeType===1&&t)||null}var um=function(t,e){return t(e)},Fs=function(t,e){return t(e)},dm=ie,hm=co,F={useState:ee,useId:xs,useReducer:Ps,useEffect:z,useLayoutEffect:We,useInsertionEffect:Rc,useTransition:Tc,useDeferredValue:Dc,useSyncExternalStore:Oc,startTransition:vc,useRef:X,useImperativeHandle:Sn,useMemo:Z,useCallback:q,useContext:Sr,useDebugValue:gc,version:"18.3.1",Children:Jf,render:yc,hydrate:rm,unmountComponentAtNode:Nc,createPortal:Ic,createElement:me,createContext:si,createFactory:om,cloneElement:lm,createRef:jf,Fragment:ie,isValidElement:co,isElement:hm,isFragment:sm,isMemo:am,findDOMNode:cm,Component:bt,PureComponent:is,memo:ur,forwardRef:_t,flushSync:Fs,unstable_batchedUpdates:um,StrictMode:dm,Suspense:Ni,SuspenseList:Pr,lazy:tm,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:im};const bc=Object.freeze(Object.defineProperty({__proto__:null,Children:Jf,Component:bt,Fragment:ie,PureComponent:is,StrictMode:dm,Suspense:Ni,SuspenseList:Pr,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:im,cloneElement:lm,createContext:si,createElement:me,createFactory:om,createPortal:Ic,createRef:jf,default:F,findDOMNode:cm,flushSync:Fs,forwardRef:_t,hydrate:rm,isElement:hm,isFragment:sm,isMemo:am,isValidElement:co,lazy:tm,memo:ur,render:yc,startTransition:vc,unmountComponentAtNode:Nc,unstable_batchedUpdates:um,useCallback:q,useContext:Sr,useDebugValue:gc,useDeferredValue:Dc,useEffect:z,useErrorBoundary:function(t){var e=gr(An++,10),n=ee();return e.__=t,Ee.componentDidCatch||(Ee.componentDidCatch=function(r,i){e.__&&e.__(r,i),n[1](r)}),[n[0],function(){n[1](void 0)}]},useId:xs,useImperativeHandle:Sn,useInsertionEffect:Rc,useLayoutEffect:We,useMemo:Z,useReducer:Ps,useRef:X,useState:ee,useSyncExternalStore:Oc,useTransition:Tc,version:"18.3.1"},Symbol.toStringTag,{value:"Module"}));var wc=Object.prototype.hasOwnProperty;function ke(t){return Array.isArray(t)}function Kt(t){return!(!t||typeof t!="object"||t instanceof Date||ke(t))}function Dg(t){return Kt(t)&&t.constructor===Object}function te(t){return typeof t=="function"}function Ze(t){const e=typeof t;return t!==void 0&&(Rl(t)||e!=="object"&&e!=="function")}function Rl(t){return t instanceof Date}function pm(t){return typeof t=="boolean"}function Wt(t){return t instanceof Promise}function Be(t){return t instanceof Map||t instanceof WeakMap}function gn(t){return t instanceof Set||t instanceof WeakSet}function ss(t){if(!t)return!1;if(ke(t))return t.length===0;if(Be(t)||gn(t))return t.size===0;for(const e in t)if(wc.call(t,e))return!1;return!0}var Tg=new Set(["boolean","string","number"]);function Hs(t){return!!t.parent}var fm=Symbol.toPrimitive,Rg=Symbol.iterator,Jr=Symbol("getNode"),Us=Symbol("delete"),mm=Symbol("opaque"),Ig=Symbol("plain"),Lc=Symbol("optimized"),ji=Symbol("linked"),we={pendingNodes:new Map,dirtyNodes:new Set};function Vi(t){return t&&(t[mm]||t.$$typeof)}function Em(t){return t&&t[Ig]}function _m(t){return ke(t)?"array":Be(t)?"map":t instanceof Set?"set":"object"}function yg(t,e){return Be(e)?{__LSType:"Map",value:Array.from(e.entries())}:e instanceof Set?{__LSType:"Set",value:Array.from(e)}:(we.replacer&&(e=we.replacer(t,e)),e)}var Cg=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z$/;function Ng(t,e){if(e){if(typeof e=="string"&&Cg.test(e))return new Date(e);if(typeof e=="object"){if(e.__LSType==="Map")return new Map(e.value);if(e.__LSType==="Set")return new Set(e.value)}we.reviver&&(e=we.reviver(t,e))}return e}function Am(t){return t&&JSON.stringify(t,yg)}function gm(t){return t&&JSON.parse(t,Ng)}function Sm(t){return gm(Am(t))}function Ne(t){return!!t&&!!t[Jr]}function uo(t){return t&&t[Jr]}function Om(t,e,n,r,i){return r?t.add(n):i?t.set(e,n):t[e]=n,n}function En(t,e){var n;const r=(n=t.parent)!=null?n:t,i=t.parent?t.key:"_",o=e===Us;o&&(e=void 0);const s=t.parent?kc(r):r.root,a=gn(s),l=Be(s),u=a?i:l?s.get(i):s[i],c=te(e);if((e=r.isAssigning||!c||te(u)?e:e(u))!==u)try{r.isSetting=(r.isSetting||0)+1,o?l||a?s.delete(i):delete s[i]:Om(s,i,e,a,l)}finally{r.isSetting--}return{prevValue:u,newValue:e,parentValue:s}}var pd=[];function Ae(t){let e=0,n=t;for(;Hs(n);)pd[e++]=n.key,n=n.parent;let r=t.root._;for(let i=e-1;r&&i>=0;i--){const o=pd[i];r=o!=="size"&&Be(r)?r.get(o):r[o]}return r}function Bt(t,e,n){var r,i;let o=(r=t.children)==null?void 0:r.get(e);return o||(o={root:t.root,parent:t,key:e,lazy:!0,numListenersRecursive:0},((i=t.lazyFn)==null?void 0:i.length)===1&&(n=t.lazyFn.bind(t,e)),te(n)&&(o=Object.assign(()=>{},o),o.lazyFn=n),t.children||(t.children=new Map),t.children.set(e,o)),o}function kc(t){let e=Ae(t);if(!e||te(e))if(Hs(t)){const n=kc(t.parent),r=gn(n),i=Be(n);e=Om(n,t.key,{},r,i)}else e=t.root._={};return e}function vm(t,e){var n,r;let i=Ne(t)?void 0:Kt(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 o=e.key+"_keyExtractor",s=(r=(n=e.functions)==null?void 0:n.get(o))!=null?r:Ae(e.parent)[e.key+"_keyExtractor"];s&&te(s)&&(i=s)}return i}function fd(t,e,n){t.functions||(t.functions=new Map),t.functions.set(e,n)}function Dm(t,e){return t===e||Rl(t)&&Rl(e)&&+t==+e}function Il(t,e,n,r){return e?void 0:t?r?Array.from(t):n?Array.from(t.keys()):Object.keys(t):[]}function bg(t,e){return t&&Object.defineProperty(t,e,{value:!0,enumerable:!1,writable:!0,configurable:!0}),t}var md=function(t){return bg(t,mm)};function Tm(t,e){var n;t.isPlain||!((n=t.parent)!=null&&n.isPlain)&&!Em(e)||(t.isPlain=!0)}function qt(t,e,n,r){let i=t;return!Ne(i)&&te(i)&&(i=n?i(n):i()),Ne(i)&&!r?i.get(e):i}var bi,wg=(t,e)=>t&&t[e];function Rm(t,e,n,r,i,o,s){let a,l=t;if(e.length>0){let u=o;for(let c=0;c<e.length;c++){a=e[c];const d=Be(l);let h=l?d?l.get(a):l[a]:void 0;const p=u?d?u.get(a):u[a]:void 0;if(h===Us)return u&&(d?l.set(a,p):l[a]=p,s==null||s(e.slice(0,c+1),p)),t;if(h===void 0&&r===void 0&&c===e.length-1)return t;c<e.length-1&&h==null&&(h=Mc(n[c]),Be(l)?l.set(a,h):l[a]=h),c<e.length-1&&(l=h,u&&(u=p))}}return a===void 0?t=i==="merge"?as(t,r):r:i==="merge"?l[a]=as(l[a],r):Be(l)?l.set(a,r):l[a]=r,t}function Ed(t,e,n){let r=n;for(let i=0;i<t.length;i++){const o=t[i];r=r?r[o]:Mc(e[i])}return r}function yl(t){return!(!t||(Kt(t)||ke(t))&&ss(t))}function Mc(t){switch(t){case"array":return[];case"map":return new Map;case"set":return new Set;default:return{}}}function Lg(t,e,n){const{path:r,valueAtPath:i,prevAtPath:o,pathTypes:s}=e;return Rm(t,r,s,o)}function as(t,...e){if(Ze(t))return e[e.length-1];let n=ke(t)?[...t]:{...t};for(let r=0;r<e.length;r++){const i=e[r];if(Dg(i)||ke(i)){const o=i;for(const s in o)wc.call(o,s)&&(o[s]instanceof Object&&!Ne(o[s])&&Object.keys(o[s]).length>0?n[s]=as(n[s]||(ke(o[s])?[]:{}),o[s]):n[s]=o[s])}else n=i}return n}var ls=0,va=!1,Da=!1,jr=new Map;function kg(){jr.size>0&&ai(!0)}function Im(t,e){for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function Mg(t,e){try{return(function(n,r){for(let i=0;i<r.length;i++)n=Lg(n,r[i]);return n})(t?Sm(t):{},e)}catch(n){return}}function Pc(t,e){return function(){return Mg(t,e)}}function zi(t,e,n,r,i){const o=new Map;cs(o,t,!!we.isLoadingLocal,!!we.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:!!we.isLoadingRemote,isFromPersist:!!we.isLoadingLocal}),o.size&&ym(o,!0),ls<=0&&Cm()}function cs(t,e,n,r,i,o,s,a,l,u,c,d){if(e.numListenersRecursive>0&&((function(h,p,m,_,E,A,g,S,O,D,I,R){if(D?p.listenersImmediate:p.listeners){const y={path:A,pathTypes:g,valueAtPath:S,prevAtPath:O},v=h.get(p);if(v&&A.length>0){const{changes:T}=v;Im(T[0].path,y.path)||(T.push(y),v.level=Math.min(v.level,I),v.whenOptimizedOnlyIf||(v.whenOptimizedOnlyIf=R))}else h.set(p,{level:I,value:E,isFromSync:_,isFromPersist:m,whenOptimizedOnlyIf:R,changes:[y]})}})(t,e,n,r,i,o,s,a,l,u,c,d),e.linkedFromNodes))for(const h of e.linkedFromNodes)cs(t,Pg(h,o),n,r,a,[],[],a,l,u,0,d);if(e.parent){const h=e.parent;h&&cs(t,h,n,r,Ae(h),[e.key].concat(o),[_m(i)].concat(s),a,l,u,c+1,d)}}function ym(t,e){const n=new Set;t.forEach(({changes:r,level:i,value:o,isFromPersist:s,isFromSync:a,whenOptimizedOnlyIf:l},u)=>{const c=e?u.listenersImmediate:u.listeners;if(c){let d;const h=Array.from(c);for(let p=0;p<h.length;p++){const m=h[p],{track:_,noArgs:E,listener:A}=m;n.has(A)||(_===!0?i<=0:_!==Lc||l&&i<=0)&&(E||d||(d={value:o,isFromPersist:s,isFromSync:a,getPrevious:Pc(o,r),changes:r}),_||n.add(A),A(d))}}})}function Cm(){const t=Array.from(we.dirtyNodes);we.dirtyNodes.clear(),t.forEach(r=>{const i=r.dirtyFn;i&&(r.dirtyFn=void 0,i())});const e=jr;jr=new Map;const n=new Map;e.forEach(({value:r,prev:i,level:o,isFromPersist:s,isFromSync:a,whenOptimizedOnlyIf:l},u)=>{cs(n,u,s,a,r,[],[],r,i,!1,o,l)}),n.size&&ym(n,!1)}function wt(t){Bs();try{t()}finally{ai()}}function Bs(){ls++,bi||(bi=setTimeout(kg,0))}function ai(t){(--ls<=0||t)&&(va?Da=!0:(bi&&(clearTimeout(bi),bi=void 0),ls=0,va=!0,Cm(),va=!1,Da&&(Da=!1,ai(!0))))}function Pg(t,e){let n=t;for(let r=0;r<e.length;r++)n=Bt(n,e[r]);return n}function xc(t,e,n,r,i){if(Ne(t))return t;const o=Wt(t);let s={root:{_:t},lazy:!0,numListenersRecursive:0};te(t)&&(s=Object.assign(()=>{},s),s.lazyFn=t);var a;const l=e||(a=t,Tg.has(typeof a))?new i(s):r(s);return o&&(En(s,void 0),n(s,t)),l}var xr=new WeakMap,Nm=[],bm=[],wm=[],Fr=0,Cl=!1;function mi(t,e,n){const r=xr.get(t);if(!r||!r.has(n))return;const i=r.get(n);i&&i.size!==0&&(Nm[Fr]=t,bm[Fr]=e,wm[Fr]=n,Fr++,Cl||(Cl=!0,queueMicrotask(xg)))}var Ei={type:"listener-added",node:null,listener:void 0,timestamp:0};function xg(){Cl=!1;const t=typeof performance!="undefined"?performance.now():Date.now();Ei.timestamp=t;for(let e=0;e<Fr;e++){const n=Nm[e],r=bm[e],i=wm[e],o=xr.get(n);if(!o)continue;const s=o.get(i);if(!s||s.size===0)continue;const a=n.listeners,l=n.listenersImmediate;if(!a&&!l&&n.numListenersRecursive&&(i!=="listener-added"||r))continue;let u=!1;if(i==="listener-added")r?u=!!(a!=null&&a.has(r))||!!(l!=null&&l.has(r)):u=!(!(!(a!=null&&a.size)&&!(l!=null&&l.size))||typeof n.numListenersRecursive!="number")&&n.numListenersRecursive>0;else if(i==="listener-removed")u=!(a!=null&&a.has(r))&&!(l!=null&&l.has(r));else{const c=a&&a.size>0||l&&l.size>0;u=typeof n.numListenersRecursive=="number"?!c&&n.numListenersRecursive===0:!c}if(u){Ei.type=i,Ei.node=n,Ei.listener=r;const c=Array.from(s);for(let d=0;d<c.length;d++)try{c[d](Ei)}catch(h){console.error(`Error in middleware handler for ${i}:`,h)}}}Fr=0}function _d(t){var e,n;return!((e=t.listeners)!=null&&e.size)&&!((n=t.listenersImmediate)!=null&&n.size)&&(function(r){var i;return((i=r.activationState)==null?void 0:i.synced)||!1})(t)}function Bn(t,e,n={},r){var i;const{initial:o,immediate:s,noArgs:a}=n,{trackingType:l}=n;let u=s?t.listenersImmediate:t.listeners;u||(u=new Set,s?t.listenersImmediate=u:t.listeners=u);const c={listener:e,track:l,noArgs:a};if(u.add(c),o){const _=Ae(t);e({value:_,isFromPersist:!0,isFromSync:!1,changes:[{path:[],pathTypes:[],prevAtPath:_,valueAtPath:_}],getPrevious:()=>{}})}let d;function h(_,E=e,A){if(!(r!=null&&r.has(_))){r||(r=new Set),r.add(A||t),E||(E=e);const g={trackingType:!0,...n};d=[...d||[],Bn(_,E,g,r)]}}t.linkedToNode&&h(t.linkedToNode),(i=t.linkedFromNodes)==null||i.forEach(_=>h(_)),t.numListenersRecursive++;let p=t.parent,m=[t.key];for(;p;){if(p.linkedFromNodes)for(const _ of p.linkedFromNodes)r!=null&&r.has(_)||h(_,Fg(_,m,e),p);p.numListenersRecursive++,_d(p)&&mi(p,void 0,"listener-added"),m=[p.key,...m],p=p.parent}return mi(t,c,"listener-added"),()=>{u.delete(c),d==null||d.forEach(A=>A());const _=[];let E=t;for(;E;)E.numListenersRecursive--,E.numListenersRecursive===0&&_.push(E),E=E.parent;mi(t,c,"listener-removed"),u.size===0&&mi(t,void 0,"listeners-cleared");for(const A of _)A!==t&&_d(A)&&mi(A,void 0,"listeners-cleared")}}function Fg(t,e,n){let r=Ed(e,[],Ae(t));return function({value:i,isFromPersist:o,isFromSync:s}){const a=Ed(e,[],i);a!==r&&n({value:a,isFromPersist:o,isFromSync:s,changes:[{path:[],pathTypes:[],prevAtPath:r,valueAtPath:a}],getPrevious:()=>r}),r=a}}function Ad(t,e,n,r){let i=[];return t==null||t.forEach(o=>{const{node:s,track:a}=o;i.push(Bn(s,e,{trackingType:a,immediate:r,noArgs:n}))}),()=>{if(i){for(let o=0;o<i.length;o++)i[o]();i=void 0}}}var Yo=0,gd=[],Hr={current:void 0};function Go(t,e){if(Yo){const n=Hr.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 Lm(t,e,n,r,i,o){let s,a,l=e;gd.push(Hr.current),Yo++,Hr.current={};const u=t&&qt(t,n,r,i==null?void 0:i.fromComputed),c=Hr.current.nodes;return--Yo<0&&(Yo=0),Hr.current=gd.pop(),r!=null&&r.cancel||(s=Ad(c,l,!1,i==null?void 0:i.immediate),a=o?()=>(s==null||s(),s=Ad(c,l),s):void 0),{nodes:c,value:u,dispose:s,resubscribe:a}}function mt(t,e,n){let r,i;te(e)?r=e:n=e;let o=!1;const s={num:0},a=function(){if(o)return;s.onCleanup&&(s.onCleanup(),s.onCleanup=void 0),o=!0,Bs(),delete s.value,i==null||i();const{dispose:l,value:u,nodes:c}=Lm(t,a,void 0,s,n);var d,h;i=l,s.value=u,s.nodes=c,s.refresh=a,s.onCleanupReaction&&(s.onCleanupReaction(),s.onCleanupReaction=void 0),ai(),o=!1,!r||!(n!=null&&n.fromComputed)&&(!(s.num>0)&&(d=t)&&((h=d[Jr])!=null&&h.isEvent)||s.previous===s.value&&typeof s.value!="object")||r(s),s.previous=s.value,s.num++};return a(),()=>{var l,u;(l=s.onCleanup)==null||l.call(s),s.onCleanup=void 0,(u=s.onCleanupReaction)==null||u.call(s),s.onCleanupReaction=void 0,i==null||i()}}function km(t,e){const n=Or(t);if(n==null||Ze(n))return n;const r=e==="string"?te(n.toString)?n.toString:n.valueOf:te(n.valueOf)?n.valueOf:n.toString;return te(r)?r.call(n):n}function Mm(t,e,n){if(Wt(t))return e?t.then(e):t;const r=ke(t);let i,o;return mt(function(s){const a=r?t.map(l=>qt(l)):qt(t);if(!Wt(a)){{let l=!0;if(ke(a))for(let u=0;u<a.length;u++){let c=a[u];Ne(c)?c=qt(c):te(c)&&(c=c()),l=l&&!!(n?yl(c):c)}else l=n?yl(a):a;l&&(i=a,s.cancel=!0)}return i}i=a},function(){o=e==null?void 0:e(i)}),Wt(i)?e?i.then(e):i:i!==void 0?e?o:Promise.resolve(i):new Promise(s=>{if(e){const a=e;e=l=>{const u=a(l);s(Wt(u)?u.then(c=>c):u)}}else e=s})}function js(t,e){return Mm(t,e,!1)}var Ta=new Set(["copyWithin","fill","from","pop","push","reverse","shift","sort","splice","unshift"]),Sd=new Set(["every","filter","find","findIndex","flatMap","forEach","join","map","reduce","some"]),Hg=new Set(["filter","find"]),Nl=new Map,bl=new Map([["get",Vs],["set",Lt],["peek",Or],["onChange",Bn],["assign",function(t,e){const n=ft(t);if(Bs(),Ze(t.root._)&&(t.root._={}),Be(e)){const r=Ae(t);Be(r)?e.forEach((i,o)=>r.set(o,i)):Lt(t,e)}else{t.isAssigning=(t.isAssigning||0)+1;try{Object.assign(n,e)}finally{t.isAssigning--}}return ai(),n}],["delete",Fm],["toggle",function(t){const e=Ae(t);(e==null||pm(e))&&Lt(t,!e)}]]);function Pm(t,e,n,...r){var i;if(n!=="push"||r.length!==1){const o=e.slice(),s=e[n].apply(e,r);if(t){const a=Hs(t),l=a?t.key:"_";(a?Ae(t.parent):t.root)[l]=o,Zr((i=t.parent)!=null?i:t,l,e)}return s}Zr(t,e.length+"",r[0])}function Fc(t,e,n){var r,i,o;if(Kt(e)&&Vi(e)||Kt(n)&&Vi(n)){const D=e!==n;return D&&(t.listeners||t.listenersImmediate)&&zi(t,e,n,0),D}const s=ke(e);let a,l;const u=Be(e),c=gn(e),d=Be(n),h=gn(n),p=Il(e,s,u,c),m=Il(n,s,d,h),_=((r=p||e)==null?void 0:r.length)||0,E=((i=m||n)==null?void 0:i.length)||0;let A,g,S,O=!1;if(s&&ke(n)){if(n.length>0){const D=n[0];if(D!==void 0&&(A=vm(D,t),A&&(g=te(A),a=new Map,l=[]),t.children))for(let I=0;I<n.length;I++){const R=n[I];if(R){const y=t.children.get(I+"");if(y&&(e[I]||Od(y,R),A)){const v=g?A(R):R[A];a.set(v,y)}}}}}else if(n&&(!e||Kt(e))){const D=m.length;for(let I=0;I<D;I++){const R=m[I];if(!p.includes(R)){O=!0;const y=Bt(t,R),v=d?n.get(R):n[R];v!==void 0&&Od(y,v)}}}if(e&&!Ze(e)){O=O||_!==E;const D=O;let I=!1;for(let R=0;R<_;R++){const y=s?R+"":p[R];let v=u?e.get(y):e[y];const T=d?n==null?void 0:n.get(y):n==null?void 0:n[y];let C=!Dm(v,T);if(C){const N=A&&v?g?A(v):v[A]:void 0,L=(o=t.children)==null?void 0:o.get(y);if(Ne(v)){const k=uo(v);if((L==null?void 0:L.linkedToNode)===k){const M=Ae(k);u?e.set(y,M):e[y]=M;continue}const x=v;v=()=>x}let b=Bt(t,y,v);if(b.lazy||!te(v)&&!Ne(v)||(Bm(b,v),Mn(b)),s&&N!==void 0){const k=N!==void 0?a==null?void 0:a.get(N):void 0;if(k){if(k!==void 0&&k.key!==y){const x=n[k.key];D&&(b=k,t.children.delete(b.key),b.key=y,l.push([y,b])),I=!0,C=x!==v}}else O=!0}if(C)if(te(v)||Ne(v))ei(t,y,v);else if(Ze(v))O=!0;else{const k=Fc(b,v,T);O=O||k,C=k}(C||s&&!D)&&(b.listeners||b.listenersImmediate)&&zi(b,v,T,0,!D)}}if(l)for(let R=0;R<l.length;R++){const[y,v]=l[R];t.children.set(y,v)}S=O||I}else n!==void 0&&(S=!0);return S!=null&&S}function Od(t,e){var n,r;(n=t.linkedToNodeDispose)==null||n.call(t),(r=t.activatedObserveDispose)==null||r.call(t),Ze(e)||Fc(t,void 0,e),(t.listeners||t.listenersImmediate)&&zi(t,void 0,e,0)}function ft(t,e,n){return e!==void 0&&(t=Bt(t,e,n)),t.proxy||(t.proxy=new Proxy(t,xm))}function wl(){if(we.pendingNodes.size>0){const t=Array.from(we.pendingNodes.values());we.pendingNodes.clear(),t.forEach(e=>e())}}var xm={get(t,e,n){var r,i,o;if(e===fm)return h=>km(t,h);if(e===Jr)return t;if(e==="apply"||e==="call"){const h=Ae(t);if(te(h))return h[e]}if(e==="constructor"){const h=(r=Mn(t))==null?void 0:r.constructor;return typeof h=="function"?h:Object}let s=Mn(t,e==="get"||e==="peek");if(e===Rg)return!s||Ze(s)?void 0:s[e];const a=t.linkedToNode||(s==null?void 0:s[Jr]);if(a&&e!=="onChange")return xm.get(a,e,n);if(Be(s)||gn(s)){const h=(function(p,m,_){const E=_==null?void 0:_[m];if(m==="size")return Go(p,!0),_[m];if(te(E))return function(A,g,S){const O=arguments.length,D=_;if(m==="get"){if(O>0&&typeof A!="boolean"&&A!==Lc)return ft(p,A)}else{if(m==="set")return O===2?Lt(Bt(p,A),g):O===1&&Be(_)&&Lt(p,A),ft(p);if(m==="delete"){if(O>0){const R=_.get?D.get(A):A;return Fm(p,A),R!==void 0}}else{if(m==="clear"){const R=gn(D)?new Set(D):new Map(D),y=D.size;return D.clear(),void(y&&Hm(p,_,R))}if(m==="add"){const R=new Set(_),y=_.add(A);return _.has(m)||zi(p,y,R,0),ft(p)}}}const I=bl.get(m);if(!I)return _[m](A,g);switch(O){case 0:return I(p);case 1:return I(p,A);case 2:return I(p,A,g);default:return I(p,A,g,S)}}})(t,e,s);if(h!==void 0)return h}const l=bl.get(e);if(l)return e!=="get"&&e!=="peek"||wl(),function(h,p,m){switch(arguments.length){case 0:return l(t);case 1:return l(t,h);case 2:return l(t,h,p);default:return l(t,h,p,m)}};const u=Nl.get(e);if(u)return u.get(t);let c=s==null?void 0:s[e];if(Kt(s)&&Vi(s))return c;const d=(i=t.functions)==null?void 0:i.get(e);if(d)return Ne(d)?d:ft(t,e,d);if(c=(function(h,p){if(h){const m=Object.getOwnPropertyDescriptor(h,p);return m!=null&&m.get&&(delete h[p],h[p]=m.set?(function(_){te(_)&&(_={get:_});const E=function(){return{[ji]:_}};return E.prototype[ji]=_,E})({get:m.get,set:({value:_})=>m.set(_)}):m.get),h[p]}})(s,e),(function(h){return h==null})(s)&&c===void 0&&(Ta.has(e)||Sd.has(e))&&(s=[],Ta.has(e)&&En(t,s),c=s[e]),te(c)){if(ke(s)){if(Ta.has(e))return(...p)=>Pm(t,s,e,...p);if(Sd.has(e))return Go(t,!0),function(p,m){const _=e==="reduce",E=_?(S,O,D,I)=>p(S,ft(t,D+"",O),D,I):(S,O,D)=>p(ft(t,O+"",S),O,D);if(_||!Hg.has(e))return s[e](E,m);const A=e==="find",g=[];for(let S=0;S<s.length;S++)if(E(s[S],S,s)){const O=ft(t,S+"");if(A)return O;g.push(O)}return A?void 0:g}}ei(t,e,c);const h=(o=t.functions)==null?void 0:o.get(e);return h?ft(t,e,h):c.bind(s)}return Ze(c)&&e==="length"&&ke(s)?(Go(t,!0),c):ft(t,e)},getPrototypeOf(t){const e=Ae(t);return e!==null&&typeof e=="object"?Reflect.getPrototypeOf(e):null},ownKeys(t){Mn(t);const e=Vs(t,!0);if(Ze(e))return[];const n=e?Reflect.ownKeys(e):[];if(ke(e)&&n[n.length-1]==="length"&&n.splice(n.length-1,1),te(t)){const r=Reflect.ownKeys(t);["caller","arguments","prototype"].forEach(i=>r.includes(i)&&n.push(i))}return n},getOwnPropertyDescriptor(t,e){if(e==="caller"||e==="arguments"||e==="prototype")return{configurable:!1,enumerable:!1};const n=Ae(t);if(Ze(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 Zr(t,e,n),!0;const r=Nl.get(e);return!!r&&(r.set(t,n),!0)},deleteProperty:(t,e)=>!!t.isSetting&&Reflect.deleteProperty(t,e),has(t,e){const n=Ae(t);return n!=null&&(typeof n=="object"||typeof n=="function")&&Reflect.has(n,e)},apply(t,e,n){Ne(e)&&(e=e.peek());const r=Ae(t),i=te(r)?r:t.lazyFn||t;return Reflect.apply(i,e,n)}};function Lt(t,e){t.parent?Zr(t.parent,t.key,e):Zr(t,"_",e)}function Zr(t,e,n,r){const i=!t.parent&&e==="_";!t.parent||Ae(t)||te(n)||Lt(t,{[e]:n});const o=i?t:Bt(t,e,n);if(Tm(o,n),Ne(n))us(o,n);else{const{newValue:s,prevValue:a,parentValue:l}=En(o,n),u=Ze(a)||a instanceof Date||Ze(s)||s instanceof Date;if(!u){let h=o;do h.needsExtract=!0,h.recursivelyAutoActivated=!1;while(h=h.parent)}const c=!Dm(s,a),d=!c&&o.isComputing&&!u&&!o.isPlain;!c&&!d||o.isComputing&&o.isPlain&&t.numListenersRecursive===0||Hm(t,s,a,o,l,u,i,r,d),ei(t,e,s)}}function Fm(t,e){e===void 0&&Hs(t)&&(e=t.key,t=t.parent);const n=Ae(t);ke(n)?Pm(t,n,"splice",e,1):Zr(t,e!=null?e:"_",Us,-1)}function Hm(t,e,n,r,i,o,s,a,l){r||(r=t),Bs(),o===void 0&&(o=Ze(e));let u,c,d=l||o,h=!1;(!o||n&&!Ze(n))&&(d=d||Fc(r,e,n),ke(e)?u=e:(Be(e)||gn(e))&&(c=e)),ke(i)?u=i:(Be(i)||gn(i))&&(c=i),u?h=(u==null?void 0:u.length)!==(n==null?void 0:n.length):c&&(h=(c==null?void 0:c.size)!==(n==null?void 0:n.size)),(o||!e||ss(e)&&!ss(n)?e!==n:d)&&zi(o&&s?t:r,e,n,(a!=null?a:n===void 0)?-1:d?0:1,h),ai()}function Qr(t,e,n){const r=t.numGets=(t.numGets||0)+1;t.state||(t.state=xc({isLoaded:!1},!1,Qr,ft)),e.then(i=>{r>=(t.getNumResolved||0)&&(t.getNumResolved=t.numGets,n?n({value:i}):Lt(t,i),t.state.assign({isLoaded:!0,error:void 0}))}).catch(i=>{t.state.error.set(i)})}function ei(t,e,n){if(Wt(n)){const r=Bt(t,e);return Qr(r,n),void En(r,void 0)}if(Ne(n)){const r=()=>n;fd(t,e,r);const i=Bt(t,e,r),o=Or(uo(n));return us(i,n),En(i,o),Ae(i)}if(typeof n=="function")return fd(t,e,n),e}function Vs(t,e){return Go(t,e?Kt(e)?e.shallow:e:void 0),Or(t)}function Or(t){return Mn(t,!0)}var No=!1;function Mn(t,e){var n;if(No=!0,e&&((n=t.dirtyChildren)==null?void 0:n.size)){const i=Array.from(t.dirtyChildren);t.dirtyChildren.clear(),i.forEach(o=>o.dirtyFn&&Mn(o))}if(t.dirtyFn){const i=t.dirtyFn;t.dirtyFn=void 0,we.dirtyNodes.delete(t),i()}No=!1;let r=Ae(t);return t.root.isLoadingLocal||t.isPlain||(r=(function(i,o,s){const a=o,l=i.lazy;if(l){const u=i.lazyFn;if(delete i.lazy,te(u))if(u.length===1)o={};else{if(i.parent){const c=Ae(i.parent);te(o)&&(c?delete c[i.key]:i.root._=void 0)}o=(function(c,d){let h,p,m,_=!0;const E=d;let A,g,S=[];function O(){c.dirtyFn=g,we.dirtyNodes.add(c)}const D=mt(()=>{var I,R,y,v;if(_)_=!1,te(Ae(c))&&En(c,void 0);else if(!No&&g&&(function(b,k){if(!No&&!(function(M){var U,V;let W=M,$=M.numListenersRecursive>0;for(;W&&!$;)((U=W.listeners)!=null&&U.size||(V=W.listenersImmediate)!=null&&V.size)&&($=!0),W=W.parent;return $})(b)){k&&(b.dirtyFn=k);let M=b;for(;M;)M.dirtyChildren||(M.dirtyChildren=new Set),M.dirtyChildren.add(b),M=M.parent;return!0}})(c,g))return void(m=!0);let T=E(),C=!1;const N=Ne(T);(N||c.linkedToNode)&&(C=N,T=us(c,T)),te(T)&&T.length===0&&(T=T());const L=N||T==null?void 0:T[ji];if(L&&(c.activationState=L,T=void 0),m=!1,p=Wt(T),c.activated){if(c.activationState){const b=c.activationState;(R=(I=c.state)==null?void 0:I.peek())!=null&&R.sync?(c.state.sync(),m=!0):T=(v=(y=b.get)==null?void 0:y.call(b))!=null?v:b.initial}}else{c.activated=!0;let b=Ug;L!=null&&L.synced&&(b=we.activateSyncedNode,m=!0);const k=b(c,T);h=k.update;let x=k.value;!C&&Ne(x)&&(x=us(c,x)),T=x!=null?x:L==null?void 0:L.initial}return m&&(A=T),p=p||Wt(T),T},I=>{const{value:R,nodes:y,refresh:v}=I;if(g=v,!m){if(!p||!we.isLoadingRemote)if(p)if(c.activationState){const{initial:T}=c.activationState;R&&Wt(R)&&Qr(c,R,h),te(Ae(c))&&En(c,T!=null?T:void 0)}else c.activated&&(Qr(c,R,h),te(Ae(c))&&En(c,void 0));else{A=R;const T=c.state.isLoaded.peek();!T&&te(R)||(c.isComputing=!0,Lt(c,R),c.isComputing=!1),T||c.state.assign({isLoaded:!0,error:void 0})}S.forEach(T=>T()),S=[],y==null||y.forEach(({node:T,track:C})=>{S.push(Bn(T,O,{immediate:!0,trackingType:C}))})}I.cancel=!0},{fromComputed:!0});return c.activatedObserveDispose=()=>{D==null||D(),S.forEach(I=>I())},A})(i,u)}else Ne(o)&&(o=ei(i.parent,i.key,o))}return Tm(i,o),!l&&!i.needsExtract||i.isPlain||Ne(o)||Ze(o)||(s&&(function(u,c){if(!c.recursivelyAutoActivated&&(Kt(u)||ke(u))&&!Vi(u)){c.recursivelyAutoActivated=!0;const d=[];jm(u,d,()=>{var p;let m=c;for(let _=0;_<d.length;_++){const E=d[_],A=(p=Ae(m))==null?void 0:p[E];m=Bt(m,E,te(A)?A:void 0),Mn(m)}return m})}})(o,i),i.parent&&ei(i.parent,i.key,a)),o})(t,r,!!e)),r}function Um(t){var e,n;(e=t.activatedObserveDispose)==null||e.call(t),(n=t.linkedToNodeDispose)==null||n.call(t),t.activatedObserveDispose=t.linkedToNodeDispose=t.linkedToNode=void 0}function Bm(t,e){Um(t),t.lazyFn=e,t.lazy=!0}function Ug(t,e){if(t.state||(t.state=xc({isLoaded:!1},!1,Qr,ft)),t.activationState){const{set:n,get:r,initial:i}=t.activationState;if((e=r==null?void 0:r())!=null&&e!==null||(e=i),n){let o,s=[],a=0;const l=u=>{if(s.length>0){let c,d,h,p=!1,m=!1;u?(c=u.changes,d=u.value,p=u.isFromPersist,m=u.isFromSync,h=u.getPrevious):(c=s,d=o,h=Pc(d,c)),s=[],o=void 0,we.pendingNodes.delete(t),a++;const _=a,E=()=>{_===a&&(t.isComputing=!0,n({value:d,changes:c,isFromPersist:p,isFromSync:m,getPrevious:h}),t.isComputing=!1)};Mm(t.state.isLoaded,E,!0)}};Bn(t,({value:u,changes:c})=>{t.isComputing||(c.length>1||!te(c[0].prevAtPath))&&(o=u,s.length>0&&(c=c.filter(d=>!Im(s[0].path,d.path))),s.push(...c),we.pendingNodes.set(t,l))},{immediate:!0}),Bn(t,l)}}return{update:({value:n})=>{t.isComputing||(t.isComputing=!0,Lt(t,n),t.isComputing=!1)},value:e}}function us(t,e){var n;const r=e?uo(e):void 0;return r!==t&&(r==null?void 0:r.linkedToNode)!==t&&(t.linkedToNode=r,(n=t.linkedToNodeDispose)==null||n.call(t),r&&(r.linkedFromNodes||(r.linkedFromNodes=new Set),r.linkedFromNodes.add(t),t.linkedToNodeDispose=Bn(r,()=>{te(e=Mn(r))||Lt(t,e)},{initial:!0},new Set([t])))),e}function jm(t,e,n){var r;if((Kt(t)||ke(t))&&!Vi(t)&&!Em(t)){for(const i in t)if(wc.call(t,i)){const o=t[i];if(Ne(o)){const s=n();ei(s,i,o),delete s.lazy}else{const s=te(o)&&((r=o.prototype)==null?void 0:r[ji]);if(s){const a=s.activate;(!a||a==="auto")&&Or(Bt(n(),i,o))}}typeof o=="object"&&(e.push(i),jm(o,e,n),e.pop())}}}var vd=["get","set","peek","onChange","toggle"];function er(t){this._node=t;for(let e=0;e<vd.length;e++){const n=vd[e];this[n]=this[n].bind(this)}}function bo(t,e){er.prototype[t]=function(...n){return e.call(this,this._node,...n)}}function se(t){return xc(t,!1,Qr,ft,er)}bo("peek",t=>(wl(),Or(t))),bo("get",(t,e)=>(wl(),Vs(t,e))),bo("set",Lt),bo("onChange",Bn),Object.defineProperty(er.prototype,Jr,{configurable:!0,get(){return this._node}}),Object.defineProperty(er.prototype,fm,{configurable:!0,value(t){return km(this._node,t)}}),er.prototype.toggle=function(){const t=this.peek();(t==null||pm(t))&&this.set(!t)},er.prototype.delete=function(){return this.set(void 0),this};var zs={createPreviousHandler:Pc,clone:Sm,deactivateNode:Um,deepMerge:as,ensureNodeValue:kc,findIDKey:vm,get:Vs,getChildNode:Bt,getKeys:Il,getNode:uo,getNodeValue:Ae,getPathType:_m,getProxy:ft,getValueAtPath:function(t,e){return e.reduce(wg,t)},globalState:we,initializePathType:Mc,ObservablePrimitiveClass:er,observableProperties:Nl,observableFns:bl,optimized:Lc,peek:Or,reactivateNode:Bm,registerMiddleware:function(t,e,n){let r=xr.get(t);r||(r=new Map,xr.set(t,r));let i=r.get(e);return i||(i=new Set,r.set(e,i)),i.add(n),()=>{const o=xr.get(t);if(!o)return;const s=o.get(e);s&&(s.delete(n),s.size===0&&(o.delete(e),o.size===0&&xr.delete(t)))}},safeParse:gm,safeStringify:Am,set:Lt,setAtPath:Rm,setNodeValue:En,symbolLinked:ji,symbolDelete:Us,tracking:Hr},{globalState:Dd,observableProperties:Bg,observableFns:jg,ObservablePrimitiveClass:Td}=zs;class $s{constructor(e={}){this._handlers=new Set,this._meta=e}meta(e){return new $s(e)}_emit(e,n){for(const r of this._handlers)r({level:e,data:n,timestamp:Date.now(),meta:this._meta})}error(...e){return this._emit("error",e)}warn(...e){return this._emit("warn",e)}info(...e){return this._emit("info",e)}log(...e){return this._emit("log",e)}trace(...e){return this._emit("trace",e)}registerHandler(e){return this._handlers.add(e),()=>this._handlers.delete(e)}}const Ll=new $s,Ce=new $s;function Hc(t,e,n){return{...(function(i,o){return i===void 0||i==="default"?"default":i==="classic"?"classic":(Ce.warn(`Invalid \`baseTheme\` value '${i}' for ${o}; expected "classic" or "default", falling back to "default".`),"default")})(t,n)==="classic"?rI:nI,...e!=null?e:{}}}function Rd(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 Id(t){const e=(function(){const i=document.createElement("canvas");i.width=i.height=1;const o=i.getContext("2d",{willReadFrequently:!0});return o.textBaseline="top",o.font='100px "Twemoji Mozilla","Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji","EmojiOne Color","Android Emoji",sans-serif',o.scale(.01,.01),o})(),n=Rd(e,t,"#fff"),r=Rd(e,t,"#000");return r===n&&!r.startsWith("0,0,0,")}const Vg=si(null),Ra={didCatch:!1,error:null};class Vm extends bt{constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=Ra}static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(){const{error:e}=this.state;if(e!==null){for(var n,r,i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];(n=(r=this.props).onReset)===null||n===void 0||n.call(r,{args:o,reason:"imperative-api"}),this.setState(Ra)}}componentDidCatch(e,n){var r,i;(r=(i=this.props).onError)===null||r===void 0||r.call(i,e,n)}componentDidUpdate(e,n){const{didCatch:r}=this.state,{resetKeys:i}=this.props;var o,s;r&&n.error!==null&&(function(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return a.length!==l.length||a.some((u,c)=>!Object.is(u,l[c]))})(e.resetKeys,i)&&((o=(s=this.props).onReset)===null||o===void 0||o.call(s,{next:i,prev:e.resetKeys,reason:"keys"}),this.setState(Ra))}render(){const{children:e,fallbackRender:n,FallbackComponent:r,fallback:i}=this.props,{didCatch:o,error:s}=this.state;let a=e;if(o){const l={error:s,resetErrorBoundary:this.resetErrorBoundary};if(typeof n=="function")a=n(l);else if(r)a=me(r,l);else{if(i===void 0)throw s;a=i}}return me(Vg.Provider,{value:{didCatch:o,error:s,resetErrorBoundary:this.resetErrorBoundary}},a)}}var wo=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Ys(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Uc(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}),n}var yd={exports:{}},Ia={};const zm=Uc(bc);var Cd,Nd,zg=(Nd||(Nd=1,yd.exports=(function(){if(Cd)return Ia;Cd=1;var t=zm,e=typeof Object.is=="function"?Object.is:function(l,u){return l===u&&(l!==0||1/l==1/u)||l!=l&&u!=u},n=t.useState,r=t.useEffect,i=t.useLayoutEffect,o=t.useDebugValue;function s(l){var u=l.getSnapshot;l=l.value;try{var c=u();return!e(l,c)}catch(d){return!0}}var a=typeof window=="undefined"||window.document===void 0||window.document.createElement===void 0?function(l,u){return u()}:function(l,u){var c=u(),d=n({inst:{value:c,getSnapshot:u}}),h=d[0].inst,p=d[1];return i(function(){h.value=c,h.getSnapshot=u,s(h)&&p({inst:h})},[l,c,u]),r(function(){return s(h)&&p({inst:h}),l(function(){s(h)&&p({inst:h})})},[l]),o(c),c};return Ia.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:a,Ia})()),yd.exports),bd=!1,kl={inObserver:!1},wd=void 0,$g=()=>wd||(wd=si(null));function Ld(t){const e=js(t);if(!F.use)throw e;F.use(e)}function J(t,e){let n;if(kl.inObserver&&Ne(t)&&!(e!=null&&e.suspense))return n=qt(t,e),e!=null&&e.suspense&&n===void 0&&Ld(t),n;try{const r=Sr($g()),i=Z(()=>(function(l,u){let c,d,h,p,m,_,E=0;const A=()=>{d==null||d();const{value:S,dispose:O,resubscribe:D}=Lm(p,g,l,void 0,void 0,!0);return d=O,h=D,S},g=({value:S})=>{if(u!=null&&u.peek()){const O=_;_=S,O===void 0&&js(()=>!u.get(),()=>{const D=_;_=void 0,g({value:D})})}else{let O=l==null?void 0:l.skipCheck;if(!O){const D=A();(D!==m||!Ze(D)&&D===S)&&(O=!0)}O&&(E++,c==null||c())}};return{subscribe:S=>(c=S,!d&&h&&(d=h()),()=>{d==null||d(),d=void 0}),getVersion:()=>E,run:S=>(p=S,m=A())}})(e,r),[]),{subscribe:o,getVersion:s,run:a}=i;n=a(t),zg.useSyncExternalStore(o,s,s)}catch(r){throw r}return e!=null&&e.suspense&&n===void 0&&Ld(t),n}var kd=typeof Symbol=="function"&&Symbol.for;function $m(t,e,n,r,i){const o=kd?Symbol.for("react.forward_ref"):_t(m=>null).$$typeof,s=kd?Symbol.for("react.memo"):ur(m=>null).$$typeof;if(t.__legend_proxied)return t;let a=!1,l=!1,u=t;s&&u.$$typeof===s&&u.type&&(l=!0,u=u.type),o&&u.$$typeof===o&&(a=!0,u=u.render);const c=r?new Set(r):void 0,d={apply(m,_,E){if(n){const A=E[0],g={},S=Object.keys(A);for(let O=0;O<S.length;O++){const D=S[O],I=A[D],R=c&&c.has(D);if(D==="children"&&(te(I)||Ne(I)))g[D]=J(I,{skipCheck:!0});else if(R||D.startsWith("$")||D.endsWith("$")){const y=R?D:D.endsWith("$")?D.slice(0,-1):D.slice(1),v=i==null?void 0:i[y],T=v&&Ne(I);if(g[y]=T&&(v!=null&&v.selector)?v.selector(g,I):J(I),T&&(v.defaultValue!==void 0&&g[y]===void 0&&(g[y]=v.defaultValue),v.handler&&v.getValue)){const C=N=>{var L;I.set(v.getValue(N)),(L=A[v.handler])==null||L.call(A,N)};g[v.handler]=q(C,[A[v.handler],i])}R||delete g[D]}else g[D]===void 0&&(g[D]=I)}E[0]=g}return e?J(()=>{kl.inObserver=!0;try{return Reflect.apply(m,_,E)}finally{kl.inObserver=!1}},{skipCheck:!0}):Reflect.apply(m,_,E)}},h=new Proxy(u,d);let p;return a?(p=_t(h),p.__legend_proxied=!0):p=h,e||l?ur(p):p}var{findIDKey:Yg,getNode:Gg,optimized:Wg}=zs,Md=new Map;function $i({each:t,optimized:e,item:n,itemProps:r,sortValues:i,children:o}){var s;if(!t)return null;const a=J(()=>t.get(!e||Wg));if(!n&&o){const u=X(void 0);u.current=o,n=Z(()=>{return c=({item$:d,id:h})=>u.current(d,h),$m(c,!0);var c},[])}else if(n.$$typeof!==Symbol.for("react.memo")){let u=Md.get(n);u||(u=ur(n),Md.set(n,u)),n=u}if(!a)return null;const l=[];if(ke(a)){const u=a[0],c=Gg(t),d=a.length,h=d>0?c&&Yg(u,c)||(u.id!==void 0?"id":u.key!==void 0?"key":void 0):void 0,p=te(h);for(let m=0;m<d;m++)if(a[m]){const _=a[m],E=(s=p?h(_):_[h])!=null?s:m,A=t[m],g={key:E,id:E,item$:A,item:A};l.push(me(n,r?Object.assign(g,r):g))}}else{const u=Be(a),c=u?Array.from(a.keys()):Object.keys(a);i&&c.sort((d,h)=>i(u?a.get(d):a[d],u?a.get(h):a[h],d,h));for(let d=0;d<c.length;d++){const h=c[d];if(u?a.get(h):a[h]){const p=u?t.get(h):t[h],m={key:h,id:h,item$:p,item:p};l.push(me(n,r?Object.assign(m,r):m))}}}return l}ur(function({children:t}){return J(()=>qt(qt(t)),{skipCheck:!0})},(t,e)=>!e.scoped||t.children===e.children);var Pd=new Map,xd=new Map;function Fd({if:t,ifReady:e,else:n,$value:r,wrap:i,children:o}){const s=J(t!=null?t:e),a=J((e!==void 0?yl(s):s)?te(o)?()=>o(r?r.get():s):o:n!=null?n:null,{skipCheck:!0});return i?me(i,void 0,a):a}new Proxy({},{get(t,e){if(!t[e]){const n=Pd.get(e)||e,r=_t((i,o)=>{const s={...i};return!o||!te(o)&&ss(o)||(s.ref=o),me(n,s)});t[e]=(function(i,o,s){return $m(i,!1,!0,o,s)})(r,[],xd.get(e))}return t[e]}}),(function(t){(function(e){if(bd)return;bd=!0;const n={value:{handler:"onChange",getValue:i=>i.target.value,defaultValue:""}},r=Object.assign({checked:{handler:"onChange",getValue:i=>i.target.checked}},n);e({binders:{input:r,textarea:n,select:n}})})(t)})(function({components:t,binders:e}){if(t)for(const n in t)Pd.set(n,t[n]);if(e)for(const n in e)xd.set(n,e[n])});var Xg=(t,e)=>{{const n=X({num:0});z(()=>{var r;const{current:i}=n;i.num++;const o=()=>{i.dispose&&i.num<2&&(i.dispose(),i.dispose=void 0),i.num--};if(i.dispose!==void 0)return o;{const s=(r=t())!=null?r:null;if(s&&te(s))return i.dispose=s,()=>queueMicrotask(o)}},e)}};function Ym(t){return Xg(()=>{const e=t();if(!Wt(e))return e},[])}var Kg=Ym;function Gm(t){return Ym(()=>t)}var qg=Gm,{deactivateNode:Jg}=zs;function ct(t,e){var n;const r=X({});r.current.value=t;const i=e?ct(e):void 0;if(!((n=r.current)!=null&&n.obs$)){const o=i?te(t)&&t.length===1?s=>(i.get(),r.current.value(s)):()=>(i.get(),qt(r.current.value)):t;r.current.obs$=se(o)}return i&&i.set(e),Gm(()=>{const o=r.current.obs$;if(o){const s=uo(o);Jg(s)}}),r.current.obs$}function Wm(t,e,n,r){let i;te(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||(n==null?void 0:n.deps))?ct(r):void 0,s=X({});return s.current.selector=t,s.current.reaction=i,o&&o.set(r),s.current.dispose||(s.current.dispose=mt(a=>{var l;return o==null||o.get(),qt((l=s.current)==null?void 0:l.selector,void 0,a)},a=>{var l,u;return(u=(l=s.current).reaction)==null?void 0:u.call(l,a)},n)),qg(()=>{var a,l;(l=(a=s.current)==null?void 0:a.dispose)==null||l.call(a)}),s.current.dispose}function Yi(t,e,n,r){let i;te(e)?i=e:Array.isArray(e)?(r=e,n=void 0):n=e,i&&Array.isArray(n)&&(r=n,n=void 0),r=r||(n==null?void 0:n.deps);const o=X({}),s=r?ct(r):void 0;o.current.selector=t,o.current.reaction=i,s&&s.set(r),Kg(()=>mt(a=>{var l;return s==null||s.get(),qt((l=o.current)==null?void 0:l.selector,void 0,a)},a=>{var l,u;return(u=(l=o.current).reaction)==null?void 0:u.call(l,a)},n))}class Xm extends Error{}function Hd(t,e){if(!t)throw new Xm(e!=null?e:"Assertion failed")}const re=Object.assign(Hd,{is:function(t,e,n){return Hd(e,n)},unreachable:function(){throw new Error("Unreachable code")},never:function(t){throw new Error("Unreachable")},defined:function(t){if(t==null)throw new Xm("Value is not defined")}}),[Km,Qe]=jt(),[qm,ho]=jt(),[Zg,Qg]=jt(),[Bc,po]=jt(),[eS,tS]=jt(),[Jm,ae]=jt(),[Zm,li]=jt(),[nS,Qm]=jt(),[eE,tE]=jt(),[nE,rS]=jt(),[iS,jc]=jt();function jt(){const t=si(void 0);return[t,()=>{const e=Sr(t);return re(e!==void 0),e}]}const Vr={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"}},Ud={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:Vr,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:"選擇對話"}}},rE=()=>{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},Bd=(t,e)=>{const n=rE();return n.fillStyle=e,n.fillText(t,0,0),n.getImageData(0,0,1,1).data},oS=t=>!t.includes("‍")||rE().measureText(t).width<160,sS=(t,e)=>{const n=[...t].join(",");return n===[...e].join(",")&&!n.startsWith("0,0,0,")};function iE(t){try{return(function(e){const n=Bd(e,"#000"),r=Bd(e,"#fff"),i=oS(e);return n&&r&&i&&sS(n,r)})(t)}catch(e){return!0}}var kf;const oE=(kf=globalThis.window)!=null&&kf.document?(function(){if(typeof window=="undefined"||window.E2E||window.__talkjsE2E)return 16;const t={"🫩":16,"🚶‍➡️":15.1,"🫨":15,"🫠":14,"😵‍💫":13.1,"🥲":13,"🧑‍🦰":12.1,"🥻":12,"🥰":11,"🤩":5,"👱‍♀️":4,"🤣":3,"👁️‍🗨️":2,"😀":1,"😐️":.7,"😃":.6};for(const[e,n]of Object.entries(t))if(iE(e))return n})():0;class sE{constructor(e,n){this.currentUser$=se(null),this.app$=se(null),this.appId$=se(null),this.extUserId$=se(null),this.hasTokenFetcher$=se(!1),this.authTokenState$=se("idle"),this.themeCustom$=se(md({value:void 0})),this.highlightedStrings$=se([]),this.device$=se({supportsEmojiPicker:!!oE,isMobile:typeof window!="undefined"&&/Mobi/i.test(window.navigator.userAgent)}),this.errors$=se({unknownUser:!1,wrongAppId:!1,serverError:!1}),this.conversationSearch=null,this.messageSearch=null,this.locale$=se(()=>{var s,a;const r=this.extUserId$.get(),i=this.app$.appMetadata.defaultLocale.get(),o=this.currentUser$.locale.get();return(a=(s=r&&o)!=null?s:i)!=null?a:"en-US"}),this.translationData$=se(()=>(function(r){const i=r.replace(/_/g,"-").toLowerCase(),o=Ud[i];if(o)return{strings:{...o.translation,locale:i},emojiPickerTranslationUrl:o.emojiPickerTranslationUrl,emojiDataUrl:o.emojiDataUrl};const s=i.slice(0,2),a=Ud[s];return a?{strings:{...a.translation,locale:s},emojiPickerTranslationUrl:a.emojiPickerTranslationUrl,emojiDataUrl:a.emojiDataUrl}:(Ce.warn(`User locale '${r}' not supported; falling back to English.`),{strings:{...Vr.translation,locale:"en-US"},emojiPickerTranslationUrl:Vr.emojiPickerTranslationUrl,emojiDataUrl:Vr.emojiDataUrl})})(this.locale$.get())),this.t$=se(()=>this.translationData$.strings.get()),wt(()=>{this.appId$.set(e),this.extUserId$.set(n)})}updateThemeCustom(e){this.themeCustom$.set(md({value:e}))}}const aS={canReplyToMessage:!1,canEditMessage:!1,canDeleteMessage:!1,canAddReaction:!1};class lS extends sE{constructor(e,n){super(e,n),this.type="ChatboxStore",this.messageSubscriptions={},this.readyForNewMessagesPromise=Promise.resolve(),this.fileUploads={},this.renderedConversationId$=se(void 0),this.focusedMessage$=se(null),this.chatSearchState$=se("hidden"),this.searchQuery$=se(""),this.newMessageMarker$=se(void 0),this.state$=se({loadingConversationId:null,currentConversationId:null,editor:{isEmpty:!0,atTextLimit:!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 r=this.state$.currentConversationId.get();return r&&this.state$.conversations.child(r).get()},userPermissions:()=>{var s;const r=((s=this.app$.features.get())!=null?s:[]).includes("search_in_conv"),i=this.app$.role.general.get(),o=this.app$.role.permissions.get();return re.defined(i),re.defined(o),{canSearch:r,showTypingIndicator:i.showTypingIndicators,canShareFile:i.enableFileTransfers,canShareLocation:i.enableLocation,canMention:i.enableMentions,showOnlineStatus:i.enablePresence!==!1,canSendVoiceMessage:i.enableVoiceRecording,canLeaveConversation:o.conversations.leave==="all",canMarkConversationAsUnread:o.conversations.markAsUnread==="all"}},messagePermissions:()=>{const r=this.app$.role.permissions.get();re.defined(r);const i=this.state$.userPermissions.get(),o={...aS,...i},s={canReplyToMessage:vn(r.messages.reply,!0),canEditMessage:vn(r.messages.edit,!0),canDeleteMessage:vn(r.messages.delete,!0),canAddReaction:vn(r.messages.emojiReactions,!0),...i},a={...s,canEditMessage:!1},l={canReplyToMessage:vn(r.messages.reply,!1),canEditMessage:vn(r.messages.edit,!1),canDeleteMessage:vn(r.messages.delete,!1),canAddReaction:vn(r.messages.emojiReactions,!1),...i};return{system:o,own:s,ownWithoutEditing:a,other:l,otherWithoutEditing:{...l,canEditMessage:!1}}}}),this.referencedMessage$=se(()=>{const r=this.state$.currentConversationId.get(),i=this.state$.referencedMessageId.get();return r&&i?this.state$.messages.child(r).lookup.child(i).get():null}),this.chatItems$=se(()=>{var m,_,E;const r=this.state$.currentConversationId.get();if(!r)return[];const i=(m=this.newMessageMarker$.get())!=null?m:1/0,o=(_=this.state$.messages.child(r).state.get())!=null?_:[],s=Object.values((E=this.state$.ephemeralMessages.child(r).get())!=null?E:{}),a=s.length===0?o:s.sort((A,g)=>g.createdAt-A.createdAt).concat(o),l=a.map(A=>{const g=A.content[0],S=g==null?void 0:g.type;if(!g||S!=="file")return A;const O=g.size+","+g.filename,D=this.state$.localFileBlobUrls.child(r).child(O).url.get();return D?{...A,content:[{...g,url:D}]}:A});let u=null,c=0,d=!1;const h=[];for(const A of l){const g=new Date(A.createdAt),S=new Date(g).setHours(0,0,0,0),O=c&&S!==c,D=g.getTime()>i,I=!(!d||D||u!=null&&u.id.startsWith("ephemeral"));(I||O)&&h.push(new Wn({id:"border-before-"+A.id,isDayMarker:!!O,isReadMarker:!!I,timestamp:O?c:void 0})),h.push(A),d=D,c=S,u=A}const p=this.extUserId$.peek();return(function(A,g){const S=[];let O=[],D=null;for(const I of A)D===null||g(D,I)?O.push(I):(S.push(O),O=[I]),D=I;return O.length!==0&&S.push(O),S})(h,(A,g)=>{var S,O;return A instanceof Wn&&g instanceof Wn?A.id===g.id:A instanceof Wn||g instanceof Wn?!1:Math.abs(A.createdAt-g.createdAt)<=6e4&&((S=A.sender)==null?void 0:S.id)===((O=g.sender)==null?void 0:O.id)}).map(A=>{var S;const g=A[A.length-1];return{items:A,id:g.id,type:g instanceof Wn?"divider":g.sender?((S=g.sender)==null?void 0:S.id)===p?"own":"other":"system"}})})}storeTyping(e,n){this.state$.typing.child(e).set(n)}setSearchQuery(e){const n=e.trim().split(/\s+/).map(r=>r.trim()).filter(Boolean);wt(()=>{this.searchQuery$.set(e),this.highlightedStrings$.set(n)})}messagePermissions$(e){const n=this.currentUser$.get();if(!n)throw new Error("Unreachable");const r=e.content[0];return e.sender?n.id===e.sender.id?r.type==="text"?this.state$.messagePermissions.own:this.state$.messagePermissions.ownWithoutEditing:r.type==="text"?this.state$.messagePermissions.other:this.state$.messagePermissions.otherWithoutEditing:this.state$.messagePermissions.system}canRenderUi(e){const n=this.app$.get(),r=this.currentUser$.get();if(e===null)return!!(n&&r);const i=this.state$.conversations.child(e).get(),o=this.state$.participants.child(e).get();return!!(n&&r&&i&&o)}storeMessages(e,n,r){wt(()=>{const i=n.reduce((a,l)=>(a[l.id]=l,a),{}),o=this.extUserId$.peek();re(o),this.state$.messages.child(e).set({state:n,lookup:i,loadedAll:r});const s=this.state$.ephemeralMessages.child(e);for(const a of n){const l=this.state$.ephemeralMessageIdMapping.child(e).child(a.id).peek();if(!l)continue;s.child(l).delete();const u=a.content[0];if(u.type!=="file")continue;const c=u.size+","+u.filename,d=this.state$.localFileBlobUrls.child(e).child(c);if(d.fetching.peek()!==!1)continue;const h=()=>{URL.revokeObjectURL(d.url.peek()),d.delete()};if(u.subtype==="image"){d.fetching.set(!0);const p=document.createElement("img");p.addEventListener("load",h,{once:!0}),p.src=u.url}else if(u.subtype==="video"){d.fetching.set(!0);const p=document.createElement("video");p.addEventListener("loadeddata",h,{once:!0}),p.src=u.url}else if(u.subtype==="audio"||u.subtype==="voice"){d.fetching.set(!0);const p=document.createElement("audio");p.addEventListener("loadeddata",h,{once:!0}),p.src=u.url}}})}}function vn(t,e){return t==="all"||t==="own"&&e||t==="other"&&!e}class Wn{constructor({id:e,isDayMarker:n,isReadMarker:r,timestamp:i}){this.id=e,this.isDayMarker=n,this.isReadMarker=r,this.timestamp=n?i:void 0}}function $t(t,e=!1){return(function(n,r=!1){return n.map(i=>{if(typeof i=="string")return i;switch(i.type){case"bold":return"*"+$t(i.children)+"*";case"italic":return"_"+$t(i.children)+"_";case"strikethrough":return"~"+$t(i.children)+"~";case"blockquote":return $t(i.children).split(`
2
2
  `).map(o=>"> "+o).join(`
3
3
  `)+`
4
4
  `;case"autolink":case"autoLink":case"suppressed":case"emoji":return i.text;case"codeblock":case"codeBlock":return"```"+i.language+`
5
5
  `+i.text+"```";case"codespan":case"codeSpan":return"```"+i.text+"```";case"mention":return r?`<!!mention:${i.id}|${i.text}>`:`@${i.text}`;case"customemoji":case"customEmoji":return r?`<!!customemoji:${i.text}>`:i.text;case"link":return`<${i.url}|${$t(i.children)}>`;case"actionlink":case"actionLink":case"actionbutton":case"actionButton":return(function(o){const s=new URLSearchParams(o.params).toString(),a=s?o.action+"?"+s:o.action;return`<${o.type}:${a}|${$t(o.children)}>`})(i);case"bulletlist":case"bulletList":return`
6
6
  `+$t(i.children);case"bulletpoint":case"bulletPoint":return"- "+$t(i.children)+`
7
- `}}).join("")})(t,e).trim()}class jd{constructor(e,n,r,i,o,s){this.send=n,this.attachFile=r,this.shareLocation=i,this.toggleEmojiPicker=o,this.recordVoiceMessage=s,this.isEmpty=e.isEmpty,this.atTextLimit=e.atTextLimit,this.characterCount=e.characterCount,this.showEmojiPicker=e.showEmojiPicker}}function Ve(t){this.content=t}function aE(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 s=0;i.text[s]==o.text[s];s++)n++;return n}if(i.content.size||o.content.size){let s=aE(i.content,o.content,n+1);if(s!=null)return s}n+=i.nodeSize}else n+=i.nodeSize}}function lE(t,e,n,r){for(let i=t.childCount,o=e.childCount;;){if(i==0||o==0)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 u=0,c=Math.min(s.text.length,a.text.length);for(;u<c&&s.text[s.text.length-u-1]==a.text[a.text.length-u-1];)u++,n--,r--;return{a:n,b:r}}if(s.content.size||a.content.size){let u=lE(s.content,a.content,n-1,r-1);if(u)return u}n-=l,r-=l}else n-=l,r-=l}}Ve.prototype={constructor:Ve,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 e==-1?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 i==-1?o.push(n||t,e):(o[i+1]=e,n&&(o[i]=n)),new Ve(o)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new Ve(n)},addToStart:function(t,e){return new Ve([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new Ve(n)},addBefore:function(t,e,n){var r=this.remove(e),i=r.content.slice(),o=r.find(t);return i.splice(o==-1?i.length:o,0,e,n),new Ve(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=Ve.from(t)).size?new Ve(t.content.concat(this.subtract(t).content)):this},append:function(t){return(t=Ve.from(t)).size?new Ve(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=Ve.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}},Ve.from=function(t){if(t instanceof Ve)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new Ve(e)};class j{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,n,r,i=0,o){for(let s=0,a=0;a<n;s++){let l=this.content[s],u=a+l.nodeSize;if(u>e&&r(l,i+a,o||null,s)!==!1&&l.content.size){let c=a+1;l.nodesBetween(Math.max(0,e-c),Math.min(l.content.size,n-c),r,i+c)}a=u}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,i){let o="",s=!0;return this.nodesBetween(e,n,(a,l)=>{let u=a.isText?a.text.slice(Math.max(e,l)-l,n-l):a.isLeaf?i?typeof i=="function"?i(a):i:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&u||a.isTextblock)&&r&&(s?s=!1:o+=r),o+=u},0),o}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,i=this.content.slice(),o=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),o=1);o<e.content.length;o++)i.push(e.content[o]);return new j(i,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],i=0;if(n>e)for(let o=0,s=0;s<n;o++){let a=this.content[o],l=s+a.nodeSize;l>e&&((s<e||l>n)&&(a=a.isText?a.cut(Math.max(0,e-s),Math.min(a.text.length,n-s)):a.cut(Math.max(0,e-s-1),Math.min(a.content.size,n-s-1))),r.push(a),i+=a.nodeSize),s=l}return new j(r,i)}cutByIndex(e,n){return e==n?j.empty:e==0&&n==this.content.length?this:new j(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let i=this.content.slice(),o=this.size+n.nodeSize-r.nodeSize;return i[e]=n,new j(i,o)}addToStart(e){return new j([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new j(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(e.content[n]))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(e){let n=this.content[e];if(!n)throw new RangeError("Index "+e+" out of range for "+this);return n}maybeChild(e){return this.content[e]||null}forEach(e){for(let n=0,r=0;n<this.content.length;n++){let i=this.content[n];e(i,r,n),r+=i.nodeSize}}findDiffStart(e,n=0){return aE(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return lE(this,e,n,r)}findIndex(e){if(e==0)return ko(0,e);if(e==this.size)return ko(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let i=r+this.child(n).nodeSize;if(i>=e)return i==e?ko(n+1,i):ko(n,r);r=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,n){if(!n)return j.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new j(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return j.empty;let n,r=0;for(let i=0;i<e.length;i++){let o=e[i];r+=o.nodeSize,i&&o.isText&&e[i-1].sameMarkup(o)?(n||(n=e.slice(0,i)),n[n.length-1]=o.withText(n[n.length-1].text+o.text)):n&&n.push(o)}return new j(n||e,r)}static from(e){if(!e)return j.empty;if(e instanceof j)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new j([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}j.empty=new j([],0);const Ia={index:0,offset:0};function ko(t,e){return Ia.index=t,Ia.offset=e,Ia}function ds(t,e){if(t===e)return!0;if(!t||typeof t!="object"||!e||typeof e!="object")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 r=0;r<t.length;r++)if(!ds(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!ds(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}class fe{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,r=!1;for(let i=0;i<e.length;i++){let o=e[i];if(this.eq(o))return e;if(this.type.excludes(o.type))n||(n=e.slice(0,i));else{if(o.type.excludes(this.type))return e;!r&&o.type.rank>this.type.rank&&(n||(n=e.slice(0,i)),n.push(this),r=!0),n&&n.push(o)}}return n||(n=e.slice()),r||n.push(this),n}removeFromSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return e.slice(0,n).concat(e.slice(n+1));return e}isInSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return!0;return!1}eq(e){return this==e||this.type==e.type&&ds(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let i=r.create(n.attrs);return r.checkAttrs(i.attrs),i}static sameSet(e,n){if(e==n)return!0;if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(n[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return fe.none;if(e instanceof fe)return[e];let n=e.slice();return n.sort((r,i)=>r.type.rank-i.type.rank),n}}fe.none=[];class hs extends Error{}class G{constructor(e,n,r){this.content=e,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let r=uE(this.content,e+this.openStart,n);return r&&new G(r,this.openStart,this.openEnd)}removeBetween(e,n){return new G(cE(this.content,e+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,n){if(!n)return G.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new G(j.fromJSON(e,n.content),r,i)}static maxOpen(e,n=!0){let r=0,i=0;for(let o=e.firstChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.firstChild)r++;for(let o=e.lastChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.lastChild)i++;return new G(e,r,i)}}function cE(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(cE(o.content,e-i-1,n-i-1)))}function uE(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=uE(s.content,e-o-1,n,s);return a&&t.replaceChild(i,s.copy(a))}function cS(t,e,n){if(n.openStart>t.depth)throw new hs("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new hs("Inconsistent open depths");return dE(t,e,n,0)}function dE(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=dE(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:s,end:a}=(function(l,u){let c=u.depth-l.openStart,d=u.node(c).copy(l.content);for(let h=c-1;h>=0;h--)d=u.node(h).copy(j.from(d));return{start:d.resolveNoCache(l.openStart+c),end:d.resolveNoCache(d.content.size-l.openEnd-c)}})(n,t);return or(o,pE(t,s,a,e,r))}{let s=t.parent,a=s.content;return or(s,a.cut(0,t.parentOffset).append(n.content).append(a.cut(e.parentOffset)))}}return or(o,ps(t,e,r))}function hE(t,e){if(!e.type.compatibleContent(t.type))throw new hs("Cannot join "+e.type.name+" onto "+t.type.name)}function Ml(t,e,n){let r=t.node(n);return hE(r,e.node(n)),r}function ir(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 wi(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&&(ir(t.nodeAfter,r),o++));for(let a=o;a<s;a++)ir(i.child(a),r);e&&e.depth==n&&e.textOffset&&ir(e.nodeBefore,r)}function or(t,e){return t.type.checkContent(e),t.copy(e)}function pE(t,e,n,r,i){let o=t.depth>i&&Ml(t,e,i+1),s=r.depth>i&&Ml(n,r,i+1),a=[];return wi(null,t,i,a),o&&s&&e.index(i)==n.index(i)?(hE(o,s),ir(or(o,pE(t,e,n,r,i+1)),a)):(o&&ir(or(o,ps(t,e,i+1)),a),wi(e,n,i,a),s&&ir(or(s,ps(n,r,i+1)),a)),wi(r,null,i,a),new j(a)}function ps(t,e,n){let r=[];return wi(null,t,n,r),t.depth>n&&ir(or(Ml(t,e,n+1),ps(t,e,n+1)),r),wi(e,null,n,r),new j(r)}G.empty=new G(j.empty,0,0);class Gi{constructor(e,n,r){this.pos=e,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[3*this.resolveDepth(e)]}index(e){return this.path[3*this.resolveDepth(e)+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e!=this.depth||this.textOffset?1:0)}start(e){return(e=this.resolveDepth(e))==0?0:this.path[3*e-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]}after(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]+this.path[3*e].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,n=this.index(this.depth);if(n==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=e.child(n);return r?e.child(n).cut(r):i}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let r=this.path[3*n],i=n==0?0:this.path[3*n-1]+1;for(let o=0;o<e;o++)i+=r.child(o).nodeSize;return i}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return fe.none;if(this.textOffset)return e.child(n).marks;let r=e.maybeChild(n-1),i=e.maybeChild(n);if(!r){let a=r;r=i,i=a}let o=r.marks;for(var s=0;s<o.length;s++)o[s].type.spec.inclusive!==!1||i&&o[s].isInSet(i.marks)||(o=o[s--].removeFromSet(o));return o}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,i=e.parent.maybeChild(e.index());for(var o=0;o<r.length;o++)r[o].type.spec.inclusive!==!1||i&&r[o].isInSet(i.marks)||(r=r[o--].removeFromSet(r));return r}sharedDepth(e){for(let n=this.depth;n>0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!n||n(this.node(r))))return new hS(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let n=1;n<=this.depth;n++)e+=(e?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return e+":"+this.parentOffset}static resolve(e,n){if(!(n>=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let r=[],i=0,o=n;for(let s=e;;){let{index:a,offset:l}=s.content.findIndex(o),u=o-l;if(r.push(s,a,i+l),!u||(s=s.child(a),s.isText))break;o=u-1,i+=l+1}return new Gi(n,r,o)}static resolveCached(e,n){let r=Vd.get(e);if(r)for(let o=0;o<r.elts.length;o++){let s=r.elts[o];if(s.pos==n)return s}else Vd.set(e,r=new uS);let i=r.elts[r.i]=Gi.resolve(e,n);return r.i=(r.i+1)%dS,i}}class uS{constructor(){this.elts=[],this.i=0}}const dS=12,Vd=new WeakMap;class hS{constructor(e,n,r){this.$from=e,this.$to=n,this.depth=r}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 pS=Object.create(null);let sr=class Pl{constructor(e,n,r,i=fe.none){this.type=e,this.attrs=n,this.marks=i,this.content=r||j.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,n,r,i=0){this.content.nodesBetween(e,n,r,i,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,n,r,i){return this.content.textBetween(e,n,r,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,n,r){return this.type==e&&ds(this.attrs,n||e.defaultAttrs||pS)&&fe.sameSet(this.marks,r||fe.none)}copy(e=null){return e==this.content?this:new Pl(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new Pl(this.type,this.attrs,this.content,e)}cut(e,n=this.content.size){return e==0&&n==this.content.size?this:this.copy(this.content.cut(e,n))}slice(e,n=this.content.size,r=!1){if(e==n)return G.empty;let i=this.resolve(e),o=this.resolve(n),s=r?0:i.sharedDepth(n),a=i.start(s),l=i.node(s).content.cut(i.pos-a,o.pos-a);return new G(l,i.depth-s,o.depth-s)}replace(e,n,r){return cS(this.resolve(e),this.resolve(n),r)}nodeAt(e){for(let n=this;;){let{index:r,offset:i}=n.content.findIndex(e);if(n=n.maybeChild(r),!n)return null;if(i==e||n.isText)return n;e-=i+1}}childAfter(e){let{index:n,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(n),index:n,offset:r};let i=this.content.child(n-1);return{node:i,index:n-1,offset:r-i.nodeSize}}resolve(e){return Gi.resolveCached(this,e)}resolveNoCache(e){return Gi.resolve(this,e)}rangeHasMark(e,n,r){let i=!1;return n>e&&this.nodesBetween(e,n,o=>(r.isInSet(o.marks)&&(i=!0),!i)),i}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 e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),fE(this.marks,e)}contentMatchAt(e){let n=this.type.contentMatch.matchFragment(this.content,0,e);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(e,n,r=j.empty,i=0,o=r.childCount){let s=this.contentMatchAt(e).matchFragment(r,i,o),a=s&&s.matchFragment(this.content,n);if(!a||!a.validEnd)return!1;for(let l=i;l<o;l++)if(!this.type.allowsMarks(r.child(l).marks))return!1;return!0}canReplaceWith(e,n,r,i){if(i&&!this.type.allowsMarks(i))return!1;let o=this.contentMatchAt(e).matchType(r),s=o&&o.matchFragment(this.content,n);return!!s&&s.validEnd}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=fe.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!fe.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,r)}let i=j.fromJSON(e,n.content),o=e.nodeType(n.type).create(n.attrs,i,r);return o.type.checkAttrs(o.attrs),o}};sr.prototype.text=void 0;class fs extends sr{constructor(e,n,r,i){if(super(e,n,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):fE(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,n){return this.text.slice(e,n)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new fs(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new fs(this.type,this.attrs,e,this.marks)}cut(e=0,n=this.text.length){return e==0&&n==this.text.length?this:this.withText(this.text.slice(e,n))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function fE(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class dr{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new fS(e,n);if(r.next==null)return dr.empty;let i=mE(r);r.next&&r.err("Unexpected trailing text");let o=(function(s){let a=Object.create(null);return l($d(s,0));function l(u){let c=[];u.forEach(h=>{s[h].forEach(({term:p,to:m})=>{if(!p)return;let _;for(let E=0;E<c.length;E++)c[E][0]==p&&(_=c[E][1]);$d(s,m).forEach(E=>{_||c.push([p,_=[]]),_.indexOf(E)==-1&&_.push(E)})})});let d=a[u.join(",")]=new dr(u.indexOf(s.length-1)>-1);for(let h=0;h<c.length;h++){let p=c[h][1].sort(EE);d.next.push({type:c[h][0],next:a[p.join(",")]||l(p)})}return d}})((function(s){let a=[[]];return c(d(s,0),l()),a;function l(){return a.push([])-1}function u(h,p,m){let _={term:m,to:p};return a[h].push(_),_}function c(h,p){h.forEach(m=>m.to=p)}function d(h,p){if(h.type=="choice")return h.exprs.reduce((m,_)=>m.concat(d(_,p)),[]);if(h.type!="seq"){if(h.type=="star"){let m=l();return u(p,m),c(d(h.expr,m),m),[u(m)]}if(h.type=="plus"){let m=l();return c(d(h.expr,p),m),c(d(h.expr,m),m),[u(m)]}if(h.type=="opt")return[u(p)].concat(d(h.expr,p));if(h.type=="range"){let m=p;for(let _=0;_<h.min;_++){let E=l();c(d(h.expr,m),E),m=E}if(h.max==-1)c(d(h.expr,m),m);else for(let _=h.min;_<h.max;_++){let E=l();u(m,E),c(d(h.expr,m),E),m=E}return[u(m)]}if(h.type=="name")return[u(p,void 0,h.value)];throw new Error("Unknown expr type")}for(let m=0;;m++){let _=d(h.exprs[m],p);if(m==h.exprs.length-1)return _;c(_,p=l())}}})(i));return(function(s,a){for(let l=0,u=[s];l<u.length;l++){let c=u[l],d=!c.validEnd,h=[];for(let p=0;p<c.next.length;p++){let{type:m,next:_}=c.next[p];h.push(m.name),!d||m.isText||m.hasRequiredAttrs()||(d=!1),u.indexOf(_)==-1&&u.push(_)}d&&a.err("Only non-generatable nodes ("+h.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}})(o,r),o}matchType(e){for(let n=0;n<this.next.length;n++)if(this.next[n].type==e)return this.next[n].next;return null}matchFragment(e,n=0,r=e.childCount){let i=this;for(let o=n;i&&o<r;o++)i=i.matchType(e.child(o).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:n}=this.next[e];if(!n.isText&&!n.hasRequiredAttrs())return n}return null}compatible(e){for(let n=0;n<this.next.length;n++)for(let r=0;r<e.next.length;r++)if(this.next[n].type==e.next[r].type)return!0;return!1}fillBefore(e,n=!1,r=0){let i=[this];return(function o(s,a){let l=s.matchFragment(e,r);if(l&&(!n||l.validEnd))return j.from(a.map(u=>u.createAndFill()));for(let u=0;u<s.next.length;u++){let{type:c,next:d}=s.next[u];if(!c.isText&&!c.hasRequiredAttrs()&&i.indexOf(d)==-1){i.push(d);let h=o(d,a.concat(c));if(h)return h}}return null})(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),o=i.match;if(o.matchType(e)){let s=[];for(let a=i;a.type;a=a.via)s.push(a.type);return s.reverse()}for(let s=0;s<o.next.length;s++){let{type:a,next:l}=o.next[s];a.isLeaf||a.hasRequiredAttrs()||a.name in n||i.type&&!l.validEnd||(r.push({match:a.contentMatch,type:a,via:i}),n[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];return(function n(r){e.push(r);for(let i=0;i<r.next.length;i++)e.indexOf(r.next[i].next)==-1&&n(r.next[i].next)})(this),e.map((n,r)=>{let i=r+(n.validEnd?"*":" ")+" ";for(let o=0;o<n.next.length;o++)i+=(o?", ":"")+n.next[o].type.name+"->"+e.indexOf(n.next[o].next);return i}).join(`
8
- `)}}dr.empty=new dr(!0);class fS{constructor(e,n){this.string=e,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=e.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(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function mE(t){let e=[];do e.push(mS(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function mS(t){let e=[];do e.push(ES(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function ES(t){let e=(function(n){if(n.eat("(")){let r=mE(n);return n.eat(")")||n.err("Missing closing paren"),r}if(!/\W/.test(n.next)){let r=(function(i,o){let s=i.nodeTypes,a=s[o];if(a)return[a];let l=[];for(let u in s){let c=s[u];c.isInGroup(o)&&l.push(c)}return l.length==0&&i.err("No node type or group '"+o+"' found"),l})(n,n.next).map(i=>(n.inline==null?n.inline=i.isInline:n.inline!=i.isInline&&n.err("Mixing inline and block content"),{type:"name",value:i}));return n.pos++,r.length==1?r[0]:{type:"choice",exprs:r}}n.err("Unexpected token '"+n.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=_S(t,e)}return e}function zd(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function _S(t,e){let n=zd(t),r=n;return t.eat(",")&&(r=t.next!="}"?zd(t):-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function EE(t,e){return e-t}function $d(t,e){let n=[];return(function r(i){let o=t[i];if(o.length==1&&!o[0].term)return r(o[0].to);n.push(i);for(let s=0;s<o.length;s++){let{term:a,to:l}=o[s];a||n.indexOf(l)!=-1||r(l)}})(e),n.sort(EE)}function _E(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 gE(t,e){let n=Object.create(null);for(let r in t){let i=e&&e[r];if(i===void 0){let o=t[r];if(!o.hasDefault)throw new RangeError("No value supplied for attribute "+r);i=o.default}n[r]=i}return n}function AE(t,e,n,r){for(let i in e)if(!(i in t))throw new RangeError(`Unsupported attribute ${i} for ${n} of type ${i}`);for(let i in t){let o=t[i];o.validate&&o.validate(e[i])}}function SE(t,e){let n=Object.create(null);if(e)for(let r in e)n[r]=new gS(t,r,e[r]);return n}let Yd=class vE{constructor(e,n,r){this.name=e,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=SE(e,r.attrs),this.defaultAttrs=_E(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==dr.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:gE(this.attrs,e)}create(e=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new sr(this,this.computeAttrs(e),j.from(n),fe.setFrom(r))}createChecked(e=null,n,r){return n=j.from(n),this.checkContent(n),new sr(this,this.computeAttrs(e),n,fe.setFrom(r))}createAndFill(e=null,n,r){if(e=this.computeAttrs(e),(n=j.from(n)).size){let s=this.contentMatch.fillBefore(n);if(!s)return null;n=s.append(n)}let i=this.contentMatch.matchFragment(n),o=i&&i.fillBefore(j.empty,!0);return o?new sr(this,e,n.append(o),fe.setFrom(r)):null}validContent(e){let n=this.contentMatch.matchFragment(e);if(!n||!n.validEnd)return!1;for(let r=0;r<e.childCount;r++)if(!this.allowsMarks(e.child(r).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){AE(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let n=0;n<e.length;n++)if(!this.allowsMarkType(e[n].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let n;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?n&&n.push(e[r]):n||(n=e.slice(0,r));return n?n.length?n:fe.none:e}static compile(e,n){let r=Object.create(null);e.forEach((o,s)=>r[o]=new vE(o,n,s));let i=n.spec.topNode||"doc";if(!r[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let o in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};class gS{constructor(e,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?(function(i,o,s){let a=s.split("|");return l=>{let u=l===null?"null":typeof l;if(a.indexOf(u)<0)throw new RangeError(`Expected value of type ${a} for attribute ${o} on type ${i}, got ${u}`)}})(e,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class Gs{constructor(e,n,r,i){this.name=e,this.rank=n,this.schema=r,this.spec=i,this.attrs=SE(e,i.attrs),this.excluded=null;let o=_E(this.attrs);this.instance=o?new fe(this,o):null}create(e=null){return!e&&this.instance?this.instance:new fe(this,gE(this.attrs,e))}static compile(e,n){let r=Object.create(null),i=0;return e.forEach((o,s)=>r[o]=new Gs(o,i++,n,s)),r}removeFromSet(e){for(var n=0;n<e.length;n++)e[n].type==this&&(e=e.slice(0,n).concat(e.slice(n+1)),n--);return e}isInSet(e){for(let n=0;n<e.length;n++)if(e[n].type==this)return e[n]}checkAttrs(e){AE(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}function Gd(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 a in t.marks){let l=t.marks[a];(i=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(i)>-1)&&n.push(s=l)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}class Wi{constructor(e,n){this.schema=e,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(i=>{if((function(o){return o.tag!=null})(i))this.tags.push(i);else if((function(o){return o.style!=null})(i)){let o=/[^=]*/.exec(i.style)[0];r.indexOf(o)<0&&r.push(o),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let o=e.nodes[i.node];return o.contentMatch.matchType(o)})}parse(e,n={}){let r=new Kd(this,n,!1);return r.addAll(e,fe.none,n.from,n.to),r.finish()}parseSlice(e,n={}){let r=new Kd(this,n,!0);return r.addAll(e,fe.none,n.from,n.to),G.maxOpen(r.finish())}matchTag(e,n,r){for(let i=r?this.tags.indexOf(r)+1:0;i<this.tags.length;i++){let o=this.tags[i];if(SS(e,o.tag)&&(o.namespace===void 0||e.namespaceURI==o.namespace)&&(!o.context||n.matchesContext(o.context))){if(o.getAttrs){let s=o.getAttrs(e);if(s===!1)continue;o.attrs=s||void 0}return o}}}matchStyle(e,n,r,i){for(let o=i?this.styles.indexOf(i)+1:0;o<this.styles.length;o++){let s=this.styles[o],a=s.style;if(!(a.indexOf(e)!=0||s.context&&!r.matchesContext(s.context)||a.length>e.length&&(a.charCodeAt(e.length)!=61||a.slice(e.length+1)!=n))){if(s.getAttrs){let l=s.getAttrs(n);if(l===!1)continue;s.attrs=l||void 0}return s}}}static schemaRules(e){let n=[];function r(i){let o=i.priority==null?50:i.priority,s=0;for(;s<n.length;s++){let a=n[s];if((a.priority==null?50:a.priority)<o)break}n.splice(s,0,i)}for(let i in e.marks){let o=e.marks[i].spec.parseDOM;o&&o.forEach(s=>{r(s=qd(s)),s.mark||s.ignore||s.clearMark||(s.mark=i)})}for(let i in e.nodes){let o=e.nodes[i].spec.parseDOM;o&&o.forEach(s=>{r(s=qd(s)),s.node||s.ignore||s.mark||(s.node=i)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new Wi(e,Wi.schemaRules(e)))}}const OE={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},AS={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Wd={ol:!0,ul:!0};function Xd(t,e,n){return e!=null?(e?1:0)|(e==="full"?2:0):t&&t.whitespace=="pre"?3:-5&n}class Ca{constructor(e,n,r,i,o,s){this.type=e,this.attrs=n,this.marks=r,this.solid=i,this.options=s,this.content=[],this.activeMarks=fe.none,this.match=o||(4&s?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(j.from(e));if(!n){let r,i=this.type.contentMatch;return(r=i.findWrapping(e.type))?(this.match=i,r):null}this.match=this.type.contentMatch.matchFragment(n)}return this.match.findWrapping(e.type)}finish(e){if(!(1&this.options)){let r,i=this.content[this.content.length-1];if(i&&i.isText&&(r=/[ \t\r\n\u000c]+$/.exec(i.text))){let o=i;i.text.length==r[0].length?this.content.pop():this.content[this.content.length-1]=o.withText(o.text.slice(0,o.text.length-r[0].length))}}let n=j.from(this.content);return!e&&this.match&&(n=n.append(this.match.fillBefore(j.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!OE.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class Kd{constructor(e,n,r){this.parser=e,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let i,o=n.topNode,s=Xd(null,n.preserveWhitespace,0)|(r?4:0);i=o?new Ca(o.type,o.attrs,fe.none,!0,n.topMatch||o.type.contentMatch,s):new Ca(r?null:e.schema.topNodeType,null,fe.none,!0,null,s),this.nodes=[i],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,n){e.nodeType==3?this.addTextNode(e,n):e.nodeType==1&&this.addElement(e,n)}addTextNode(e,n){let r=e.nodeValue,i=this.top,o=2&i.options?"full":this.localPreserveWS||(1&i.options)>0,{schema:s}=this.parser;if(o==="full"||i.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(o)if(o==="full")r=r.replace(/\r\n?/g,`
9
- `);else if(s.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(s.linebreakReplacement.create())){let a=r.split(/\r?\n|\r/);for(let l=0;l<a.length;l++)l&&this.insertNode(s.linebreakReplacement.create(),n,!0),a[l]&&this.insertNode(s.text(a[l]),n,!/\S/.test(a[l]));r=""}else r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let a=i.content[i.content.length-1],l=e.previousSibling;(!a||l&&l.nodeName=="BR"||a.isText&&/[ \t\r\n\u000c]$/.test(a.text))&&(r=r.slice(1))}r&&this.insertNode(s.text(r),n,!/\S/.test(r)),this.findInText(e)}else this.findInside(e)}addElement(e,n,r){let i=this.localPreserveWS,o=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let s,a=e.nodeName.toLowerCase();Wd.hasOwnProperty(a)&&this.parser.normalizeLists&&(function(u){for(let c=u.firstChild,d=null;c;c=c.nextSibling){let h=c.nodeType==1?c.nodeName.toLowerCase():null;h&&Wd.hasOwnProperty(h)&&d?(d.appendChild(c),c=d):h=="li"?d=c:h&&(d=null)}})(e);let l=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(s=this.parser.matchTag(e,this,r));e:if(l?l.ignore:AS.hasOwnProperty(a))this.findInside(e),this.ignoreFallback(e,n);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(e=l.skip);let u,c=this.needsBlock;if(OE.hasOwnProperty(a))o.content.length&&o.content[0].isInline&&this.open&&(this.open--,o=this.top),u=!0,o.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,n);break e}let d=l&&l.skip?n:this.readStyles(e,n);d&&this.addAll(e,d),u&&this.sync(o),this.needsBlock=c}else{let u=this.readStyles(e,n);u&&this.addElementByRule(e,l,u,l.consuming===!1?s:void 0)}this.localPreserveWS=i}leafFallback(e,n){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
10
- `),n)}ignoreFallback(e,n){e.nodeName!="BR"||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"),n,!0)}readStyles(e,n){let r=e.style;if(r&&r.length)for(let i=0;i<this.parser.matchedStyles.length;i++){let o=this.parser.matchedStyles[i],s=r.getPropertyValue(o);if(s)for(let a;;){let l=this.parser.matchStyle(o,s,this,a);if(!l)break;if(l.ignore)return null;if(n=l.clearMark?n.filter(u=>!l.clearMark(u)):n.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming!==!1)break;a=l}}return n}addElementByRule(e,n,r,i){let o,s;if(n.node)if(s=this.parser.schema.nodes[n.node],s.isLeaf)this.insertNode(s.create(n.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let l=this.enter(s,n.attrs||null,r,n.preserveWhitespace);l&&(o=!0,r=l)}else{let l=this.parser.schema.marks[n.mark];r=r.concat(l.create(n.attrs))}let a=this.top;if(s&&s.isLeaf)this.findInside(e);else if(i)this.addElement(e,r,i);else if(n.getContent)this.findInside(e),n.getContent(e,this.parser.schema).forEach(l=>this.insertNode(l,r,!1));else{let l=e;typeof n.contentElement=="string"?l=e.querySelector(n.contentElement):typeof n.contentElement=="function"?l=n.contentElement(e):n.contentElement&&(l=n.contentElement),this.findAround(e,l,!0),this.addAll(l,r),this.findAround(e,l,!1)}o&&this.sync(a)&&this.open--}addAll(e,n,r,i){let o=r||0;for(let s=r?e.childNodes[r]:e.firstChild,a=i==null?null:e.childNodes[i];s!=a;s=s.nextSibling,++o)this.findAtPoint(e,o),this.addDOM(s,n);this.findAtPoint(e,o)}findPlace(e,n,r){let i,o;for(let s=this.open,a=0;s>=0;s--){let l=this.nodes[s],u=l.findWrapping(e);if(u&&(!i||i.length>u.length+a)&&(i=u,o=l,!u.length))break;if(l.solid){if(r)break;a+=2}}if(!i)return null;this.sync(o);for(let s=0;s<i.length;s++)n=this.enterInner(i[s],null,n,!1);return n}insertNode(e,n,r){if(e.isInline&&this.needsBlock&&!this.top.type){let o=this.textblockFromContext();o&&(n=this.enterInner(o,null,n))}let i=this.findPlace(e,n,r);if(i){this.closeExtra();let o=this.top;o.match&&(o.match=o.match.matchType(e.type));let s=fe.none;for(let a of i.concat(e.marks))(o.type?o.type.allowsMarkType(a.type):Jd(a.type,e.type))&&(s=a.addToSet(s));return o.content.push(e.mark(s)),!0}return!1}enter(e,n,r,i){let o=this.findPlace(e.create(n),r,!1);return o&&(o=this.enterInner(e,n,r,!0,i)),o}enterInner(e,n,r,i=!1,o){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(e);let a=Xd(e,o,s.options);4&s.options&&s.content.length==0&&(a|=4);let l=fe.none;return r=r.filter(u=>!(s.type?s.type.allowsMarkType(u.type):Jd(u.type,e))||(l=u.addToSet(l),!1)),this.nodes.push(new Ca(e,n,l,i,null,a)),this.open++,r}closeExtra(e=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(e));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(e){for(let n=this.open;n>=0;n--){if(this.nodes[n]==e)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=1)}return!1}get currentPos(){this.closeExtra();let e=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let i=r.length-1;i>=0;i--)e+=r[i].nodeSize;n&&e++}return e}findAtPoint(e,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&e.nodeType==1&&e.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(e,n,r){if(e!=n&&this.find)for(let i=0;i<this.find.length;i++)this.find[i].pos==null&&e.nodeType==1&&e.contains(this.find[i].node)&&n.compareDocumentPosition(this.find[i].node)&(r?2:4)&&(this.find[i].pos=this.currentPos)}findInText(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&(this.find[n].pos=this.currentPos-(e.nodeValue.length-this.find[n].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let n=e.split("/"),r=this.options.context,i=!(this.isOpen||r&&r.parent.type!=this.nodes[0].type),o=-(r?r.depth+1:0)+(i?0:1),s=(a,l)=>{for(;a>=0;a--){let u=n[a];if(u==""){if(a==n.length-1||a==0)continue;for(;l>=o;l--)if(s(a-1,l))return!0;return!1}{let c=l>0||l==0&&i?this.nodes[l].type:r&&l>=o?r.node(l-o).type:null;if(!c||c.name!=u&&!c.isInGroup(u))return!1;l--}}return!0};return s(n.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let n=e.depth;n>=0;n--){let r=e.node(n).contentMatchAt(e.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}}function SS(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function qd(t){let e={};for(let n in t)e[n]=t[n];return e}function Jd(t,e){let n=e.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(t))continue;let o=[],s=a=>{o.push(a);for(let l=0;l<a.edgeCount;l++){let{type:u,next:c}=a.edge(l);if(u==e||o.indexOf(c)<0&&s(c))return!0}};if(s(i.contentMatch))return!0}}class ci{constructor(e,n){this.nodes=e,this.marks=n}serializeFragment(e,n={},r){r||(r=Na(n).createDocumentFragment());let i=r,o=[];return e.forEach(s=>{if(o.length||s.marks.length){let a=0,l=0;for(;a<o.length&&l<s.marks.length;){let u=s.marks[l];if(this.marks[u.type.name]){if(!u.eq(o[a][0])||u.type.spec.spanning===!1)break;a++,l++}else l++}for(;a<o.length;)i=o.pop()[1];for(;l<s.marks.length;){let u=s.marks[l++],c=this.serializeMark(u,s.isInline,n);c&&(o.push([u,i]),i.appendChild(c.dom),i=c.contentDOM||c.dom)}}i.appendChild(this.serializeNodeInner(s,n))}),r}serializeNodeInner(e,n){let{dom:r,contentDOM:i}=Wo(Na(n),this.nodes[e.type.name](e),null,e.attrs);if(i){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,n,i)}return r}serializeNode(e,n={}){let r=this.serializeNodeInner(e,n);for(let i=e.marks.length-1;i>=0;i--){let o=this.serializeMark(e.marks[i],e.isInline,n);o&&((o.contentDOM||o.dom).appendChild(r),r=o.dom)}return r}serializeMark(e,n,r={}){let i=this.marks[e.type.name];return i&&Wo(Na(r),i(e,n),null,e.attrs)}static renderSpec(e,n,r=null,i){return Wo(e,n,r,i)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new ci(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=Zd(e.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(e){return Zd(e.marks)}}function Zd(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function Na(t){return t.document||window.document}const Qd=new WeakMap;function vS(t){let e=Qd.get(t);return e===void 0&&Qd.set(t,e=(function(n){let r=null;function i(o){if(o&&typeof o=="object")if(Array.isArray(o))if(typeof o[0]=="string")r||(r=[]),r.push(o);else for(let s=0;s<o.length;s++)i(o[s]);else for(let s in o)i(o[s])}return i(n),r})(t)),e}function Wo(t,e,n,r){if(typeof e=="string")return{dom:t.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let i,o=e[0];if(typeof o!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(i=vS(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,a=o.indexOf(" ");a>0&&(n=o.slice(0,a),o=o.slice(a+1));let l=n?t.createElementNS(n,o):t.createElement(o),u=e[1],c=1;if(u&&typeof u=="object"&&u.nodeType==null&&!Array.isArray(u)){c=2;for(let d in u)if(u[d]!=null){let h=d.indexOf(" ");h>0?l.setAttributeNS(d.slice(0,h),d.slice(h+1),u[d]):d=="style"&&l.style?l.style.cssText=u[d]:l.setAttribute(d,u[d])}}for(let d=c;d<e.length;d++){let h=e[d];if(h===0){if(d<e.length-1||d>c)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}{let{dom:p,contentDOM:m}=Wo(t,h,n,r);if(l.appendChild(p),m){if(s)throw new RangeError("Multiple content holes");s=m}}}return{dom:l,contentDOM:s}}const DE=Math.pow(2,16);function OS(t,e){return t+e*DE}function eh(t){return 65535&t}class xl{constructor(e,n,r){this.pos=e,this.delInfo=n,this.recover=r}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}}class vt{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&vt.empty)return vt.empty}recover(e){let n=0,r=eh(e);if(!this.inverted)for(let i=0;i<r;i++)n+=this.ranges[3*i+2]-this.ranges[3*i+1];return this.ranges[3*r]+n+(function(i){return(i-(65535&i))/DE})(e)}mapResult(e,n=1){return this._map(e,n,!1)}map(e,n=1){return this._map(e,n,!0)}_map(e,n,r){let i=0,o=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?i:0);if(l>e)break;let u=this.ranges[a+o],c=this.ranges[a+s],d=l+u;if(e<=d){let h=l+i+((u?e==l?-1:e==d?1:n:n)<0?0:c);if(r)return h;let p=e==(n<0?l:d)?null:OS(a/3,e-l),m=e==l?2:e==d?1:4;return(n<0?e!=l:e!=d)&&(m|=8),new xl(h,m,p)}i+=c-u}return r?e+i:new xl(e+i,0,null)}touches(e,n){let r=0,i=eh(n),o=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?r:0);if(l>e)break;let u=this.ranges[a+o];if(e<=l+u&&a==3*i)return!0;r+=this.ranges[a+s]-u}return!1}forEach(e){let n=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,o=0;i<this.ranges.length;i+=3){let s=this.ranges[i],a=s-(this.inverted?o:0),l=s+(this.inverted?0:o),u=this.ranges[i+n],c=this.ranges[i+r];e(a,a+u,l,l+c),o+=c-u}}invert(){return new vt(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?vt.empty:new vt(e<0?[0,-e,0]:[0,0,e])}}vt.empty=new vt([]);class Xi{constructor(e,n,r=0,i=e?e.length:0){this.mirror=n,this.from=r,this.to=i,this._maps=e||[],this.ownData=!(e||n)}get maps(){return this._maps}slice(e=0,n=this.maps.length){return new Xi(this._maps,this.mirror,e,n)}appendMap(e,n){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),n!=null&&this.setMirror(this._maps.length-1,n)}appendMapping(e){for(let n=0,r=this._maps.length;n<e._maps.length;n++){let i=e.getMirror(n);this.appendMap(e._maps[n],i!=null&&i<n?r+i:void 0)}}getMirror(e){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==e)return this.mirror[n+(n%2?-1:1)]}}setMirror(e,n){this.mirror||(this.mirror=[]),this.mirror.push(e,n)}appendMappingInverted(e){for(let n=e.maps.length-1,r=this._maps.length+e._maps.length;n>=0;n--){let i=e.getMirror(n);this.appendMap(e._maps[n].invert(),i!=null&&i>n?r-i-1:void 0)}}invert(){let e=new Xi;return e.appendMappingInverted(this),e}map(e,n=1){if(this.mirror)return this._map(e,n,!0);for(let r=this.from;r<this.to;r++)e=this._maps[r].map(e,n);return e}mapResult(e,n=1){return this._map(e,n,!1)}_map(e,n,r){let i=0;for(let o=this.from;o<this.to;o++){let s=this._maps[o].mapResult(e,n);if(s.recover!=null){let a=this.getMirror(o);if(a!=null&&a>o&&a<this.to){o=a,e=this._maps[a].recover(s.recover);continue}}i|=s.delInfo,e=s.pos}return r?e:new xl(e,i,null)}}const ba=Object.create(null);class et{getMap(){return vt.empty}merge(e){return null}static fromJSON(e,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=ba[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in ba)throw new RangeError("Duplicate use of step JSON ID "+e);return ba[e]=n,n.prototype.jsonID=e,n}}class ke{constructor(e,n){this.doc=e,this.failed=n}static ok(e){return new ke(e,null)}static fail(e){return new ke(null,e)}static fromReplace(e,n,r,i){try{return ke.ok(e.replace(n,r,i))}catch(o){if(o instanceof hs)return ke.fail(o.message);throw o}}}function Vc(t,e,n){let r=[];for(let i=0;i<t.childCount;i++){let o=t.child(i);o.content.size&&(o=o.copy(Vc(o.content,e,o))),o.isInline&&(o=e(o,n,i)),r.push(o)}return j.fromArray(r)}class Nn extends et{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=e.resolve(this.from),i=r.node(r.sharedDepth(this.to)),o=new G(Vc(n.content,(s,a)=>s.isAtom&&a.type.allowsMarkType(this.mark.type)?s.mark(this.mark.addToSet(s.marks)):s,i),n.openStart,n.openEnd);return ke.fromReplace(e,this.from,this.to,o)}invert(){return new Xt(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Nn(n.pos,r.pos,this.mark)}merge(e){return e instanceof Nn&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Nn(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Nn(n.from,n.to,e.markFromJSON(n.mark))}}et.jsonID("addMark",Nn);class Xt extends et{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=new G(Vc(n.content,i=>i.mark(this.mark.removeFromSet(i.marks)),e),n.openStart,n.openEnd);return ke.fromReplace(e,this.from,this.to,r)}invert(){return new Nn(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Xt(n.pos,r.pos,this.mark)}merge(e){return e instanceof Xt&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Xt(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Xt(n.from,n.to,e.markFromJSON(n.mark))}}et.jsonID("removeMark",Xt);class bn extends et{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return ke.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return ke.fromReplace(e,this.pos,this.pos+1,new G(j.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let i=0;i<n.marks.length;i++)if(!n.marks[i].isInSet(r))return new bn(this.pos,n.marks[i]);return new bn(this.pos,this.mark)}}return new hr(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new bn(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new bn(n.pos,e.markFromJSON(n.mark))}}et.jsonID("addNodeMark",bn);class hr extends et{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return ke.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return ke.fromReplace(e,this.pos,this.pos+1,new G(j.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);return n&&this.mark.isInSet(n.marks)?new bn(this.pos,this.mark):this}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new hr(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new hr(n.pos,e.markFromJSON(n.mark))}}et.jsonID("removeNodeMark",hr);class $e extends et{constructor(e,n,r,i=!1){super(),this.from=e,this.to=n,this.slice=r,this.structure=i}apply(e){return this.structure&&Fl(e,this.from,this.to)?ke.fail("Structure replace would overwrite content"):ke.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new vt([this.from,this.to-this.from,this.slice.size])}invert(e){return new $e(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deletedAcross&&r.deletedAcross?null:new $e(n.pos,Math.max(n.pos,r.pos),this.slice,this.structure)}merge(e){if(!(e instanceof $e)||e.structure||this.structure)return null;if(this.from+this.slice.size!=e.from||this.slice.openEnd||e.slice.openStart){if(e.to!=this.from||this.slice.openStart||e.slice.openEnd)return null;{let n=this.slice.size+e.slice.size==0?G.empty:new G(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new $e(e.from,this.to,n,this.structure)}}{let n=this.slice.size+e.slice.size==0?G.empty:new G(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new $e(this.from,this.to+(e.to-e.from),n,this.structure)}}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new $e(n.from,n.to,G.fromJSON(e,n.slice),!!n.structure)}}et.jsonID("replace",$e);class Ot extends et{constructor(e,n,r,i,o,s,a=!1){super(),this.from=e,this.to=n,this.gapFrom=r,this.gapTo=i,this.slice=o,this.insert=s,this.structure=a}apply(e){if(this.structure&&(Fl(e,this.from,this.gapFrom)||Fl(e,this.gapTo,this.to)))return ke.fail("Structure gap-replace would overwrite content");let n=e.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return ke.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?ke.fromReplace(e,this.from,this.to,r):ke.fail("Content does not fit in gap")}getMap(){return new vt([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let n=this.gapTo-this.gapFrom;return new Ot(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),i=this.from==this.gapFrom?n.pos:e.map(this.gapFrom,-1),o=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||i<n.pos||o>r.pos?null:new Ot(n.pos,r.pos,i,o,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Ot(n.from,n.to,n.gapFrom,n.gapTo,G.fromJSON(e,n.slice),n.insert,!!n.structure)}}function Fl(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 s=r.node(o).maybeChild(r.indexAfter(o));for(;i>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,i--}}return!1}function wa(t,e,n,r=n.contentMatch,i=!0){let o=t.doc.nodeAt(e),s=[],a=e+1;for(let l=0;l<o.childCount;l++){let u=o.child(l),c=a+u.nodeSize,d=r.matchType(u.type);if(d){r=d;for(let h=0;h<u.marks.length;h++)n.allowsMarkType(u.marks[h].type)||t.step(new Xt(a,c,u.marks[h]));if(i&&u.isText&&n.whitespace!="pre"){let h,p,m=/\r?\n|\r/g;for(;h=m.exec(u.text);)p||(p=new G(j.from(n.schema.text(" ",n.allowedMarks(u.marks))),0,0)),s.push(new $e(a+h.index,a+h.index+h[0].length,p))}}else s.push(new $e(a,c,G.empty));a=c}if(!r.validEnd){let l=r.fillBefore(j.empty,!0);t.replace(a,a,new G(l,0,0))}for(let l=s.length-1;l>=0;l--)t.step(s[l])}function DS(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function zc(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(n==0||o.type.spec.isolating||!DS(o,s,a))break;s&&(r=1),a<o.childCount&&(i=1)}return null}function th(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 l=t.mapping.slice(r).map(n+1+o+s.index);t.replaceWith(l,l+1,e.type.schema.linebreakReplacement.create())}}})}function nh(t,e,n,r){e.forEach((i,o)=>{if(i.type==i.type.schema.linebreakReplacement){let s=t.mapping.slice(r).map(n+1+o);t.replaceWith(s,s+1,e.type.schema.text(`
11
- `))}})}function Xo(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 u=i.depth-1,c=n-2;u>o;u--,c--){let d=i.node(u),h=i.index(u);if(d.type.spec.isolating)return!1;let p=d.content.cutByIndex(h,d.childCount),m=r&&r[c+1];m&&(p=p.replaceChild(0,m.type.create(m.attrs)));let _=r&&r[c]||d;if(!d.canReplace(h+1,d.childCount)||!_.type.validContent(p))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 rh(t,e){let n=t.resolve(e),r=n.index();return(function(i,o){return!(!i||!o||i.isLeaf||!(function(s,a){a.content.size||s.type.compatibleContent(a.type);let l=s.contentMatchAt(s.childCount),{linebreakReplacement:u}=s.type.schema;for(let c=0;c<a.childCount;c++){let d=a.child(c),h=d.type==u?s.type.schema.nodes.text:d.type;if(l=l.matchType(h),!l||!s.type.allowsMarks(d.marks))return!1}return l.validEnd})(i,o))})(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function $c(t,e,n=e,r=G.empty){if(e==n&&!r.size)return null;let i=t.resolve(e),o=t.resolve(n);return TE(i,o,r)?new $e(e,n,r):new TS(i,o,r).fit()}function TE(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}et.jsonID("replaceAround",Ot);class TS{constructor(e,n,r){this.$from=e,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=j.empty;for(let i=0;i<=e.depth;i++){let o=e.node(i);this.frontier.push({type:o.type,match:o.contentMatchAt(e.indexAfter(i))})}for(let i=e.depth;i>0;i--)this.placed=j.from(e.node(i).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let u=this.findFittable();u?this.placeNodes(u):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,i=this.close(e<0?this.$to:r.doc.resolve(e));if(!i)return null;let o=this.placed,s=r.depth,a=i.depth;for(;s&&a&&o.childCount==1;)o=o.firstChild.content,s--,a--;let l=new G(o,s,a);return e>-1?new Ot(r.pos,e,this.$to.pos,this.$to.end(),l,n):l.size||r.pos!=this.$to.pos?new $e(r.pos,i.pos,l):null}findFittable(){let e=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,i=this.unplaced.openEnd;r<e;r++){let o=n.firstChild;if(n.childCount>1&&(i=0),o.type.spec.isolating&&i<=r){e=r;break}n=o.content}for(let n=1;n<=2;n++)for(let r=n==1?e:this.unplaced.openStart;r>=0;r--){let i,o=null;r?(o=ka(this.unplaced.content,r-1).firstChild,i=o.content):i=this.unplaced.content;let s=i.firstChild;for(let a=this.depth;a>=0;a--){let l,{type:u,match:c}=this.frontier[a],d=null;if(n==1&&(s?c.matchType(s.type)||(d=c.fillBefore(j.from(s),!1)):o&&u.compatibleContent(o.type)))return{sliceDepth:r,frontierDepth:a,parent:o,inject:d};if(n==2&&s&&(l=c.findWrapping(s.type)))return{sliceDepth:r,frontierDepth:a,parent:o,wrap:l};if(o&&c.matchType(o.type))break}}}openMore(){let{content:e,openStart:n,openEnd:r}=this.unplaced,i=ka(e,n);return!(!i.childCount||i.firstChild.isLeaf)&&(this.unplaced=new G(e,n+1,Math.max(r,i.size+n>=e.size-r?n+1:0)),!0)}dropNode(){let{content:e,openStart:n,openEnd:r}=this.unplaced,i=ka(e,n);if(i.childCount<=1&&n>0){let o=e.size-n<=n+i.size;this.unplaced=new G(Oi(e,n-1,1),n-1,o?n-1:r)}else this.unplaced=new G(Oi(e,n,1),n,r)}placeNodes({sliceDepth:e,frontierDepth:n,parent:r,inject:i,wrap:o}){for(;this.depth>n;)this.closeFrontierNode();if(o)for(let _=0;_<o.length;_++)this.openFrontierNode(o[_]);let s=this.unplaced,a=r?r.content:s.content,l=s.openStart-e,u=0,c=[],{match:d,type:h}=this.frontier[n];if(i){for(let _=0;_<i.childCount;_++)c.push(i.child(_));d=d.matchFragment(i)}let p=a.size+e-(s.content.size-s.openEnd);for(;u<a.childCount;){let _=a.child(u),E=d.matchType(_.type);if(!E)break;u++,(u>1||l==0||_.content.size)&&(d=E,c.push(RE(_.mark(h.allowedMarks(_.marks)),u==1?l:0,u==a.childCount?p:-1)))}let m=u==a.childCount;m||(p=-1),this.placed=Di(this.placed,n,j.from(c)),this.frontier[n].match=d,m&&p<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let _=0,E=a;_<p;_++){let g=E.lastChild;this.frontier.push({type:g.type,match:g.contentMatchAt(g.childCount)}),E=g.content}this.unplaced=m?e==0?G.empty:new G(Oi(s.content,e-1,1),e-1,p<0?s.openEnd:e-1):new G(Oi(s.content,e,u),s.openStart,s.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e,n=this.frontier[this.depth];if(!n.type.isTextblock||!La(this.$to,this.$to.depth,n.type,n.match,!1)||this.$to.depth==this.depth&&(e=this.findCloseLevel(this.$to))&&e.depth==this.depth)return-1;let{depth:r}=this.$to,i=this.$to.after(r);for(;r>1&&i==this.$to.end(--r);)++i;return i}findCloseLevel(e){e:for(let n=Math.min(this.depth,e.depth);n>=0;n--){let{match:r,type:i}=this.frontier[n],o=n<e.depth&&e.end(n+1)==e.pos+(e.depth-(n+1)),s=La(e,n,i,r,o);if(s){for(let a=n-1;a>=0;a--){let{match:l,type:u}=this.frontier[a],c=La(e,a,u,l,!0);if(!c||c.childCount)continue e}return{depth:n,fit:s,move:o?e.doc.resolve(e.after(n+1)):e}}}}close(e){let n=this.findCloseLevel(e);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=Di(this.placed,n.depth,n.fit)),e=n.move;for(let r=n.depth+1;r<=e.depth;r++){let i=e.node(r),o=i.type.contentMatch.fillBefore(i.content,!0,e.index(r));this.openFrontierNode(i.type,i.attrs,o)}return e}openFrontierNode(e,n=null,r){let i=this.frontier[this.depth];i.match=i.match.matchType(e),this.placed=Di(this.placed,this.depth,j.from(e.create(n,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let e=this.frontier.pop().match.fillBefore(j.empty,!0);e.childCount&&(this.placed=Di(this.placed,this.frontier.length,e))}}function Oi(t,e,n){return e==0?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(Oi(t.firstChild.content,e-1,n)))}function Di(t,e,n){return e==0?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(Di(t.lastChild.content,e-1,n)))}function ka(t,e){for(let n=0;n<e;n++)t=t.firstChild.content;return t}function RE(t,e,n){if(e<=0)return t;let r=t.content;return e>1&&(r=r.replaceChild(0,RE(r.firstChild,e-1,r.childCount==1?n-1:0))),e>0&&(r=t.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(t.type.contentMatch.matchFragment(r).fillBefore(j.empty,!0)))),t.copy(r)}function La(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(l,u,c){for(let d=c;d<u.childCount;d++)if(!l.allowsMarks(u.child(d).marks))return!0;return!1})(n,o.content,s)?a:null}function RS(t){return t.spec.defining||t.spec.definingForContent}function yE(t,e,n,r,i){if(e<n){let o=t.firstChild;t=t.replaceChild(0,o.copy(yE(o.content,e+1,n,r,o)))}if(e>r){let o=i.contentMatchAt(0),s=o.fillBefore(t).append(t);t=s.append(o.matchFragment(s).fillBefore(j.empty,!0))}return t}function ih(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}class zr extends et{constructor(e,n,r){super(),this.pos=e,this.attr=n,this.value=r}apply(e){let n=e.nodeAt(this.pos);if(!n)return ke.fail("No node at attribute step's position");let r=Object.create(null);for(let o in n.attrs)r[o]=n.attrs[o];r[this.attr]=this.value;let i=n.type.create(r,null,n.marks);return ke.fromReplace(e,this.pos,this.pos+1,new G(j.from(i),0,n.isLeaf?0:1))}getMap(){return vt.empty}invert(e){return new zr(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new zr(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new zr(n.pos,n.attr,n.value)}}et.jsonID("attr",zr);class Ki extends et{constructor(e,n){super(),this.attr=e,this.value=n}apply(e){let n=Object.create(null);for(let i in e.attrs)n[i]=e.attrs[i];n[this.attr]=this.value;let r=e.type.create(n,e.content,e.marks);return ke.ok(r)}getMap(){return vt.empty}invert(e){return new Ki(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new Ki(n.attr,n.value)}}et.jsonID("docAttr",Ki);let Ti=class extends Error{};Ti=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n},(Ti.prototype=Object.create(Error.prototype)).constructor=Ti,Ti.prototype.name="TransformError";class yS{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new Xi}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let n=this.maybeStep(e);if(n.failed)throw new Ti(n.failed);return this}maybeStep(e){let n=e.apply(this.doc);return n.failed||this.addStep(e,n.doc),n}get docChanged(){return this.steps.length>0}addStep(e,n){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=n}replace(e,n=e,r=G.empty){let i=$c(this.doc,e,n,r);return i&&this.step(i),this}replaceWith(e,n,r){return this.replace(e,n,new G(j.from(r),0,0))}delete(e,n){return this.replace(e,n,G.empty)}insert(e,n){return this.replaceWith(e,e,n)}replaceRange(e,n,r){return(function(i,o,s,a){if(!a.size)return i.deleteRange(o,s);let l=i.doc.resolve(o),u=i.doc.resolve(s);if(TE(l,u,a))return i.step(new $e(o,s,a));let c=ih(l,u);c[c.length-1]==0&&c.pop();let d=-(l.depth+1);c.unshift(d);for(let E=l.depth,g=l.pos-1;E>0;E--,g--){let A=l.node(E).type.spec;if(A.defining||A.definingAsContext||A.isolating)break;c.indexOf(E)>-1?d=E:l.before(E)==g&&c.splice(1,0,-E)}let h=c.indexOf(d),p=[],m=a.openStart;for(let E=a.content,g=0;;g++){let A=E.firstChild;if(p.push(A),g==a.openStart)break;E=A.content}for(let E=m-1;E>=0;E--){let g=p[E],A=RS(g.type);if(A&&!g.sameMarkup(l.node(Math.abs(d)-1)))m=E;else if(A||!g.type.isTextblock)break}for(let E=a.openStart;E>=0;E--){let g=(E+m+1)%(a.openStart+1),A=p[g];if(A)for(let S=0;S<c.length;S++){let v=c[(S+h)%c.length],D=!0;v<0&&(D=!1,v=-v);let y=l.node(v-1),R=l.index(v-1);if(y.canReplaceWith(R,R,A.type,A.marks))return i.replace(l.before(v),D?u.after(v):s,new G(yE(a.content,0,a.openStart,g),g,a.openEnd))}}let _=i.steps.length;for(let E=c.length-1;E>=0&&(i.replace(o,s,a),!(i.steps.length>_));E--){let g=c[E];g<0||(o=l.before(g),s=u.after(g))}})(this,e,n,r),this}replaceRangeWith(e,n,r){return(function(i,o,s,a){if(!a.isInline&&o==s&&i.doc.resolve(o).parent.content.size){let l=(function(u,c,d){let h=u.resolve(c);if(h.parent.canReplaceWith(h.index(),h.index(),d))return c;if(h.parentOffset==0)for(let p=h.depth-1;p>=0;p--){let m=h.index(p);if(h.node(p).canReplaceWith(m,m,d))return h.before(p+1);if(m>0)return null}if(h.parentOffset==h.parent.content.size)for(let p=h.depth-1;p>=0;p--){let m=h.indexAfter(p);if(h.node(p).canReplaceWith(m,m,d))return h.after(p+1);if(m<h.node(p).childCount)return null}return null})(i.doc,o,a.type);l!=null&&(o=s=l)}i.replaceRange(o,s,new G(j.from(a),0,0))})(this,e,n,r),this}deleteRange(e,n){return(function(r,i,o){let s=r.doc.resolve(i),a=r.doc.resolve(o),l=ih(s,a);for(let u=0;u<l.length;u++){let c=l[u],d=u==l.length-1;if(d&&c==0||s.node(c).type.contentMatch.validEnd)return r.delete(s.start(c),a.end(c));if(c>0&&(d||s.node(c-1).canReplace(s.index(c-1),a.indexAfter(c-1))))return r.delete(s.before(c),a.after(c))}for(let u=1;u<=s.depth&&u<=a.depth;u++)if(i-s.start(u)==s.depth-u&&o>s.end(u)&&a.end(u)-o!=a.depth-u&&s.start(u-1)==a.start(u-1)&&s.node(u-1).canReplace(s.index(u-1),a.index(u-1)))return r.delete(s.before(u),o);r.delete(i,o)})(this,e,n),this}lift(e,n){return(function(r,i,o){let{$from:s,$to:a,depth:l}=i,u=s.before(l+1),c=a.after(l+1),d=u,h=c,p=j.empty,m=0;for(let g=l,A=!1;g>o;g--)A||s.index(g)>0?(A=!0,p=j.from(s.node(g).copy(p)),m++):d--;let _=j.empty,E=0;for(let g=l,A=!1;g>o;g--)A||a.after(g+1)<a.end(g)?(A=!0,_=j.from(a.node(g).copy(_)),E++):h++;r.step(new Ot(d,h,u,c,new G(p.append(_),m,E),p.size-m,!0))})(this,e,n),this}join(e,n=1){return(function(r,i,o){let s=null,{linebreakReplacement:a}=r.doc.type.schema,l=r.doc.resolve(i-o),u=l.node().type;if(a&&u.inlineContent){let p=u.whitespace=="pre",m=!!u.contentMatch.matchType(a);p&&!m?s=!1:!p&&m&&(s=!0)}let c=r.steps.length;if(s===!1){let p=r.doc.resolve(i+o);nh(r,p.node(),p.before(),c)}u.inlineContent&&wa(r,i+o-1,u,l.node().contentMatchAt(l.index()),s==null);let d=r.mapping.slice(c),h=d.map(i-o);if(r.step(new $e(h,d.map(i+o,-1),G.empty,!0)),s===!0){let p=r.doc.resolve(h);th(r,p.node(),p.before(),r.steps.length)}})(this,e,n),this}wrap(e,n){return(function(r,i,o){let s=j.empty;for(let u=o.length-1;u>=0;u--){if(s.size){let c=o[u].type.contentMatch.matchFragment(s);if(!c||!c.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}s=j.from(o[u].type.create(o[u].attrs,s))}let a=i.start,l=i.end;r.step(new Ot(a,l,a,l,new G(s,0,0),o.length,!0))})(this,e,n),this}setBlockType(e,n=e,r,i=null){return(function(o,s,a,l,u){if(!l.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let c=o.steps.length;o.doc.nodesBetween(s,a,(d,h)=>{let p=typeof u=="function"?u(d):u;if(d.isTextblock&&!d.hasMarkup(l,p)&&(function(m,_,E){let g=m.resolve(_),A=g.index();return g.parent.canReplaceWith(A,A+1,E)})(o.doc,o.mapping.slice(c).map(h),l)){let m=null;if(l.schema.linebreakReplacement){let A=l.whitespace=="pre",S=!!l.contentMatch.matchType(l.schema.linebreakReplacement);A&&!S?m=!1:!A&&S&&(m=!0)}m===!1&&nh(o,d,h,c),wa(o,o.mapping.slice(c).map(h,1),l,void 0,m===null);let _=o.mapping.slice(c),E=_.map(h,1),g=_.map(h+d.nodeSize,1);return o.step(new Ot(E,g,E+1,g-1,new G(j.from(l.create(p,null,d.marks)),0,0),1,!0)),m===!0&&th(o,d,h,c),!1}})})(this,e,n,r,i),this}setNodeMarkup(e,n,r=null,i){return(function(o,s,a,l,u){let c=o.doc.nodeAt(s);if(!c)throw new RangeError("No node at given position");a||(a=c.type);let d=a.create(l,null,u||c.marks);if(c.isLeaf)return o.replaceWith(s,s+c.nodeSize,d);if(!a.validContent(c.content))throw new RangeError("Invalid content for node type "+a.name);o.step(new Ot(s,s+c.nodeSize,s+1,s+c.nodeSize-1,new G(j.from(d),0,0),1,!0))})(this,e,n,r,i),this}setNodeAttribute(e,n,r){return this.step(new zr(e,n,r)),this}setDocAttribute(e,n){return this.step(new Ki(e,n)),this}addNodeMark(e,n){return this.step(new bn(e,n)),this}removeNodeMark(e,n){let r=this.doc.nodeAt(e);if(!r)throw new RangeError("No node at position "+e);if(n instanceof fe)n.isInSet(r.marks)&&this.step(new hr(e,n));else{let i,o=r.marks,s=[];for(;i=n.isInSet(o);)s.push(new hr(e,i)),o=i.removeFromSet(o);for(let a=s.length-1;a>=0;a--)this.step(s[a])}return this}split(e,n=1,r){return(function(i,o,s=1,a){let l=i.doc.resolve(o),u=j.empty,c=j.empty;for(let d=l.depth,h=l.depth-s,p=s-1;d>h;d--,p--){u=j.from(l.node(d).copy(u));let m=a&&a[p];c=j.from(m?m.type.create(m.attrs,c):l.node(d).copy(c))}i.step(new $e(o,o,new G(u.append(c),s,s),!0))})(this,e,n,r),this}addMark(e,n,r){return(function(i,o,s,a){let l,u,c=[],d=[];i.doc.nodesBetween(o,s,(h,p,m)=>{if(!h.isInline)return;let _=h.marks;if(!a.isInSet(_)&&m.type.allowsMarkType(a.type)){let E=Math.max(p,o),g=Math.min(p+h.nodeSize,s),A=a.addToSet(_);for(let S=0;S<_.length;S++)_[S].isInSet(A)||(l&&l.to==E&&l.mark.eq(_[S])?l.to=g:c.push(l=new Xt(E,g,_[S])));u&&u.to==E?u.to=g:d.push(u=new Nn(E,g,a))}}),c.forEach(h=>i.step(h)),d.forEach(h=>i.step(h))})(this,e,n,r),this}removeMark(e,n,r){return(function(i,o,s,a){let l=[],u=0;i.doc.nodesBetween(o,s,(c,d)=>{if(!c.isInline)return;u++;let h=null;if(a instanceof Gs){let p,m=c.marks;for(;p=a.isInSet(m);)(h||(h=[])).push(p),m=p.removeFromSet(m)}else a?a.isInSet(c.marks)&&(h=[a]):h=c.marks;if(h&&h.length){let p=Math.min(d+c.nodeSize,s);for(let m=0;m<h.length;m++){let _,E=h[m];for(let g=0;g<l.length;g++){let A=l[g];A.step==u-1&&E.eq(l[g].style)&&(_=A)}_?(_.to=p,_.step=u):l.push({style:E,from:Math.max(d,o),to:p,step:u})}}}),l.forEach(c=>i.step(new Xt(c.from,c.to,c.style)))})(this,e,n,r),this}clearIncompatible(e,n,r){return wa(this,e,n,r),this}}const Ma=Object.create(null);class pe{constructor(e,n,r){this.$anchor=e,this.$head=n,this.ranges=r||[new IS(e.min(n),e.max(n))]}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 e=this.ranges;for(let n=0;n<e.length;n++)if(e[n].$from.pos!=e[n].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,n=G.empty){let r=n.content.lastChild,i=null;for(let a=0;a<n.openEnd;a++)i=r,r=r.lastChild;let o=e.steps.length,s=this.ranges;for(let a=0;a<s.length;a++){let{$from:l,$to:u}=s[a],c=e.mapping.slice(o);e.replaceRange(c.map(l.pos),c.map(u.pos),a?G.empty:n),a==0&&ah(e,o,(r?r.isInline:i&&i.isTextblock)?-1:1)}}replaceWith(e,n){let r=e.steps.length,i=this.ranges;for(let o=0;o<i.length;o++){let{$from:s,$to:a}=i[o],l=e.mapping.slice(r),u=l.map(s.pos),c=l.map(a.pos);o?e.deleteRange(u,c):(e.replaceRangeWith(u,c,n),ah(e,r,n.isInline?-1:1))}}static findFrom(e,n,r=!1){let i=e.parent.inlineContent?new de(e):kr(e.node(0),e.parent,e.pos,e.index(),n,r);if(i)return i;for(let o=e.depth-1;o>=0;o--){let s=n<0?kr(e.node(0),e.node(o),e.before(o+1),e.index(o),n,r):kr(e.node(0),e.node(o),e.after(o+1),e.index(o)+1,n,r);if(s)return s}return null}static near(e,n=1){return this.findFrom(e,n)||this.findFrom(e,-n)||new Rt(e.node(0))}static atStart(e){return kr(e,e,0,0,1)||new Rt(e)}static atEnd(e){return kr(e,e,e.content.size,e.childCount,-1)||new Rt(e)}static fromJSON(e,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=Ma[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in Ma)throw new RangeError("Duplicate use of selection JSON ID "+e);return Ma[e]=n,n.prototype.jsonID=e,n}getBookmark(){return de.between(this.$anchor,this.$head).getBookmark()}}pe.prototype.visible=!0;class IS{constructor(e,n){this.$from=e,this.$to=n}}let oh=!1;function sh(t){oh||t.parent.inlineContent||(oh=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class de extends pe{constructor(e,n=e){sh(e),sh(n),super(e,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,n){let r=e.resolve(n.map(this.head));if(!r.parent.inlineContent)return pe.near(r);let i=e.resolve(n.map(this.anchor));return new de(i.parent.inlineContent?i:r,r)}replace(e,n=G.empty){if(super.replace(e,n),n==G.empty){let r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}eq(e){return e instanceof de&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new Ws(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new de(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,r=n){let i=e.resolve(n);return new this(i,r==n?i:e.resolve(r))}static between(e,n,r){let i=e.pos-n.pos;if(r&&!i||(r=i>=0?1:-1),!n.parent.inlineContent){let o=pe.findFrom(n,r,!0)||pe.findFrom(n,-r,!0);if(!o)return pe.near(n,r);n=o.$head}return e.parent.inlineContent||(i==0||(e=(pe.findFrom(e,-r,!0)||pe.findFrom(e,r,!0)).$anchor).pos<n.pos!=i<0)&&(e=n),new de(e,n)}}pe.jsonID("text",de);class Ws{constructor(e,n){this.anchor=e,this.head=n}map(e){return new Ws(e.map(this.anchor),e.map(this.head))}resolve(e){return de.between(e.resolve(this.anchor),e.resolve(this.head))}}class Q extends pe{constructor(e){let n=e.nodeAfter,r=e.node(0).resolve(e.pos+n.nodeSize);super(e,r),this.node=n}map(e,n){let{deleted:r,pos:i}=n.mapResult(this.anchor),o=e.resolve(i);return r?pe.near(o):new Q(o)}content(){return new G(j.from(this.node),0,0)}eq(e){return e instanceof Q&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new Yc(this.anchor)}static fromJSON(e,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new Q(e.resolve(n.anchor))}static create(e,n){return new Q(e.resolve(n))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}Q.prototype.visible=!1,pe.jsonID("node",Q);class Yc{constructor(e){this.anchor=e}map(e){let{deleted:n,pos:r}=e.mapResult(this.anchor);return n?new Ws(r,r):new Yc(r)}resolve(e){let n=e.resolve(this.anchor),r=n.nodeAfter;return r&&Q.isSelectable(r)?new Q(n):pe.near(n)}}class Rt extends pe{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,n=G.empty){if(n==G.empty){e.delete(0,e.doc.content.size);let r=pe.atStart(e.doc);r.eq(e.selection)||e.setSelection(r)}else super.replace(e,n)}toJSON(){return{type:"all"}}static fromJSON(e){return new Rt(e)}map(e){return new Rt(e)}eq(e){return e instanceof Rt}getBookmark(){return CS}}pe.jsonID("all",Rt);const CS={map(){return this},resolve:t=>new Rt(t)};function kr(t,e,n,r,i,o=!1){if(e.inlineContent)return de.create(t,n);for(let s=r-(i>0?0:1);i>0?s<e.childCount:s>=0;s+=i){let a=e.child(s);if(a.isAtom){if(!o&&Q.isSelectable(a))return Q.create(t,n-(i<0?a.nodeSize:0))}else{let l=kr(t,a,n+i,i<0?a.childCount:0,i,o);if(l)return l}n+=a.nodeSize*i}return null}function ah(t,e,n){let r=t.steps.length-1;if(r<e)return;let i,o=t.steps[r];(o instanceof $e||o instanceof Ot)&&(t.mapping.maps[r].forEach((s,a,l,u)=>{i==null&&(i=u)}),t.setSelection(pe.near(t.doc.resolve(i),n)))}class NS extends yS{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.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(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=-3&this.updated|1,this.storedMarks=null,this}get selectionSet(){return(1&this.updated)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=2,this}ensureMarks(e){return fe.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(2&this.updated)>0}addStep(e,n){super.addStep(e,n),this.updated=-3&this.updated,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,n=!0){let r=this.selection;return n&&(e=e.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||fe.none))),r.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,n,r){let i=this.doc.type.schema;if(n==null)return e?this.replaceSelectionWith(i.text(e),!0):this.deleteSelection();{if(r==null&&(r=n),r=r==null?n:r,!e)return this.deleteRange(n,r);let o=this.storedMarks;if(!o){let s=this.doc.resolve(n);o=r==n?s.marks():s.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,i.text(e,o)),this.selection.empty||this.setSelection(pe.near(this.selection.$to)),this}}setMeta(e,n){return this.meta[typeof e=="string"?e:e.key]=n,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=4,this}get scrolledIntoView(){return(4&this.updated)>0}}function lh(t,e){return e&&t?t.bind(e):t}class Ri{constructor(e,n,r){this.name=e,this.init=lh(n.init,r),this.apply=lh(n.apply,r)}}const bS=[new Ri("doc",{init:t=>t.doc||t.schema.topNodeType.createAndFill(),apply:t=>t.doc}),new Ri("selection",{init:(t,e)=>t.selection||pe.atStart(e.doc),apply:t=>t.selection}),new Ri("storedMarks",{init:t=>t.storedMarks||null,apply:(t,e,n,r)=>r.selection.$cursor?t.storedMarks:null}),new Ri("scrollToSelection",{init:()=>0,apply:(t,e)=>t.scrolledIntoView?e+1:e})];class Pa{constructor(e,n){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=bS.slice(),n&&n.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new Ri(r.key,r.spec.state,r))})}}class Ur{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,n=-1){for(let r=0;r<this.config.plugins.length;r++)if(r!=n){let i=this.config.plugins[r];if(i.spec.filterTransaction&&!i.spec.filterTransaction.call(i,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let n=[e],r=this.applyInner(e),i=null;for(;;){let o=!1;for(let s=0;s<this.config.plugins.length;s++){let a=this.config.plugins[s];if(a.spec.appendTransaction){let l=i?i[s].n:0,u=i?i[s].state:this,c=l<n.length&&a.spec.appendTransaction.call(a,l?n.slice(l):n,u,r);if(c&&r.filterTransaction(c,s)){if(c.setMeta("appendedTransaction",e),!i){i=[];for(let d=0;d<this.config.plugins.length;d++)i.push(d<s?{state:r,n:n.length}:{state:this,n:0})}n.push(c),r=r.applyInner(c),o=!0}i&&(i[s]={state:r,n:n.length})}}if(!o)return{state:r,transactions:n}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let n=new Ur(this.config),r=this.config.fields;for(let i=0;i<r.length;i++){let o=r[i];n[o.name]=o.apply(e,this[o.name],this,n)}return n}get tr(){return new NS(this)}static create(e){let n=new Pa(e.doc?e.doc.type.schema:e.schema,e.plugins),r=new Ur(n);for(let i=0;i<n.fields.length;i++)r[n.fields[i].name]=n.fields[i].init(e,r);return r}reconfigure(e){let n=new Pa(this.schema,e.plugins),r=n.fields,i=new Ur(n);for(let o=0;o<r.length;o++){let s=r[o].name;i[s]=this.hasOwnProperty(s)?this[s]:r[o].init(e,i)}return i}toJSON(e){let n={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(n.storedMarks=this.storedMarks.map(r=>r.toJSON())),e&&typeof e=="object")for(let r in e){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let i=e[r],o=i.spec.state;o&&o.toJSON&&(n[r]=o.toJSON.call(i,this[i.key]))}return n}static fromJSON(e,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let i=new Pa(e.schema,e.plugins),o=new Ur(i);return i.fields.forEach(s=>{if(s.name=="doc")o.doc=sr.fromJSON(e.schema,n.doc);else if(s.name=="selection")o.selection=pe.fromJSON(o.doc,n.selection);else if(s.name=="storedMarks")n.storedMarks&&(o.storedMarks=n.storedMarks.map(e.schema.markFromJSON));else{if(r)for(let a in r){let l=r[a],u=l.spec.state;if(l.key==s.name&&u&&u.fromJSON&&Object.prototype.hasOwnProperty.call(n,a))return void(o[s.name]=u.fromJSON.call(l,e,n[a],o))}o[s.name]=s.init(e,o)}}),o}}function IE(t,e,n){for(let r in t){let i=t[r];i instanceof Function?i=i.bind(e):r=="handleDOMEvents"&&(i=IE(i,e,{})),n[r]=i}return n}class Xs{constructor(e){this.spec=e,this.props={},e.props&&IE(e.props,this,this.props),this.key=e.key?e.key.key:CE("plugin")}getState(e){return e[this.key]}}const xa=Object.create(null);function CE(t){return t in xa?t+"$"+ ++xa[t]:(xa[t]=0,t+"$")}class Ks{constructor(e="key"){this.key=CE(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const Ye=function(t){for(var e=0;;e++)if(!(t=t.previousSibling))return e},ti=function(t){let e=t.assignedSlot||t.parentNode;return e&&e.nodeType==11?e.host:e};let Hl=null;const un=function(t,e,n){let r=Hl||(Hl=document.createRange());return r.setEnd(t,n==null?t.nodeValue.length:n),r.setStart(t,e||0),r},pr=function(t,e,n,r){return n&&(ch(t,e,n,r,-1)||ch(t,e,n,r,1))},wS=/^(img|br|input|textarea|hr)$/i;function ch(t,e,n,r,i){for(var o;;){if(t==n&&e==r)return!0;if(e==(i<0?0:Nt(t))){let s=t.parentNode;if(!s||s.nodeType!=1||qi(t)||wS.test(t.nodeName)||t.contentEditable=="false")return!1;e=Ye(t)+(i<0?0:1),t=s}else{if(t.nodeType!=1)return!1;{let s=t.childNodes[e+(i<0?-1:0)];if(s.nodeType==1&&s.contentEditable=="false"){if(!(!((o=s.pmViewDesc)===null||o===void 0)&&o.ignoreForSelection))return!1;e+=i}else t=s,e=i<0?Nt(t):0}}}}function Nt(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function qi(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 qs=function(t){return t.focusNode&&pr(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function Zn(t,e){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}const en=typeof navigator!="undefined"?navigator:null,uh=typeof document!="undefined"?document:null,Vn=en&&en.userAgent||"",Ul=/Edge\/(\d+)/.exec(Vn),NE=/MSIE \d/.exec(Vn),Bl=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Vn),Et=!!(NE||Bl||Ul),Pn=NE?document.documentMode:Bl?+Bl[1]:Ul?+Ul[1]:0,Lt=!Et&&/gecko\/(\d+)/i.test(Vn);Lt&&(/Firefox\/(\d+)/.exec(Vn)||[0,0])[1];const jl=!Et&&/Chrome\/(\d+)/.exec(Vn),Ue=!!jl,bE=jl?+jl[1]:0,Ge=!Et&&!!en&&/Apple Computer/.test(en.vendor),ni=Ge&&(/Mobile\/\w+/.test(Vn)||!!en&&en.maxTouchPoints>2),It=ni||!!en&&/Mac/.test(en.platform),wE=!!en&&/Win/.test(en.platform),pn=/Android \d/.test(Vn),fo=!!uh&&"webkitFontSmoothing"in uh.documentElement.style,kS=fo?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function LS(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 ln(t,e){return typeof t=="number"?t:t[e]}function MS(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 dh(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(s.nodeType!=1){s=ti(s);continue}let a=s,l=a==o.body,u=l?LS(o):MS(a),c=0,d=0;if(e.top<u.top+ln(r,"top")?d=-(u.top-e.top+ln(i,"top")):e.bottom>u.bottom-ln(r,"bottom")&&(d=e.bottom-e.top>u.bottom-u.top?e.top+ln(i,"top")-u.top:e.bottom-u.bottom+ln(i,"bottom")),e.left<u.left+ln(r,"left")?c=-(u.left-e.left+ln(i,"left")):e.right>u.right-ln(r,"right")&&(c=e.right-u.right+ln(i,"right")),c||d)if(l)o.defaultView.scrollBy(c,d);else{let p=a.scrollLeft,m=a.scrollTop;d&&(a.scrollTop+=d),c&&(a.scrollLeft+=c);let _=a.scrollLeft-p,E=a.scrollTop-m;e={left:e.left-_,top:e.top-E,right:e.right-_,bottom:e.bottom-E}}let h=l?"fixed":getComputedStyle(s).position;if(/^(fixed|sticky)$/.test(h))break;s=h=="absolute"?s.offsetParent:ti(s)}}function hh(t){let e=[],n=t.ownerDocument;for(let r=t;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),t!=n);r=ti(r));return e}function ph(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 Nr=null;function kE(t,e){let n,r,i,o,s=2e8,a=0,l=e.top,u=e.top;for(let c=t.firstChild,d=0;c;c=c.nextSibling,d++){let h;if(c.nodeType==1)h=c.getClientRects();else{if(c.nodeType!=3)continue;h=un(c).getClientRects()}for(let p=0;p<h.length;p++){let m=h[p];if(m.top<=l&&m.bottom>=u){l=Math.max(m.bottom,l),u=Math.min(m.top,u);let _=m.left>e.left?m.left-e.left:m.right<e.left?e.left-m.right:0;if(_<s){n=c,s=_,r=_&&n.nodeType==3?{left:m.right<e.left?m.right:m.left,top:e.top}:e,c.nodeType==1&&_&&(a=d+(e.left>=(m.left+m.right)/2?1:0));continue}}else m.top>e.top&&!i&&m.left<=e.left&&m.right>=e.left&&(i=c,o={left:Math.max(m.left,Math.min(m.right,e.left)),top:m.top});!n&&(e.left>=m.right&&e.top>=m.top||e.left>=m.left&&e.top>=m.bottom)&&(a=d+1)}}return!n&&i&&(n=i,r=o,s=0),n&&n.nodeType==3?(function(c,d){let h,p=c.nodeValue.length,m=document.createRange();for(let _=0;_<p;_++){m.setEnd(c,_+1),m.setStart(c,_);let E=Dn(m,1);if(E.top!=E.bottom&&Gc(d,E)){h={node:c,offset:_+(d.left>=(E.left+E.right)/2?1:0)};break}}return m.detach(),h||{node:c,offset:0}})(n,r):!n||s&&n.nodeType==1?{node:t,offset:a}:kE(n,r)}function Gc(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function LE(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 s=t.childNodes[o];if(s.nodeType==1){let a=s.getClientRects();for(let l=0;l<a.length;l++){let u=a[l];if(Gc(e,u))return LE(s,e,u)}}if((o=(o+1)%r)==i)break}return t}function PS(t,e){let n,r=t.dom.ownerDocument,i=0,o=(function(u,c,d){if(u.caretPositionFromPoint)try{let h=u.caretPositionFromPoint(c,d);if(h)return{node:h.offsetNode,offset:Math.min(Nt(h.offsetNode),h.offset)}}catch(h){}if(u.caretRangeFromPoint){let h=u.caretRangeFromPoint(c,d);if(h)return{node:h.startContainer,offset:Math.min(Nt(h.startContainer),h.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(a.nodeType!=1?a.parentNode:a)){let u=t.dom.getBoundingClientRect();if(!Gc(e,u)||(a=LE(t.dom,e,u),!a))return null}if(Ge)for(let u=a;n&&u;u=ti(u))u.draggable&&(n=void 0);if(a=(function(u,c){let d=u.parentNode;return d&&/^li$/i.test(d.nodeName)&&c.left<u.getBoundingClientRect().left?d:u})(a,e),n){if(Lt&&n.nodeType==1&&(i=Math.min(i,n.childNodes.length),i<n.childNodes.length)){let c,d=n.childNodes[i];d.nodeName=="IMG"&&(c=d.getBoundingClientRect()).right<=e.left&&c.bottom>e.top&&i++}let u;fo&&i&&n.nodeType==1&&(u=n.childNodes[i-1]).nodeType==1&&u.contentEditable=="false"&&u.getBoundingClientRect().top>=e.top&&i--,n==t.dom&&i==n.childNodes.length-1&&n.lastChild.nodeType==1&&e.top>n.lastChild.getBoundingClientRect().bottom?s=t.state.doc.content.size:i!=0&&n.nodeType==1&&n.childNodes[i-1].nodeName=="BR"||(s=(function(c,d,h,p){let m=-1;for(let _=d,E=!1;_!=c.dom;){let g,A=c.docView.nearestDesc(_,!0);if(!A)return null;if(A.dom.nodeType==1&&(A.node.isBlock&&A.parent||!A.contentDOM)&&((g=A.dom.getBoundingClientRect()).width||g.height)&&(A.node.isBlock&&A.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(A.dom.nodeName)&&(!E&&g.left>p.left||g.top>p.top?m=A.posBefore:(!E&&g.right<p.left||g.bottom<p.top)&&(m=A.posAfter),E=!0),!A.contentDOM&&m<0&&!A.node.isText))return(A.node.isBlock?p.top<(g.top+g.bottom)/2:p.left<(g.left+g.right)/2)?A.posBefore:A.posAfter;_=A.dom.parentNode}return m>-1?m:c.docView.posFromDOM(d,h,-1)})(t,n,i,e))}s==null&&(s=(function(u,c,d){let{node:h,offset:p}=kE(c,d),m=-1;if(h.nodeType==1&&!h.firstChild){let _=h.getBoundingClientRect();m=_.left!=_.right&&d.left>(_.left+_.right)/2?1:-1}return u.docView.posFromDOM(h,p,m)})(t,a,e));let l=t.docView.nearestDesc(a,!0);return{pos:s,inside:l?l.posAtStart-l.border:-1}}function fh(t){return t.top<t.bottom||t.left<t.right}function Dn(t,e){let n=t.getClientRects();if(n.length){let r=n[e<0?0:n.length-1];if(fh(r))return r}return Array.prototype.find.call(n,fh)||t.getBoundingClientRect()}const xS=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function ME(t,e,n){let{node:r,offset:i,atom:o}=t.docView.domFromPos(e,n<0?-1:1),s=fo||Lt;if(r.nodeType==3){if(!s||!xS.test(r.nodeValue)&&(n<0?i:i!=r.nodeValue.length)){let a=i,l=i,u=n<0?1:-1;return n<0&&!i?(l++,u=-1):n>=0&&i==r.nodeValue.length?(a--,u=1):n<0?a--:l++,_i(Dn(un(r,a,l),u),u<0)}{let a=Dn(un(r,i,i),n);if(Lt&&i&&/\s/.test(r.nodeValue[i-1])&&i<r.nodeValue.length){let l=Dn(un(r,i-1,i-1),-1);if(l.top==a.top){let u=Dn(un(r,i,i+1),-1);if(u.top!=a.top)return _i(u,u.left<l.left)}}return a}}if(!t.state.doc.resolve(e-(o||0)).parent.inlineContent){if(o==null&&i&&(n<0||i==Nt(r))){let a=r.childNodes[i-1];if(a.nodeType==1)return Fa(a.getBoundingClientRect(),!1)}if(o==null&&i<Nt(r)){let a=r.childNodes[i];if(a.nodeType==1)return Fa(a.getBoundingClientRect(),!0)}return Fa(r.getBoundingClientRect(),n>=0)}if(o==null&&i&&(n<0||i==Nt(r))){let a=r.childNodes[i-1],l=a.nodeType==3?un(a,Nt(a)-(s?0:1)):a.nodeType!=1||a.nodeName=="BR"&&a.nextSibling?null:a;if(l)return _i(Dn(l,1),!1)}if(o==null&&i<Nt(r)){let a=r.childNodes[i];for(;a.pmViewDesc&&a.pmViewDesc.ignoreForCoords;)a=a.nextSibling;let l=a?a.nodeType==3?un(a,0,s?0:1):a.nodeType==1?a:null:null;if(l)return _i(Dn(l,-1),!0)}return _i(Dn(r.nodeType==3?un(r):r,-n),n>=0)}function _i(t,e){if(t.width==0)return t;let n=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:n,right:n}}function Fa(t,e){if(t.height==0)return t;let n=e?t.top:t.bottom;return{top:n,bottom:n,left:t.left,right:t.right}}function mh(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 FS=/[\u0590-\u08ac]/;let Eh=null,_h=null,gh=!1;function HS(t,e,n){return Eh==e&&_h==n?gh:(Eh=e,_h=n,gh=n=="up"||n=="down"?(function(r,i,o){let s=i.selection,a=o=="up"?s.$from:s.$to;return mh(r,i,()=>{let{node:l}=r.docView.domFromPos(a.pos,o=="up"?-1:1);for(;;){let c=r.docView.nearestDesc(l,!0);if(!c)break;if(c.node.isBlock){l=c.contentDOM||c.dom;break}l=c.dom.parentNode}let u=ME(r,a.pos,1);for(let c=l.firstChild;c;c=c.nextSibling){let d;if(c.nodeType==1)d=c.getClientRects();else{if(c.nodeType!=3)continue;d=un(c,0,c.nodeValue.length).getClientRects()}for(let h=0;h<d.length;h++){let p=d[h];if(p.bottom>p.top+1&&(o=="up"?u.top-p.top>2*(p.bottom-u.top):p.bottom-u.bottom>2*(u.bottom-p.top)))return!1}}return!0})})(t,e,n):(function(r,i,o){let{$head:s}=i.selection;if(!s.parent.isTextblock)return!1;let a=s.parentOffset,l=!a,u=a==s.parent.content.size,c=r.domSelection();return c?FS.test(s.parent.textContent)&&c.modify?mh(r,i,()=>{let{focusNode:d,focusOffset:h,anchorNode:p,anchorOffset:m}=r.domSelectionRange(),_=c.caretBidiLevel;c.modify("move",o,"character");let E=s.depth?r.docView.domAfterPos(s.before()):r.dom,{focusNode:g,focusOffset:A}=r.domSelectionRange(),S=g&&!E.contains(g.nodeType==1?g:g.parentNode)||d==g&&h==A;try{c.collapse(p,m),d&&(d!=p||h!=m)&&c.extend&&c.extend(d,h)}catch(v){}return _!=null&&(c.caretBidiLevel=_),S}):o=="left"||o=="backward"?l:u:s.pos==s.start()||s.pos==s.end()})(t,e,n))}class mo{constructor(e,n,r,i){this.parent=e,this.children=n,this.dom=r,this.contentDOM=i,this.dirty=0,r.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,n,r){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let n=0;n<this.children.length;n++)e+=this.children[n].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let n=0,r=this.posAtStart;;n++){let i=this.children[n];if(i==e)return r;r+=i.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(e,n,r){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode)){if(r<0){let o,s;if(e==this.contentDOM)o=e.childNodes[n-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;o=e.previousSibling}for(;o&&(!(s=o.pmViewDesc)||s.parent!=this);)o=o.previousSibling;return o?this.posBeforeChild(s)+s.size:this.posAtStart}{let o,s;if(e==this.contentDOM)o=e.childNodes[n];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;o=e.nextSibling}for(;o&&(!(s=o.pmViewDesc)||s.parent!=this);)o=o.nextSibling;return o?this.posBeforeChild(s):this.posAtEnd}}let i;if(e==this.dom&&this.contentDOM)i=n>Ye(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))i=2&e.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(n==0)for(let o=e;;o=o.parentNode){if(o==this.dom){i=!1;break}if(o.previousSibling)break}if(i==null&&n==e.childNodes.length)for(let o=e;;o=o.parentNode){if(o==this.dom){i=!0;break}if(o.nextSibling)break}}return(i==null?r>0:i)?this.posAtEnd:this.posAtStart}nearestDesc(e,n=!1){for(let r=!0,i=e;i;i=i.parentNode){let o,s=this.getDesc(i);if(s&&(!n||s.node)){if(!r||!(o=s.nodeDOM)||(o.nodeType==1?o.contains(e.nodeType==1?e:e.parentNode):o==e))return s;r=!1}}}getDesc(e){let n=e.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(e,n,r){for(let i=e;i;i=i.parentNode){let o=this.getDesc(i);if(o)return o.localPosFromDOM(e,n,r)}return-1}descAt(e){for(let n=0,r=0;n<this.children.length;n++){let i=this.children[n],o=r+i.size;if(r==e&&o!=r){for(;!i.border&&i.children.length;)for(let s=0;s<i.children.length;s++){let a=i.children[s];if(a.size){i=a;break}}return i}if(e<o)return i.descAt(e-r-i.border);r=o}}domFromPos(e,n){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let r=0,i=0;for(let o=0;r<this.children.length;r++){let s=this.children[r],a=o+s.size;if(a>e||s instanceof xE){i=e-o;break}o=a}if(i)return this.children[r].domFromPos(i-this.children[r].border,n);for(let o;r&&!(o=this.children[r-1]).size&&o instanceof PE&&o.side>=0;r--);if(n<=0){let o,s=!0;for(;o=r?this.children[r-1]:null,o&&o.dom.parentNode!=this.contentDOM;r--,s=!1);return o&&n&&s&&!o.border&&!o.domAtom?o.domFromPos(o.size,n):{node:this.contentDOM,offset:o?Ye(o.dom)+1:0}}{let o,s=!0;for(;o=r<this.children.length?this.children[r]:null,o&&o.dom.parentNode!=this.contentDOM;r++,s=!1);return o&&s&&!o.border&&!o.domAtom?o.domFromPos(0,n):{node:this.contentDOM,offset:o?Ye(o.dom):this.contentDOM.childNodes.length}}}parseRange(e,n,r=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:n,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let i=-1,o=-1;for(let s=r,a=0;;a++){let l=this.children[a],u=s+l.size;if(i==-1&&e<=u){let c=s+l.border;if(e>=c&&n<=u-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(e,n,c);e=s;for(let d=a;d>0;d--){let h=this.children[d-1];if(h.size&&h.dom.parentNode==this.contentDOM&&!h.emptyChildAt(1)){i=Ye(h.dom)+1;break}e-=h.size}i==-1&&(i=0)}if(i>-1&&(u>n||a==this.children.length-1)){n=u;for(let c=a+1;c<this.children.length;c++){let d=this.children[c];if(d.size&&d.dom.parentNode==this.contentDOM&&!d.emptyChildAt(-1)){o=Ye(d.dom);break}n+=d.size}o==-1&&(o=this.contentDOM.childNodes.length);break}s=u}return{node:this.contentDOM,from:e,to:n,fromOffset:i,toOffset:o}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let n=this.children[e<0?0:this.children.length-1];return n.size==0||n.emptyChildAt(e)}domAfterPos(e){let{node:n,offset:r}=this.domFromPos(e,0);if(n.nodeType!=1||r==n.childNodes.length)throw new RangeError("No node after pos "+e);return n.childNodes[r]}setSelection(e,n,r,i=!1){let o=Math.min(e,n),s=Math.max(e,n);for(let p=0,m=0;p<this.children.length;p++){let _=this.children[p],E=m+_.size;if(o>m&&s<E)return _.setSelection(e-m-_.border,n-m-_.border,r,i);m=E}let a=this.domFromPos(e,e?-1:1),l=n==e?a:this.domFromPos(n,n?-1:1),u=r.root.getSelection(),c=r.domSelectionRange(),d=!1;if((Lt||Ge)&&e==n){let{node:p,offset:m}=a;if(p.nodeType==3){if(d=!(!m||p.nodeValue[m-1]!=`
12
- `),d&&m==p.nodeValue.length)for(let _,E=p;E;E=E.parentNode){if(_=E.nextSibling){_.nodeName=="BR"&&(a=l={node:_.parentNode,offset:Ye(_)+1});break}let g=E.pmViewDesc;if(g&&g.node&&g.node.isBlock)break}}else{let _=p.childNodes[m-1];d=_&&(_.nodeName=="BR"||_.contentEditable=="false")}}if(Lt&&c.focusNode&&c.focusNode!=l.node&&c.focusNode.nodeType==1){let p=c.focusNode.childNodes[c.focusOffset];p&&p.contentEditable=="false"&&(i=!0)}if(!(i||d&&Ge)&&pr(a.node,a.offset,c.anchorNode,c.anchorOffset)&&pr(l.node,l.offset,c.focusNode,c.focusOffset))return;let h=!1;if((u.extend||e==n)&&(!d||!Lt)){u.collapse(a.node,a.offset);try{e!=n&&u.extend(l.node,l.offset),h=!0}catch(p){}}if(!h){if(e>n){let m=a;a=l,l=m}let p=document.createRange();p.setEnd(l.node,l.offset),p.setStart(a.node,a.offset),u.removeAllRanges(),u.addRange(p)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,n){for(let r=0,i=0;i<this.children.length;i++){let o=this.children[i],s=r+o.size;if(r==s?e<=s&&n>=r:e<s&&n>r){let a=r+o.border,l=s-o.border;if(e>=a&&n<=l)return this.dirty=e==r||n==s?2:1,void(e!=a||n!=l||!o.contentLost&&o.dom.parentNode==this.contentDOM?o.markDirty(e-a,n-a):o.dirty=3);o.dirty=o.dom!=o.contentDOM||o.dom.parentNode!=this.contentDOM||o.children.length?3:2}r=s}this.dirty=2}markParentsDirty(){let e=1;for(let n=this.parent;n;n=n.parent,e++){let r=e==1?2:1;n.dirty<r&&(n.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(e){return!1}}class PE extends mo{constructor(e,n,r,i){let o,s=n.type.toDOM;if(typeof s=="function"&&(s=s(r,()=>o?o.parent?o.parent.posBeforeChild(o):void 0:i)),!n.type.spec.raw){if(s.nodeType!=1){let a=document.createElement("span");a.appendChild(s),s=a}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(e,[],s,null),this.widget=n,this.widget=n,o=this}matchesWidget(e){return this.dirty==0&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let n=this.widget.spec.stopEvent;return!!n&&n(e)}ignoreMutation(e){return e.type!="selection"||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}}class US extends mo{constructor(e,n,r,i){super(e,[],n,null),this.textDOM=r,this.text=i}get size(){return this.text.length}localPosFromDOM(e,n){return e!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class ar extends mo{constructor(e,n,r,i,o){super(e,[],r,i),this.mark=n,this.spec=o}static create(e,n,r,i){let o=i.nodeViews[n.type.name],s=o&&o(n,i,r);return s&&s.dom||(s=ci.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new ar(e,n,s.dom,s.contentDOM||s.dom,s)}parseRule(){return 3&this.dirty||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=3&&this.mark.eq(e)}markDirty(e,n){if(super.markDirty(e,n),this.dirty!=0){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=0}}slice(e,n,r){let i=ar.create(this.parent,this.mark,!0,r),o=this.children,s=this.size;n<s&&(o=zl(o,n,s,r)),e>0&&(o=zl(o,0,e,r));for(let a=0;a<o.length;a++)o[a].parent=i;return i.children=o,i}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class xn extends mo{constructor(e,n,r,i,o,s,a,l,u){super(e,[],o,s),this.node=n,this.outerDeco=r,this.innerDeco=i,this.nodeDOM=a}static create(e,n,r,i,o,s){let a,l=o.nodeViews[n.type.name],u=l&&l(n,o,()=>a?a.parent?a.parent.posBeforeChild(a):void 0:s,r,i),c=u&&u.dom,d=u&&u.contentDOM;if(n.isText)if(c){if(c.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else c=document.createTextNode(n.text);else c||({dom:c,contentDOM:d}=ci.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));d||n.isText||c.nodeName=="BR"||(c.hasAttribute("contenteditable")||(c.contentEditable="false"),n.type.spec.draggable&&(c.draggable=!0));let h=c;return c=UE(c,r,n),u?a=new BS(e,n,r,i,c,d||null,h,u,o,s+1):n.isText?new Js(e,n,r,i,c,h,o):new xn(e,n,r,i,c,d||null,h,o,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(e.preserveWhitespace="full"),this.contentDOM)if(this.contentLost){for(let n=this.children.length-1;n>=0;n--){let r=this.children[n];if(this.dom.contains(r.dom.parentNode)){e.contentElement=r.dom.parentNode;break}}e.contentElement||(e.getContent=()=>j.empty)}else e.contentElement=this.contentDOM;else e.getContent=()=>this.node.content;return e}matchesNode(e,n,r){return this.dirty==0&&e.eq(this.node)&&ms(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,n){let r=this.node.inlineContent,i=n,o=e.composing?this.localCompositionInfo(e,n):null,s=o&&o.pos>-1?o:null,a=o&&o.pos<0,l=new VS(this,s&&s.node,e);(function(u,c,d,h){let p=c.locals(u),m=0;if(p.length==0){for(let A=0;A<u.childCount;A++){let S=u.child(A);h(S,p,c.forChild(m,S),A),m+=S.nodeSize}return}let _=0,E=[],g=null;for(let A=0;;){let S,v,D,y;for(;_<p.length&&p[_].to==m;){let O=p[_++];O.widget&&(S?(v||(v=[S])).push(O):S=O)}if(S)if(v){v.sort(zS);for(let O=0;O<v.length;O++)d(v[O],A,!!g)}else d(S,A,!!g);if(g)y=-1,D=g,g=null;else{if(!(A<u.childCount))break;y=A,D=u.child(A++)}for(let O=0;O<E.length;O++)E[O].to<=m&&E.splice(O--,1);for(;_<p.length&&p[_].from<=m&&p[_].to>m;)E.push(p[_++]);let R=m+D.nodeSize;if(D.isText){let O=R;_<p.length&&p[_].from<O&&(O=p[_].from);for(let T=0;T<E.length;T++)E[T].to<O&&(O=E[T].to);O<R&&(g=D.cut(O-m),D=D.cut(0,O-m),R=O,y=-1)}else for(;_<p.length&&p[_].to<R;)_++;let I=D.isInline&&!D.isLeaf?E.filter(O=>!O.inline):E.slice();h(D,I,c.forChild(m,D),y),m=R}})(this.node,this.innerDeco,(u,c,d)=>{u.spec.marks?l.syncToMarks(u.spec.marks,r,e,c):u.type.side>=0&&!d&&l.syncToMarks(c==this.node.childCount?fe.none:this.node.child(c).marks,r,e,c),l.placeWidget(u,e,i)},(u,c,d,h)=>{let p;l.syncToMarks(u.marks,r,e,h),l.findNodeMatch(u,c,d,h)||a&&e.state.selection.from>i&&e.state.selection.to<i+u.nodeSize&&(p=l.findIndexWithChild(o.node))>-1&&l.updateNodeAt(u,c,d,p,e)||l.updateNextNode(u,c,d,e,h,i)||l.addNode(u,c,d,e,i),i+=u.nodeSize}),l.syncToMarks([],r,e,0),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==2)&&(s&&this.protectLocalComposition(e,s),FE(this.contentDOM,this.children,e),ni&&(function(u){if(u.nodeName=="UL"||u.nodeName=="OL"){let c=u.style.cssText;u.style.cssText=c+"; list-style: square !important",window.getComputedStyle(u).listStyle,u.style.cssText=c}})(this.dom))}localCompositionInfo(e,n){let{from:r,to:i}=e.state.selection;if(!(e.state.selection instanceof de)||r<n||i>n+this.node.content.size)return null;let o=e.input.compositionNode;if(!o||!this.dom.contains(o.parentNode))return null;if(this.node.inlineContent){let s=o.nodeValue,a=(function(l,u,c,d){for(let h=0,p=0;h<l.childCount&&p<=d;){let m=l.child(h++),_=p;if(p+=m.nodeSize,!m.isText)continue;let E=m.text;for(;h<l.childCount;){let g=l.child(h++);if(p+=g.nodeSize,!g.isText)break;E+=g.text}if(p>=c){if(p>=d&&E.slice(d-u.length-_,d-_)==u)return d-u.length;let g=_<d?E.lastIndexOf(u,d-_-1):-1;if(g>=0&&g+u.length+_>=c)return _+g;if(c==d&&E.length>=d+u.length-_&&E.slice(d-_,d-_+u.length)==u)return d}}return-1})(this.node.content,s,r-n,i-n);return a<0?null:{node:o,pos:a,text:s}}return{node:o,pos:-1,text:""}}protectLocalComposition(e,{node:n,pos:r,text:i}){if(this.getDesc(n))return;let o=n;for(;o.parentNode!=this.contentDOM;o=o.parentNode){for(;o.previousSibling;)o.parentNode.removeChild(o.previousSibling);for(;o.nextSibling;)o.parentNode.removeChild(o.nextSibling);o.pmViewDesc&&(o.pmViewDesc=void 0)}let s=new US(this,o,n,i);e.input.compositionNodes.push(s),this.children=zl(this.children,r,r+i.length,e,s)}update(e,n,r,i){return!(this.dirty==3||!e.sameMarkup(this.node))&&(this.updateInner(e,n,r,i),!0)}updateInner(e,n,r,i){this.updateOuterDeco(n),this.node=e,this.innerDeco=r,this.contentDOM&&this.updateChildren(i,this.posAtStart),this.dirty=0}updateOuterDeco(e){if(ms(e,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=HE(this.dom,this.nodeDOM,Vl(this.outerDeco,this.node,n),Vl(e,this.node,n)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.nodeDOM.draggable=!0))}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function Ah(t,e,n,r,i){UE(r,e,t);let o=new xn(void 0,t,e,n,r,r,r,i,0);return o.contentDOM&&o.updateChildren(i,0),o}class Js extends xn{constructor(e,n,r,i,o,s,a){super(e,n,r,i,o,null,s,a,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,n,r,i){return!(this.dirty==3||this.dirty!=0&&!this.inParent()||!e.sameMarkup(this.node))&&(this.updateOuterDeco(n),this.dirty==0&&e.text==this.node.text||e.text==this.nodeDOM.nodeValue||(this.nodeDOM.nodeValue=e.text,i.trackWrites==this.nodeDOM&&(i.trackWrites=null)),this.node=e,this.dirty=0,!0)}inParent(){let e=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,n,r){return e==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(e,n,r)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,n,r){let i=this.node.cut(e,n),o=document.createTextNode(i.text);return new Js(this.parent,i,this.outerDeco,this.innerDeco,o,o,r)}markDirty(e,n){super.markDirty(e,n),this.dom==this.nodeDOM||e!=0&&n!=this.nodeDOM.nodeValue.length||(this.dirty=3)}get domAtom(){return!1}isText(e){return this.node.text==e}}class xE extends mo{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==0&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class BS extends xn{constructor(e,n,r,i,o,s,a,l,u,c){super(e,n,r,i,o,s,a,u,c),this.spec=l}update(e,n,r,i){if(this.dirty==3)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let o=this.spec.update(e,n,r);return o&&this.updateInner(e,n,r,i),o}return!(!this.contentDOM&&!e.isLeaf)&&super.update(e,n,r,i)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,n,r,i){this.spec.setSelection?this.spec.setSelection(e,n,r.root):super.setSelection(e,n,r,i)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return!!this.spec.stopEvent&&this.spec.stopEvent(e)}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function FE(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=Sh(r),i=!0;r=r.nextSibling}else i=!0,t.insertBefore(a,r);if(s instanceof ar){let l=r?r.previousSibling:t.lastChild;FE(s.contentDOM,s.children,n),r=l?l.nextSibling:t.firstChild}}for(;r;)r=Sh(r),i=!0;i&&n.trackWrites==t&&(n.trackWrites=null)}const ki=function(t){t&&(this.nodeName=t)};ki.prototype=Object.create(null);const tr=[new ki];function Vl(t,e,n){if(t.length==0)return tr;let r=n?tr[0]:new ki,i=[r];for(let o=0;o<t.length;o++){let s=t[o].type.attrs;if(s){s.nodeName&&i.push(r=new ki(s.nodeName));for(let a in s){let l=s[a];l!=null&&(n&&i.length==1&&i.push(r=new ki(e.isInline?"span":"div")),a=="class"?r.class=(r.class?r.class+" ":"")+l:a=="style"?r.style=(r.style?r.style+";":"")+l:a!="nodeName"&&(r[a]=l))}}}return i}function HE(t,e,n,r){if(n==tr&&r==tr)return e;let i=e;for(let o=0;o<r.length;o++){let s=r[o],a=n[o];if(o){let l;a&&a.nodeName==s.nodeName&&i!=t&&(l=i.parentNode)&&l.nodeName.toLowerCase()==s.nodeName||(l=document.createElement(s.nodeName),l.pmIsDeco=!0,l.appendChild(i),a=tr[0]),i=l}jS(i,a||tr[0],s)}return i}function jS(t,e,n){for(let r in e)r=="class"||r=="style"||r=="nodeName"||r in n||t.removeAttribute(r);for(let r in n)r!="class"&&r!="style"&&r!="nodeName"&&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 o=0;o<r.length;o++)i.indexOf(r[o])==-1&&t.classList.remove(r[o]);for(let o=0;o<i.length;o++)r.indexOf(i[o])==-1&&t.classList.add(i[o]);t.classList.length==0&&t.removeAttribute("class")}if(e.style!=n.style){if(e.style){let r,i=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g;for(;r=i.exec(e.style);)t.style.removeProperty(r[1])}n.style&&(t.style.cssText+=n.style)}}function UE(t,e,n){return HE(t,t,tr,Vl(e,n,t.nodeType!=1))}function ms(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 Sh(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class VS{constructor(e,n,r){this.lock=n,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=(function(i,o){let s=o,a=s.children.length,l=i.childCount,u=new Map,c=[];e:for(;l>0;){let d;for(;;)if(a){let p=s.children[a-1];if(!(p instanceof ar)){d=p,a--;break}s=p,a=p.children.length}else{if(s==o)break e;a=s.parent.children.indexOf(s),s=s.parent}let h=d.node;if(h){if(h!=i.child(l-1))break;--l,u.set(d,l),c.push(d)}}return{index:l,matched:u,matches:c.reverse()}})(e.node.content,e)}destroyBetween(e,n){if(e!=n){for(let r=e;r<n;r++)this.top.children[r].destroy();this.top.children.splice(e,n-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,n,r,i){let o=0,s=this.stack.length>>1,a=Math.min(s,e.length);for(;o<a&&(o==s-1?this.top:this.stack[o+1<<1]).matchesMark(e[o])&&e[o].type.spec.spanning!==!1;)o++;for(;o<s;)this.destroyRest(),this.top.dirty=0,this.index=this.stack.pop(),this.top=this.stack.pop(),s--;for(;s<e.length;){this.stack.push(this.top,this.index+1);let l=-1,u=this.top.children.length;i<this.preMatch.index&&(u=Math.min(this.index+3,u));for(let c=this.index;c<u;c++){let d=this.top.children[c];if(d.matchesMark(e[s])&&!this.isLocked(d.dom)){l=c;break}}if(l>-1)l>this.index&&(this.changed=!0,this.destroyBetween(this.index,l)),this.top=this.top.children[this.index];else{let c=ar.create(this.top,e[s],n,r);this.top.children.splice(this.index,0,c),this.top=c,this.changed=!0}this.index=0,s++}}findNodeMatch(e,n,r,i){let o,s=-1;if(i>=this.preMatch.index&&(o=this.preMatch.matches[i-this.preMatch.index]).parent==this.top&&o.matchesNode(e,n,r))s=this.top.children.indexOf(o,this.index);else for(let a=this.index,l=Math.min(this.top.children.length,a+5);a<l;a++){let u=this.top.children[a];if(u.matchesNode(e,n,r)&&!this.preMatch.matched.has(u)){s=a;break}}return!(s<0)&&(this.destroyBetween(this.index,s),this.index++,!0)}updateNodeAt(e,n,r,i,o){let s=this.top.children[i];return s.dirty==3&&s.dom==s.contentDOM&&(s.dirty=2),!!s.update(e,n,r,o)&&(this.destroyBetween(this.index,i),this.index++,!0)}findIndexWithChild(e){for(;;){let n=e.parentNode;if(!n)return-1;if(n==this.top.contentDOM){let r=e.pmViewDesc;if(r){for(let i=this.index;i<this.top.children.length;i++)if(this.top.children[i]==r)return i}return-1}e=n}}updateNextNode(e,n,r,i,o,s){for(let a=this.index;a<this.top.children.length;a++){let l=this.top.children[a];if(l instanceof xn){let u=this.preMatch.matched.get(l);if(u!=null&&u!=o)return!1;let c,d=l.dom,h=this.isLocked(d)&&!(e.isText&&l.node&&l.node.isText&&l.nodeDOM.nodeValue==e.text&&l.dirty!=3&&ms(n,l.outerDeco));if(!h&&l.update(e,n,r,i))return this.destroyBetween(this.index,a),l.dom!=d&&(this.changed=!0),this.index++,!0;if(!h&&(c=this.recreateWrapper(l,e,n,r,i,s)))return this.destroyBetween(this.index,a),this.top.children[this.index]=c,c.contentDOM&&(c.dirty=2,c.updateChildren(i,s+1),c.dirty=0),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,n,r,i,o,s){if(e.dirty||n.isAtom||!e.children.length||!e.node.content.eq(n.content)||!ms(r,e.outerDeco)||!i.eq(e.innerDeco))return null;let a=xn.create(this.top,n,r,i,o,s);if(a.contentDOM){a.children=e.children,e.children=[];for(let l of a.children)l.parent=a}return e.destroy(),a}addNode(e,n,r,i,o){let s=xn.create(this.top,e,n,r,i,o);s.contentDOM&&s.updateChildren(i,o+1),this.top.children.splice(this.index++,0,s),this.changed=!0}placeWidget(e,n,r){let i=this.index<this.top.children.length?this.top.children[this.index]:null;if(!i||!i.matchesWidget(e)||e!=i.widget&&i.widget.type.toDOM.parentNode){let o=new PE(this.top,e,n,r);this.top.children.splice(this.index++,0,o),this.changed=!0}else this.index++}addTextblockHacks(){let e=this.top.children[this.index-1],n=this.top;for(;e instanceof ar;)n=e,e=n.children[n.children.length-1];(!e||!(e instanceof Js)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((Ge||Ue)&&e&&e.dom.contentEditable=="false"&&this.addHackNode("IMG",n),this.addHackNode("BR",this.top))}addHackNode(e,n){if(n==this.top&&this.index<n.children.length&&n.children[this.index].matchesHack(e))this.index++;else{let r=document.createElement(e);e=="IMG"&&(r.className="ProseMirror-separator",r.alt=""),e=="BR"&&(r.className="ProseMirror-trailingBreak");let i=new xE(this.top,[],r,null);n!=this.top?n.children.push(i):n.children.splice(this.index++,0,i),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}}function zS(t,e){return t.type.side-e.type.side}function zl(t,e,n,r,i){let o=[];for(let s=0,a=0;s<t.length;s++){let l=t[s],u=a,c=a+=l.size;u>=n||c<=e?o.push(l):(u<e&&o.push(l.slice(0,e-u,r)),i&&(o.push(i),i=void 0),c>n&&o.push(l.slice(n-u,l.size,r)))}return o}function Wc(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&&i.size==0,s=t.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let a,l,u=r.resolve(s);if(qs(n)){for(a=s;i&&!i.node;)i=i.parent;let d=i.node;if(i&&d.isAtom&&Q.isSelectable(d)&&i.parent&&(!d.isInline||!(function(h,p,m){for(let _=p==0,E=p==Nt(h);_||E;){if(h==m)return!0;let g=Ye(h);if(!(h=h.parentNode))return!1;_=_&&g==0,E=E&&g==Nt(h)}})(n.focusNode,n.focusOffset,i.dom))){let h=i.posBefore;l=new Q(s==h?u:r.resolve(h))}}else{if(n instanceof t.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let d=s,h=s;for(let p=0;p<n.rangeCount;p++){let m=n.getRangeAt(p);d=Math.min(d,t.docView.posFromDOM(m.startContainer,m.startOffset,1)),h=Math.max(h,t.docView.posFromDOM(m.endContainer,m.endOffset,-1))}if(d<0)return null;[a,s]=h==t.state.selection.anchor?[h,d]:[d,h],u=r.resolve(s)}else a=t.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(a<0)return null}let c=r.resolve(a);return l||(l=Xc(t,c,u,e=="pointer"||t.state.selection.head<u.pos&&!o?1:-1)),l}function vh(t){return t.editable?t.hasFocus():jE(t)&&document.activeElement&&document.activeElement.contains(t.dom)}function _n(t,e=!1){let n=t.state.selection;if(BE(t,n),vh(t)){if(!e&&t.input.mouseDown&&t.input.mouseDown.allowDefault&&Ue){let r=t.domSelectionRange(),i=t.domObserver.currentSelection;if(r.anchorNode&&i.anchorNode&&pr(r.anchorNode,r.anchorOffset,i.anchorNode,i.anchorOffset))return t.input.mouseDown.delayedSelectionSync=!0,void t.domObserver.setCurSelection()}if(t.domObserver.disconnectSelection(),t.cursorWrapper)(function(r){let i=r.domSelection();if(!i)return;let o=r.cursorWrapper.dom,s=o.nodeName=="IMG";s?i.collapse(o.parentNode,Ye(o)+1):i.collapse(o,0),!s&&!r.state.selection.visible&&Et&&Pn<=11&&(o.disabled=!0,o.disabled=!1)})(t);else{let r,i,{anchor:o,head:s}=n;!Oh||n instanceof de||(n.$from.parent.inlineContent||(r=Dh(t,n.from)),n.empty||n.$from.parent.inlineContent||(i=Dh(t,n.to))),t.docView.setSelection(o,s,t,e),Oh&&(r&&Th(r),i&&Th(i)),n.visible?t.dom.classList.remove("ProseMirror-hideselection"):(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&(function(a){let l=a.dom.ownerDocument;l.removeEventListener("selectionchange",a.input.hideSelectionGuard);let u=a.domSelectionRange(),c=u.anchorNode,d=u.anchorOffset;l.addEventListener("selectionchange",a.input.hideSelectionGuard=()=>{u.anchorNode==c&&u.anchorOffset==d||(l.removeEventListener("selectionchange",a.input.hideSelectionGuard),setTimeout(()=>{vh(a)&&!a.state.selection.visible||a.dom.classList.remove("ProseMirror-hideselection")},20))})})(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}const Oh=Ge||Ue&&bE<63;function Dh(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(Ge&&i&&i.contentEditable=="false")return Ha(i);if(!(i&&i.contentEditable!="false"||o&&o.contentEditable!="false")){if(i)return Ha(i);if(o)return Ha(o)}}function Ha(t){return t.contentEditable="true",Ge&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function Th(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function BE(t,e){if(e instanceof Q){let n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(Rh(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else Rh(t)}function Rh(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function Xc(t,e,n,r){return t.someProp("createSelectionBetween",i=>i(t,e,n))||de.between(e,n,r)}function yh(t){return!(t.editable&&!t.hasFocus())&&jE(t)}function jE(t){let e=t.domSelectionRange();if(!e.anchorNode)return!1;try{return t.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(t.editable||t.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch(n){return!1}}function $l(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&&pe.findFrom(o,e)}function Rn(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function Ih(t,e,n){let r=t.state.selection;if(!(r instanceof de)){if(r instanceof Q&&r.node.isInline)return Rn(t,new de(e>0?r.$to:r.$from));{let i=$l(t.state,e);return!!i&&Rn(t,i)}}if(n.indexOf("s")>-1){let{$head:i}=r,o=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter;if(!o||o.isText||!o.isLeaf)return!1;let s=t.state.doc.resolve(i.pos+o.nodeSize*(e<0?-1:1));return Rn(t,new de(r.$anchor,s))}if(!r.empty)return!1;if(t.endOfTextblock(e>0?"forward":"backward")){let i=$l(t.state,e);return!!(i&&i instanceof Q)&&Rn(t,i)}if(!(It&&n.indexOf("m")>-1)){let i,o=r.$head,s=o.textOffset?null:e<0?o.nodeBefore:o.nodeAfter;if(!s||s.isText)return!1;let a=e<0?o.pos-s.nodeSize:o.pos;return!!(s.isAtom||(i=t.docView.descAt(a))&&!i.contentDOM)&&(Q.isSelectable(s)?Rn(t,new Q(e<0?t.state.doc.resolve(o.pos-s.nodeSize):o)):!!fo&&Rn(t,new de(t.state.doc.resolve(e<0?a:a+s.nodeSize))))}}function Lo(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function gi(t,e){let n=t.pmViewDesc;return n&&n.size==0&&(e<0||t.nextSibling||t.nodeName!="BR")}function br(t,e){return e<0?(function(n){let r=n.domSelectionRange(),i=r.focusNode,o=r.focusOffset;if(!i)return;let s,a,l=!1;for(Lt&&i.nodeType==1&&o<Lo(i)&&gi(i.childNodes[o],-1)&&(l=!0);;)if(o>0){if(i.nodeType!=1)break;{let u=i.childNodes[o-1];if(gi(u,-1))s=i,a=--o;else{if(u.nodeType!=3)break;i=u,o=i.nodeValue.length}}}else{if(Ch(i))break;{let u=i.previousSibling;for(;u&&gi(u,-1);)s=i.parentNode,a=Ye(u),u=u.previousSibling;if(u)i=u,o=Lo(i);else{if(i=i.parentNode,i==n.dom)break;o=0}}}l?Ua(n,i,o):s&&Ua(n,s,a)})(t):(function(n){let r=n.domSelectionRange(),i=r.focusNode,o=r.focusOffset;if(!i)return;let s,a,l=Lo(i);for(;;)if(o<l){if(i.nodeType!=1||!gi(i.childNodes[o],1))break;s=i,a=++o}else{if(Ch(i))break;{let u=i.nextSibling;for(;u&&gi(u,1);)s=u.parentNode,a=Ye(u)+1,u=u.nextSibling;if(u)i=u,o=0,l=Lo(i);else{if(i=i.parentNode,i==n.dom)break;o=l=0}}}s&&Ua(n,s,a)})(t)}function Ch(t){let e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function Ua(t,e,n){if(e.nodeType!=3){let o,s;(s=(function(a,l){for(;a&&l==a.childNodes.length&&!qi(a);)l=Ye(a)+1,a=a.parentNode;for(;a&&l<a.childNodes.length;){let u=a.childNodes[l];if(u.nodeType==3)return u;if(u.nodeType==1&&u.contentEditable=="false")break;a=u,l=0}})(e,n))?(e=s,n=0):(o=(function(a,l){for(;a&&!l&&!qi(a);)l=Ye(a),a=a.parentNode;for(;a&&l;){let u=a.childNodes[l-1];if(u.nodeType==3)return u;if(u.nodeType==1&&u.contentEditable=="false")break;l=(a=u).childNodes.length}})(e,n))&&(e=o,n=o.nodeValue.length)}let r=t.domSelection();if(!r)return;if(qs(r)){let o=document.createRange();o.setEnd(e,n),o.setStart(e,n),r.removeAllRanges(),r.addRange(o)}else r.extend&&r.extend(e,n);t.domObserver.setCurSelection();let{state:i}=t;setTimeout(()=>{t.state==i&&_n(t)},50)}function Nh(t,e){let n=t.state.doc.resolve(e);if(!Ue&&!wE&&n.parent.inlineContent){let r=t.coordsAtPos(e);if(e>n.start()){let i=t.coordsAtPos(e-1),o=(i.top+i.bottom)/2;if(o>r.top&&o<r.bottom&&Math.abs(i.left-r.left)>1)return i.left<r.left?"ltr":"rtl"}if(e<n.end()){let i=t.coordsAtPos(e+1),o=(i.top+i.bottom)/2;if(o>r.top&&o<r.bottom&&Math.abs(i.left-r.left)>1)return i.left>r.left?"ltr":"rtl"}}return getComputedStyle(t.dom).direction=="rtl"?"rtl":"ltr"}function bh(t,e,n){let r=t.state.selection;if(r instanceof de&&!r.empty||n.indexOf("s")>-1||It&&n.indexOf("m")>-1)return!1;let{$from:i,$to:o}=r;if(!i.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let s=$l(t.state,e);if(s&&s instanceof Q)return Rn(t,s)}if(!i.parent.inlineContent){let s=e<0?i:o,a=r instanceof Rt?pe.near(s,e):pe.findFrom(s,e);return!!a&&Rn(t,a)}return!1}function wh(t,e){if(!(t.state.selection instanceof de))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 s=t.state.tr;return e<0?s.delete(n.pos-o.nodeSize,n.pos):s.delete(n.pos,n.pos+o.nodeSize),t.dispatch(s),!0}return!1}function kh(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function $S(t,e){let n=e.keyCode,r=(function(i){let o="";return i.ctrlKey&&(o+="c"),i.metaKey&&(o+="m"),i.altKey&&(o+="a"),i.shiftKey&&(o+="s"),o})(e);if(n==8||It&&n==72&&r=="c")return wh(t,-1)||br(t,-1);if(n==46&&!e.shiftKey||It&&n==68&&r=="c")return wh(t,1)||br(t,1);if(n==13||n==27)return!0;if(n==37||It&&n==66&&r=="c"){let i=n==37?Nh(t,t.state.selection.from)=="ltr"?-1:1:-1;return Ih(t,i,r)||br(t,i)}if(n==39||It&&n==70&&r=="c"){let i=n==39?Nh(t,t.state.selection.from)=="ltr"?1:-1:1;return Ih(t,i,r)||br(t,i)}return n==38||It&&n==80&&r=="c"?bh(t,-1,r)||br(t,-1):n==40||It&&n==78&&r=="c"?(function(i){if(!Ge||i.state.selection.$head.parentOffset>0)return!1;let{focusNode:o,focusOffset:s}=i.domSelectionRange();if(o&&o.nodeType==1&&s==0&&o.firstChild&&o.firstChild.contentEditable=="false"){let a=o.firstChild;kh(i,a,"true"),setTimeout(()=>kh(i,a,"false"),20)}return!1})(t)||bh(t,1,r)||br(t,1):r==(It?"m":"c")&&(n==66||n==73||n==89||n==90)}function Kc(t,e){t.someProp("transformCopied",p=>{e=p(e,t)});let n=[],{content:r,openStart:i,openEnd:o}=e;for(;i>1&&o>1&&r.childCount==1&&r.firstChild.childCount==1;){i--,o--;let p=r.firstChild;n.push(p.type.name,p.attrs!=p.type.defaultAttrs?p.attrs:null),r=p.content}let s=t.someProp("clipboardSerializer")||ci.fromSchema(t.state.schema),a=WE(),l=a.createElement("div");l.appendChild(s.serializeFragment(r,{document:a}));let u,c=l.firstChild,d=0;for(;c&&c.nodeType==1&&(u=GE[c.nodeName.toLowerCase()]);){for(let p=u.length-1;p>=0;p--){let m=a.createElement(u[p]);for(;l.firstChild;)m.appendChild(l.firstChild);l.appendChild(m),d++}c=l.firstChild}c&&c.nodeType==1&&c.setAttribute("data-pm-slice",`${i} ${o}${d?` -${d}`:""} ${JSON.stringify(n)}`);let h=t.someProp("clipboardTextSerializer",p=>p(e,t))||e.content.textBetween(0,e.content.size,`
7
+ `}}).join("")})(t,e).trim()}class jd{constructor(e,n,r,i,o,s){this.send=n,this.attachFile=r,this.shareLocation=i,this.toggleEmojiPicker=o,this.recordVoiceMessage=s,this.isEmpty=e.isEmpty,this.atTextLimit=e.atTextLimit,this.characterCount=e.characterCount,this.showEmojiPicker=e.showEmojiPicker}}function Ve(t){this.content=t}function aE(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 s=0;i.text[s]==o.text[s];s++)n++;return n}if(i.content.size||o.content.size){let s=aE(i.content,o.content,n+1);if(s!=null)return s}n+=i.nodeSize}else n+=i.nodeSize}}function lE(t,e,n,r){for(let i=t.childCount,o=e.childCount;;){if(i==0||o==0)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 u=0,c=Math.min(s.text.length,a.text.length);for(;u<c&&s.text[s.text.length-u-1]==a.text[a.text.length-u-1];)u++,n--,r--;return{a:n,b:r}}if(s.content.size||a.content.size){let u=lE(s.content,a.content,n-1,r-1);if(u)return u}n-=l,r-=l}else n-=l,r-=l}}Ve.prototype={constructor:Ve,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 e==-1?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 i==-1?o.push(n||t,e):(o[i+1]=e,n&&(o[i]=n)),new Ve(o)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new Ve(n)},addToStart:function(t,e){return new Ve([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new Ve(n)},addBefore:function(t,e,n){var r=this.remove(e),i=r.content.slice(),o=r.find(t);return i.splice(o==-1?i.length:o,0,e,n),new Ve(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=Ve.from(t)).size?new Ve(t.content.concat(this.subtract(t).content)):this},append:function(t){return(t=Ve.from(t)).size?new Ve(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=Ve.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}},Ve.from=function(t){if(t instanceof Ve)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new Ve(e)};class j{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,n,r,i=0,o){for(let s=0,a=0;a<n;s++){let l=this.content[s],u=a+l.nodeSize;if(u>e&&r(l,i+a,o||null,s)!==!1&&l.content.size){let c=a+1;l.nodesBetween(Math.max(0,e-c),Math.min(l.content.size,n-c),r,i+c)}a=u}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,i){let o="",s=!0;return this.nodesBetween(e,n,(a,l)=>{let u=a.isText?a.text.slice(Math.max(e,l)-l,n-l):a.isLeaf?i?typeof i=="function"?i(a):i:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&u||a.isTextblock)&&r&&(s?s=!1:o+=r),o+=u},0),o}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,i=this.content.slice(),o=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),o=1);o<e.content.length;o++)i.push(e.content[o]);return new j(i,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],i=0;if(n>e)for(let o=0,s=0;s<n;o++){let a=this.content[o],l=s+a.nodeSize;l>e&&((s<e||l>n)&&(a=a.isText?a.cut(Math.max(0,e-s),Math.min(a.text.length,n-s)):a.cut(Math.max(0,e-s-1),Math.min(a.content.size,n-s-1))),r.push(a),i+=a.nodeSize),s=l}return new j(r,i)}cutByIndex(e,n){return e==n?j.empty:e==0&&n==this.content.length?this:new j(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let i=this.content.slice(),o=this.size+n.nodeSize-r.nodeSize;return i[e]=n,new j(i,o)}addToStart(e){return new j([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new j(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(e.content[n]))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(e){let n=this.content[e];if(!n)throw new RangeError("Index "+e+" out of range for "+this);return n}maybeChild(e){return this.content[e]||null}forEach(e){for(let n=0,r=0;n<this.content.length;n++){let i=this.content[n];e(i,r,n),r+=i.nodeSize}}findDiffStart(e,n=0){return aE(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return lE(this,e,n,r)}findIndex(e){if(e==0)return Lo(0,e);if(e==this.size)return Lo(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let i=r+this.child(n).nodeSize;if(i>=e)return i==e?Lo(n+1,i):Lo(n,r);r=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,n){if(!n)return j.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new j(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return j.empty;let n,r=0;for(let i=0;i<e.length;i++){let o=e[i];r+=o.nodeSize,i&&o.isText&&e[i-1].sameMarkup(o)?(n||(n=e.slice(0,i)),n[n.length-1]=o.withText(n[n.length-1].text+o.text)):n&&n.push(o)}return new j(n||e,r)}static from(e){if(!e)return j.empty;if(e instanceof j)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new j([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}j.empty=new j([],0);const ya={index:0,offset:0};function Lo(t,e){return ya.index=t,ya.offset=e,ya}function ds(t,e){if(t===e)return!0;if(!t||typeof t!="object"||!e||typeof e!="object")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 r=0;r<t.length;r++)if(!ds(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!ds(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}class fe{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,r=!1;for(let i=0;i<e.length;i++){let o=e[i];if(this.eq(o))return e;if(this.type.excludes(o.type))n||(n=e.slice(0,i));else{if(o.type.excludes(this.type))return e;!r&&o.type.rank>this.type.rank&&(n||(n=e.slice(0,i)),n.push(this),r=!0),n&&n.push(o)}}return n||(n=e.slice()),r||n.push(this),n}removeFromSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return e.slice(0,n).concat(e.slice(n+1));return e}isInSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return!0;return!1}eq(e){return this==e||this.type==e.type&&ds(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let i=r.create(n.attrs);return r.checkAttrs(i.attrs),i}static sameSet(e,n){if(e==n)return!0;if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(n[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return fe.none;if(e instanceof fe)return[e];let n=e.slice();return n.sort((r,i)=>r.type.rank-i.type.rank),n}}fe.none=[];class hs extends Error{}class G{constructor(e,n,r){this.content=e,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let r=uE(this.content,e+this.openStart,n);return r&&new G(r,this.openStart,this.openEnd)}removeBetween(e,n){return new G(cE(this.content,e+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,n){if(!n)return G.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new G(j.fromJSON(e,n.content),r,i)}static maxOpen(e,n=!0){let r=0,i=0;for(let o=e.firstChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.firstChild)r++;for(let o=e.lastChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.lastChild)i++;return new G(e,r,i)}}function cE(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(cE(o.content,e-i-1,n-i-1)))}function uE(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=uE(s.content,e-o-1,n,s);return a&&t.replaceChild(i,s.copy(a))}function cS(t,e,n){if(n.openStart>t.depth)throw new hs("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new hs("Inconsistent open depths");return dE(t,e,n,0)}function dE(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=dE(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:s,end:a}=(function(l,u){let c=u.depth-l.openStart,d=u.node(c).copy(l.content);for(let h=c-1;h>=0;h--)d=u.node(h).copy(j.from(d));return{start:d.resolveNoCache(l.openStart+c),end:d.resolveNoCache(d.content.size-l.openEnd-c)}})(n,t);return or(o,pE(t,s,a,e,r))}{let s=t.parent,a=s.content;return or(s,a.cut(0,t.parentOffset).append(n.content).append(a.cut(e.parentOffset)))}}return or(o,ps(t,e,r))}function hE(t,e){if(!e.type.compatibleContent(t.type))throw new hs("Cannot join "+e.type.name+" onto "+t.type.name)}function Ml(t,e,n){let r=t.node(n);return hE(r,e.node(n)),r}function ir(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 wi(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&&(ir(t.nodeAfter,r),o++));for(let a=o;a<s;a++)ir(i.child(a),r);e&&e.depth==n&&e.textOffset&&ir(e.nodeBefore,r)}function or(t,e){return t.type.checkContent(e),t.copy(e)}function pE(t,e,n,r,i){let o=t.depth>i&&Ml(t,e,i+1),s=r.depth>i&&Ml(n,r,i+1),a=[];return wi(null,t,i,a),o&&s&&e.index(i)==n.index(i)?(hE(o,s),ir(or(o,pE(t,e,n,r,i+1)),a)):(o&&ir(or(o,ps(t,e,i+1)),a),wi(e,n,i,a),s&&ir(or(s,ps(n,r,i+1)),a)),wi(r,null,i,a),new j(a)}function ps(t,e,n){let r=[];return wi(null,t,n,r),t.depth>n&&ir(or(Ml(t,e,n+1),ps(t,e,n+1)),r),wi(e,null,n,r),new j(r)}G.empty=new G(j.empty,0,0);class Gi{constructor(e,n,r){this.pos=e,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[3*this.resolveDepth(e)]}index(e){return this.path[3*this.resolveDepth(e)+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e!=this.depth||this.textOffset?1:0)}start(e){return(e=this.resolveDepth(e))==0?0:this.path[3*e-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]}after(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]+this.path[3*e].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,n=this.index(this.depth);if(n==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=e.child(n);return r?e.child(n).cut(r):i}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let r=this.path[3*n],i=n==0?0:this.path[3*n-1]+1;for(let o=0;o<e;o++)i+=r.child(o).nodeSize;return i}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return fe.none;if(this.textOffset)return e.child(n).marks;let r=e.maybeChild(n-1),i=e.maybeChild(n);if(!r){let a=r;r=i,i=a}let o=r.marks;for(var s=0;s<o.length;s++)o[s].type.spec.inclusive!==!1||i&&o[s].isInSet(i.marks)||(o=o[s--].removeFromSet(o));return o}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,i=e.parent.maybeChild(e.index());for(var o=0;o<r.length;o++)r[o].type.spec.inclusive!==!1||i&&r[o].isInSet(i.marks)||(r=r[o--].removeFromSet(r));return r}sharedDepth(e){for(let n=this.depth;n>0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!n||n(this.node(r))))return new hS(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let n=1;n<=this.depth;n++)e+=(e?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return e+":"+this.parentOffset}static resolve(e,n){if(!(n>=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let r=[],i=0,o=n;for(let s=e;;){let{index:a,offset:l}=s.content.findIndex(o),u=o-l;if(r.push(s,a,i+l),!u||(s=s.child(a),s.isText))break;o=u-1,i+=l+1}return new Gi(n,r,o)}static resolveCached(e,n){let r=Vd.get(e);if(r)for(let o=0;o<r.elts.length;o++){let s=r.elts[o];if(s.pos==n)return s}else Vd.set(e,r=new uS);let i=r.elts[r.i]=Gi.resolve(e,n);return r.i=(r.i+1)%dS,i}}class uS{constructor(){this.elts=[],this.i=0}}const dS=12,Vd=new WeakMap;class hS{constructor(e,n,r){this.$from=e,this.$to=n,this.depth=r}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 pS=Object.create(null);let sr=class Pl{constructor(e,n,r,i=fe.none){this.type=e,this.attrs=n,this.marks=i,this.content=r||j.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,n,r,i=0){this.content.nodesBetween(e,n,r,i,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,n,r,i){return this.content.textBetween(e,n,r,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,n,r){return this.type==e&&ds(this.attrs,n||e.defaultAttrs||pS)&&fe.sameSet(this.marks,r||fe.none)}copy(e=null){return e==this.content?this:new Pl(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new Pl(this.type,this.attrs,this.content,e)}cut(e,n=this.content.size){return e==0&&n==this.content.size?this:this.copy(this.content.cut(e,n))}slice(e,n=this.content.size,r=!1){if(e==n)return G.empty;let i=this.resolve(e),o=this.resolve(n),s=r?0:i.sharedDepth(n),a=i.start(s),l=i.node(s).content.cut(i.pos-a,o.pos-a);return new G(l,i.depth-s,o.depth-s)}replace(e,n,r){return cS(this.resolve(e),this.resolve(n),r)}nodeAt(e){for(let n=this;;){let{index:r,offset:i}=n.content.findIndex(e);if(n=n.maybeChild(r),!n)return null;if(i==e||n.isText)return n;e-=i+1}}childAfter(e){let{index:n,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(n),index:n,offset:r};let i=this.content.child(n-1);return{node:i,index:n-1,offset:r-i.nodeSize}}resolve(e){return Gi.resolveCached(this,e)}resolveNoCache(e){return Gi.resolve(this,e)}rangeHasMark(e,n,r){let i=!1;return n>e&&this.nodesBetween(e,n,o=>(r.isInSet(o.marks)&&(i=!0),!i)),i}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 e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),fE(this.marks,e)}contentMatchAt(e){let n=this.type.contentMatch.matchFragment(this.content,0,e);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(e,n,r=j.empty,i=0,o=r.childCount){let s=this.contentMatchAt(e).matchFragment(r,i,o),a=s&&s.matchFragment(this.content,n);if(!a||!a.validEnd)return!1;for(let l=i;l<o;l++)if(!this.type.allowsMarks(r.child(l).marks))return!1;return!0}canReplaceWith(e,n,r,i){if(i&&!this.type.allowsMarks(i))return!1;let o=this.contentMatchAt(e).matchType(r),s=o&&o.matchFragment(this.content,n);return!!s&&s.validEnd}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=fe.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!fe.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,r)}let i=j.fromJSON(e,n.content),o=e.nodeType(n.type).create(n.attrs,i,r);return o.type.checkAttrs(o.attrs),o}};sr.prototype.text=void 0;class fs extends sr{constructor(e,n,r,i){if(super(e,n,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):fE(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,n){return this.text.slice(e,n)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new fs(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new fs(this.type,this.attrs,e,this.marks)}cut(e=0,n=this.text.length){return e==0&&n==this.text.length?this:this.withText(this.text.slice(e,n))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function fE(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class dr{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new fS(e,n);if(r.next==null)return dr.empty;let i=mE(r);r.next&&r.err("Unexpected trailing text");let o=(function(s){let a=Object.create(null);return l($d(s,0));function l(u){let c=[];u.forEach(h=>{s[h].forEach(({term:p,to:m})=>{if(!p)return;let _;for(let E=0;E<c.length;E++)c[E][0]==p&&(_=c[E][1]);$d(s,m).forEach(E=>{_||c.push([p,_=[]]),_.indexOf(E)==-1&&_.push(E)})})});let d=a[u.join(",")]=new dr(u.indexOf(s.length-1)>-1);for(let h=0;h<c.length;h++){let p=c[h][1].sort(EE);d.next.push({type:c[h][0],next:a[p.join(",")]||l(p)})}return d}})((function(s){let a=[[]];return c(d(s,0),l()),a;function l(){return a.push([])-1}function u(h,p,m){let _={term:m,to:p};return a[h].push(_),_}function c(h,p){h.forEach(m=>m.to=p)}function d(h,p){if(h.type=="choice")return h.exprs.reduce((m,_)=>m.concat(d(_,p)),[]);if(h.type!="seq"){if(h.type=="star"){let m=l();return u(p,m),c(d(h.expr,m),m),[u(m)]}if(h.type=="plus"){let m=l();return c(d(h.expr,p),m),c(d(h.expr,m),m),[u(m)]}if(h.type=="opt")return[u(p)].concat(d(h.expr,p));if(h.type=="range"){let m=p;for(let _=0;_<h.min;_++){let E=l();c(d(h.expr,m),E),m=E}if(h.max==-1)c(d(h.expr,m),m);else for(let _=h.min;_<h.max;_++){let E=l();u(m,E),c(d(h.expr,m),E),m=E}return[u(m)]}if(h.type=="name")return[u(p,void 0,h.value)];throw new Error("Unknown expr type")}for(let m=0;;m++){let _=d(h.exprs[m],p);if(m==h.exprs.length-1)return _;c(_,p=l())}}})(i));return(function(s,a){for(let l=0,u=[s];l<u.length;l++){let c=u[l],d=!c.validEnd,h=[];for(let p=0;p<c.next.length;p++){let{type:m,next:_}=c.next[p];h.push(m.name),!d||m.isText||m.hasRequiredAttrs()||(d=!1),u.indexOf(_)==-1&&u.push(_)}d&&a.err("Only non-generatable nodes ("+h.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}})(o,r),o}matchType(e){for(let n=0;n<this.next.length;n++)if(this.next[n].type==e)return this.next[n].next;return null}matchFragment(e,n=0,r=e.childCount){let i=this;for(let o=n;i&&o<r;o++)i=i.matchType(e.child(o).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:n}=this.next[e];if(!n.isText&&!n.hasRequiredAttrs())return n}return null}compatible(e){for(let n=0;n<this.next.length;n++)for(let r=0;r<e.next.length;r++)if(this.next[n].type==e.next[r].type)return!0;return!1}fillBefore(e,n=!1,r=0){let i=[this];return(function o(s,a){let l=s.matchFragment(e,r);if(l&&(!n||l.validEnd))return j.from(a.map(u=>u.createAndFill()));for(let u=0;u<s.next.length;u++){let{type:c,next:d}=s.next[u];if(!c.isText&&!c.hasRequiredAttrs()&&i.indexOf(d)==-1){i.push(d);let h=o(d,a.concat(c));if(h)return h}}return null})(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),o=i.match;if(o.matchType(e)){let s=[];for(let a=i;a.type;a=a.via)s.push(a.type);return s.reverse()}for(let s=0;s<o.next.length;s++){let{type:a,next:l}=o.next[s];a.isLeaf||a.hasRequiredAttrs()||a.name in n||i.type&&!l.validEnd||(r.push({match:a.contentMatch,type:a,via:i}),n[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];return(function n(r){e.push(r);for(let i=0;i<r.next.length;i++)e.indexOf(r.next[i].next)==-1&&n(r.next[i].next)})(this),e.map((n,r)=>{let i=r+(n.validEnd?"*":" ")+" ";for(let o=0;o<n.next.length;o++)i+=(o?", ":"")+n.next[o].type.name+"->"+e.indexOf(n.next[o].next);return i}).join(`
8
+ `)}}dr.empty=new dr(!0);class fS{constructor(e,n){this.string=e,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=e.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(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function mE(t){let e=[];do e.push(mS(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function mS(t){let e=[];do e.push(ES(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function ES(t){let e=(function(n){if(n.eat("(")){let r=mE(n);return n.eat(")")||n.err("Missing closing paren"),r}if(!/\W/.test(n.next)){let r=(function(i,o){let s=i.nodeTypes,a=s[o];if(a)return[a];let l=[];for(let u in s){let c=s[u];c.isInGroup(o)&&l.push(c)}return l.length==0&&i.err("No node type or group '"+o+"' found"),l})(n,n.next).map(i=>(n.inline==null?n.inline=i.isInline:n.inline!=i.isInline&&n.err("Mixing inline and block content"),{type:"name",value:i}));return n.pos++,r.length==1?r[0]:{type:"choice",exprs:r}}n.err("Unexpected token '"+n.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=_S(t,e)}return e}function zd(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function _S(t,e){let n=zd(t),r=n;return t.eat(",")&&(r=t.next!="}"?zd(t):-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function EE(t,e){return e-t}function $d(t,e){let n=[];return(function r(i){let o=t[i];if(o.length==1&&!o[0].term)return r(o[0].to);n.push(i);for(let s=0;s<o.length;s++){let{term:a,to:l}=o[s];a||n.indexOf(l)!=-1||r(l)}})(e),n.sort(EE)}function _E(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 AE(t,e){let n=Object.create(null);for(let r in t){let i=e&&e[r];if(i===void 0){let o=t[r];if(!o.hasDefault)throw new RangeError("No value supplied for attribute "+r);i=o.default}n[r]=i}return n}function gE(t,e,n,r){for(let i in e)if(!(i in t))throw new RangeError(`Unsupported attribute ${i} for ${n} of type ${i}`);for(let i in t){let o=t[i];o.validate&&o.validate(e[i])}}function SE(t,e){let n=Object.create(null);if(e)for(let r in e)n[r]=new AS(t,r,e[r]);return n}let Yd=class OE{constructor(e,n,r){this.name=e,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=SE(e,r.attrs),this.defaultAttrs=_E(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==dr.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:AE(this.attrs,e)}create(e=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new sr(this,this.computeAttrs(e),j.from(n),fe.setFrom(r))}createChecked(e=null,n,r){return n=j.from(n),this.checkContent(n),new sr(this,this.computeAttrs(e),n,fe.setFrom(r))}createAndFill(e=null,n,r){if(e=this.computeAttrs(e),(n=j.from(n)).size){let s=this.contentMatch.fillBefore(n);if(!s)return null;n=s.append(n)}let i=this.contentMatch.matchFragment(n),o=i&&i.fillBefore(j.empty,!0);return o?new sr(this,e,n.append(o),fe.setFrom(r)):null}validContent(e){let n=this.contentMatch.matchFragment(e);if(!n||!n.validEnd)return!1;for(let r=0;r<e.childCount;r++)if(!this.allowsMarks(e.child(r).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){gE(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let n=0;n<e.length;n++)if(!this.allowsMarkType(e[n].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let n;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?n&&n.push(e[r]):n||(n=e.slice(0,r));return n?n.length?n:fe.none:e}static compile(e,n){let r=Object.create(null);e.forEach((o,s)=>r[o]=new OE(o,n,s));let i=n.spec.topNode||"doc";if(!r[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let o in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};class AS{constructor(e,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?(function(i,o,s){let a=s.split("|");return l=>{let u=l===null?"null":typeof l;if(a.indexOf(u)<0)throw new RangeError(`Expected value of type ${a} for attribute ${o} on type ${i}, got ${u}`)}})(e,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class Gs{constructor(e,n,r,i){this.name=e,this.rank=n,this.schema=r,this.spec=i,this.attrs=SE(e,i.attrs),this.excluded=null;let o=_E(this.attrs);this.instance=o?new fe(this,o):null}create(e=null){return!e&&this.instance?this.instance:new fe(this,AE(this.attrs,e))}static compile(e,n){let r=Object.create(null),i=0;return e.forEach((o,s)=>r[o]=new Gs(o,i++,n,s)),r}removeFromSet(e){for(var n=0;n<e.length;n++)e[n].type==this&&(e=e.slice(0,n).concat(e.slice(n+1)),n--);return e}isInSet(e){for(let n=0;n<e.length;n++)if(e[n].type==this)return e[n]}checkAttrs(e){gE(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}function Gd(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 a in t.marks){let l=t.marks[a];(i=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(i)>-1)&&n.push(s=l)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}class Wi{constructor(e,n){this.schema=e,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(i=>{if((function(o){return o.tag!=null})(i))this.tags.push(i);else if((function(o){return o.style!=null})(i)){let o=/[^=]*/.exec(i.style)[0];r.indexOf(o)<0&&r.push(o),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let o=e.nodes[i.node];return o.contentMatch.matchType(o)})}parse(e,n={}){let r=new Kd(this,n,!1);return r.addAll(e,fe.none,n.from,n.to),r.finish()}parseSlice(e,n={}){let r=new Kd(this,n,!0);return r.addAll(e,fe.none,n.from,n.to),G.maxOpen(r.finish())}matchTag(e,n,r){for(let i=r?this.tags.indexOf(r)+1:0;i<this.tags.length;i++){let o=this.tags[i];if(SS(e,o.tag)&&(o.namespace===void 0||e.namespaceURI==o.namespace)&&(!o.context||n.matchesContext(o.context))){if(o.getAttrs){let s=o.getAttrs(e);if(s===!1)continue;o.attrs=s||void 0}return o}}}matchStyle(e,n,r,i){for(let o=i?this.styles.indexOf(i)+1:0;o<this.styles.length;o++){let s=this.styles[o],a=s.style;if(!(a.indexOf(e)!=0||s.context&&!r.matchesContext(s.context)||a.length>e.length&&(a.charCodeAt(e.length)!=61||a.slice(e.length+1)!=n))){if(s.getAttrs){let l=s.getAttrs(n);if(l===!1)continue;s.attrs=l||void 0}return s}}}static schemaRules(e){let n=[];function r(i){let o=i.priority==null?50:i.priority,s=0;for(;s<n.length;s++){let a=n[s];if((a.priority==null?50:a.priority)<o)break}n.splice(s,0,i)}for(let i in e.marks){let o=e.marks[i].spec.parseDOM;o&&o.forEach(s=>{r(s=qd(s)),s.mark||s.ignore||s.clearMark||(s.mark=i)})}for(let i in e.nodes){let o=e.nodes[i].spec.parseDOM;o&&o.forEach(s=>{r(s=qd(s)),s.node||s.ignore||s.mark||(s.node=i)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new Wi(e,Wi.schemaRules(e)))}}const vE={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},gS={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Wd={ol:!0,ul:!0};function Xd(t,e,n){return e!=null?(e?1:0)|(e==="full"?2:0):t&&t.whitespace=="pre"?3:-5&n}class Ca{constructor(e,n,r,i,o,s){this.type=e,this.attrs=n,this.marks=r,this.solid=i,this.options=s,this.content=[],this.activeMarks=fe.none,this.match=o||(4&s?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(j.from(e));if(!n){let r,i=this.type.contentMatch;return(r=i.findWrapping(e.type))?(this.match=i,r):null}this.match=this.type.contentMatch.matchFragment(n)}return this.match.findWrapping(e.type)}finish(e){if(!(1&this.options)){let r,i=this.content[this.content.length-1];if(i&&i.isText&&(r=/[ \t\r\n\u000c]+$/.exec(i.text))){let o=i;i.text.length==r[0].length?this.content.pop():this.content[this.content.length-1]=o.withText(o.text.slice(0,o.text.length-r[0].length))}}let n=j.from(this.content);return!e&&this.match&&(n=n.append(this.match.fillBefore(j.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!vE.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class Kd{constructor(e,n,r){this.parser=e,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let i,o=n.topNode,s=Xd(null,n.preserveWhitespace,0)|(r?4:0);i=o?new Ca(o.type,o.attrs,fe.none,!0,n.topMatch||o.type.contentMatch,s):new Ca(r?null:e.schema.topNodeType,null,fe.none,!0,null,s),this.nodes=[i],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,n){e.nodeType==3?this.addTextNode(e,n):e.nodeType==1&&this.addElement(e,n)}addTextNode(e,n){let r=e.nodeValue,i=this.top,o=2&i.options?"full":this.localPreserveWS||(1&i.options)>0,{schema:s}=this.parser;if(o==="full"||i.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(o)if(o==="full")r=r.replace(/\r\n?/g,`
9
+ `);else if(s.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(s.linebreakReplacement.create())){let a=r.split(/\r?\n|\r/);for(let l=0;l<a.length;l++)l&&this.insertNode(s.linebreakReplacement.create(),n,!0),a[l]&&this.insertNode(s.text(a[l]),n,!/\S/.test(a[l]));r=""}else r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let a=i.content[i.content.length-1],l=e.previousSibling;(!a||l&&l.nodeName=="BR"||a.isText&&/[ \t\r\n\u000c]$/.test(a.text))&&(r=r.slice(1))}r&&this.insertNode(s.text(r),n,!/\S/.test(r)),this.findInText(e)}else this.findInside(e)}addElement(e,n,r){let i=this.localPreserveWS,o=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let s,a=e.nodeName.toLowerCase();Wd.hasOwnProperty(a)&&this.parser.normalizeLists&&(function(u){for(let c=u.firstChild,d=null;c;c=c.nextSibling){let h=c.nodeType==1?c.nodeName.toLowerCase():null;h&&Wd.hasOwnProperty(h)&&d?(d.appendChild(c),c=d):h=="li"?d=c:h&&(d=null)}})(e);let l=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(s=this.parser.matchTag(e,this,r));e:if(l?l.ignore:gS.hasOwnProperty(a))this.findInside(e),this.ignoreFallback(e,n);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(e=l.skip);let u,c=this.needsBlock;if(vE.hasOwnProperty(a))o.content.length&&o.content[0].isInline&&this.open&&(this.open--,o=this.top),u=!0,o.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,n);break e}let d=l&&l.skip?n:this.readStyles(e,n);d&&this.addAll(e,d),u&&this.sync(o),this.needsBlock=c}else{let u=this.readStyles(e,n);u&&this.addElementByRule(e,l,u,l.consuming===!1?s:void 0)}this.localPreserveWS=i}leafFallback(e,n){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
10
+ `),n)}ignoreFallback(e,n){e.nodeName!="BR"||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"),n,!0)}readStyles(e,n){let r=e.style;if(r&&r.length)for(let i=0;i<this.parser.matchedStyles.length;i++){let o=this.parser.matchedStyles[i],s=r.getPropertyValue(o);if(s)for(let a;;){let l=this.parser.matchStyle(o,s,this,a);if(!l)break;if(l.ignore)return null;if(n=l.clearMark?n.filter(u=>!l.clearMark(u)):n.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming!==!1)break;a=l}}return n}addElementByRule(e,n,r,i){let o,s;if(n.node)if(s=this.parser.schema.nodes[n.node],s.isLeaf)this.insertNode(s.create(n.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let l=this.enter(s,n.attrs||null,r,n.preserveWhitespace);l&&(o=!0,r=l)}else{let l=this.parser.schema.marks[n.mark];r=r.concat(l.create(n.attrs))}let a=this.top;if(s&&s.isLeaf)this.findInside(e);else if(i)this.addElement(e,r,i);else if(n.getContent)this.findInside(e),n.getContent(e,this.parser.schema).forEach(l=>this.insertNode(l,r,!1));else{let l=e;typeof n.contentElement=="string"?l=e.querySelector(n.contentElement):typeof n.contentElement=="function"?l=n.contentElement(e):n.contentElement&&(l=n.contentElement),this.findAround(e,l,!0),this.addAll(l,r),this.findAround(e,l,!1)}o&&this.sync(a)&&this.open--}addAll(e,n,r,i){let o=r||0;for(let s=r?e.childNodes[r]:e.firstChild,a=i==null?null:e.childNodes[i];s!=a;s=s.nextSibling,++o)this.findAtPoint(e,o),this.addDOM(s,n);this.findAtPoint(e,o)}findPlace(e,n,r){let i,o;for(let s=this.open,a=0;s>=0;s--){let l=this.nodes[s],u=l.findWrapping(e);if(u&&(!i||i.length>u.length+a)&&(i=u,o=l,!u.length))break;if(l.solid){if(r)break;a+=2}}if(!i)return null;this.sync(o);for(let s=0;s<i.length;s++)n=this.enterInner(i[s],null,n,!1);return n}insertNode(e,n,r){if(e.isInline&&this.needsBlock&&!this.top.type){let o=this.textblockFromContext();o&&(n=this.enterInner(o,null,n))}let i=this.findPlace(e,n,r);if(i){this.closeExtra();let o=this.top;o.match&&(o.match=o.match.matchType(e.type));let s=fe.none;for(let a of i.concat(e.marks))(o.type?o.type.allowsMarkType(a.type):Jd(a.type,e.type))&&(s=a.addToSet(s));return o.content.push(e.mark(s)),!0}return!1}enter(e,n,r,i){let o=this.findPlace(e.create(n),r,!1);return o&&(o=this.enterInner(e,n,r,!0,i)),o}enterInner(e,n,r,i=!1,o){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(e);let a=Xd(e,o,s.options);4&s.options&&s.content.length==0&&(a|=4);let l=fe.none;return r=r.filter(u=>!(s.type?s.type.allowsMarkType(u.type):Jd(u.type,e))||(l=u.addToSet(l),!1)),this.nodes.push(new Ca(e,n,l,i,null,a)),this.open++,r}closeExtra(e=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(e));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(e){for(let n=this.open;n>=0;n--){if(this.nodes[n]==e)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=1)}return!1}get currentPos(){this.closeExtra();let e=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let i=r.length-1;i>=0;i--)e+=r[i].nodeSize;n&&e++}return e}findAtPoint(e,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&e.nodeType==1&&e.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(e,n,r){if(e!=n&&this.find)for(let i=0;i<this.find.length;i++)this.find[i].pos==null&&e.nodeType==1&&e.contains(this.find[i].node)&&n.compareDocumentPosition(this.find[i].node)&(r?2:4)&&(this.find[i].pos=this.currentPos)}findInText(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&(this.find[n].pos=this.currentPos-(e.nodeValue.length-this.find[n].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let n=e.split("/"),r=this.options.context,i=!(this.isOpen||r&&r.parent.type!=this.nodes[0].type),o=-(r?r.depth+1:0)+(i?0:1),s=(a,l)=>{for(;a>=0;a--){let u=n[a];if(u==""){if(a==n.length-1||a==0)continue;for(;l>=o;l--)if(s(a-1,l))return!0;return!1}{let c=l>0||l==0&&i?this.nodes[l].type:r&&l>=o?r.node(l-o).type:null;if(!c||c.name!=u&&!c.isInGroup(u))return!1;l--}}return!0};return s(n.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let n=e.depth;n>=0;n--){let r=e.node(n).contentMatchAt(e.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}}function SS(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function qd(t){let e={};for(let n in t)e[n]=t[n];return e}function Jd(t,e){let n=e.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(t))continue;let o=[],s=a=>{o.push(a);for(let l=0;l<a.edgeCount;l++){let{type:u,next:c}=a.edge(l);if(u==e||o.indexOf(c)<0&&s(c))return!0}};if(s(i.contentMatch))return!0}}class ci{constructor(e,n){this.nodes=e,this.marks=n}serializeFragment(e,n={},r){r||(r=Na(n).createDocumentFragment());let i=r,o=[];return e.forEach(s=>{if(o.length||s.marks.length){let a=0,l=0;for(;a<o.length&&l<s.marks.length;){let u=s.marks[l];if(this.marks[u.type.name]){if(!u.eq(o[a][0])||u.type.spec.spanning===!1)break;a++,l++}else l++}for(;a<o.length;)i=o.pop()[1];for(;l<s.marks.length;){let u=s.marks[l++],c=this.serializeMark(u,s.isInline,n);c&&(o.push([u,i]),i.appendChild(c.dom),i=c.contentDOM||c.dom)}}i.appendChild(this.serializeNodeInner(s,n))}),r}serializeNodeInner(e,n){let{dom:r,contentDOM:i}=Wo(Na(n),this.nodes[e.type.name](e),null,e.attrs);if(i){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,n,i)}return r}serializeNode(e,n={}){let r=this.serializeNodeInner(e,n);for(let i=e.marks.length-1;i>=0;i--){let o=this.serializeMark(e.marks[i],e.isInline,n);o&&((o.contentDOM||o.dom).appendChild(r),r=o.dom)}return r}serializeMark(e,n,r={}){let i=this.marks[e.type.name];return i&&Wo(Na(r),i(e,n),null,e.attrs)}static renderSpec(e,n,r=null,i){return Wo(e,n,r,i)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new ci(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=Zd(e.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(e){return Zd(e.marks)}}function Zd(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function Na(t){return t.document||window.document}const Qd=new WeakMap;function OS(t){let e=Qd.get(t);return e===void 0&&Qd.set(t,e=(function(n){let r=null;function i(o){if(o&&typeof o=="object")if(Array.isArray(o))if(typeof o[0]=="string")r||(r=[]),r.push(o);else for(let s=0;s<o.length;s++)i(o[s]);else for(let s in o)i(o[s])}return i(n),r})(t)),e}function Wo(t,e,n,r){if(typeof e=="string")return{dom:t.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let i,o=e[0];if(typeof o!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(i=OS(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,a=o.indexOf(" ");a>0&&(n=o.slice(0,a),o=o.slice(a+1));let l=n?t.createElementNS(n,o):t.createElement(o),u=e[1],c=1;if(u&&typeof u=="object"&&u.nodeType==null&&!Array.isArray(u)){c=2;for(let d in u)if(u[d]!=null){let h=d.indexOf(" ");h>0?l.setAttributeNS(d.slice(0,h),d.slice(h+1),u[d]):d=="style"&&l.style?l.style.cssText=u[d]:l.setAttribute(d,u[d])}}for(let d=c;d<e.length;d++){let h=e[d];if(h===0){if(d<e.length-1||d>c)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}{let{dom:p,contentDOM:m}=Wo(t,h,n,r);if(l.appendChild(p),m){if(s)throw new RangeError("Multiple content holes");s=m}}}return{dom:l,contentDOM:s}}const DE=Math.pow(2,16);function vS(t,e){return t+e*DE}function eh(t){return 65535&t}class xl{constructor(e,n,r){this.pos=e,this.delInfo=n,this.recover=r}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}}class Ot{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&Ot.empty)return Ot.empty}recover(e){let n=0,r=eh(e);if(!this.inverted)for(let i=0;i<r;i++)n+=this.ranges[3*i+2]-this.ranges[3*i+1];return this.ranges[3*r]+n+(function(i){return(i-(65535&i))/DE})(e)}mapResult(e,n=1){return this._map(e,n,!1)}map(e,n=1){return this._map(e,n,!0)}_map(e,n,r){let i=0,o=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?i:0);if(l>e)break;let u=this.ranges[a+o],c=this.ranges[a+s],d=l+u;if(e<=d){let h=l+i+((u?e==l?-1:e==d?1:n:n)<0?0:c);if(r)return h;let p=e==(n<0?l:d)?null:vS(a/3,e-l),m=e==l?2:e==d?1:4;return(n<0?e!=l:e!=d)&&(m|=8),new xl(h,m,p)}i+=c-u}return r?e+i:new xl(e+i,0,null)}touches(e,n){let r=0,i=eh(n),o=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?r:0);if(l>e)break;let u=this.ranges[a+o];if(e<=l+u&&a==3*i)return!0;r+=this.ranges[a+s]-u}return!1}forEach(e){let n=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,o=0;i<this.ranges.length;i+=3){let s=this.ranges[i],a=s-(this.inverted?o:0),l=s+(this.inverted?0:o),u=this.ranges[i+n],c=this.ranges[i+r];e(a,a+u,l,l+c),o+=c-u}}invert(){return new Ot(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?Ot.empty:new Ot(e<0?[0,-e,0]:[0,0,e])}}Ot.empty=new Ot([]);class Xi{constructor(e,n,r=0,i=e?e.length:0){this.mirror=n,this.from=r,this.to=i,this._maps=e||[],this.ownData=!(e||n)}get maps(){return this._maps}slice(e=0,n=this.maps.length){return new Xi(this._maps,this.mirror,e,n)}appendMap(e,n){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),n!=null&&this.setMirror(this._maps.length-1,n)}appendMapping(e){for(let n=0,r=this._maps.length;n<e._maps.length;n++){let i=e.getMirror(n);this.appendMap(e._maps[n],i!=null&&i<n?r+i:void 0)}}getMirror(e){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==e)return this.mirror[n+(n%2?-1:1)]}}setMirror(e,n){this.mirror||(this.mirror=[]),this.mirror.push(e,n)}appendMappingInverted(e){for(let n=e.maps.length-1,r=this._maps.length+e._maps.length;n>=0;n--){let i=e.getMirror(n);this.appendMap(e._maps[n].invert(),i!=null&&i>n?r-i-1:void 0)}}invert(){let e=new Xi;return e.appendMappingInverted(this),e}map(e,n=1){if(this.mirror)return this._map(e,n,!0);for(let r=this.from;r<this.to;r++)e=this._maps[r].map(e,n);return e}mapResult(e,n=1){return this._map(e,n,!1)}_map(e,n,r){let i=0;for(let o=this.from;o<this.to;o++){let s=this._maps[o].mapResult(e,n);if(s.recover!=null){let a=this.getMirror(o);if(a!=null&&a>o&&a<this.to){o=a,e=this._maps[a].recover(s.recover);continue}}i|=s.delInfo,e=s.pos}return r?e:new xl(e,i,null)}}const ba=Object.create(null);class et{getMap(){return Ot.empty}merge(e){return null}static fromJSON(e,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=ba[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in ba)throw new RangeError("Duplicate use of step JSON ID "+e);return ba[e]=n,n.prototype.jsonID=e,n}}class Le{constructor(e,n){this.doc=e,this.failed=n}static ok(e){return new Le(e,null)}static fail(e){return new Le(null,e)}static fromReplace(e,n,r,i){try{return Le.ok(e.replace(n,r,i))}catch(o){if(o instanceof hs)return Le.fail(o.message);throw o}}}function Vc(t,e,n){let r=[];for(let i=0;i<t.childCount;i++){let o=t.child(i);o.content.size&&(o=o.copy(Vc(o.content,e,o))),o.isInline&&(o=e(o,n,i)),r.push(o)}return j.fromArray(r)}class Nn extends et{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=e.resolve(this.from),i=r.node(r.sharedDepth(this.to)),o=new G(Vc(n.content,(s,a)=>s.isAtom&&a.type.allowsMarkType(this.mark.type)?s.mark(this.mark.addToSet(s.marks)):s,i),n.openStart,n.openEnd);return Le.fromReplace(e,this.from,this.to,o)}invert(){return new Xt(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Nn(n.pos,r.pos,this.mark)}merge(e){return e instanceof Nn&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Nn(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Nn(n.from,n.to,e.markFromJSON(n.mark))}}et.jsonID("addMark",Nn);class Xt extends et{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=new G(Vc(n.content,i=>i.mark(this.mark.removeFromSet(i.marks)),e),n.openStart,n.openEnd);return Le.fromReplace(e,this.from,this.to,r)}invert(){return new Nn(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Xt(n.pos,r.pos,this.mark)}merge(e){return e instanceof Xt&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Xt(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Xt(n.from,n.to,e.markFromJSON(n.mark))}}et.jsonID("removeMark",Xt);class bn extends et{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return Le.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return Le.fromReplace(e,this.pos,this.pos+1,new G(j.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let i=0;i<n.marks.length;i++)if(!n.marks[i].isInSet(r))return new bn(this.pos,n.marks[i]);return new bn(this.pos,this.mark)}}return new hr(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new bn(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new bn(n.pos,e.markFromJSON(n.mark))}}et.jsonID("addNodeMark",bn);class hr extends et{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return Le.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return Le.fromReplace(e,this.pos,this.pos+1,new G(j.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);return n&&this.mark.isInSet(n.marks)?new bn(this.pos,this.mark):this}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new hr(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new hr(n.pos,e.markFromJSON(n.mark))}}et.jsonID("removeNodeMark",hr);class $e extends et{constructor(e,n,r,i=!1){super(),this.from=e,this.to=n,this.slice=r,this.structure=i}apply(e){return this.structure&&Fl(e,this.from,this.to)?Le.fail("Structure replace would overwrite content"):Le.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new Ot([this.from,this.to-this.from,this.slice.size])}invert(e){return new $e(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deletedAcross&&r.deletedAcross?null:new $e(n.pos,Math.max(n.pos,r.pos),this.slice,this.structure)}merge(e){if(!(e instanceof $e)||e.structure||this.structure)return null;if(this.from+this.slice.size!=e.from||this.slice.openEnd||e.slice.openStart){if(e.to!=this.from||this.slice.openStart||e.slice.openEnd)return null;{let n=this.slice.size+e.slice.size==0?G.empty:new G(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new $e(e.from,this.to,n,this.structure)}}{let n=this.slice.size+e.slice.size==0?G.empty:new G(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new $e(this.from,this.to+(e.to-e.from),n,this.structure)}}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new $e(n.from,n.to,G.fromJSON(e,n.slice),!!n.structure)}}et.jsonID("replace",$e);class vt extends et{constructor(e,n,r,i,o,s,a=!1){super(),this.from=e,this.to=n,this.gapFrom=r,this.gapTo=i,this.slice=o,this.insert=s,this.structure=a}apply(e){if(this.structure&&(Fl(e,this.from,this.gapFrom)||Fl(e,this.gapTo,this.to)))return Le.fail("Structure gap-replace would overwrite content");let n=e.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return Le.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?Le.fromReplace(e,this.from,this.to,r):Le.fail("Content does not fit in gap")}getMap(){return new Ot([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let n=this.gapTo-this.gapFrom;return new vt(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),i=this.from==this.gapFrom?n.pos:e.map(this.gapFrom,-1),o=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||i<n.pos||o>r.pos?null:new vt(n.pos,r.pos,i,o,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new vt(n.from,n.to,n.gapFrom,n.gapTo,G.fromJSON(e,n.slice),n.insert,!!n.structure)}}function Fl(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 s=r.node(o).maybeChild(r.indexAfter(o));for(;i>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,i--}}return!1}function wa(t,e,n,r=n.contentMatch,i=!0){let o=t.doc.nodeAt(e),s=[],a=e+1;for(let l=0;l<o.childCount;l++){let u=o.child(l),c=a+u.nodeSize,d=r.matchType(u.type);if(d){r=d;for(let h=0;h<u.marks.length;h++)n.allowsMarkType(u.marks[h].type)||t.step(new Xt(a,c,u.marks[h]));if(i&&u.isText&&n.whitespace!="pre"){let h,p,m=/\r?\n|\r/g;for(;h=m.exec(u.text);)p||(p=new G(j.from(n.schema.text(" ",n.allowedMarks(u.marks))),0,0)),s.push(new $e(a+h.index,a+h.index+h[0].length,p))}}else s.push(new $e(a,c,G.empty));a=c}if(!r.validEnd){let l=r.fillBefore(j.empty,!0);t.replace(a,a,new G(l,0,0))}for(let l=s.length-1;l>=0;l--)t.step(s[l])}function DS(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function zc(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(n==0||o.type.spec.isolating||!DS(o,s,a))break;s&&(r=1),a<o.childCount&&(i=1)}return null}function th(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 l=t.mapping.slice(r).map(n+1+o+s.index);t.replaceWith(l,l+1,e.type.schema.linebreakReplacement.create())}}})}function nh(t,e,n,r){e.forEach((i,o)=>{if(i.type==i.type.schema.linebreakReplacement){let s=t.mapping.slice(r).map(n+1+o);t.replaceWith(s,s+1,e.type.schema.text(`
11
+ `))}})}function Xo(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 u=i.depth-1,c=n-2;u>o;u--,c--){let d=i.node(u),h=i.index(u);if(d.type.spec.isolating)return!1;let p=d.content.cutByIndex(h,d.childCount),m=r&&r[c+1];m&&(p=p.replaceChild(0,m.type.create(m.attrs)));let _=r&&r[c]||d;if(!d.canReplace(h+1,d.childCount)||!_.type.validContent(p))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 rh(t,e){let n=t.resolve(e),r=n.index();return(function(i,o){return!(!i||!o||i.isLeaf||!(function(s,a){a.content.size||s.type.compatibleContent(a.type);let l=s.contentMatchAt(s.childCount),{linebreakReplacement:u}=s.type.schema;for(let c=0;c<a.childCount;c++){let d=a.child(c),h=d.type==u?s.type.schema.nodes.text:d.type;if(l=l.matchType(h),!l||!s.type.allowsMarks(d.marks))return!1}return l.validEnd})(i,o))})(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function $c(t,e,n=e,r=G.empty){if(e==n&&!r.size)return null;let i=t.resolve(e),o=t.resolve(n);return TE(i,o,r)?new $e(e,n,r):new TS(i,o,r).fit()}function TE(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}et.jsonID("replaceAround",vt);class TS{constructor(e,n,r){this.$from=e,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=j.empty;for(let i=0;i<=e.depth;i++){let o=e.node(i);this.frontier.push({type:o.type,match:o.contentMatchAt(e.indexAfter(i))})}for(let i=e.depth;i>0;i--)this.placed=j.from(e.node(i).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let u=this.findFittable();u?this.placeNodes(u):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,i=this.close(e<0?this.$to:r.doc.resolve(e));if(!i)return null;let o=this.placed,s=r.depth,a=i.depth;for(;s&&a&&o.childCount==1;)o=o.firstChild.content,s--,a--;let l=new G(o,s,a);return e>-1?new vt(r.pos,e,this.$to.pos,this.$to.end(),l,n):l.size||r.pos!=this.$to.pos?new $e(r.pos,i.pos,l):null}findFittable(){let e=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,i=this.unplaced.openEnd;r<e;r++){let o=n.firstChild;if(n.childCount>1&&(i=0),o.type.spec.isolating&&i<=r){e=r;break}n=o.content}for(let n=1;n<=2;n++)for(let r=n==1?e:this.unplaced.openStart;r>=0;r--){let i,o=null;r?(o=La(this.unplaced.content,r-1).firstChild,i=o.content):i=this.unplaced.content;let s=i.firstChild;for(let a=this.depth;a>=0;a--){let l,{type:u,match:c}=this.frontier[a],d=null;if(n==1&&(s?c.matchType(s.type)||(d=c.fillBefore(j.from(s),!1)):o&&u.compatibleContent(o.type)))return{sliceDepth:r,frontierDepth:a,parent:o,inject:d};if(n==2&&s&&(l=c.findWrapping(s.type)))return{sliceDepth:r,frontierDepth:a,parent:o,wrap:l};if(o&&c.matchType(o.type))break}}}openMore(){let{content:e,openStart:n,openEnd:r}=this.unplaced,i=La(e,n);return!(!i.childCount||i.firstChild.isLeaf)&&(this.unplaced=new G(e,n+1,Math.max(r,i.size+n>=e.size-r?n+1:0)),!0)}dropNode(){let{content:e,openStart:n,openEnd:r}=this.unplaced,i=La(e,n);if(i.childCount<=1&&n>0){let o=e.size-n<=n+i.size;this.unplaced=new G(vi(e,n-1,1),n-1,o?n-1:r)}else this.unplaced=new G(vi(e,n,1),n,r)}placeNodes({sliceDepth:e,frontierDepth:n,parent:r,inject:i,wrap:o}){for(;this.depth>n;)this.closeFrontierNode();if(o)for(let _=0;_<o.length;_++)this.openFrontierNode(o[_]);let s=this.unplaced,a=r?r.content:s.content,l=s.openStart-e,u=0,c=[],{match:d,type:h}=this.frontier[n];if(i){for(let _=0;_<i.childCount;_++)c.push(i.child(_));d=d.matchFragment(i)}let p=a.size+e-(s.content.size-s.openEnd);for(;u<a.childCount;){let _=a.child(u),E=d.matchType(_.type);if(!E)break;u++,(u>1||l==0||_.content.size)&&(d=E,c.push(RE(_.mark(h.allowedMarks(_.marks)),u==1?l:0,u==a.childCount?p:-1)))}let m=u==a.childCount;m||(p=-1),this.placed=Di(this.placed,n,j.from(c)),this.frontier[n].match=d,m&&p<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let _=0,E=a;_<p;_++){let A=E.lastChild;this.frontier.push({type:A.type,match:A.contentMatchAt(A.childCount)}),E=A.content}this.unplaced=m?e==0?G.empty:new G(vi(s.content,e-1,1),e-1,p<0?s.openEnd:e-1):new G(vi(s.content,e,u),s.openStart,s.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e,n=this.frontier[this.depth];if(!n.type.isTextblock||!ka(this.$to,this.$to.depth,n.type,n.match,!1)||this.$to.depth==this.depth&&(e=this.findCloseLevel(this.$to))&&e.depth==this.depth)return-1;let{depth:r}=this.$to,i=this.$to.after(r);for(;r>1&&i==this.$to.end(--r);)++i;return i}findCloseLevel(e){e:for(let n=Math.min(this.depth,e.depth);n>=0;n--){let{match:r,type:i}=this.frontier[n],o=n<e.depth&&e.end(n+1)==e.pos+(e.depth-(n+1)),s=ka(e,n,i,r,o);if(s){for(let a=n-1;a>=0;a--){let{match:l,type:u}=this.frontier[a],c=ka(e,a,u,l,!0);if(!c||c.childCount)continue e}return{depth:n,fit:s,move:o?e.doc.resolve(e.after(n+1)):e}}}}close(e){let n=this.findCloseLevel(e);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=Di(this.placed,n.depth,n.fit)),e=n.move;for(let r=n.depth+1;r<=e.depth;r++){let i=e.node(r),o=i.type.contentMatch.fillBefore(i.content,!0,e.index(r));this.openFrontierNode(i.type,i.attrs,o)}return e}openFrontierNode(e,n=null,r){let i=this.frontier[this.depth];i.match=i.match.matchType(e),this.placed=Di(this.placed,this.depth,j.from(e.create(n,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let e=this.frontier.pop().match.fillBefore(j.empty,!0);e.childCount&&(this.placed=Di(this.placed,this.frontier.length,e))}}function vi(t,e,n){return e==0?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(vi(t.firstChild.content,e-1,n)))}function Di(t,e,n){return e==0?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(Di(t.lastChild.content,e-1,n)))}function La(t,e){for(let n=0;n<e;n++)t=t.firstChild.content;return t}function RE(t,e,n){if(e<=0)return t;let r=t.content;return e>1&&(r=r.replaceChild(0,RE(r.firstChild,e-1,r.childCount==1?n-1:0))),e>0&&(r=t.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(t.type.contentMatch.matchFragment(r).fillBefore(j.empty,!0)))),t.copy(r)}function ka(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(l,u,c){for(let d=c;d<u.childCount;d++)if(!l.allowsMarks(u.child(d).marks))return!0;return!1})(n,o.content,s)?a:null}function RS(t){return t.spec.defining||t.spec.definingForContent}function IE(t,e,n,r,i){if(e<n){let o=t.firstChild;t=t.replaceChild(0,o.copy(IE(o.content,e+1,n,r,o)))}if(e>r){let o=i.contentMatchAt(0),s=o.fillBefore(t).append(t);t=s.append(o.matchFragment(s).fillBefore(j.empty,!0))}return t}function ih(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}class zr extends et{constructor(e,n,r){super(),this.pos=e,this.attr=n,this.value=r}apply(e){let n=e.nodeAt(this.pos);if(!n)return Le.fail("No node at attribute step's position");let r=Object.create(null);for(let o in n.attrs)r[o]=n.attrs[o];r[this.attr]=this.value;let i=n.type.create(r,null,n.marks);return Le.fromReplace(e,this.pos,this.pos+1,new G(j.from(i),0,n.isLeaf?0:1))}getMap(){return Ot.empty}invert(e){return new zr(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new zr(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new zr(n.pos,n.attr,n.value)}}et.jsonID("attr",zr);class Ki extends et{constructor(e,n){super(),this.attr=e,this.value=n}apply(e){let n=Object.create(null);for(let i in e.attrs)n[i]=e.attrs[i];n[this.attr]=this.value;let r=e.type.create(n,e.content,e.marks);return Le.ok(r)}getMap(){return Ot.empty}invert(e){return new Ki(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new Ki(n.attr,n.value)}}et.jsonID("docAttr",Ki);let Ti=class extends Error{};Ti=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n},(Ti.prototype=Object.create(Error.prototype)).constructor=Ti,Ti.prototype.name="TransformError";class IS{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new Xi}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let n=this.maybeStep(e);if(n.failed)throw new Ti(n.failed);return this}maybeStep(e){let n=e.apply(this.doc);return n.failed||this.addStep(e,n.doc),n}get docChanged(){return this.steps.length>0}addStep(e,n){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=n}replace(e,n=e,r=G.empty){let i=$c(this.doc,e,n,r);return i&&this.step(i),this}replaceWith(e,n,r){return this.replace(e,n,new G(j.from(r),0,0))}delete(e,n){return this.replace(e,n,G.empty)}insert(e,n){return this.replaceWith(e,e,n)}replaceRange(e,n,r){return(function(i,o,s,a){if(!a.size)return i.deleteRange(o,s);let l=i.doc.resolve(o),u=i.doc.resolve(s);if(TE(l,u,a))return i.step(new $e(o,s,a));let c=ih(l,u);c[c.length-1]==0&&c.pop();let d=-(l.depth+1);c.unshift(d);for(let E=l.depth,A=l.pos-1;E>0;E--,A--){let g=l.node(E).type.spec;if(g.defining||g.definingAsContext||g.isolating)break;c.indexOf(E)>-1?d=E:l.before(E)==A&&c.splice(1,0,-E)}let h=c.indexOf(d),p=[],m=a.openStart;for(let E=a.content,A=0;;A++){let g=E.firstChild;if(p.push(g),A==a.openStart)break;E=g.content}for(let E=m-1;E>=0;E--){let A=p[E],g=RS(A.type);if(g&&!A.sameMarkup(l.node(Math.abs(d)-1)))m=E;else if(g||!A.type.isTextblock)break}for(let E=a.openStart;E>=0;E--){let A=(E+m+1)%(a.openStart+1),g=p[A];if(g)for(let S=0;S<c.length;S++){let O=c[(S+h)%c.length],D=!0;O<0&&(D=!1,O=-O);let I=l.node(O-1),R=l.index(O-1);if(I.canReplaceWith(R,R,g.type,g.marks))return i.replace(l.before(O),D?u.after(O):s,new G(IE(a.content,0,a.openStart,A),A,a.openEnd))}}let _=i.steps.length;for(let E=c.length-1;E>=0&&(i.replace(o,s,a),!(i.steps.length>_));E--){let A=c[E];A<0||(o=l.before(A),s=u.after(A))}})(this,e,n,r),this}replaceRangeWith(e,n,r){return(function(i,o,s,a){if(!a.isInline&&o==s&&i.doc.resolve(o).parent.content.size){let l=(function(u,c,d){let h=u.resolve(c);if(h.parent.canReplaceWith(h.index(),h.index(),d))return c;if(h.parentOffset==0)for(let p=h.depth-1;p>=0;p--){let m=h.index(p);if(h.node(p).canReplaceWith(m,m,d))return h.before(p+1);if(m>0)return null}if(h.parentOffset==h.parent.content.size)for(let p=h.depth-1;p>=0;p--){let m=h.indexAfter(p);if(h.node(p).canReplaceWith(m,m,d))return h.after(p+1);if(m<h.node(p).childCount)return null}return null})(i.doc,o,a.type);l!=null&&(o=s=l)}i.replaceRange(o,s,new G(j.from(a),0,0))})(this,e,n,r),this}deleteRange(e,n){return(function(r,i,o){let s=r.doc.resolve(i),a=r.doc.resolve(o),l=ih(s,a);for(let u=0;u<l.length;u++){let c=l[u],d=u==l.length-1;if(d&&c==0||s.node(c).type.contentMatch.validEnd)return r.delete(s.start(c),a.end(c));if(c>0&&(d||s.node(c-1).canReplace(s.index(c-1),a.indexAfter(c-1))))return r.delete(s.before(c),a.after(c))}for(let u=1;u<=s.depth&&u<=a.depth;u++)if(i-s.start(u)==s.depth-u&&o>s.end(u)&&a.end(u)-o!=a.depth-u&&s.start(u-1)==a.start(u-1)&&s.node(u-1).canReplace(s.index(u-1),a.index(u-1)))return r.delete(s.before(u),o);r.delete(i,o)})(this,e,n),this}lift(e,n){return(function(r,i,o){let{$from:s,$to:a,depth:l}=i,u=s.before(l+1),c=a.after(l+1),d=u,h=c,p=j.empty,m=0;for(let A=l,g=!1;A>o;A--)g||s.index(A)>0?(g=!0,p=j.from(s.node(A).copy(p)),m++):d--;let _=j.empty,E=0;for(let A=l,g=!1;A>o;A--)g||a.after(A+1)<a.end(A)?(g=!0,_=j.from(a.node(A).copy(_)),E++):h++;r.step(new vt(d,h,u,c,new G(p.append(_),m,E),p.size-m,!0))})(this,e,n),this}join(e,n=1){return(function(r,i,o){let s=null,{linebreakReplacement:a}=r.doc.type.schema,l=r.doc.resolve(i-o),u=l.node().type;if(a&&u.inlineContent){let p=u.whitespace=="pre",m=!!u.contentMatch.matchType(a);p&&!m?s=!1:!p&&m&&(s=!0)}let c=r.steps.length;if(s===!1){let p=r.doc.resolve(i+o);nh(r,p.node(),p.before(),c)}u.inlineContent&&wa(r,i+o-1,u,l.node().contentMatchAt(l.index()),s==null);let d=r.mapping.slice(c),h=d.map(i-o);if(r.step(new $e(h,d.map(i+o,-1),G.empty,!0)),s===!0){let p=r.doc.resolve(h);th(r,p.node(),p.before(),r.steps.length)}})(this,e,n),this}wrap(e,n){return(function(r,i,o){let s=j.empty;for(let u=o.length-1;u>=0;u--){if(s.size){let c=o[u].type.contentMatch.matchFragment(s);if(!c||!c.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}s=j.from(o[u].type.create(o[u].attrs,s))}let a=i.start,l=i.end;r.step(new vt(a,l,a,l,new G(s,0,0),o.length,!0))})(this,e,n),this}setBlockType(e,n=e,r,i=null){return(function(o,s,a,l,u){if(!l.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let c=o.steps.length;o.doc.nodesBetween(s,a,(d,h)=>{let p=typeof u=="function"?u(d):u;if(d.isTextblock&&!d.hasMarkup(l,p)&&(function(m,_,E){let A=m.resolve(_),g=A.index();return A.parent.canReplaceWith(g,g+1,E)})(o.doc,o.mapping.slice(c).map(h),l)){let m=null;if(l.schema.linebreakReplacement){let g=l.whitespace=="pre",S=!!l.contentMatch.matchType(l.schema.linebreakReplacement);g&&!S?m=!1:!g&&S&&(m=!0)}m===!1&&nh(o,d,h,c),wa(o,o.mapping.slice(c).map(h,1),l,void 0,m===null);let _=o.mapping.slice(c),E=_.map(h,1),A=_.map(h+d.nodeSize,1);return o.step(new vt(E,A,E+1,A-1,new G(j.from(l.create(p,null,d.marks)),0,0),1,!0)),m===!0&&th(o,d,h,c),!1}})})(this,e,n,r,i),this}setNodeMarkup(e,n,r=null,i){return(function(o,s,a,l,u){let c=o.doc.nodeAt(s);if(!c)throw new RangeError("No node at given position");a||(a=c.type);let d=a.create(l,null,u||c.marks);if(c.isLeaf)return o.replaceWith(s,s+c.nodeSize,d);if(!a.validContent(c.content))throw new RangeError("Invalid content for node type "+a.name);o.step(new vt(s,s+c.nodeSize,s+1,s+c.nodeSize-1,new G(j.from(d),0,0),1,!0))})(this,e,n,r,i),this}setNodeAttribute(e,n,r){return this.step(new zr(e,n,r)),this}setDocAttribute(e,n){return this.step(new Ki(e,n)),this}addNodeMark(e,n){return this.step(new bn(e,n)),this}removeNodeMark(e,n){let r=this.doc.nodeAt(e);if(!r)throw new RangeError("No node at position "+e);if(n instanceof fe)n.isInSet(r.marks)&&this.step(new hr(e,n));else{let i,o=r.marks,s=[];for(;i=n.isInSet(o);)s.push(new hr(e,i)),o=i.removeFromSet(o);for(let a=s.length-1;a>=0;a--)this.step(s[a])}return this}split(e,n=1,r){return(function(i,o,s=1,a){let l=i.doc.resolve(o),u=j.empty,c=j.empty;for(let d=l.depth,h=l.depth-s,p=s-1;d>h;d--,p--){u=j.from(l.node(d).copy(u));let m=a&&a[p];c=j.from(m?m.type.create(m.attrs,c):l.node(d).copy(c))}i.step(new $e(o,o,new G(u.append(c),s,s),!0))})(this,e,n,r),this}addMark(e,n,r){return(function(i,o,s,a){let l,u,c=[],d=[];i.doc.nodesBetween(o,s,(h,p,m)=>{if(!h.isInline)return;let _=h.marks;if(!a.isInSet(_)&&m.type.allowsMarkType(a.type)){let E=Math.max(p,o),A=Math.min(p+h.nodeSize,s),g=a.addToSet(_);for(let S=0;S<_.length;S++)_[S].isInSet(g)||(l&&l.to==E&&l.mark.eq(_[S])?l.to=A:c.push(l=new Xt(E,A,_[S])));u&&u.to==E?u.to=A:d.push(u=new Nn(E,A,a))}}),c.forEach(h=>i.step(h)),d.forEach(h=>i.step(h))})(this,e,n,r),this}removeMark(e,n,r){return(function(i,o,s,a){let l=[],u=0;i.doc.nodesBetween(o,s,(c,d)=>{if(!c.isInline)return;u++;let h=null;if(a instanceof Gs){let p,m=c.marks;for(;p=a.isInSet(m);)(h||(h=[])).push(p),m=p.removeFromSet(m)}else a?a.isInSet(c.marks)&&(h=[a]):h=c.marks;if(h&&h.length){let p=Math.min(d+c.nodeSize,s);for(let m=0;m<h.length;m++){let _,E=h[m];for(let A=0;A<l.length;A++){let g=l[A];g.step==u-1&&E.eq(l[A].style)&&(_=g)}_?(_.to=p,_.step=u):l.push({style:E,from:Math.max(d,o),to:p,step:u})}}}),l.forEach(c=>i.step(new Xt(c.from,c.to,c.style)))})(this,e,n,r),this}clearIncompatible(e,n,r){return wa(this,e,n,r),this}}const Ma=Object.create(null);class pe{constructor(e,n,r){this.$anchor=e,this.$head=n,this.ranges=r||[new yS(e.min(n),e.max(n))]}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 e=this.ranges;for(let n=0;n<e.length;n++)if(e[n].$from.pos!=e[n].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,n=G.empty){let r=n.content.lastChild,i=null;for(let a=0;a<n.openEnd;a++)i=r,r=r.lastChild;let o=e.steps.length,s=this.ranges;for(let a=0;a<s.length;a++){let{$from:l,$to:u}=s[a],c=e.mapping.slice(o);e.replaceRange(c.map(l.pos),c.map(u.pos),a?G.empty:n),a==0&&ah(e,o,(r?r.isInline:i&&i.isTextblock)?-1:1)}}replaceWith(e,n){let r=e.steps.length,i=this.ranges;for(let o=0;o<i.length;o++){let{$from:s,$to:a}=i[o],l=e.mapping.slice(r),u=l.map(s.pos),c=l.map(a.pos);o?e.deleteRange(u,c):(e.replaceRangeWith(u,c,n),ah(e,r,n.isInline?-1:1))}}static findFrom(e,n,r=!1){let i=e.parent.inlineContent?new de(e):Lr(e.node(0),e.parent,e.pos,e.index(),n,r);if(i)return i;for(let o=e.depth-1;o>=0;o--){let s=n<0?Lr(e.node(0),e.node(o),e.before(o+1),e.index(o),n,r):Lr(e.node(0),e.node(o),e.after(o+1),e.index(o)+1,n,r);if(s)return s}return null}static near(e,n=1){return this.findFrom(e,n)||this.findFrom(e,-n)||new Rt(e.node(0))}static atStart(e){return Lr(e,e,0,0,1)||new Rt(e)}static atEnd(e){return Lr(e,e,e.content.size,e.childCount,-1)||new Rt(e)}static fromJSON(e,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=Ma[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in Ma)throw new RangeError("Duplicate use of selection JSON ID "+e);return Ma[e]=n,n.prototype.jsonID=e,n}getBookmark(){return de.between(this.$anchor,this.$head).getBookmark()}}pe.prototype.visible=!0;class yS{constructor(e,n){this.$from=e,this.$to=n}}let oh=!1;function sh(t){oh||t.parent.inlineContent||(oh=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class de extends pe{constructor(e,n=e){sh(e),sh(n),super(e,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,n){let r=e.resolve(n.map(this.head));if(!r.parent.inlineContent)return pe.near(r);let i=e.resolve(n.map(this.anchor));return new de(i.parent.inlineContent?i:r,r)}replace(e,n=G.empty){if(super.replace(e,n),n==G.empty){let r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}eq(e){return e instanceof de&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new Ws(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new de(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,r=n){let i=e.resolve(n);return new this(i,r==n?i:e.resolve(r))}static between(e,n,r){let i=e.pos-n.pos;if(r&&!i||(r=i>=0?1:-1),!n.parent.inlineContent){let o=pe.findFrom(n,r,!0)||pe.findFrom(n,-r,!0);if(!o)return pe.near(n,r);n=o.$head}return e.parent.inlineContent||(i==0||(e=(pe.findFrom(e,-r,!0)||pe.findFrom(e,r,!0)).$anchor).pos<n.pos!=i<0)&&(e=n),new de(e,n)}}pe.jsonID("text",de);class Ws{constructor(e,n){this.anchor=e,this.head=n}map(e){return new Ws(e.map(this.anchor),e.map(this.head))}resolve(e){return de.between(e.resolve(this.anchor),e.resolve(this.head))}}class Q extends pe{constructor(e){let n=e.nodeAfter,r=e.node(0).resolve(e.pos+n.nodeSize);super(e,r),this.node=n}map(e,n){let{deleted:r,pos:i}=n.mapResult(this.anchor),o=e.resolve(i);return r?pe.near(o):new Q(o)}content(){return new G(j.from(this.node),0,0)}eq(e){return e instanceof Q&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new Yc(this.anchor)}static fromJSON(e,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new Q(e.resolve(n.anchor))}static create(e,n){return new Q(e.resolve(n))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}Q.prototype.visible=!1,pe.jsonID("node",Q);class Yc{constructor(e){this.anchor=e}map(e){let{deleted:n,pos:r}=e.mapResult(this.anchor);return n?new Ws(r,r):new Yc(r)}resolve(e){let n=e.resolve(this.anchor),r=n.nodeAfter;return r&&Q.isSelectable(r)?new Q(n):pe.near(n)}}class Rt extends pe{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,n=G.empty){if(n==G.empty){e.delete(0,e.doc.content.size);let r=pe.atStart(e.doc);r.eq(e.selection)||e.setSelection(r)}else super.replace(e,n)}toJSON(){return{type:"all"}}static fromJSON(e){return new Rt(e)}map(e){return new Rt(e)}eq(e){return e instanceof Rt}getBookmark(){return CS}}pe.jsonID("all",Rt);const CS={map(){return this},resolve:t=>new Rt(t)};function Lr(t,e,n,r,i,o=!1){if(e.inlineContent)return de.create(t,n);for(let s=r-(i>0?0:1);i>0?s<e.childCount:s>=0;s+=i){let a=e.child(s);if(a.isAtom){if(!o&&Q.isSelectable(a))return Q.create(t,n-(i<0?a.nodeSize:0))}else{let l=Lr(t,a,n+i,i<0?a.childCount:0,i,o);if(l)return l}n+=a.nodeSize*i}return null}function ah(t,e,n){let r=t.steps.length-1;if(r<e)return;let i,o=t.steps[r];(o instanceof $e||o instanceof vt)&&(t.mapping.maps[r].forEach((s,a,l,u)=>{i==null&&(i=u)}),t.setSelection(pe.near(t.doc.resolve(i),n)))}class NS extends IS{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.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(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=-3&this.updated|1,this.storedMarks=null,this}get selectionSet(){return(1&this.updated)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=2,this}ensureMarks(e){return fe.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(2&this.updated)>0}addStep(e,n){super.addStep(e,n),this.updated=-3&this.updated,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,n=!0){let r=this.selection;return n&&(e=e.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||fe.none))),r.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,n,r){let i=this.doc.type.schema;if(n==null)return e?this.replaceSelectionWith(i.text(e),!0):this.deleteSelection();{if(r==null&&(r=n),r=r==null?n:r,!e)return this.deleteRange(n,r);let o=this.storedMarks;if(!o){let s=this.doc.resolve(n);o=r==n?s.marks():s.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,i.text(e,o)),this.selection.empty||this.setSelection(pe.near(this.selection.$to)),this}}setMeta(e,n){return this.meta[typeof e=="string"?e:e.key]=n,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=4,this}get scrolledIntoView(){return(4&this.updated)>0}}function lh(t,e){return e&&t?t.bind(e):t}class Ri{constructor(e,n,r){this.name=e,this.init=lh(n.init,r),this.apply=lh(n.apply,r)}}const bS=[new Ri("doc",{init:t=>t.doc||t.schema.topNodeType.createAndFill(),apply:t=>t.doc}),new Ri("selection",{init:(t,e)=>t.selection||pe.atStart(e.doc),apply:t=>t.selection}),new Ri("storedMarks",{init:t=>t.storedMarks||null,apply:(t,e,n,r)=>r.selection.$cursor?t.storedMarks:null}),new Ri("scrollToSelection",{init:()=>0,apply:(t,e)=>t.scrolledIntoView?e+1:e})];class Pa{constructor(e,n){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=bS.slice(),n&&n.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new Ri(r.key,r.spec.state,r))})}}class Ur{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,n=-1){for(let r=0;r<this.config.plugins.length;r++)if(r!=n){let i=this.config.plugins[r];if(i.spec.filterTransaction&&!i.spec.filterTransaction.call(i,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let n=[e],r=this.applyInner(e),i=null;for(;;){let o=!1;for(let s=0;s<this.config.plugins.length;s++){let a=this.config.plugins[s];if(a.spec.appendTransaction){let l=i?i[s].n:0,u=i?i[s].state:this,c=l<n.length&&a.spec.appendTransaction.call(a,l?n.slice(l):n,u,r);if(c&&r.filterTransaction(c,s)){if(c.setMeta("appendedTransaction",e),!i){i=[];for(let d=0;d<this.config.plugins.length;d++)i.push(d<s?{state:r,n:n.length}:{state:this,n:0})}n.push(c),r=r.applyInner(c),o=!0}i&&(i[s]={state:r,n:n.length})}}if(!o)return{state:r,transactions:n}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let n=new Ur(this.config),r=this.config.fields;for(let i=0;i<r.length;i++){let o=r[i];n[o.name]=o.apply(e,this[o.name],this,n)}return n}get tr(){return new NS(this)}static create(e){let n=new Pa(e.doc?e.doc.type.schema:e.schema,e.plugins),r=new Ur(n);for(let i=0;i<n.fields.length;i++)r[n.fields[i].name]=n.fields[i].init(e,r);return r}reconfigure(e){let n=new Pa(this.schema,e.plugins),r=n.fields,i=new Ur(n);for(let o=0;o<r.length;o++){let s=r[o].name;i[s]=this.hasOwnProperty(s)?this[s]:r[o].init(e,i)}return i}toJSON(e){let n={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(n.storedMarks=this.storedMarks.map(r=>r.toJSON())),e&&typeof e=="object")for(let r in e){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let i=e[r],o=i.spec.state;o&&o.toJSON&&(n[r]=o.toJSON.call(i,this[i.key]))}return n}static fromJSON(e,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let i=new Pa(e.schema,e.plugins),o=new Ur(i);return i.fields.forEach(s=>{if(s.name=="doc")o.doc=sr.fromJSON(e.schema,n.doc);else if(s.name=="selection")o.selection=pe.fromJSON(o.doc,n.selection);else if(s.name=="storedMarks")n.storedMarks&&(o.storedMarks=n.storedMarks.map(e.schema.markFromJSON));else{if(r)for(let a in r){let l=r[a],u=l.spec.state;if(l.key==s.name&&u&&u.fromJSON&&Object.prototype.hasOwnProperty.call(n,a))return void(o[s.name]=u.fromJSON.call(l,e,n[a],o))}o[s.name]=s.init(e,o)}}),o}}function yE(t,e,n){for(let r in t){let i=t[r];i instanceof Function?i=i.bind(e):r=="handleDOMEvents"&&(i=yE(i,e,{})),n[r]=i}return n}class Xs{constructor(e){this.spec=e,this.props={},e.props&&yE(e.props,this,this.props),this.key=e.key?e.key.key:CE("plugin")}getState(e){return e[this.key]}}const xa=Object.create(null);function CE(t){return t in xa?t+"$"+ ++xa[t]:(xa[t]=0,t+"$")}class Ks{constructor(e="key"){this.key=CE(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const Ye=function(t){for(var e=0;;e++)if(!(t=t.previousSibling))return e},ti=function(t){let e=t.assignedSlot||t.parentNode;return e&&e.nodeType==11?e.host:e};let Hl=null;const un=function(t,e,n){let r=Hl||(Hl=document.createRange());return r.setEnd(t,n==null?t.nodeValue.length:n),r.setStart(t,e||0),r},pr=function(t,e,n,r){return n&&(ch(t,e,n,r,-1)||ch(t,e,n,r,1))},wS=/^(img|br|input|textarea|hr)$/i;function ch(t,e,n,r,i){for(var o;;){if(t==n&&e==r)return!0;if(e==(i<0?0:Nt(t))){let s=t.parentNode;if(!s||s.nodeType!=1||qi(t)||wS.test(t.nodeName)||t.contentEditable=="false")return!1;e=Ye(t)+(i<0?0:1),t=s}else{if(t.nodeType!=1)return!1;{let s=t.childNodes[e+(i<0?-1:0)];if(s.nodeType==1&&s.contentEditable=="false"){if(!(!((o=s.pmViewDesc)===null||o===void 0)&&o.ignoreForSelection))return!1;e+=i}else t=s,e=i<0?Nt(t):0}}}}function Nt(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function qi(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 qs=function(t){return t.focusNode&&pr(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function Zn(t,e){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}const en=typeof navigator!="undefined"?navigator:null,uh=typeof document!="undefined"?document:null,Vn=en&&en.userAgent||"",Ul=/Edge\/(\d+)/.exec(Vn),NE=/MSIE \d/.exec(Vn),Bl=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Vn),Et=!!(NE||Bl||Ul),Pn=NE?document.documentMode:Bl?+Bl[1]:Ul?+Ul[1]:0,kt=!Et&&/gecko\/(\d+)/i.test(Vn);kt&&(/Firefox\/(\d+)/.exec(Vn)||[0,0])[1];const jl=!Et&&/Chrome\/(\d+)/.exec(Vn),Ue=!!jl,bE=jl?+jl[1]:0,Ge=!Et&&!!en&&/Apple Computer/.test(en.vendor),ni=Ge&&(/Mobile\/\w+/.test(Vn)||!!en&&en.maxTouchPoints>2),yt=ni||!!en&&/Mac/.test(en.platform),wE=!!en&&/Win/.test(en.platform),pn=/Android \d/.test(Vn),fo=!!uh&&"webkitFontSmoothing"in uh.documentElement.style,LS=fo?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function kS(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 ln(t,e){return typeof t=="number"?t:t[e]}function MS(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 dh(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(s.nodeType!=1){s=ti(s);continue}let a=s,l=a==o.body,u=l?kS(o):MS(a),c=0,d=0;if(e.top<u.top+ln(r,"top")?d=-(u.top-e.top+ln(i,"top")):e.bottom>u.bottom-ln(r,"bottom")&&(d=e.bottom-e.top>u.bottom-u.top?e.top+ln(i,"top")-u.top:e.bottom-u.bottom+ln(i,"bottom")),e.left<u.left+ln(r,"left")?c=-(u.left-e.left+ln(i,"left")):e.right>u.right-ln(r,"right")&&(c=e.right-u.right+ln(i,"right")),c||d)if(l)o.defaultView.scrollBy(c,d);else{let p=a.scrollLeft,m=a.scrollTop;d&&(a.scrollTop+=d),c&&(a.scrollLeft+=c);let _=a.scrollLeft-p,E=a.scrollTop-m;e={left:e.left-_,top:e.top-E,right:e.right-_,bottom:e.bottom-E}}let h=l?"fixed":getComputedStyle(s).position;if(/^(fixed|sticky)$/.test(h))break;s=h=="absolute"?s.offsetParent:ti(s)}}function hh(t){let e=[],n=t.ownerDocument;for(let r=t;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),t!=n);r=ti(r));return e}function ph(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 Nr=null;function LE(t,e){let n,r,i,o,s=2e8,a=0,l=e.top,u=e.top;for(let c=t.firstChild,d=0;c;c=c.nextSibling,d++){let h;if(c.nodeType==1)h=c.getClientRects();else{if(c.nodeType!=3)continue;h=un(c).getClientRects()}for(let p=0;p<h.length;p++){let m=h[p];if(m.top<=l&&m.bottom>=u){l=Math.max(m.bottom,l),u=Math.min(m.top,u);let _=m.left>e.left?m.left-e.left:m.right<e.left?e.left-m.right:0;if(_<s){n=c,s=_,r=_&&n.nodeType==3?{left:m.right<e.left?m.right:m.left,top:e.top}:e,c.nodeType==1&&_&&(a=d+(e.left>=(m.left+m.right)/2?1:0));continue}}else m.top>e.top&&!i&&m.left<=e.left&&m.right>=e.left&&(i=c,o={left:Math.max(m.left,Math.min(m.right,e.left)),top:m.top});!n&&(e.left>=m.right&&e.top>=m.top||e.left>=m.left&&e.top>=m.bottom)&&(a=d+1)}}return!n&&i&&(n=i,r=o,s=0),n&&n.nodeType==3?(function(c,d){let h,p=c.nodeValue.length,m=document.createRange();for(let _=0;_<p;_++){m.setEnd(c,_+1),m.setStart(c,_);let E=Dn(m,1);if(E.top!=E.bottom&&Gc(d,E)){h={node:c,offset:_+(d.left>=(E.left+E.right)/2?1:0)};break}}return m.detach(),h||{node:c,offset:0}})(n,r):!n||s&&n.nodeType==1?{node:t,offset:a}:LE(n,r)}function Gc(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function kE(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 s=t.childNodes[o];if(s.nodeType==1){let a=s.getClientRects();for(let l=0;l<a.length;l++){let u=a[l];if(Gc(e,u))return kE(s,e,u)}}if((o=(o+1)%r)==i)break}return t}function PS(t,e){let n,r=t.dom.ownerDocument,i=0,o=(function(u,c,d){if(u.caretPositionFromPoint)try{let h=u.caretPositionFromPoint(c,d);if(h)return{node:h.offsetNode,offset:Math.min(Nt(h.offsetNode),h.offset)}}catch(h){}if(u.caretRangeFromPoint){let h=u.caretRangeFromPoint(c,d);if(h)return{node:h.startContainer,offset:Math.min(Nt(h.startContainer),h.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(a.nodeType!=1?a.parentNode:a)){let u=t.dom.getBoundingClientRect();if(!Gc(e,u)||(a=kE(t.dom,e,u),!a))return null}if(Ge)for(let u=a;n&&u;u=ti(u))u.draggable&&(n=void 0);if(a=(function(u,c){let d=u.parentNode;return d&&/^li$/i.test(d.nodeName)&&c.left<u.getBoundingClientRect().left?d:u})(a,e),n){if(kt&&n.nodeType==1&&(i=Math.min(i,n.childNodes.length),i<n.childNodes.length)){let c,d=n.childNodes[i];d.nodeName=="IMG"&&(c=d.getBoundingClientRect()).right<=e.left&&c.bottom>e.top&&i++}let u;fo&&i&&n.nodeType==1&&(u=n.childNodes[i-1]).nodeType==1&&u.contentEditable=="false"&&u.getBoundingClientRect().top>=e.top&&i--,n==t.dom&&i==n.childNodes.length-1&&n.lastChild.nodeType==1&&e.top>n.lastChild.getBoundingClientRect().bottom?s=t.state.doc.content.size:i!=0&&n.nodeType==1&&n.childNodes[i-1].nodeName=="BR"||(s=(function(c,d,h,p){let m=-1;for(let _=d,E=!1;_!=c.dom;){let A,g=c.docView.nearestDesc(_,!0);if(!g)return null;if(g.dom.nodeType==1&&(g.node.isBlock&&g.parent||!g.contentDOM)&&((A=g.dom.getBoundingClientRect()).width||A.height)&&(g.node.isBlock&&g.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(g.dom.nodeName)&&(!E&&A.left>p.left||A.top>p.top?m=g.posBefore:(!E&&A.right<p.left||A.bottom<p.top)&&(m=g.posAfter),E=!0),!g.contentDOM&&m<0&&!g.node.isText))return(g.node.isBlock?p.top<(A.top+A.bottom)/2:p.left<(A.left+A.right)/2)?g.posBefore:g.posAfter;_=g.dom.parentNode}return m>-1?m:c.docView.posFromDOM(d,h,-1)})(t,n,i,e))}s==null&&(s=(function(u,c,d){let{node:h,offset:p}=LE(c,d),m=-1;if(h.nodeType==1&&!h.firstChild){let _=h.getBoundingClientRect();m=_.left!=_.right&&d.left>(_.left+_.right)/2?1:-1}return u.docView.posFromDOM(h,p,m)})(t,a,e));let l=t.docView.nearestDesc(a,!0);return{pos:s,inside:l?l.posAtStart-l.border:-1}}function fh(t){return t.top<t.bottom||t.left<t.right}function Dn(t,e){let n=t.getClientRects();if(n.length){let r=n[e<0?0:n.length-1];if(fh(r))return r}return Array.prototype.find.call(n,fh)||t.getBoundingClientRect()}const xS=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function ME(t,e,n){let{node:r,offset:i,atom:o}=t.docView.domFromPos(e,n<0?-1:1),s=fo||kt;if(r.nodeType==3){if(!s||!xS.test(r.nodeValue)&&(n<0?i:i!=r.nodeValue.length)){let a=i,l=i,u=n<0?1:-1;return n<0&&!i?(l++,u=-1):n>=0&&i==r.nodeValue.length?(a--,u=1):n<0?a--:l++,_i(Dn(un(r,a,l),u),u<0)}{let a=Dn(un(r,i,i),n);if(kt&&i&&/\s/.test(r.nodeValue[i-1])&&i<r.nodeValue.length){let l=Dn(un(r,i-1,i-1),-1);if(l.top==a.top){let u=Dn(un(r,i,i+1),-1);if(u.top!=a.top)return _i(u,u.left<l.left)}}return a}}if(!t.state.doc.resolve(e-(o||0)).parent.inlineContent){if(o==null&&i&&(n<0||i==Nt(r))){let a=r.childNodes[i-1];if(a.nodeType==1)return Fa(a.getBoundingClientRect(),!1)}if(o==null&&i<Nt(r)){let a=r.childNodes[i];if(a.nodeType==1)return Fa(a.getBoundingClientRect(),!0)}return Fa(r.getBoundingClientRect(),n>=0)}if(o==null&&i&&(n<0||i==Nt(r))){let a=r.childNodes[i-1],l=a.nodeType==3?un(a,Nt(a)-(s?0:1)):a.nodeType!=1||a.nodeName=="BR"&&a.nextSibling?null:a;if(l)return _i(Dn(l,1),!1)}if(o==null&&i<Nt(r)){let a=r.childNodes[i];for(;a.pmViewDesc&&a.pmViewDesc.ignoreForCoords;)a=a.nextSibling;let l=a?a.nodeType==3?un(a,0,s?0:1):a.nodeType==1?a:null:null;if(l)return _i(Dn(l,-1),!0)}return _i(Dn(r.nodeType==3?un(r):r,-n),n>=0)}function _i(t,e){if(t.width==0)return t;let n=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:n,right:n}}function Fa(t,e){if(t.height==0)return t;let n=e?t.top:t.bottom;return{top:n,bottom:n,left:t.left,right:t.right}}function mh(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 FS=/[\u0590-\u08ac]/;let Eh=null,_h=null,Ah=!1;function HS(t,e,n){return Eh==e&&_h==n?Ah:(Eh=e,_h=n,Ah=n=="up"||n=="down"?(function(r,i,o){let s=i.selection,a=o=="up"?s.$from:s.$to;return mh(r,i,()=>{let{node:l}=r.docView.domFromPos(a.pos,o=="up"?-1:1);for(;;){let c=r.docView.nearestDesc(l,!0);if(!c)break;if(c.node.isBlock){l=c.contentDOM||c.dom;break}l=c.dom.parentNode}let u=ME(r,a.pos,1);for(let c=l.firstChild;c;c=c.nextSibling){let d;if(c.nodeType==1)d=c.getClientRects();else{if(c.nodeType!=3)continue;d=un(c,0,c.nodeValue.length).getClientRects()}for(let h=0;h<d.length;h++){let p=d[h];if(p.bottom>p.top+1&&(o=="up"?u.top-p.top>2*(p.bottom-u.top):p.bottom-u.bottom>2*(u.bottom-p.top)))return!1}}return!0})})(t,e,n):(function(r,i,o){let{$head:s}=i.selection;if(!s.parent.isTextblock)return!1;let a=s.parentOffset,l=!a,u=a==s.parent.content.size,c=r.domSelection();return c?FS.test(s.parent.textContent)&&c.modify?mh(r,i,()=>{let{focusNode:d,focusOffset:h,anchorNode:p,anchorOffset:m}=r.domSelectionRange(),_=c.caretBidiLevel;c.modify("move",o,"character");let E=s.depth?r.docView.domAfterPos(s.before()):r.dom,{focusNode:A,focusOffset:g}=r.domSelectionRange(),S=A&&!E.contains(A.nodeType==1?A:A.parentNode)||d==A&&h==g;try{c.collapse(p,m),d&&(d!=p||h!=m)&&c.extend&&c.extend(d,h)}catch(O){}return _!=null&&(c.caretBidiLevel=_),S}):o=="left"||o=="backward"?l:u:s.pos==s.start()||s.pos==s.end()})(t,e,n))}class mo{constructor(e,n,r,i){this.parent=e,this.children=n,this.dom=r,this.contentDOM=i,this.dirty=0,r.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,n,r){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let n=0;n<this.children.length;n++)e+=this.children[n].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let n=0,r=this.posAtStart;;n++){let i=this.children[n];if(i==e)return r;r+=i.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(e,n,r){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode)){if(r<0){let o,s;if(e==this.contentDOM)o=e.childNodes[n-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;o=e.previousSibling}for(;o&&(!(s=o.pmViewDesc)||s.parent!=this);)o=o.previousSibling;return o?this.posBeforeChild(s)+s.size:this.posAtStart}{let o,s;if(e==this.contentDOM)o=e.childNodes[n];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;o=e.nextSibling}for(;o&&(!(s=o.pmViewDesc)||s.parent!=this);)o=o.nextSibling;return o?this.posBeforeChild(s):this.posAtEnd}}let i;if(e==this.dom&&this.contentDOM)i=n>Ye(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))i=2&e.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(n==0)for(let o=e;;o=o.parentNode){if(o==this.dom){i=!1;break}if(o.previousSibling)break}if(i==null&&n==e.childNodes.length)for(let o=e;;o=o.parentNode){if(o==this.dom){i=!0;break}if(o.nextSibling)break}}return(i==null?r>0:i)?this.posAtEnd:this.posAtStart}nearestDesc(e,n=!1){for(let r=!0,i=e;i;i=i.parentNode){let o,s=this.getDesc(i);if(s&&(!n||s.node)){if(!r||!(o=s.nodeDOM)||(o.nodeType==1?o.contains(e.nodeType==1?e:e.parentNode):o==e))return s;r=!1}}}getDesc(e){let n=e.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(e,n,r){for(let i=e;i;i=i.parentNode){let o=this.getDesc(i);if(o)return o.localPosFromDOM(e,n,r)}return-1}descAt(e){for(let n=0,r=0;n<this.children.length;n++){let i=this.children[n],o=r+i.size;if(r==e&&o!=r){for(;!i.border&&i.children.length;)for(let s=0;s<i.children.length;s++){let a=i.children[s];if(a.size){i=a;break}}return i}if(e<o)return i.descAt(e-r-i.border);r=o}}domFromPos(e,n){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let r=0,i=0;for(let o=0;r<this.children.length;r++){let s=this.children[r],a=o+s.size;if(a>e||s instanceof xE){i=e-o;break}o=a}if(i)return this.children[r].domFromPos(i-this.children[r].border,n);for(let o;r&&!(o=this.children[r-1]).size&&o instanceof PE&&o.side>=0;r--);if(n<=0){let o,s=!0;for(;o=r?this.children[r-1]:null,o&&o.dom.parentNode!=this.contentDOM;r--,s=!1);return o&&n&&s&&!o.border&&!o.domAtom?o.domFromPos(o.size,n):{node:this.contentDOM,offset:o?Ye(o.dom)+1:0}}{let o,s=!0;for(;o=r<this.children.length?this.children[r]:null,o&&o.dom.parentNode!=this.contentDOM;r++,s=!1);return o&&s&&!o.border&&!o.domAtom?o.domFromPos(0,n):{node:this.contentDOM,offset:o?Ye(o.dom):this.contentDOM.childNodes.length}}}parseRange(e,n,r=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:n,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let i=-1,o=-1;for(let s=r,a=0;;a++){let l=this.children[a],u=s+l.size;if(i==-1&&e<=u){let c=s+l.border;if(e>=c&&n<=u-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(e,n,c);e=s;for(let d=a;d>0;d--){let h=this.children[d-1];if(h.size&&h.dom.parentNode==this.contentDOM&&!h.emptyChildAt(1)){i=Ye(h.dom)+1;break}e-=h.size}i==-1&&(i=0)}if(i>-1&&(u>n||a==this.children.length-1)){n=u;for(let c=a+1;c<this.children.length;c++){let d=this.children[c];if(d.size&&d.dom.parentNode==this.contentDOM&&!d.emptyChildAt(-1)){o=Ye(d.dom);break}n+=d.size}o==-1&&(o=this.contentDOM.childNodes.length);break}s=u}return{node:this.contentDOM,from:e,to:n,fromOffset:i,toOffset:o}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let n=this.children[e<0?0:this.children.length-1];return n.size==0||n.emptyChildAt(e)}domAfterPos(e){let{node:n,offset:r}=this.domFromPos(e,0);if(n.nodeType!=1||r==n.childNodes.length)throw new RangeError("No node after pos "+e);return n.childNodes[r]}setSelection(e,n,r,i=!1){let o=Math.min(e,n),s=Math.max(e,n);for(let p=0,m=0;p<this.children.length;p++){let _=this.children[p],E=m+_.size;if(o>m&&s<E)return _.setSelection(e-m-_.border,n-m-_.border,r,i);m=E}let a=this.domFromPos(e,e?-1:1),l=n==e?a:this.domFromPos(n,n?-1:1),u=r.root.getSelection(),c=r.domSelectionRange(),d=!1;if((kt||Ge)&&e==n){let{node:p,offset:m}=a;if(p.nodeType==3){if(d=!(!m||p.nodeValue[m-1]!=`
12
+ `),d&&m==p.nodeValue.length)for(let _,E=p;E;E=E.parentNode){if(_=E.nextSibling){_.nodeName=="BR"&&(a=l={node:_.parentNode,offset:Ye(_)+1});break}let A=E.pmViewDesc;if(A&&A.node&&A.node.isBlock)break}}else{let _=p.childNodes[m-1];d=_&&(_.nodeName=="BR"||_.contentEditable=="false")}}if(kt&&c.focusNode&&c.focusNode!=l.node&&c.focusNode.nodeType==1){let p=c.focusNode.childNodes[c.focusOffset];p&&p.contentEditable=="false"&&(i=!0)}if(!(i||d&&Ge)&&pr(a.node,a.offset,c.anchorNode,c.anchorOffset)&&pr(l.node,l.offset,c.focusNode,c.focusOffset))return;let h=!1;if((u.extend||e==n)&&(!d||!kt)){u.collapse(a.node,a.offset);try{e!=n&&u.extend(l.node,l.offset),h=!0}catch(p){}}if(!h){if(e>n){let m=a;a=l,l=m}let p=document.createRange();p.setEnd(l.node,l.offset),p.setStart(a.node,a.offset),u.removeAllRanges(),u.addRange(p)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,n){for(let r=0,i=0;i<this.children.length;i++){let o=this.children[i],s=r+o.size;if(r==s?e<=s&&n>=r:e<s&&n>r){let a=r+o.border,l=s-o.border;if(e>=a&&n<=l)return this.dirty=e==r||n==s?2:1,void(e!=a||n!=l||!o.contentLost&&o.dom.parentNode==this.contentDOM?o.markDirty(e-a,n-a):o.dirty=3);o.dirty=o.dom!=o.contentDOM||o.dom.parentNode!=this.contentDOM||o.children.length?3:2}r=s}this.dirty=2}markParentsDirty(){let e=1;for(let n=this.parent;n;n=n.parent,e++){let r=e==1?2:1;n.dirty<r&&(n.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(e){return!1}}class PE extends mo{constructor(e,n,r,i){let o,s=n.type.toDOM;if(typeof s=="function"&&(s=s(r,()=>o?o.parent?o.parent.posBeforeChild(o):void 0:i)),!n.type.spec.raw){if(s.nodeType!=1){let a=document.createElement("span");a.appendChild(s),s=a}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(e,[],s,null),this.widget=n,this.widget=n,o=this}matchesWidget(e){return this.dirty==0&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let n=this.widget.spec.stopEvent;return!!n&&n(e)}ignoreMutation(e){return e.type!="selection"||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}}class US extends mo{constructor(e,n,r,i){super(e,[],n,null),this.textDOM=r,this.text=i}get size(){return this.text.length}localPosFromDOM(e,n){return e!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class ar extends mo{constructor(e,n,r,i,o){super(e,[],r,i),this.mark=n,this.spec=o}static create(e,n,r,i){let o=i.nodeViews[n.type.name],s=o&&o(n,i,r);return s&&s.dom||(s=ci.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new ar(e,n,s.dom,s.contentDOM||s.dom,s)}parseRule(){return 3&this.dirty||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=3&&this.mark.eq(e)}markDirty(e,n){if(super.markDirty(e,n),this.dirty!=0){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=0}}slice(e,n,r){let i=ar.create(this.parent,this.mark,!0,r),o=this.children,s=this.size;n<s&&(o=zl(o,n,s,r)),e>0&&(o=zl(o,0,e,r));for(let a=0;a<o.length;a++)o[a].parent=i;return i.children=o,i}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class xn extends mo{constructor(e,n,r,i,o,s,a,l,u){super(e,[],o,s),this.node=n,this.outerDeco=r,this.innerDeco=i,this.nodeDOM=a}static create(e,n,r,i,o,s){let a,l=o.nodeViews[n.type.name],u=l&&l(n,o,()=>a?a.parent?a.parent.posBeforeChild(a):void 0:s,r,i),c=u&&u.dom,d=u&&u.contentDOM;if(n.isText)if(c){if(c.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else c=document.createTextNode(n.text);else c||({dom:c,contentDOM:d}=ci.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));d||n.isText||c.nodeName=="BR"||(c.hasAttribute("contenteditable")||(c.contentEditable="false"),n.type.spec.draggable&&(c.draggable=!0));let h=c;return c=UE(c,r,n),u?a=new BS(e,n,r,i,c,d||null,h,u,o,s+1):n.isText?new Js(e,n,r,i,c,h,o):new xn(e,n,r,i,c,d||null,h,o,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(e.preserveWhitespace="full"),this.contentDOM)if(this.contentLost){for(let n=this.children.length-1;n>=0;n--){let r=this.children[n];if(this.dom.contains(r.dom.parentNode)){e.contentElement=r.dom.parentNode;break}}e.contentElement||(e.getContent=()=>j.empty)}else e.contentElement=this.contentDOM;else e.getContent=()=>this.node.content;return e}matchesNode(e,n,r){return this.dirty==0&&e.eq(this.node)&&ms(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,n){let r=this.node.inlineContent,i=n,o=e.composing?this.localCompositionInfo(e,n):null,s=o&&o.pos>-1?o:null,a=o&&o.pos<0,l=new VS(this,s&&s.node,e);(function(u,c,d,h){let p=c.locals(u),m=0;if(p.length==0){for(let g=0;g<u.childCount;g++){let S=u.child(g);h(S,p,c.forChild(m,S),g),m+=S.nodeSize}return}let _=0,E=[],A=null;for(let g=0;;){let S,O,D,I;for(;_<p.length&&p[_].to==m;){let v=p[_++];v.widget&&(S?(O||(O=[S])).push(v):S=v)}if(S)if(O){O.sort(zS);for(let v=0;v<O.length;v++)d(O[v],g,!!A)}else d(S,g,!!A);if(A)I=-1,D=A,A=null;else{if(!(g<u.childCount))break;I=g,D=u.child(g++)}for(let v=0;v<E.length;v++)E[v].to<=m&&E.splice(v--,1);for(;_<p.length&&p[_].from<=m&&p[_].to>m;)E.push(p[_++]);let R=m+D.nodeSize;if(D.isText){let v=R;_<p.length&&p[_].from<v&&(v=p[_].from);for(let T=0;T<E.length;T++)E[T].to<v&&(v=E[T].to);v<R&&(A=D.cut(v-m),D=D.cut(0,v-m),R=v,I=-1)}else for(;_<p.length&&p[_].to<R;)_++;let y=D.isInline&&!D.isLeaf?E.filter(v=>!v.inline):E.slice();h(D,y,c.forChild(m,D),I),m=R}})(this.node,this.innerDeco,(u,c,d)=>{u.spec.marks?l.syncToMarks(u.spec.marks,r,e,c):u.type.side>=0&&!d&&l.syncToMarks(c==this.node.childCount?fe.none:this.node.child(c).marks,r,e,c),l.placeWidget(u,e,i)},(u,c,d,h)=>{let p;l.syncToMarks(u.marks,r,e,h),l.findNodeMatch(u,c,d,h)||a&&e.state.selection.from>i&&e.state.selection.to<i+u.nodeSize&&(p=l.findIndexWithChild(o.node))>-1&&l.updateNodeAt(u,c,d,p,e)||l.updateNextNode(u,c,d,e,h,i)||l.addNode(u,c,d,e,i),i+=u.nodeSize}),l.syncToMarks([],r,e,0),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==2)&&(s&&this.protectLocalComposition(e,s),FE(this.contentDOM,this.children,e),ni&&(function(u){if(u.nodeName=="UL"||u.nodeName=="OL"){let c=u.style.cssText;u.style.cssText=c+"; list-style: square !important",window.getComputedStyle(u).listStyle,u.style.cssText=c}})(this.dom))}localCompositionInfo(e,n){let{from:r,to:i}=e.state.selection;if(!(e.state.selection instanceof de)||r<n||i>n+this.node.content.size)return null;let o=e.input.compositionNode;if(!o||!this.dom.contains(o.parentNode))return null;if(this.node.inlineContent){let s=o.nodeValue,a=(function(l,u,c,d){for(let h=0,p=0;h<l.childCount&&p<=d;){let m=l.child(h++),_=p;if(p+=m.nodeSize,!m.isText)continue;let E=m.text;for(;h<l.childCount;){let A=l.child(h++);if(p+=A.nodeSize,!A.isText)break;E+=A.text}if(p>=c){if(p>=d&&E.slice(d-u.length-_,d-_)==u)return d-u.length;let A=_<d?E.lastIndexOf(u,d-_-1):-1;if(A>=0&&A+u.length+_>=c)return _+A;if(c==d&&E.length>=d+u.length-_&&E.slice(d-_,d-_+u.length)==u)return d}}return-1})(this.node.content,s,r-n,i-n);return a<0?null:{node:o,pos:a,text:s}}return{node:o,pos:-1,text:""}}protectLocalComposition(e,{node:n,pos:r,text:i}){if(this.getDesc(n))return;let o=n;for(;o.parentNode!=this.contentDOM;o=o.parentNode){for(;o.previousSibling;)o.parentNode.removeChild(o.previousSibling);for(;o.nextSibling;)o.parentNode.removeChild(o.nextSibling);o.pmViewDesc&&(o.pmViewDesc=void 0)}let s=new US(this,o,n,i);e.input.compositionNodes.push(s),this.children=zl(this.children,r,r+i.length,e,s)}update(e,n,r,i){return!(this.dirty==3||!e.sameMarkup(this.node))&&(this.updateInner(e,n,r,i),!0)}updateInner(e,n,r,i){this.updateOuterDeco(n),this.node=e,this.innerDeco=r,this.contentDOM&&this.updateChildren(i,this.posAtStart),this.dirty=0}updateOuterDeco(e){if(ms(e,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=HE(this.dom,this.nodeDOM,Vl(this.outerDeco,this.node,n),Vl(e,this.node,n)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.nodeDOM.draggable=!0))}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function gh(t,e,n,r,i){UE(r,e,t);let o=new xn(void 0,t,e,n,r,r,r,i,0);return o.contentDOM&&o.updateChildren(i,0),o}class Js extends xn{constructor(e,n,r,i,o,s,a){super(e,n,r,i,o,null,s,a,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,n,r,i){return!(this.dirty==3||this.dirty!=0&&!this.inParent()||!e.sameMarkup(this.node))&&(this.updateOuterDeco(n),this.dirty==0&&e.text==this.node.text||e.text==this.nodeDOM.nodeValue||(this.nodeDOM.nodeValue=e.text,i.trackWrites==this.nodeDOM&&(i.trackWrites=null)),this.node=e,this.dirty=0,!0)}inParent(){let e=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,n,r){return e==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(e,n,r)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,n,r){let i=this.node.cut(e,n),o=document.createTextNode(i.text);return new Js(this.parent,i,this.outerDeco,this.innerDeco,o,o,r)}markDirty(e,n){super.markDirty(e,n),this.dom==this.nodeDOM||e!=0&&n!=this.nodeDOM.nodeValue.length||(this.dirty=3)}get domAtom(){return!1}isText(e){return this.node.text==e}}class xE extends mo{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==0&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class BS extends xn{constructor(e,n,r,i,o,s,a,l,u,c){super(e,n,r,i,o,s,a,u,c),this.spec=l}update(e,n,r,i){if(this.dirty==3)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let o=this.spec.update(e,n,r);return o&&this.updateInner(e,n,r,i),o}return!(!this.contentDOM&&!e.isLeaf)&&super.update(e,n,r,i)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,n,r,i){this.spec.setSelection?this.spec.setSelection(e,n,r.root):super.setSelection(e,n,r,i)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return!!this.spec.stopEvent&&this.spec.stopEvent(e)}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function FE(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=Sh(r),i=!0;r=r.nextSibling}else i=!0,t.insertBefore(a,r);if(s instanceof ar){let l=r?r.previousSibling:t.lastChild;FE(s.contentDOM,s.children,n),r=l?l.nextSibling:t.firstChild}}for(;r;)r=Sh(r),i=!0;i&&n.trackWrites==t&&(n.trackWrites=null)}const Li=function(t){t&&(this.nodeName=t)};Li.prototype=Object.create(null);const tr=[new Li];function Vl(t,e,n){if(t.length==0)return tr;let r=n?tr[0]:new Li,i=[r];for(let o=0;o<t.length;o++){let s=t[o].type.attrs;if(s){s.nodeName&&i.push(r=new Li(s.nodeName));for(let a in s){let l=s[a];l!=null&&(n&&i.length==1&&i.push(r=new Li(e.isInline?"span":"div")),a=="class"?r.class=(r.class?r.class+" ":"")+l:a=="style"?r.style=(r.style?r.style+";":"")+l:a!="nodeName"&&(r[a]=l))}}}return i}function HE(t,e,n,r){if(n==tr&&r==tr)return e;let i=e;for(let o=0;o<r.length;o++){let s=r[o],a=n[o];if(o){let l;a&&a.nodeName==s.nodeName&&i!=t&&(l=i.parentNode)&&l.nodeName.toLowerCase()==s.nodeName||(l=document.createElement(s.nodeName),l.pmIsDeco=!0,l.appendChild(i),a=tr[0]),i=l}jS(i,a||tr[0],s)}return i}function jS(t,e,n){for(let r in e)r=="class"||r=="style"||r=="nodeName"||r in n||t.removeAttribute(r);for(let r in n)r!="class"&&r!="style"&&r!="nodeName"&&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 o=0;o<r.length;o++)i.indexOf(r[o])==-1&&t.classList.remove(r[o]);for(let o=0;o<i.length;o++)r.indexOf(i[o])==-1&&t.classList.add(i[o]);t.classList.length==0&&t.removeAttribute("class")}if(e.style!=n.style){if(e.style){let r,i=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g;for(;r=i.exec(e.style);)t.style.removeProperty(r[1])}n.style&&(t.style.cssText+=n.style)}}function UE(t,e,n){return HE(t,t,tr,Vl(e,n,t.nodeType!=1))}function ms(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 Sh(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class VS{constructor(e,n,r){this.lock=n,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=(function(i,o){let s=o,a=s.children.length,l=i.childCount,u=new Map,c=[];e:for(;l>0;){let d;for(;;)if(a){let p=s.children[a-1];if(!(p instanceof ar)){d=p,a--;break}s=p,a=p.children.length}else{if(s==o)break e;a=s.parent.children.indexOf(s),s=s.parent}let h=d.node;if(h){if(h!=i.child(l-1))break;--l,u.set(d,l),c.push(d)}}return{index:l,matched:u,matches:c.reverse()}})(e.node.content,e)}destroyBetween(e,n){if(e!=n){for(let r=e;r<n;r++)this.top.children[r].destroy();this.top.children.splice(e,n-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,n,r,i){let o=0,s=this.stack.length>>1,a=Math.min(s,e.length);for(;o<a&&(o==s-1?this.top:this.stack[o+1<<1]).matchesMark(e[o])&&e[o].type.spec.spanning!==!1;)o++;for(;o<s;)this.destroyRest(),this.top.dirty=0,this.index=this.stack.pop(),this.top=this.stack.pop(),s--;for(;s<e.length;){this.stack.push(this.top,this.index+1);let l=-1,u=this.top.children.length;i<this.preMatch.index&&(u=Math.min(this.index+3,u));for(let c=this.index;c<u;c++){let d=this.top.children[c];if(d.matchesMark(e[s])&&!this.isLocked(d.dom)){l=c;break}}if(l>-1)l>this.index&&(this.changed=!0,this.destroyBetween(this.index,l)),this.top=this.top.children[this.index];else{let c=ar.create(this.top,e[s],n,r);this.top.children.splice(this.index,0,c),this.top=c,this.changed=!0}this.index=0,s++}}findNodeMatch(e,n,r,i){let o,s=-1;if(i>=this.preMatch.index&&(o=this.preMatch.matches[i-this.preMatch.index]).parent==this.top&&o.matchesNode(e,n,r))s=this.top.children.indexOf(o,this.index);else for(let a=this.index,l=Math.min(this.top.children.length,a+5);a<l;a++){let u=this.top.children[a];if(u.matchesNode(e,n,r)&&!this.preMatch.matched.has(u)){s=a;break}}return!(s<0)&&(this.destroyBetween(this.index,s),this.index++,!0)}updateNodeAt(e,n,r,i,o){let s=this.top.children[i];return s.dirty==3&&s.dom==s.contentDOM&&(s.dirty=2),!!s.update(e,n,r,o)&&(this.destroyBetween(this.index,i),this.index++,!0)}findIndexWithChild(e){for(;;){let n=e.parentNode;if(!n)return-1;if(n==this.top.contentDOM){let r=e.pmViewDesc;if(r){for(let i=this.index;i<this.top.children.length;i++)if(this.top.children[i]==r)return i}return-1}e=n}}updateNextNode(e,n,r,i,o,s){for(let a=this.index;a<this.top.children.length;a++){let l=this.top.children[a];if(l instanceof xn){let u=this.preMatch.matched.get(l);if(u!=null&&u!=o)return!1;let c,d=l.dom,h=this.isLocked(d)&&!(e.isText&&l.node&&l.node.isText&&l.nodeDOM.nodeValue==e.text&&l.dirty!=3&&ms(n,l.outerDeco));if(!h&&l.update(e,n,r,i))return this.destroyBetween(this.index,a),l.dom!=d&&(this.changed=!0),this.index++,!0;if(!h&&(c=this.recreateWrapper(l,e,n,r,i,s)))return this.destroyBetween(this.index,a),this.top.children[this.index]=c,c.contentDOM&&(c.dirty=2,c.updateChildren(i,s+1),c.dirty=0),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,n,r,i,o,s){if(e.dirty||n.isAtom||!e.children.length||!e.node.content.eq(n.content)||!ms(r,e.outerDeco)||!i.eq(e.innerDeco))return null;let a=xn.create(this.top,n,r,i,o,s);if(a.contentDOM){a.children=e.children,e.children=[];for(let l of a.children)l.parent=a}return e.destroy(),a}addNode(e,n,r,i,o){let s=xn.create(this.top,e,n,r,i,o);s.contentDOM&&s.updateChildren(i,o+1),this.top.children.splice(this.index++,0,s),this.changed=!0}placeWidget(e,n,r){let i=this.index<this.top.children.length?this.top.children[this.index]:null;if(!i||!i.matchesWidget(e)||e!=i.widget&&i.widget.type.toDOM.parentNode){let o=new PE(this.top,e,n,r);this.top.children.splice(this.index++,0,o),this.changed=!0}else this.index++}addTextblockHacks(){let e=this.top.children[this.index-1],n=this.top;for(;e instanceof ar;)n=e,e=n.children[n.children.length-1];(!e||!(e instanceof Js)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((Ge||Ue)&&e&&e.dom.contentEditable=="false"&&this.addHackNode("IMG",n),this.addHackNode("BR",this.top))}addHackNode(e,n){if(n==this.top&&this.index<n.children.length&&n.children[this.index].matchesHack(e))this.index++;else{let r=document.createElement(e);e=="IMG"&&(r.className="ProseMirror-separator",r.alt=""),e=="BR"&&(r.className="ProseMirror-trailingBreak");let i=new xE(this.top,[],r,null);n!=this.top?n.children.push(i):n.children.splice(this.index++,0,i),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}}function zS(t,e){return t.type.side-e.type.side}function zl(t,e,n,r,i){let o=[];for(let s=0,a=0;s<t.length;s++){let l=t[s],u=a,c=a+=l.size;u>=n||c<=e?o.push(l):(u<e&&o.push(l.slice(0,e-u,r)),i&&(o.push(i),i=void 0),c>n&&o.push(l.slice(n-u,l.size,r)))}return o}function Wc(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&&i.size==0,s=t.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let a,l,u=r.resolve(s);if(qs(n)){for(a=s;i&&!i.node;)i=i.parent;let d=i.node;if(i&&d.isAtom&&Q.isSelectable(d)&&i.parent&&(!d.isInline||!(function(h,p,m){for(let _=p==0,E=p==Nt(h);_||E;){if(h==m)return!0;let A=Ye(h);if(!(h=h.parentNode))return!1;_=_&&A==0,E=E&&A==Nt(h)}})(n.focusNode,n.focusOffset,i.dom))){let h=i.posBefore;l=new Q(s==h?u:r.resolve(h))}}else{if(n instanceof t.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let d=s,h=s;for(let p=0;p<n.rangeCount;p++){let m=n.getRangeAt(p);d=Math.min(d,t.docView.posFromDOM(m.startContainer,m.startOffset,1)),h=Math.max(h,t.docView.posFromDOM(m.endContainer,m.endOffset,-1))}if(d<0)return null;[a,s]=h==t.state.selection.anchor?[h,d]:[d,h],u=r.resolve(s)}else a=t.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(a<0)return null}let c=r.resolve(a);return l||(l=Xc(t,c,u,e=="pointer"||t.state.selection.head<u.pos&&!o?1:-1)),l}function Oh(t){return t.editable?t.hasFocus():jE(t)&&document.activeElement&&document.activeElement.contains(t.dom)}function _n(t,e=!1){let n=t.state.selection;if(BE(t,n),Oh(t)){if(!e&&t.input.mouseDown&&t.input.mouseDown.allowDefault&&Ue){let r=t.domSelectionRange(),i=t.domObserver.currentSelection;if(r.anchorNode&&i.anchorNode&&pr(r.anchorNode,r.anchorOffset,i.anchorNode,i.anchorOffset))return t.input.mouseDown.delayedSelectionSync=!0,void t.domObserver.setCurSelection()}if(t.domObserver.disconnectSelection(),t.cursorWrapper)(function(r){let i=r.domSelection();if(!i)return;let o=r.cursorWrapper.dom,s=o.nodeName=="IMG";s?i.collapse(o.parentNode,Ye(o)+1):i.collapse(o,0),!s&&!r.state.selection.visible&&Et&&Pn<=11&&(o.disabled=!0,o.disabled=!1)})(t);else{let r,i,{anchor:o,head:s}=n;!vh||n instanceof de||(n.$from.parent.inlineContent||(r=Dh(t,n.from)),n.empty||n.$from.parent.inlineContent||(i=Dh(t,n.to))),t.docView.setSelection(o,s,t,e),vh&&(r&&Th(r),i&&Th(i)),n.visible?t.dom.classList.remove("ProseMirror-hideselection"):(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&(function(a){let l=a.dom.ownerDocument;l.removeEventListener("selectionchange",a.input.hideSelectionGuard);let u=a.domSelectionRange(),c=u.anchorNode,d=u.anchorOffset;l.addEventListener("selectionchange",a.input.hideSelectionGuard=()=>{u.anchorNode==c&&u.anchorOffset==d||(l.removeEventListener("selectionchange",a.input.hideSelectionGuard),setTimeout(()=>{Oh(a)&&!a.state.selection.visible||a.dom.classList.remove("ProseMirror-hideselection")},20))})})(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}const vh=Ge||Ue&&bE<63;function Dh(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(Ge&&i&&i.contentEditable=="false")return Ha(i);if(!(i&&i.contentEditable!="false"||o&&o.contentEditable!="false")){if(i)return Ha(i);if(o)return Ha(o)}}function Ha(t){return t.contentEditable="true",Ge&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function Th(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function BE(t,e){if(e instanceof Q){let n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(Rh(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else Rh(t)}function Rh(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function Xc(t,e,n,r){return t.someProp("createSelectionBetween",i=>i(t,e,n))||de.between(e,n,r)}function Ih(t){return!(t.editable&&!t.hasFocus())&&jE(t)}function jE(t){let e=t.domSelectionRange();if(!e.anchorNode)return!1;try{return t.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(t.editable||t.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch(n){return!1}}function $l(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&&pe.findFrom(o,e)}function Rn(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function yh(t,e,n){let r=t.state.selection;if(!(r instanceof de)){if(r instanceof Q&&r.node.isInline)return Rn(t,new de(e>0?r.$to:r.$from));{let i=$l(t.state,e);return!!i&&Rn(t,i)}}if(n.indexOf("s")>-1){let{$head:i}=r,o=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter;if(!o||o.isText||!o.isLeaf)return!1;let s=t.state.doc.resolve(i.pos+o.nodeSize*(e<0?-1:1));return Rn(t,new de(r.$anchor,s))}if(!r.empty)return!1;if(t.endOfTextblock(e>0?"forward":"backward")){let i=$l(t.state,e);return!!(i&&i instanceof Q)&&Rn(t,i)}if(!(yt&&n.indexOf("m")>-1)){let i,o=r.$head,s=o.textOffset?null:e<0?o.nodeBefore:o.nodeAfter;if(!s||s.isText)return!1;let a=e<0?o.pos-s.nodeSize:o.pos;return!!(s.isAtom||(i=t.docView.descAt(a))&&!i.contentDOM)&&(Q.isSelectable(s)?Rn(t,new Q(e<0?t.state.doc.resolve(o.pos-s.nodeSize):o)):!!fo&&Rn(t,new de(t.state.doc.resolve(e<0?a:a+s.nodeSize))))}}function ko(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function Ai(t,e){let n=t.pmViewDesc;return n&&n.size==0&&(e<0||t.nextSibling||t.nodeName!="BR")}function br(t,e){return e<0?(function(n){let r=n.domSelectionRange(),i=r.focusNode,o=r.focusOffset;if(!i)return;let s,a,l=!1;for(kt&&i.nodeType==1&&o<ko(i)&&Ai(i.childNodes[o],-1)&&(l=!0);;)if(o>0){if(i.nodeType!=1)break;{let u=i.childNodes[o-1];if(Ai(u,-1))s=i,a=--o;else{if(u.nodeType!=3)break;i=u,o=i.nodeValue.length}}}else{if(Ch(i))break;{let u=i.previousSibling;for(;u&&Ai(u,-1);)s=i.parentNode,a=Ye(u),u=u.previousSibling;if(u)i=u,o=ko(i);else{if(i=i.parentNode,i==n.dom)break;o=0}}}l?Ua(n,i,o):s&&Ua(n,s,a)})(t):(function(n){let r=n.domSelectionRange(),i=r.focusNode,o=r.focusOffset;if(!i)return;let s,a,l=ko(i);for(;;)if(o<l){if(i.nodeType!=1||!Ai(i.childNodes[o],1))break;s=i,a=++o}else{if(Ch(i))break;{let u=i.nextSibling;for(;u&&Ai(u,1);)s=u.parentNode,a=Ye(u)+1,u=u.nextSibling;if(u)i=u,o=0,l=ko(i);else{if(i=i.parentNode,i==n.dom)break;o=l=0}}}s&&Ua(n,s,a)})(t)}function Ch(t){let e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function Ua(t,e,n){if(e.nodeType!=3){let o,s;(s=(function(a,l){for(;a&&l==a.childNodes.length&&!qi(a);)l=Ye(a)+1,a=a.parentNode;for(;a&&l<a.childNodes.length;){let u=a.childNodes[l];if(u.nodeType==3)return u;if(u.nodeType==1&&u.contentEditable=="false")break;a=u,l=0}})(e,n))?(e=s,n=0):(o=(function(a,l){for(;a&&!l&&!qi(a);)l=Ye(a),a=a.parentNode;for(;a&&l;){let u=a.childNodes[l-1];if(u.nodeType==3)return u;if(u.nodeType==1&&u.contentEditable=="false")break;l=(a=u).childNodes.length}})(e,n))&&(e=o,n=o.nodeValue.length)}let r=t.domSelection();if(!r)return;if(qs(r)){let o=document.createRange();o.setEnd(e,n),o.setStart(e,n),r.removeAllRanges(),r.addRange(o)}else r.extend&&r.extend(e,n);t.domObserver.setCurSelection();let{state:i}=t;setTimeout(()=>{t.state==i&&_n(t)},50)}function Nh(t,e){let n=t.state.doc.resolve(e);if(!Ue&&!wE&&n.parent.inlineContent){let r=t.coordsAtPos(e);if(e>n.start()){let i=t.coordsAtPos(e-1),o=(i.top+i.bottom)/2;if(o>r.top&&o<r.bottom&&Math.abs(i.left-r.left)>1)return i.left<r.left?"ltr":"rtl"}if(e<n.end()){let i=t.coordsAtPos(e+1),o=(i.top+i.bottom)/2;if(o>r.top&&o<r.bottom&&Math.abs(i.left-r.left)>1)return i.left>r.left?"ltr":"rtl"}}return getComputedStyle(t.dom).direction=="rtl"?"rtl":"ltr"}function bh(t,e,n){let r=t.state.selection;if(r instanceof de&&!r.empty||n.indexOf("s")>-1||yt&&n.indexOf("m")>-1)return!1;let{$from:i,$to:o}=r;if(!i.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let s=$l(t.state,e);if(s&&s instanceof Q)return Rn(t,s)}if(!i.parent.inlineContent){let s=e<0?i:o,a=r instanceof Rt?pe.near(s,e):pe.findFrom(s,e);return!!a&&Rn(t,a)}return!1}function wh(t,e){if(!(t.state.selection instanceof de))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 s=t.state.tr;return e<0?s.delete(n.pos-o.nodeSize,n.pos):s.delete(n.pos,n.pos+o.nodeSize),t.dispatch(s),!0}return!1}function Lh(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function $S(t,e){let n=e.keyCode,r=(function(i){let o="";return i.ctrlKey&&(o+="c"),i.metaKey&&(o+="m"),i.altKey&&(o+="a"),i.shiftKey&&(o+="s"),o})(e);if(n==8||yt&&n==72&&r=="c")return wh(t,-1)||br(t,-1);if(n==46&&!e.shiftKey||yt&&n==68&&r=="c")return wh(t,1)||br(t,1);if(n==13||n==27)return!0;if(n==37||yt&&n==66&&r=="c"){let i=n==37?Nh(t,t.state.selection.from)=="ltr"?-1:1:-1;return yh(t,i,r)||br(t,i)}if(n==39||yt&&n==70&&r=="c"){let i=n==39?Nh(t,t.state.selection.from)=="ltr"?1:-1:1;return yh(t,i,r)||br(t,i)}return n==38||yt&&n==80&&r=="c"?bh(t,-1,r)||br(t,-1):n==40||yt&&n==78&&r=="c"?(function(i){if(!Ge||i.state.selection.$head.parentOffset>0)return!1;let{focusNode:o,focusOffset:s}=i.domSelectionRange();if(o&&o.nodeType==1&&s==0&&o.firstChild&&o.firstChild.contentEditable=="false"){let a=o.firstChild;Lh(i,a,"true"),setTimeout(()=>Lh(i,a,"false"),20)}return!1})(t)||bh(t,1,r)||br(t,1):r==(yt?"m":"c")&&(n==66||n==73||n==89||n==90)}function Kc(t,e){t.someProp("transformCopied",p=>{e=p(e,t)});let n=[],{content:r,openStart:i,openEnd:o}=e;for(;i>1&&o>1&&r.childCount==1&&r.firstChild.childCount==1;){i--,o--;let p=r.firstChild;n.push(p.type.name,p.attrs!=p.type.defaultAttrs?p.attrs:null),r=p.content}let s=t.someProp("clipboardSerializer")||ci.fromSchema(t.state.schema),a=WE(),l=a.createElement("div");l.appendChild(s.serializeFragment(r,{document:a}));let u,c=l.firstChild,d=0;for(;c&&c.nodeType==1&&(u=GE[c.nodeName.toLowerCase()]);){for(let p=u.length-1;p>=0;p--){let m=a.createElement(u[p]);for(;l.firstChild;)m.appendChild(l.firstChild);l.appendChild(m),d++}c=l.firstChild}c&&c.nodeType==1&&c.setAttribute("data-pm-slice",`${i} ${o}${d?` -${d}`:""} ${JSON.stringify(n)}`);let h=t.someProp("clipboardTextSerializer",p=>p(e,t))||e.content.textBetween(0,e.content.size,`
13
13
 
14
14
  `);return{dom:l,text:h,slice:e}}function VE(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",h=>{e=h(e,a||r,t)}),a)return s=new G(j.from(t.state.schema.text(e.replace(/\r\n?/g,`
15
- `))),0,0),t.someProp("transformPasted",h=>{s=h(s,t,!0)}),s;let d=t.someProp("clipboardTextParser",h=>h(e,i,r,t));if(d)s=d;else{let h=i.marks(),{schema:p}=t.state,m=ci.fromSchema(p);o=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(_=>{let E=o.appendChild(document.createElement("p"));_&&E.appendChild(m.serializeNode(p.text(_,h)))})}}else t.someProp("transformPastedHTML",d=>{n=d(n,t)}),o=(function(d){let h=/^(\s*<meta [^>]*>)*/.exec(d);h&&(d=d.slice(h[0].length));let p,m=WE().createElement("div"),_=/<([a-z][^>\s]+)/i.exec(d);if((p=_&&GE[_[1].toLowerCase()])&&(d=p.map(E=>"<"+E+">").join("")+d+p.map(E=>"</"+E+">").reverse().join("")),m.innerHTML=(function(E){let g=window.trustedTypes;return g?(Ba||(Ba=g.defaultPolicy||g.createPolicy("ProseMirrorClipboard",{createHTML:A=>A})),Ba.createHTML(E)):E})(d),p)for(let E=0;E<p.length;E++)m=m.querySelector(p[E])||m;return m})(n),fo&&(function(d){let h=d.querySelectorAll(Ue?"span:not([class]):not([style])":"span.Apple-converted-space");for(let p=0;p<h.length;p++){let m=h[p];m.childNodes.length==1&&m.textContent==" "&&m.parentNode&&m.parentNode.replaceChild(d.ownerDocument.createTextNode(" "),m)}})(o);let u=o&&o.querySelector("[data-pm-slice]"),c=u&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(u.getAttribute("data-pm-slice")||"");if(c&&c[3])for(let d=+c[3];d>0;d--){let h=o.firstChild;for(;h&&h.nodeType!=1;)h=h.nextSibling;if(!h)break;o=h}if(s||(s=(t.someProp("clipboardParser")||t.someProp("domParser")||Wi.fromSchema(t.state.schema)).parseSlice(o,{preserveWhitespace:!(!l&&!c),context:i,ruleFromNode:h=>h.nodeName!="BR"||h.nextSibling||!h.parentNode||YS.test(h.parentNode.nodeName)?null:{ignore:!0}})),c)s=(function(d,h){if(!d.size)return d;let p,m=d.content.firstChild.type.schema;try{p=JSON.parse(h)}catch(A){return d}let{content:_,openStart:E,openEnd:g}=d;for(let A=p.length-2;A>=0;A-=2){let S=m.nodes[p[A]];if(!S||S.hasRequiredAttrs())break;_=j.from(S.create(p[A+1],_)),E++,g++}return new G(_,E,g)})(Lh(s,+c[1],+c[2]),c[4]);else if(s=G.maxOpen((function(d,h){if(d.childCount<2)return d;for(let p=h.depth;p>=0;p--){let m,_=h.node(p).contentMatchAt(h.index(p)),E=[];if(d.forEach(g=>{if(!E)return;let A,S=_.findWrapping(g.type);if(!S)return E=null;if(A=E.length&&m.length&&$E(S,m,g,E[E.length-1],0))E[E.length-1]=A;else{E.length&&(E[E.length-1]=YE(E[E.length-1],m.length));let v=zE(g,S);E.push(v),_=_.matchType(v.type),m=S}}),E)return j.from(E)}return d})(s.content,i),!0),s.openStart||s.openEnd){let d=0,h=0;for(let p=s.content.firstChild;d<s.openStart&&!p.type.spec.isolating;d++,p=p.firstChild);for(let p=s.content.lastChild;h<s.openEnd&&!p.type.spec.isolating;h++,p=p.lastChild);s=Lh(s,d,h)}return t.someProp("transformPasted",d=>{s=d(s,t,l)}),s}const YS=/^(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 zE(t,e,n=0){for(let r=e.length-1;r>=n;r--)t=e[r].create(null,j.from(t));return t}function $E(t,e,n,r,i){if(i<t.length&&i<e.length&&t[i]==e[i]){let o=$E(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(j.from(zE(n,t,i+1))))}}function YE(t,e){if(e==0)return t;let n=t.content.replaceChild(t.childCount-1,YE(t.lastChild,e-1)),r=t.contentMatchAt(t.childCount).fillBefore(j.empty,!0);return t.copy(n.append(r))}function Yl(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=Yl(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(j.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,s.copy(a))}function Lh(t,e,n){return e<t.openStart&&(t=new G(Yl(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new G(Yl(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}const GE={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 Mh=null;function WE(){return Mh||(Mh=document.implementation.createHTMLDocument("title"))}let Ba=null;const lt={},ut={},GS={touchstart:!0,touchmove:!0};class WS{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 wn(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function ja(t){t.someProp("handleDOMEvents",e=>{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=r=>Gl(t,r))})}function Gl(t,e){return t.someProp("handleDOMEvents",n=>{let r=n[e.type];return!!r&&(r(t,e)||e.defaultPrevented)})}function XS(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||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(e))return!1;return!0}function Es(t){return{left:t.clientX,top:t.clientY}}function qc(t,e,n,r,i){if(r==-1)return!1;let o=t.state.doc.resolve(r);for(let s=o.depth+1;s>0;s--)if(t.someProp(e,a=>s>o.depth?a(t,n,o.nodeAfter,o.before(s),i,!0):a(t,n,o.node(s),o.before(s),i,!1)))return!0;return!1}function $r(t,e,n){if(t.focused||t.focus(),t.state.selection.eq(e))return;let r=t.state.tr.setSelection(e);r.setMeta("pointer",!0),t.dispatch(r)}function KS(t,e,n,r,i){return qc(t,"handleClickOn",e,n,r)||t.someProp("handleClick",o=>o(t,e,r))||(i?(function(o,s){if(s==-1)return!1;let a,l,u=o.state.selection;u instanceof Q&&(a=u.node);let c=o.state.doc.resolve(s);for(let d=c.depth+1;d>0;d--){let h=d>c.depth?c.nodeAfter:c.node(d);if(Q.isSelectable(h)){l=a&&u.$from.depth>0&&d>=u.$from.depth&&c.before(u.$from.depth+1)==u.$from.pos?c.before(u.$from.depth):c.before(d);break}}return l!=null&&($r(o,Q.create(o.state.doc,l)),!0)})(t,n):(function(o,s){if(s==-1)return!1;let a=o.state.doc.resolve(s),l=a.nodeAfter;return!!(l&&l.isAtom&&Q.isSelectable(l))&&($r(o,new Q(a)),!0)})(t,n))}function qS(t,e,n,r){return qc(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",i=>i(t,e,r))}function JS(t,e,n,r){return qc(t,"handleTripleClickOn",e,n,r)||t.someProp("handleTripleClick",i=>i(t,e,r))||(function(i,o,s){if(s.button!=0)return!1;let a=i.state.doc;if(o==-1)return!!a.inlineContent&&($r(i,de.create(a,0,a.content.size)),!0);let l=a.resolve(o);for(let u=l.depth+1;u>0;u--){let c=u>l.depth?l.nodeAfter:l.node(u),d=l.before(u);if(c.inlineContent)$r(i,de.create(a,d+1,d+1+c.content.size));else{if(!Q.isSelectable(c))continue;$r(i,Q.create(a,d))}return!0}})(t,n,r)}function Wl(t){return _s(t)}ut.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=n.keyCode==16||n.shiftKey,!Ph(t,n)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!pn||!Ue||n.keyCode!=13))if(n.keyCode!=229&&t.domObserver.forceFlush(),!ni||n.keyCode!=13||n.ctrlKey||n.altKey||n.metaKey)t.someProp("handleKeyDown",r=>r(t,n))||$S(t,n)?n.preventDefault():wn(t,"key");else{let r=Date.now();t.input.lastIOSEnter=r,t.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{t.input.lastIOSEnter==r&&(t.someProp("handleKeyDown",i=>i(t,Zn(13,"Enter"))),t.input.lastIOSEnter=0)},200)}},ut.keyup=(t,e)=>{e.keyCode==16&&(t.input.shiftKey=!1)},ut.keypress=(t,e)=>{let n=e;if(Ph(t,n)||!n.charCode||n.ctrlKey&&!n.altKey||It&&n.metaKey)return;if(t.someProp("handleKeyPress",i=>i(t,n)))return void n.preventDefault();let r=t.state.selection;if(!(r instanceof de&&r.$from.sameParent(r.$to))){let i=String.fromCharCode(n.charCode),o=()=>t.state.tr.insertText(i).scrollIntoView();/[\r\n]/.test(i)||t.someProp("handleTextInput",s=>s(t,r.$from.pos,r.$to.pos,i,o))||t.dispatch(o()),n.preventDefault()}};const XE=It?"metaKey":"ctrlKey";lt.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let r=Wl(t),i=Date.now(),o="singleClick";i-t.input.lastClick.time<500&&(function(a,l){let u=l.x-a.clientX,c=l.y-a.clientY;return u*u+c*c<100})(n,t.input.lastClick)&&!n[XE]&&t.input.lastClick.button==n.button&&(t.input.lastClick.type=="singleClick"?o="doubleClick":t.input.lastClick.type=="doubleClick"&&(o="tripleClick")),t.input.lastClick={time:i,x:n.clientX,y:n.clientY,type:o,button:n.button};let s=t.posAtCoords(Es(n));s&&(o=="singleClick"?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new ZS(t,s,n,!!r)):(o=="doubleClick"?qS:JS)(t,s.pos,s.inside,n)?n.preventDefault():wn(t,"pointer"))};class ZS{constructor(e,n,r,i){let o,s;if(this.view=e,this.pos=n,this.event=r,this.flushed=i,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!r[XE],this.allowDefault=r.shiftKey,n.inside>-1)o=e.state.doc.nodeAt(n.inside),s=n.inside;else{let c=e.state.doc.resolve(n.pos);o=c.parent,s=c.depth?c.before():0}const a=i?null:r.target,l=a?e.docView.nearestDesc(a,!0):null;this.target=l&&l.nodeDOM.nodeType==1?l.nodeDOM:null;let{selection:u}=e.state;(r.button==0&&o.type.spec.draggable&&o.type.spec.selectable!==!1||u instanceof Q&&u.from<=s&&u.to>s)&&(this.mightDrag={node:o,pos:s,addAttr:!(!this.target||this.target.draggable),setUneditable:!(!this.target||!Lt||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()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),wn(e,"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(()=>_n(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(Es(e))),this.updateAllowDefault(e),this.allowDefault||!n?wn(this.view,"pointer"):KS(this.view,n.pos,n.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||Ge&&this.mightDrag&&!this.mightDrag.node.isAtom||Ue&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?($r(this.view,pe.near(this.view.state.doc.resolve(n.pos))),e.preventDefault()):wn(this.view,"pointer")}move(e){this.updateAllowDefault(e),wn(this.view,"pointer"),e.buttons==0&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}function Ph(t,e){return!!t.composing||!!(Ge&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500)&&(t.input.compositionEndedAt=-2e8,!0)}lt.touchstart=t=>{t.input.lastTouch=Date.now(),Wl(t),wn(t,"pointer")},lt.touchmove=t=>{t.input.lastTouch=Date.now(),wn(t,"pointer")},lt.contextmenu=t=>Wl(t);const QS=pn?5e3:-1;function xh(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>_s(t),e))}function KE(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=(function(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp})());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function ev(t){let e=t.domSelectionRange();if(!e.focusNode)return null;let n=(function(i,o){for(;;){if(i.nodeType==3&&o)return i;if(i.nodeType==1&&o>0){if(i.contentEditable=="false")return null;o=Nt(i=i.childNodes[o-1])}else{if(!i.parentNode||qi(i))return null;o=Ye(i),i=i.parentNode}}})(e.focusNode,e.focusOffset),r=(function(i,o){for(;;){if(i.nodeType==3&&o<i.nodeValue.length)return i;if(i.nodeType==1&&o<i.childNodes.length){if(i.contentEditable=="false")return null;i=i.childNodes[o],o=0}else{if(!i.parentNode||qi(i))return null;o=Ye(i)+1,i=i.parentNode}}})(e.focusNode,e.focusOffset);if(n&&r&&n!=r){let i=r.pmViewDesc,o=t.domObserver.lastChangedTextNode;if(n==o||r==o)return o;if(!i||!i.isText(r.nodeValue))return r;if(t.input.compositionNode==r){let s=n.pmViewDesc;if(s&&s.isText(n.nodeValue))return r}}return n||r}function _s(t,e=!1){if(!(pn&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),KE(t),e||t.docView&&t.docView.dirty){let n=Wc(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}}ut.compositionstart=ut.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,n=e.selection.$to;if(e.selection instanceof de&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)||Ue&&wE&&(function(r){let{focusNode:i,focusOffset:o}=r.domSelectionRange();if(!i||i.nodeType!=1||o>=i.childNodes.length)return!1;let s=i.childNodes[o];return s.nodeType==1&&s.contentEditable=="false"})(t)))t.markCursor=t.state.storedMarks||n.marks(),_s(t,!0),t.markCursor=null;else if(_s(t,!e.selection.empty),Lt&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=t.domSelectionRange();for(let i=r.focusNode,o=r.focusOffset;i&&i.nodeType==1&&o!=0;){let s=o<0?i.lastChild:i.childNodes[o-1];if(!s)break;if(s.nodeType==3){let a=t.domSelection();a&&a.collapse(s,s.nodeValue.length);break}i=s,o=-1}}t.input.composing=!0}xh(t,QS)},ut.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++,xh(t,20))};const Li=Et&&Pn<15||ni&&kS<604;function Mi(t,e,n,r,i){let o=VE(t,e,n,r,t.state.selection.$from);if(t.someProp("handlePaste",l=>l(t,i,o||G.empty)))return!0;if(!o)return!1;let s=(function(l){return l.openStart==0&&l.openEnd==0&&l.content.childCount==1?l.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 qE(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," "):""}lt.copy=ut.cut=(t,e)=>{let n=e,r=t.state.selection,i=n.type=="cut";if(r.empty)return;let o=Li?null:n.clipboardData,s=r.content(),{dom:a,text:l}=Kc(t,s);o?(n.preventDefault(),o.clearData(),o.setData("text/html",a.innerHTML),o.setData("text/plain",l)):(function(u,c){if(!u.dom.parentNode)return;let d=u.dom.parentNode.appendChild(document.createElement("div"));d.appendChild(c),d.style.cssText="position: fixed; left: -10000px; top: 10px";let h=getSelection(),p=document.createRange();p.selectNodeContents(c),u.dom.blur(),h.removeAllRanges(),h.addRange(p),setTimeout(()=>{d.parentNode&&d.parentNode.removeChild(d),u.focus()},50)})(t,a),i&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))},ut.paste=(t,e)=>{let n=e;if(t.composing&&!pn)return;let r=Li?null:n.clipboardData,i=t.input.shiftKey&&t.input.lastKeyCode!=45;r&&Mi(t,qE(r),r.getData("text/html"),i,n)?n.preventDefault():(function(o,s){if(!o.dom.parentNode)return;let a=o.input.shiftKey||o.state.selection.$from.parent.type.spec.code,l=o.dom.parentNode.appendChild(document.createElement(a?"textarea":"div"));a||(l.contentEditable="true"),l.style.cssText="position: fixed; left: -10000px; top: 10px",l.focus();let u=o.input.shiftKey&&o.input.lastKeyCode!=45;setTimeout(()=>{o.focus(),l.parentNode&&l.parentNode.removeChild(l),a?Mi(o,l.value,null,u,s):Mi(o,l.textContent,l.innerHTML,u,s)},50)})(t,n)};class JE{constructor(e,n,r){this.slice=e,this.move=n,this.node=r}}const tv=It?"altKey":"ctrlKey";function Fh(t,e){let n=t.someProp("dragCopies",r=>!r(e));return n!=null?n:!e[tv]}lt.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(Es(n));if(!(s&&s.pos>=o.from&&s.pos<=(o instanceof Q?o.to-1:o.to))){if(r&&r.mightDrag)i=Q.create(t.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let d=t.docView.nearestDesc(n.target,!0);d&&d.node.type.spec.draggable&&d!=t.docView&&(i=Q.create(t.state.doc,d.posBefore))}}let a=(i||t.state.selection).content(),{dom:l,text:u,slice:c}=Kc(t,a);(!n.dataTransfer.files.length||!Ue||bE>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(Li?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",Li||n.dataTransfer.setData("text/plain",u),t.dragging=new JE(c,Fh(t,n),i)},lt.dragend=t=>{let e=t.dragging;window.setTimeout(()=>{t.dragging==e&&(t.dragging=null)},50)},ut.dragover=ut.dragenter=(t,e)=>e.preventDefault(),ut.drop=(t,e)=>{try{(function(n,r,i){if(!r.dataTransfer)return;let o=n.posAtCoords(Es(r));if(!o)return;let s=n.state.doc.resolve(o.pos),a=i&&i.slice;a?n.someProp("transformPasted",_=>{a=_(a,n,!1)}):a=VE(n,qE(r.dataTransfer),Li?null:r.dataTransfer.getData("text/html"),!1,s);let l=!(!i||!Fh(n,r));if(n.someProp("handleDrop",_=>_(n,r,a||G.empty,l)))return void r.preventDefault();if(!a)return;r.preventDefault();let u=a?(function(_,E,g){let A=_.resolve(E);if(!g.content.size)return E;let S=g.content;for(let v=0;v<g.openStart;v++)S=S.firstChild.content;for(let v=1;v<=(g.openStart==0&&g.size?2:1);v++)for(let D=A.depth;D>=0;D--){let y=D==A.depth?0:A.pos<=(A.start(D+1)+A.end(D+1))/2?-1:1,R=A.index(D)+(y>0?1:0),I=A.node(D),O=!1;if(v==1)O=I.canReplace(R,R,S);else{let T=I.contentMatchAt(R).findWrapping(S.firstChild.type);O=T&&I.canReplaceWith(R,R,T[0])}if(O)return y==0?A.pos:y<0?A.before(D+1):A.after(D+1)}return null})(n.state.doc,s.pos,a):s.pos;u==null&&(u=s.pos);let c=n.state.tr;if(l){let{node:_}=i;_?_.replace(c):c.deleteSelection()}let d=c.mapping.map(u),h=a.openStart==0&&a.openEnd==0&&a.content.childCount==1,p=c.doc;if(h?c.replaceRangeWith(d,d,a.content.firstChild):c.replaceRange(d,d,a),c.doc.eq(p))return;let m=c.doc.resolve(d);if(h&&Q.isSelectable(a.content.firstChild)&&m.nodeAfter&&m.nodeAfter.sameMarkup(a.content.firstChild))c.setSelection(new Q(m));else{let _=c.mapping.map(u);c.mapping.maps[c.mapping.maps.length-1].forEach((E,g,A,S)=>_=S),c.setSelection(Xc(n,m,c.doc.resolve(_)))}n.focus(),n.dispatch(c.setMeta("uiEvent","drop"))})(t,e,t.dragging)}finally{t.dragging=null}},lt.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())&&_n(t)},20))},lt.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)},lt.beforeinput=(t,e)=>{if(Ue&&pn&&e.inputType=="deleteContentBackward"){t.domObserver.flushSoon();let{domChangeCount:n}=t.input;setTimeout(()=>{if(t.input.domChangeCount!=n||(t.dom.blur(),t.focus(),t.someProp("handleKeyDown",i=>i(t,Zn(8,"Backspace")))))return;let{$cursor:r}=t.state.selection;r&&r.pos>0&&t.dispatch(t.state.tr.delete(r.pos-1,r.pos).scrollIntoView())},50)}};for(let t in ut)lt[t]=ut[t];function Ji(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}class gs{constructor(e,n){this.toDOM=e,this.spec=n||lr,this.side=this.spec.side||0}map(e,n,r,i){let{pos:o,deleted:s}=e.mapResult(n.from+i,this.side<0?-1:1);return s?null:new Dt(o-r,o-r,this)}valid(){return!0}eq(e){return this==e||e instanceof gs&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Ji(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class Fn{constructor(e,n){this.attrs=e,this.spec=n||lr}map(e,n,r,i){let o=e.map(n.from+i,this.spec.inclusiveStart?-1:1)-r,s=e.map(n.to+i,this.spec.inclusiveEnd?1:-1)-r;return o>=s?null:new Dt(o,s,this)}valid(e,n){return n.from<n.to}eq(e){return this==e||e instanceof Fn&&Ji(this.attrs,e.attrs)&&Ji(this.spec,e.spec)}static is(e){return e.type instanceof Fn}destroy(){}}class Jc{constructor(e,n){this.attrs=e,this.spec=n||lr}map(e,n,r,i){let o=e.mapResult(n.from+i,1);if(o.deleted)return null;let s=e.mapResult(n.to+i,-1);return s.deleted||s.pos<=o.pos?null:new Dt(o.pos-r,s.pos-r,this)}valid(e,n){let r,{index:i,offset:o}=e.content.findIndex(n.from);return o==n.from&&!(r=e.child(i)).isText&&o+r.nodeSize==n.to}eq(e){return this==e||e instanceof Jc&&Ji(this.attrs,e.attrs)&&Ji(this.spec,e.spec)}destroy(){}}class Dt{constructor(e,n,r){this.from=e,this.to=n,this.type=r}copy(e,n){return new Dt(e,n,this.type)}eq(e,n=0){return this.type.eq(e.type)&&this.from+n==e.from&&this.to+n==e.to}map(e,n,r){return this.type.map(e,this,n,r)}static widget(e,n,r){return new Dt(e,e,new gs(n,r))}static inline(e,n,r,i){return new Dt(e,n,new Fn(r,i))}static node(e,n,r,i){return new Dt(e,n,new Jc(r,i))}get spec(){return this.type.spec}get inline(){return this.type instanceof Fn}get widget(){return this.type instanceof gs}}const Lr=[],lr={};class be{constructor(e,n){this.local=e.length?e:Lr,this.children=n.length?n:Lr}static create(e,n){return n.length?Ko(n,e,0,lr):qe}find(e,n,r){let i=[];return this.findInner(e==null?0:e,n==null?1e9:n,i,0,r),i}findInner(e,n,r,i,o){for(let s=0;s<this.local.length;s++){let a=this.local[s];a.from<=n&&a.to>=e&&(!o||o(a.spec))&&r.push(a.copy(a.from+i,a.to+i))}for(let s=0;s<this.children.length;s+=3)if(this.children[s]<n&&this.children[s+1]>e){let a=this.children[s]+1;this.children[s+2].findInner(e-a,n-a,r,i+a,o)}}map(e,n,r){return this==qe||e.maps.length==0?this:this.mapInner(e,n,0,0,r||lr)}mapInner(e,n,r,i,o){let s;for(let a=0;a<this.local.length;a++){let l=this.local[a].map(e,r,i);l&&l.type.valid(n,l)?(s||(s=[])).push(l):o.onRemove&&o.onRemove(this.local[a].spec)}return this.children.length?(function(a,l,u,c,d,h,p){let m=a.slice();for(let E=0,g=h;E<u.maps.length;E++){let A=0;u.maps[E].forEach((S,v,D,y)=>{let R=y-D-(v-S);for(let I=0;I<m.length;I+=3){let O=m[I+1];if(O<0||S>O+g-A)continue;let T=m[I]+g-A;v>=T?m[I+1]=S<=T?-2:-1:S>=g&&R&&(m[I]+=R,m[I+1]+=R)}A+=R}),g=u.maps[E].map(g,-1)}let _=!1;for(let E=0;E<m.length;E+=3)if(m[E+1]<0){if(m[E+1]==-2){_=!0,m[E+1]=-1;continue}let g=u.map(a[E]+h),A=g-d;if(A<0||A>=c.content.size){_=!0;continue}let S=u.map(a[E+1]+h,-1)-d,{index:v,offset:D}=c.content.findIndex(A),y=c.maybeChild(v);if(y&&D==A&&D+y.nodeSize==S){let R=m[E+2].mapInner(u,y,g+1,a[E]+h+1,p);R!=qe?(m[E]=A,m[E+1]=S,m[E+2]=R):(m[E+1]=-2,_=!0)}else _=!0}if(_){let E=(function(A,S,v,D,y,R,I){function O(T,C){for(let N=0;N<T.local.length;N++){let k=T.local[N].map(D,y,C);k?v.push(k):I.onRemove&&I.onRemove(T.local[N].spec)}for(let N=0;N<T.children.length;N+=3)O(T.children[N+2],T.children[N]+C+1)}for(let T=0;T<A.length;T+=3)A[T+1]==-1&&O(A[T+2],S[T]+R+1);return v})(m,a,l,u,d,h,p),g=Ko(E,c,0,p);l=g.local;for(let A=0;A<m.length;A+=3)m[A+1]<0&&(m.splice(A,3),A-=3);for(let A=0,S=0;A<g.children.length;A+=3){let v=g.children[A];for(;S<m.length&&m[S]<v;)S+=3;m.splice(S,0,g.children[A],g.children[A+1],g.children[A+2])}}return new be(l.sort(nr),m)})(this.children,s||[],e,n,r,i,o):s?new be(s.sort(nr),Lr):qe}add(e,n){return n.length?this==qe?be.create(e,n):this.addInner(e,n,0):this}addInner(e,n,r){let i,o=0;e.forEach((a,l)=>{let u,c=l+r;if(u=QE(n,a,c)){for(i||(i=this.children.slice());o<i.length&&i[o]<l;)o+=3;i[o]==l?i[o+2]=i[o+2].addInner(a,u,c+1):i.splice(o,0,l,l+a.nodeSize,Ko(u,a,c+1,lr)),o+=3}});let s=ZE(o?e_(n):n,-r);for(let a=0;a<s.length;a++)s[a].type.valid(e,s[a])||s.splice(a--,1);return new be(s.length?this.local.concat(s).sort(nr):this.local,i||this.children)}remove(e){return e.length==0||this==qe?this:this.removeInner(e,0)}removeInner(e,n){let r=this.children,i=this.local;for(let o=0;o<r.length;o+=3){let s,a=r[o]+n,l=r[o+1]+n;for(let c,d=0;d<e.length;d++)(c=e[d])&&c.from>a&&c.to<l&&(e[d]=null,(s||(s=[])).push(c));if(!s)continue;r==this.children&&(r=this.children.slice());let u=r[o+2].removeInner(s,a+1);u!=qe?r[o+2]=u:(r.splice(o,3),o-=3)}if(i.length){for(let o,s=0;s<e.length;s++)if(o=e[s])for(let a=0;a<i.length;a++)i[a].eq(o,n)&&(i==this.local&&(i=this.local.slice()),i.splice(a--,1))}return r==this.children&&i==this.local?this:i.length||r.length?new be(i,r):qe}forChild(e,n){if(this==qe)return this;if(n.isLeaf)return be.empty;let r,i;for(let a=0;a<this.children.length;a+=3)if(this.children[a]>=e){this.children[a]==e&&(r=this.children[a+2]);break}let o=e+1,s=o+n.content.size;for(let a=0;a<this.local.length;a++){let l=this.local[a];if(l.from<s&&l.to>o&&l.type instanceof Fn){let u=Math.max(o,l.from)-o,c=Math.min(s,l.to)-o;u<c&&(i||(i=[])).push(l.copy(u,c))}}if(i){let a=new be(i.sort(nr),Lr);return r?new In([a,r]):a}return r||qe}eq(e){if(this==e)return!0;if(!(e instanceof be)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let n=0;n<this.local.length;n++)if(!this.local[n].eq(e.local[n]))return!1;for(let n=0;n<this.children.length;n+=3)if(this.children[n]!=e.children[n]||this.children[n+1]!=e.children[n+1]||!this.children[n+2].eq(e.children[n+2]))return!1;return!0}locals(e){return Zc(this.localsInner(e))}localsInner(e){if(this==qe)return Lr;if(e.inlineContent||!this.local.some(Fn.is))return this.local;let n=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof Fn||n.push(this.local[r]);return n}forEachSet(e){e(this)}}be.empty=new be([],[]),be.removeOverlap=Zc;const qe=be.empty;class In{constructor(e){this.members=e}map(e,n){const r=this.members.map(i=>i.map(e,n,lr));return In.from(r)}forChild(e,n){if(n.isLeaf)return be.empty;let r=[];for(let i=0;i<this.members.length;i++){let o=this.members[i].forChild(e,n);o!=qe&&(o instanceof In?r=r.concat(o.members):r.push(o))}return In.from(r)}eq(e){if(!(e instanceof In)||e.members.length!=this.members.length)return!1;for(let n=0;n<this.members.length;n++)if(!this.members[n].eq(e.members[n]))return!1;return!0}locals(e){let n,r=!0;for(let i=0;i<this.members.length;i++){let o=this.members[i].localsInner(e);if(o.length)if(n){r&&(n=n.slice(),r=!1);for(let s=0;s<o.length;s++)n.push(o[s])}else n=o}return n?Zc(r?n:n.sort(nr)):Lr}static from(e){switch(e.length){case 0:return qe;case 1:return e[0];default:return new In(e.every(n=>n instanceof be)?e:e.reduce((n,r)=>n.concat(r instanceof be?r:r.members),[]))}}forEachSet(e){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(e)}}function ZE(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 Dt(i.from+e,i.to+e,i.type))}return n}function QE(t,e,n){if(e.isLeaf)return null;let r=n+e.nodeSize,i=null;for(let o,s=0;s<t.length;s++)(o=t[s])&&o.from>n&&o.to<r&&((i||(i=[])).push(o),t[s]=null);return i}function e_(t){let e=[];for(let n=0;n<t.length;n++)t[n]!=null&&e.push(t[n]);return e}function Ko(t,e,n,r){let i=[],o=!1;e.forEach((a,l)=>{let u=QE(t,a,l+n);if(u){o=!0;let c=Ko(u,a,n+l+1,r);c!=qe&&i.push(l,l+a.nodeSize,c)}});let s=ZE(o?e_(t):t,-n).sort(nr);for(let a=0;a<s.length;a++)s[a].type.valid(e,s[a])||(r.onRemove&&r.onRemove(s[a].spec),s.splice(a--,1));return s.length||i.length?new be(s,i):qe}function nr(t,e){return t.from-e.from||t.to-e.to}function Zc(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),Hh(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),Hh(e,i+1,o.copy(r.to,o.to)))}}return e}function Hh(t,e,n){for(;e<t.length&&nr(n,t[e])>0;)e++;t.splice(e,0,n)}function Va(t){let e=[];return t.someProp("decorations",n=>{let r=n(t.state);r&&r!=qe&&e.push(r)}),t.cursorWrapper&&e.push(be.create(t.state.doc,[t.cursorWrapper.deco])),In.from(e)}const nv={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},rv=Et&&Pn<=11;class iv{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class ov{constructor(e,n){this.view=e,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new iv,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let i=0;i<r.length;i++)this.queue.push(r[i]);Et&&Pn<=11&&r.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():Ge&&e.composing&&r.some(i=>i.type=="childList"&&i.target.nodeName=="TR")?(e.input.badSafariComposition=!0,this.flushSoon()):this.flush()}),rv&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.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,nv)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let n=0;n<e.length;n++)this.queue.push(e[n]);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(yh(this.view)){if(this.suppressingSelectionUpdates)return _n(this.view);if(Et&&Pn<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&pr(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let n,r=new Set;for(let o=e.focusNode;o;o=ti(o))r.add(o);for(let o=e.anchorNode;o;o=ti(o))if(r.has(o)){n=o;break}let i=n&&this.view.docView.nearestDesc(n);return i&&i.ignoreMutation({type:"selection",target:n.nodeType==3?n.parentNode:n})?(this.setCurSelection(),!0):void 0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let r=e.domSelectionRange(),i=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&yh(e)&&!this.ignoreSelectionChange(r),o=-1,s=-1,a=!1,l=[];if(e.editable)for(let c=0;c<n.length;c++){let d=this.registerMutation(n[c],l);d&&(o=o<0?d.from:Math.min(d.from,o),s=s<0?d.to:Math.max(d.to,s),d.typeOver&&(a=!0))}if(Lt&&l.length){let c=l.filter(d=>d.nodeName=="BR");if(c.length==2){let[d,h]=c;d.parentNode&&d.parentNode.parentNode==h.parentNode?h.remove():d.remove()}else{let{focusNode:d}=this.currentSelection;for(let h of c){let p=h.parentNode;!p||p.nodeName!="LI"||d&&sv(e,d)==p||h.remove()}}}else if((Ue||Ge)&&l.some(c=>c.nodeName=="BR")&&(e.input.lastKeyCode==8||e.input.lastKeyCode==46)){for(let c of l)if(c.nodeName=="BR"&&c.parentNode){let d=c.nextSibling;d&&d.nodeType==1&&d.contentEditable=="false"&&c.parentNode.removeChild(c)}}let u=null;o<0&&i&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&qs(r)&&(u=Wc(e))&&u.eq(pe.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,_n(e),this.currentSelection.set(r),e.scrollToSelection()):(o>-1||i)&&(o>-1&&(e.docView.markDirty(o,s),(function(c){if(!Uh.has(c)&&(Uh.set(c,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(c.dom).whiteSpace)!==-1)){if(c.requiresGeckoHackNode=Lt,Bh)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."),Bh=!0}})(e)),e.input.badSafariComposition&&(e.input.badSafariComposition=!1,(function(c,d){var h;let{focusNode:p,focusOffset:m}=c.domSelectionRange();for(let _ of d)if(((h=_.parentNode)===null||h===void 0?void 0:h.nodeName)=="TR"){let E=_.nextSibling;for(;E&&E.nodeName!="TD"&&E.nodeName!="TH";)E=E.nextSibling;if(E){let g=E;for(;;){let A=g.firstChild;if(!A||A.nodeType!=1||A.contentEditable=="false"||/^(BR|IMG)$/.test(A.nodeName))break;g=A}g.insertBefore(_,g.firstChild),p==_&&c.domSelection().collapse(_,m)}else _.parentNode.removeChild(_)}})(e,l)),this.handleDOMChange(o,s,a,l),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(r)||_n(e),this.currentSelection.set(r))}registerMutation(e,n){if(n.indexOf(e.target)>-1)return null;let r=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(r==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!r||r.ignoreMutation(e))return null;if(e.type=="childList"){for(let u=0;u<e.addedNodes.length;u++){let c=e.addedNodes[u];n.push(c),c.nodeType==3&&(this.lastChangedTextNode=c)}if(r.contentDOM&&r.contentDOM!=r.dom&&!r.contentDOM.contains(e.target))return{from:r.posBefore,to:r.posAfter};let i=e.previousSibling,o=e.nextSibling;if(Et&&Pn<=11&&e.addedNodes.length)for(let u=0;u<e.addedNodes.length;u++){let{previousSibling:c,nextSibling:d}=e.addedNodes[u];(!c||Array.prototype.indexOf.call(e.addedNodes,c)<0)&&(i=c),(!d||Array.prototype.indexOf.call(e.addedNodes,d)<0)&&(o=d)}let s=i&&i.parentNode==e.target?Ye(i)+1:0,a=r.localPosFromDOM(e.target,s,-1),l=o&&o.parentNode==e.target?Ye(o):e.target.childNodes.length;return{from:a,to:r.localPosFromDOM(e.target,l,1)}}return e.type=="attributes"?{from:r.posAtStart-r.border,to:r.posAtEnd+r.border}:(this.lastChangedTextNode=e.target,{from:r.posAtStart,to:r.posAtEnd,typeOver:e.target.nodeValue==e.oldValue})}}let Uh=new WeakMap,Bh=!1;function jh(t,e){let n=e.startContainer,r=e.startOffset,i=e.endContainer,o=e.endOffset,s=t.domAtPos(t.state.selection.anchor);return pr(s.node,s.offset,i,o)&&([n,r,i,o]=[i,o,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:o}}function sv(t,e){for(let n=e.parentNode;n&&n!=t.dom;n=n.parentNode){let r=t.docView.nearestDesc(n,!0);if(r&&r.node.isBlock)return n}return null}function av(t){let e=t.pmViewDesc;if(e)return e.parseRule();if(t.nodeName=="BR"&&t.parentNode){if(Ge&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}if(t.parentNode.lastChild==t||Ge&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if(t.nodeName=="IMG"&&t.getAttribute("mark-placeholder"))return{ignore:!0};return null}const lv=/^(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 cv(t,e,n,r,i){let o=t.input.compositionPendingChanges||(t.composing?t.input.compositionID:0);if(t.input.compositionPendingChanges=0,e<0){let R=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,I=Wc(t,R);if(I&&!t.state.selection.eq(I)){if(Ue&&pn&&t.input.lastKeyCode===13&&Date.now()-100<t.input.lastKeyCodeTime&&t.someProp("handleKeyDown",T=>T(t,Zn(13,"Enter"))))return;let O=t.state.tr.setSelection(I);R=="pointer"?O.setMeta("pointer",!0):R=="key"&&O.scrollIntoView(),o&&O.setMeta("composition",o),t.dispatch(O)}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,u,c=t.state.selection,d=(function(R,I,O){let T,{node:C,fromOffset:N,toOffset:k,from:b,to:L}=R.docView.parseRange(I,O),x=R.domSelectionRange(),M=x.anchorNode;if(M&&R.dom.contains(M.nodeType==1?M:M.parentNode)&&(T=[{node:M,offset:x.anchorOffset}],qs(x)||T.push({node:x.focusNode,offset:x.focusOffset})),Ue&&R.input.lastKeyCode===8)for(let le=k;le>N;le--){let ce=C.childNodes[le-1],he=ce.pmViewDesc;if(ce.nodeName=="BR"&&!he){k=le;break}if(!he||he.size)break}let U=R.state.doc,V=R.someProp("domParser")||Wi.fromSchema(R.state.schema),W=U.resolve(b),$=null,oe=V.parse(C,{topNode:W.parent,topMatch:W.parent.contentMatchAt(W.index()),topOpen:!0,from:N,to:k,preserveWhitespace:W.parent.type.whitespace!="pre"||"full",findPositions:T,ruleFromNode:av,context:W});if(T&&T[0].pos!=null){let le=T[0].pos,ce=T[1]&&T[1].pos;ce==null&&(ce=le),$={anchor:le+b,head:ce+b}}return{doc:oe,sel:$,from:b,to:L}})(t,e,n),h=t.state.doc,p=h.slice(d.from,d.to);t.input.lastKeyCode===8&&Date.now()-100<t.input.lastKeyCodeTime?(l=t.state.selection.to,u="end"):(l=t.state.selection.from,u="start"),t.input.lastKeyCode=null;let m=(function(R,I,O,T,C){let N=R.findDiffStart(I,O);if(N==null)return null;let{a:k,b}=R.findDiffEnd(I,O+R.size,O+I.size);if(C=="end"&&(T-=k+Math.max(0,N-Math.min(k,b))-N),k<N&&R.size<I.size){let L=T<=N&&T>=k?N-T:0;N-=L,N&&N<I.size&&zh(I.textBetween(N-1,N+1))&&(N+=L?1:-1),b=N+(b-k),k=N}else if(b<N){let L=T<=N&&T>=b?N-T:0;N-=L,N&&N<R.size&&zh(R.textBetween(N-1,N+1))&&(N+=L?1:-1),k=N+(k-b),b=N}return{start:N,endA:k,endB:b}})(p.content,d.doc.content,d.from,l,u);if(m&&t.input.domChangeCount++,(ni&&t.input.lastIOSEnter>Date.now()-225||pn)&&i.some(R=>R.nodeType==1&&!lv.test(R.nodeName))&&(!m||m.endA>=m.endB)&&t.someProp("handleKeyDown",R=>R(t,Zn(13,"Enter"))))return void(t.input.lastIOSEnter=0);if(!m){if(!(r&&c instanceof de&&!c.empty&&c.$head.sameParent(c.$anchor))||t.composing||d.sel&&d.sel.anchor!=d.sel.head){if(d.sel){let R=Vh(t,t.state.doc,d.sel);if(R&&!R.eq(t.state.selection)){let I=t.state.tr.setSelection(R);o&&I.setMeta("composition",o),t.dispatch(I)}}return}m={start:c.from,endA:c.to,endB:c.to}}t.state.selection.from<t.state.selection.to&&m.start==m.endB&&t.state.selection instanceof de&&(m.start>t.state.selection.from&&m.start<=t.state.selection.from+2&&t.state.selection.from>=d.from?m.start=t.state.selection.from:m.endA<t.state.selection.to&&m.endA>=t.state.selection.to-2&&t.state.selection.to<=d.to&&(m.endB+=t.state.selection.to-m.endA,m.endA=t.state.selection.to)),Et&&Pn<=11&&m.endB==m.start+1&&m.endA==m.start&&m.start>d.from&&d.doc.textBetween(m.start-d.from-1,m.start-d.from+1)=="  "&&(m.start--,m.endA--,m.endB--);let _=d.doc.resolveNoCache(m.start-d.from),E=d.doc.resolveNoCache(m.endB-d.from),g=h.resolve(m.start),A=_.sameParent(E)&&_.parent.inlineContent&&g.end()>=m.endA;if((ni&&t.input.lastIOSEnter>Date.now()-225&&(!A||i.some(R=>R.nodeName=="DIV"||R.nodeName=="P"))||!A&&_.pos<d.doc.content.size&&(!_.sameParent(E)||!_.parent.inlineContent)&&_.pos<E.pos&&!/\S/.test(d.doc.textBetween(_.pos,E.pos,"","")))&&t.someProp("handleKeyDown",R=>R(t,Zn(13,"Enter"))))return void(t.input.lastIOSEnter=0);if(t.state.selection.anchor>m.start&&(function(R,I,O,T,C){if(O-I<=C.pos-T.pos||za(T,!0,!1)<C.pos)return!1;let N=R.resolve(I);if(!T.parent.isTextblock){let b=N.nodeAfter;return b!=null&&O==I+b.nodeSize}if(N.parentOffset<N.parent.content.size||!N.parent.isTextblock)return!1;let k=R.resolve(za(N,!0,!0));return!(!k.parent.isTextblock||k.pos>O||za(k,!0,!1)<O)&&T.parent.content.cut(T.parentOffset).eq(k.parent.content)})(h,m.start,m.endA,_,E)&&t.someProp("handleKeyDown",R=>R(t,Zn(8,"Backspace"))))return void(pn&&Ue&&t.domObserver.suppressSelectionUpdates());Ue&&m.endB==m.start&&(t.input.lastChromeDelete=Date.now()),pn&&!A&&_.start()!=E.start()&&E.parentOffset==0&&_.depth==E.depth&&d.sel&&d.sel.anchor==d.sel.head&&d.sel.head==m.endA&&(m.endB-=2,E=d.doc.resolveNoCache(m.endB-d.from),setTimeout(()=>{t.someProp("handleKeyDown",function(R){return R(t,Zn(13,"Enter"))})},20));let S,v=m.start,D=m.endA,y=R=>{let I=R||t.state.tr.replace(v,D,d.doc.slice(m.start-d.from,m.endB-d.from));if(d.sel){let O=Vh(t,I.doc,d.sel);O&&!(Ue&&t.composing&&O.empty&&(m.start!=m.endB||t.input.lastChromeDelete<Date.now()-100)&&(O.head==v||O.head==I.mapping.map(D)-1)||Et&&O.empty&&O.head==v)&&I.setSelection(O)}return o&&I.setMeta("composition",o),I.scrollIntoView()};if(A)if(_.pos==E.pos){Et&&Pn<=11&&_.parentOffset==0&&(t.domObserver.suppressSelectionUpdates(),setTimeout(()=>_n(t),20));let R=y(t.state.tr.delete(v,D)),I=h.resolve(m.start).marksAcross(h.resolve(m.endA));I&&R.ensureMarks(I),t.dispatch(R)}else if(m.endA==m.endB&&(S=(function(R,I){let O,T,C,N=R.firstChild.marks,k=I.firstChild.marks,b=N,L=k;for(let M=0;M<k.length;M++)b=k[M].removeFromSet(b);for(let M=0;M<N.length;M++)L=N[M].removeFromSet(L);if(b.length==1&&L.length==0)T=b[0],O="add",C=M=>M.mark(T.addToSet(M.marks));else{if(b.length!=0||L.length!=1)return null;T=L[0],O="remove",C=M=>M.mark(T.removeFromSet(M.marks))}let x=[];for(let M=0;M<I.childCount;M++)x.push(C(I.child(M)));if(j.from(x).eq(R))return{mark:T,type:O}})(_.parent.content.cut(_.parentOffset,E.parentOffset),g.parent.content.cut(g.parentOffset,m.endA-g.start())))){let R=y(t.state.tr);S.type=="add"?R.addMark(v,D,S.mark):R.removeMark(v,D,S.mark),t.dispatch(R)}else if(_.parent.child(_.index()).isText&&_.index()==E.index()-(E.textOffset?0:1)){let R=_.parent.textBetween(_.parentOffset,E.parentOffset),I=()=>y(t.state.tr.insertText(R,v,D));t.someProp("handleTextInput",O=>O(t,v,D,R,I))||t.dispatch(I())}else t.dispatch(y());else t.dispatch(y())}function Vh(t,e,n){return Math.max(n.anchor,n.head)>e.content.size?null:Xc(t,e.resolve(n.anchor),e.resolve(n.head))}function za(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 o=t.node(r).maybeChild(t.indexAfter(r));for(;o&&!o.isLeaf;)o=o.firstChild,i++}return i}function zh(t){if(t.length!=2)return!1;let e=t.charCodeAt(0),n=t.charCodeAt(1);return e>=56320&&e<=57343&&n>=55296&&n<=56319}class t_{constructor(e,n){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 WS,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(Xh),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):typeof e=="function"?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=Gh(this),Yh(this),this.nodeViews=Wh(this),this.docView=Ah(this.state.doc,$h(this),Va(this),this.dom,this),this.domObserver=new ov(this,(r,i,o,s)=>cv(this,r,i,o,s)),this.domObserver.start(),(function(r){for(let i in lt){let o=lt[i];r.dom.addEventListener(i,r.input.eventHandlers[i]=s=>{!XS(r,s)||Gl(r,s)||!r.editable&&s.type in ut||o(r,s)},GS[i]?{passive:!0}:void 0)}Ge&&r.dom.addEventListener("input",()=>null),ja(r)})(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let n in e)this._props[n]=e[n];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&ja(this);let n=this._props;this._props=e,e.plugins&&(e.plugins.forEach(Xh),this.directPlugins=e.plugins),this.updateStateInner(e.state,n)}setProps(e){let n={};for(let r in this._props)n[r]=this._props[r];n.state=this.state;for(let r in e)n[r]=e[r];this.update(n)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,n){var r;let i=this.state,o=!1,s=!1;e.storedMarks&&this.composing&&(KE(this),s=!0),this.state=e;let a=i.plugins!=e.plugins||this._props.plugins!=n.plugins;if(a||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let p=Wh(this);(function(m,_){let E=0,g=0;for(let A in m){if(m[A]!=_[A])return!0;E++}for(let A in _)g++;return E!=g})(p,this.nodeViews)&&(this.nodeViews=p,o=!0)}(a||n.handleDOMEvents!=this._props.handleDOMEvents)&&ja(this),this.editable=Gh(this),Yh(this);let l=Va(this),u=$h(this),c=i.plugins==e.plugins||i.doc.eq(e.doc)?e.scrollToSelection>i.scrollToSelection?"to selection":"preserve":"reset",d=o||!this.docView.matchesNode(e.doc,u,l);!d&&e.selection.eq(i.selection)||(s=!0);let h=c=="preserve"&&s&&this.dom.style.overflowAnchor==null&&(function(p){let m,_,E=p.dom.getBoundingClientRect(),g=Math.max(0,E.top);for(let A=(E.left+E.right)/2,S=g+1;S<Math.min(innerHeight,E.bottom);S+=5){let v=p.root.elementFromPoint(A,S);if(!v||v==p.dom||!p.dom.contains(v))continue;let D=v.getBoundingClientRect();if(D.top>=g-20){m=v,_=D.top;break}}return{refDOM:m,refTop:_,stack:hh(p.dom)}})(this);if(s){this.domObserver.stop();let p=d&&(Et||Ue)&&!this.composing&&!i.selection.empty&&!e.selection.empty&&(function(m,_){let E=Math.min(m.$anchor.sharedDepth(m.head),_.$anchor.sharedDepth(_.head));return m.$anchor.start(E)!=_.$anchor.start(E)})(i.selection,e.selection);if(d){let m=Ue?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=ev(this)),!o&&this.docView.update(e.doc,u,l,this)||(this.docView.updateOuterDeco(u),this.docView.destroy(),this.docView=Ah(e.doc,u,l,this.dom,this)),!m||this.trackWrites&&this.dom.contains(this.trackWrites)||(p=!0)}p||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&(function(m){let _=m.docView.domFromPos(m.state.selection.anchor,0),E=m.domSelectionRange();return pr(_.node,_.offset,E.anchorNode,E.anchorOffset)})(this))?_n(this,p):(BE(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(i),!((r=this.dragging)===null||r===void 0)&&r.node&&!i.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,i),c=="reset"?this.dom.scrollTop=0:c=="to selection"?this.scrollToSelection():h&&(function({refDOM:p,refTop:m,stack:_}){let E=p?p.getBoundingClientRect().top:0;ph(_,E==0?0:E-m)})(h)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(e&&this.dom.contains(e.nodeType==1?e:e.parentNode)&&!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof Q){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&dh(this,n.getBoundingClientRect(),e)}else dh(this,this.coordsAtPos(this.state.selection.head,1),e)}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(e&&e.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(let n=0;n<this.pluginViews.length;n++){let r=this.pluginViews[n];r.update&&r.update(this,e)}else{this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;n<this.directPlugins.length;n++){let r=this.directPlugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}for(let n=0;n<this.state.plugins.length;n++){let r=this.state.plugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}}}updateDraggedNode(e,n){let r=e.node,i=-1;if(this.state.doc.nodeAt(r.from)==r.node)i=r.from;else{let o=r.from+(this.state.doc.content.size-n.doc.content.size);(o>0&&this.state.doc.nodeAt(o))==r.node&&(i=o)}this.dragging=new JE(e.slice,e.move,i<0?void 0:Q.create(this.state.doc,i))}someProp(e,n){let r,i=this._props&&this._props[e];if(i!=null&&(r=n?n(i):i))return r;for(let s=0;s<this.directPlugins.length;s++){let a=this.directPlugins[s].props[e];if(a!=null&&(r=n?n(a):a))return r}let o=this.state.plugins;if(o)for(let s=0;s<o.length;s++){let a=o[s].props[e];if(a!=null&&(r=n?n(a):a))return r}}hasFocus(){if(Et){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if(e.contentEditable=="false")return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&(function(e){if(e.setActive)return e.setActive();if(Nr)return e.focus(Nr);let n=hh(e);e.focus(Nr==null?{get preventScroll(){return Nr={preventScroll:!0},!0}}:void 0),Nr||(Nr=!1,ph(n,0))})(this.dom),_n(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let n=this.dom.parentNode;n;n=n.parentNode)if(n.nodeType==9||n.nodeType==11&&n.host)return n.getSelection||(Object.getPrototypeOf(n).getSelection=()=>n.ownerDocument.getSelection()),this._root=n}return e||document}updateRoot(){this._root=null}posAtCoords(e){return PS(this,e)}coordsAtPos(e,n=1){return ME(this,e,n)}domAtPos(e,n=0){return this.docView.domFromPos(e,n)}nodeDOM(e){let n=this.docView.descAt(e);return n?n.nodeDOM:null}posAtDOM(e,n,r=-1){let i=this.docView.posFromDOM(e,n,r);if(i==null)throw new RangeError("DOM position not inside the editor");return i}endOfTextblock(e,n){return HS(this,n||this.state,e)}pasteHTML(e,n){return Mi(this,"",e,!1,n||new ClipboardEvent("paste"))}pasteText(e,n){return Mi(this,e,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(e){return Kc(this,e)}destroy(){this.docView&&((function(e){e.domObserver.stop();for(let n in e.input.eventHandlers)e.dom.removeEventListener(n,e.input.eventHandlers[n]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)})(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Va(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,Hl=null)}get isDestroyed(){return this.docView==null}dispatchEvent(e){return(function(n,r){Gl(n,r)||!lt[r.type]||!n.editable&&r.type in ut||lt[r.type](n,r)})(this,e)}domSelectionRange(){let e=this.domSelection();return e?Ge&&this.root.nodeType===11&&(function(n){let r=n.activeElement;for(;r&&r.shadowRoot;)r=r.shadowRoot.activeElement;return r})(this.dom.ownerDocument)==this.dom&&(function(n,r){if(r.getComposedRanges){let s=r.getComposedRanges(n.root)[0];if(s)return jh(n,s)}let i;function o(s){s.preventDefault(),s.stopImmediatePropagation(),i=s.getTargetRanges()[0]}return n.dom.addEventListener("beforeinput",o,!0),document.execCommand("indent"),n.dom.removeEventListener("beforeinput",o,!0),i?jh(n,i):null})(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}function $h(t){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(t.editable),t.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(t.state)),n)for(let r in n)r=="class"?e.class+=" "+n[r]:r=="style"?e.style=(e.style?e.style+";":"")+n[r]:e[r]||r=="contenteditable"||r=="nodeName"||(e[r]=String(n[r]))}),e.translate||(e.translate="no"),[Dt.node(0,t.state.doc.content.size,e)]}function Yh(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:Dt.widget(t.state.selection.from,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function Gh(t){return!t.someProp("editable",e=>e(t.state)===!1)}function Wh(t){let e=Object.create(null);function n(r){for(let i in r)Object.prototype.hasOwnProperty.call(e,i)||(e[i]=r[i])}return t.someProp("nodeViews",n),t.someProp("markViews",n),e}function Xh(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")}t_.prototype.dispatch=function(t){let e=this._props.dispatchTransaction;e?e.call(this,t):this.updateState(this.state.apply(t))};const xe=new class{constructor(t){this.linebreakReplacement=null,this.cached=Object.create(null);let e=this.spec={};for(let r in t)e[r]=t[r];e.nodes=Ve.from(t.nodes),e.marks=Ve.from(t.marks||{}),this.nodes=Yd.compile(this.spec.nodes,this),this.marks=Gs.compile(this.spec.marks,this);let n=Object.create(null);for(let r in this.nodes){if(r in this.marks)throw new RangeError(r+" can not be both a node and a mark");let i=this.nodes[r],o=i.spec.content||"",s=i.spec.marks;if(i.contentMatch=n[o]||(n[o]=dr.parse(o,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!i.isInline||!i.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=i}i.markSet=s=="_"?null:s?Gd(this,s.split(" ")):s!=""&&i.inlineContent?null:[]}for(let r in this.marks){let i=this.marks[r],o=i.spec.excludes;i.excluded=o==null?[i]:o==""?[]:Gd(this,o.split(" "))}this.nodeFromJSON=r=>sr.fromJSON(this,r),this.markFromJSON=r=>fe.fromJSON(this,r),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,e=null,n,r){if(typeof t=="string")t=this.nodeType(t);else{if(!(t instanceof Yd))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 fs(n,n.defaultAttrs,t,fe.setFrom(e))}mark(t,e){return typeof t=="string"&&(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})}]}}}),$a=new Ks("placeholder"),Kh=new Xs({key:$a,props:{decorations(t){if(n_(t.doc))return;const e=t.doc.firstChild,n=Dt.node(0,e.nodeSize,{class:"empty-node","data-placeholder":$a.getState(t)});return be.create(t.doc,[n])}},state:{init:()=>"",apply:(t,e)=>{var n;return(n=t.getMeta($a))!=null?n:e}}});function n_(t){return t.childCount!==1||t.firstChild.childCount!==0}for(var jn={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:"'"},As={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},uv=typeof navigator!="undefined"&&/Mac/.test(navigator.platform),dv=typeof navigator!="undefined"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),ze=0;ze<10;ze++)jn[48+ze]=jn[96+ze]=String(ze);for(ze=1;ze<=24;ze++)jn[ze+111]="F"+ze;for(ze=65;ze<=90;ze++)jn[ze]=String.fromCharCode(ze+32),As[ze]=String.fromCharCode(ze);for(var Ya in jn)As.hasOwnProperty(Ya)||(As[Ya]=jn[Ya]);const hv=typeof navigator!="undefined"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function pv(t){let e,n,r,i,o=t.split(/-(?!$)/),s=o[o.length-1];s=="Space"&&(s=" ");for(let a=0;a<o.length-1;a++){let l=o[a];if(/^(cmd|meta|m)$/i.test(l))i=!0;else if(/^a(lt)?$/i.test(l))e=!0;else if(/^(c|ctrl|control)$/i.test(l))n=!0;else if(/^s(hift)?$/i.test(l))r=!0;else{if(!/^mod$/i.test(l))throw new Error("Unrecognized modifier name: "+l);hv?i=!0:n=!0}}return e&&(s="Alt-"+s),n&&(s="Ctrl-"+s),i&&(s="Meta-"+s),r&&(s="Shift-"+s),s}function Ga(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 qh(t){return new Xs({props:{handleKeyDown:fv(t)}})}function fv(t){let e=(function(n){let r=Object.create(null);for(let i in n)r[pv(i)]=n[i];return r})(t);return function(n,r){let i,o=(function(a){var l=!(uv&&a.metaKey&&a.shiftKey&&!a.ctrlKey&&!a.altKey||dv&&a.shiftKey&&a.key&&a.key.length==1||a.key=="Unidentified")&&a.key||(a.shiftKey?As:jn)[a.keyCode]||a.key||"Unidentified";return l=="Esc"&&(l="Escape"),l=="Del"&&(l="Delete"),l=="Left"&&(l="ArrowLeft"),l=="Up"&&(l="ArrowUp"),l=="Right"&&(l="ArrowRight"),l=="Down"&&(l="ArrowDown"),l})(r),s=e[Ga(o,r)];if(s&&s(n.state,n.dispatch,n))return!0;if(o.length==1&&o!=" "){if(r.shiftKey){let a=e[Ga(o,r,!1)];if(a&&a(n.state,n.dispatch,n))return!0}if((r.shiftKey||r.altKey||r.metaKey||o.charCodeAt(0)>127)&&(i=jn[r.keyCode])&&i!=o){let a=e[Ga(i,r)];if(a&&a(n.state,n.dispatch,n))return!0}}return!1}}var Ss=200,He=function(){};He.prototype.append=function(t){return t.length?(t=He.from(t),!this.length&&t||t.length<Ss&&this.leafAppend(t)||this.length<Ss&&t.leafPrepend(this)||this.appendInner(t)):this},He.prototype.prepend=function(t){return t.length?He.from(t).append(this):this},He.prototype.appendInner=function(t){return new mv(this,t)},He.prototype.slice=function(t,e){return t===void 0&&(t=0),e===void 0&&(e=this.length),t>=e?He.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,e))},He.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)},He.prototype.forEach=function(t,e,n){e===void 0&&(e=0),n===void 0&&(n=this.length),e<=n?this.forEachInner(t,e,n,0):this.forEachInvertedInner(t,e,n,0)},He.prototype.map=function(t,e,n){e===void 0&&(e=0),n===void 0&&(n=this.length);var r=[];return this.forEach(function(i,o){return r.push(t(i,o))},e,n),r},He.from=function(t){return t instanceof He?t:t&&t.length?new r_(t):He.empty};var r_=(function(t){function e(r){t.call(this),this.values=r}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(r,i){return r==0&&i==this.length?this:new e(this.values.slice(r,i))},e.prototype.getInner=function(r){return this.values[r]},e.prototype.forEachInner=function(r,i,o,s){for(var a=i;a<o;a++)if(r(this.values[a],s+a)===!1)return!1},e.prototype.forEachInvertedInner=function(r,i,o,s){for(var a=i-1;a>=o;a--)if(r(this.values[a],s+a)===!1)return!1},e.prototype.leafAppend=function(r){if(this.length+r.length<=Ss)return new e(this.values.concat(r.flatten()))},e.prototype.leafPrepend=function(r){if(this.length+r.length<=Ss)return new e(r.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e})(He);He.empty=new r_([]);var mv=(function(t){function e(n,r){t.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.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(n){return n<this.left.length?this.left.get(n):this.right.get(n-this.left.length)},e.prototype.forEachInner=function(n,r,i,o){var s=this.left.length;return!(r<s&&this.left.forEachInner(n,r,Math.min(i,s),o)===!1)&&!(i>s&&this.right.forEachInner(n,Math.max(r-s,0),Math.min(this.length,i)-s,o+s)===!1)&&void 0},e.prototype.forEachInvertedInner=function(n,r,i,o){var s=this.left.length;return!(r>s&&this.right.forEachInvertedInner(n,r-s,Math.max(i,s)-s,o+s)===!1)&&!(i<s&&this.left.forEachInvertedInner(n,Math.min(r,s),i,o)===!1)&&void 0},e.prototype.sliceInner=function(n,r){if(n==0&&r==this.length)return this;var i=this.left.length;return r<=i?this.left.slice(n,r):n>=i?this.right.slice(n-i,r-i):this.left.slice(n,i).append(this.right.slice(0,r-i))},e.prototype.leafAppend=function(n){var r=this.right.leafAppend(n);if(r)return new e(this.left,r)},e.prototype.leafPrepend=function(n){var r=this.left.leafPrepend(n);if(r)return new e(r,this.right)},e.prototype.appendInner=function(n){return this.left.depth>=Math.max(this.right.depth,n.depth)+1?new e(this.left,new e(this.right,n)):new e(this,n)},e})(He);class xt{constructor(e,n){this.items=e,this.eventCount=n}popEvent(e,n){if(this.eventCount==0)return null;let r,i,o=this.items.length;for(;;o--)if(this.items.get(o-1).selection){--o;break}n&&(r=this.remapping(o,this.items.length),i=r.maps.length);let s,a,l=e.tr,u=[],c=[];return this.items.forEach((d,h)=>{if(!d.step)return r||(r=this.remapping(o,h+1),i=r.maps.length),i--,void c.push(d);if(r){c.push(new Yt(d.map));let p,m=d.step.map(r.slice(i));m&&l.maybeStep(m).doc&&(p=l.mapping.maps[l.mapping.maps.length-1],u.push(new Yt(p,void 0,void 0,u.length+c.length))),i--,p&&r.appendMap(p,i)}else l.maybeStep(d.step);return d.selection?(s=r?d.selection.map(r.slice(i)):d.selection,a=new xt(this.items.slice(0,o).append(c.reverse().concat(u)),this.eventCount-1),!1):void 0},this.items.length,0),{remaining:a,transform:l,selection:s}}addTransform(e,n,r,i){let o=[],s=this.eventCount,a=this.items,l=!i&&a.length?a.get(a.length-1):null;for(let c=0;c<e.steps.length;c++){let d,h=e.steps[c].invert(e.docs[c]),p=new Yt(e.mapping.maps[c],h,n);(d=l&&l.merge(p))&&(p=d,c?o.pop():a=a.slice(0,a.length-1)),o.push(p),n&&(s++,n=void 0),i||(l=p)}let u=s-r.depth;return u>Ev&&(a=(function(c,d){let h;return c.forEach((p,m)=>{if(p.selection&&d--==0)return h=m,!1}),c.slice(h)})(a,u),s-=u),new xt(a.append(o),s)}remapping(e,n){let r=new Xi;return this.items.forEach((i,o)=>{let s=i.mirrorOffset!=null&&o-i.mirrorOffset>=e?r.maps.length-i.mirrorOffset:void 0;r.appendMap(i.map,s)},e,n),r}addMaps(e){return this.eventCount==0?this:new xt(this.items.append(e.map(n=>new Yt(n))),this.eventCount)}rebased(e,n){if(!this.eventCount)return this;let r=[],i=Math.max(0,this.items.length-n),o=e.mapping,s=e.steps.length,a=this.eventCount;this.items.forEach(h=>{h.selection&&a--},i);let l=n;this.items.forEach(h=>{let p=o.getMirror(--l);if(p==null)return;s=Math.min(s,p);let m=o.maps[p];if(h.step){let _=e.steps[p].invert(e.docs[p]),E=h.selection&&h.selection.map(o.slice(l+1,p));E&&a++,r.push(new Yt(m,_,E))}else r.push(new Yt(m))},i);let u=[];for(let h=n;h<s;h++)u.push(new Yt(o.maps[h]));let c=this.items.slice(0,i).append(u).append(r),d=new xt(c,a);return d.emptyItemCount()>500&&(d=d.compress(this.items.length-r.length)),d}emptyItemCount(){let e=0;return this.items.forEach(n=>{n.step||e++}),e}compress(e=this.items.length){let n=this.remapping(0,e),r=n.maps.length,i=[],o=0;return this.items.forEach((s,a)=>{if(a>=e)i.push(s),s.selection&&o++;else if(s.step){let l=s.step.map(n.slice(r)),u=l&&l.getMap();if(r--,u&&n.appendMap(u,r),l){let c=s.selection&&s.selection.map(n.slice(r));c&&o++;let d,h=new Yt(u.invert(),l,c),p=i.length-1;(d=i.length&&i[p].merge(h))?i[p]=d:i.push(h)}}else s.map&&r--},this.items.length,0),new xt(He.from(i.reverse()),o)}}xt.empty=new xt(He.empty,0);class Yt{constructor(e,n,r,i){this.map=e,this.step=n,this.selection=r,this.mirrorOffset=i}merge(e){if(this.step&&e.step&&!e.selection){let n=e.step.merge(this.step);if(n)return new Yt(n.getMap().invert(),n,this.selection)}}}class Tn{constructor(e,n,r,i,o){this.done=e,this.undone=n,this.prevRanges=r,this.prevTime=i,this.prevComposition=o}}const Ev=20;function Jh(t){let e=[];for(let n=t.length-1;n>=0&&e.length==0;n--)t[n].forEach((r,i,o,s)=>e.push(o,s));return e}function Wa(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 Xa=!1,Zh=null;function qo(t){let e=t.plugins;if(Zh!=e){Xa=!1,Zh=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){Xa=!0;break}}return Xa}const rr=new Ks("history"),_v=new Ks("closeHistory");function gv(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new Xs({key:rr,state:{init:()=>new Tn(xt.empty,xt.empty,null,0,-1),apply:(e,n,r)=>(function(i,o,s,a){let l,u=s.getMeta(rr);if(u)return u.historyState;s.getMeta(_v)&&(i=new Tn(i.done,i.undone,null,0,-1));let c=s.getMeta("appendedTransaction");if(s.steps.length==0)return i;if(c&&c.getMeta(rr))return c.getMeta(rr).redo?new Tn(i.done.addTransform(s,void 0,a,qo(o)),i.undone,Jh(s.mapping.maps),i.prevTime,i.prevComposition):new Tn(i.done,i.undone.addTransform(s,void 0,a,qo(o)),null,i.prevTime,i.prevComposition);if(s.getMeta("addToHistory")===!1||c&&c.getMeta("addToHistory")===!1)return(l=s.getMeta("rebased"))?new Tn(i.done.rebased(s,l),i.undone.rebased(s,l),Wa(i.prevRanges,s.mapping),i.prevTime,i.prevComposition):new Tn(i.done.addMaps(s.mapping.maps),i.undone.addMaps(s.mapping.maps),Wa(i.prevRanges,s.mapping),i.prevTime,i.prevComposition);{let d=s.getMeta("composition"),h=i.prevTime==0||!c&&i.prevComposition!=d&&(i.prevTime<(s.time||0)-a.newGroupDelay||!(function(m,_){if(!_)return!1;if(!m.docChanged)return!0;let E=!1;return m.mapping.maps[0].forEach((g,A)=>{for(let S=0;S<_.length;S+=2)g<=_[S+1]&&A>=_[S]&&(E=!0)}),E})(s,i.prevRanges)),p=c?Wa(i.prevRanges,s.mapping):Jh(s.mapping.maps);return new Tn(i.done.addTransform(s,h?o.selection.getBookmark():void 0,a,qo(o)),xt.empty,p,s.time,d==null?i.prevComposition:d)}})(n,r,e,t)},config:t,props:{handleDOMEvents:{beforeinput(e,n){let r=n.inputType,i=r=="historyUndo"?o_:r=="historyRedo"?Xl:null;return!(!i||!e.editable)&&(n.preventDefault(),i(e.state,e.dispatch))}}}})}function i_(t,e){return(n,r)=>{let i=rr.getState(n);if(!i||(t?i.undone:i.done).eventCount==0)return!1;if(r){let o=(function(s,a,l){let u=qo(a),c=rr.get(a).spec.config,d=(l?s.undone:s.done).popEvent(a,u);if(!d)return null;let h=d.selection.resolve(d.transform.doc),p=(l?s.done:s.undone).addTransform(d.transform,a.selection.getBookmark(),c,u),m=new Tn(l?p:d.remaining,l?d.remaining:p,null,0,-1);return d.transform.setSelection(h).setMeta(rr,{redo:l,historyState:m})})(i,n,t);o&&r(e?o.scrollIntoView():o)}return!0}}const o_=i_(!1,!0),Xl=i_(!0,!0),s_=(t,e)=>!t.selection.empty&&(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function ri(t,e,n=!1){for(let r=t;r;r=e=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}function Qh(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 ep(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 Kl(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 Av=(t,e)=>{let{$from:n,$to:r}=t.selection;if(t.selection instanceof Q&&t.selection.node.isBlock)return!(!n.parentOffset||!Xo(t.doc,n.pos)||(e&&e(t.tr.split(n.pos).scrollIntoView()),0));if(!n.parent.isBlock)return!1;if(e){let i=r.parentOffset==r.parent.content.size,o=t.tr;(t.selection instanceof de||t.selection instanceof Rt)&&o.deleteSelection();let s=n.depth==0?null:Kl(n.node(-1).contentMatchAt(n.indexAfter(-1))),a=i&&s?[{type:s}]:void 0,l=Xo(o.doc,o.mapping.map(n.pos),1,a);if(a||l||!Xo(o.doc,o.mapping.map(n.pos),1,s?[{type:s}]:void 0)||(s&&(a=[{type:s}]),l=!0),l&&(o.split(o.mapping.map(n.pos),1,a),!i&&!n.parentOffset&&n.parent.type!=s)){let u=o.mapping.map(n.before()),c=o.doc.resolve(u);s&&n.node(-1).canReplaceWith(c.index(),c.index()+1,s)&&o.setNodeMarkup(o.mapping.map(n.before()),s)}e(o.scrollIntoView())}return!0};function a_(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(d,h,p){let m=h.nodeBefore,_=h.nodeAfter,E=h.index();return!(!(m&&_&&m.type.compatibleContent(_.type))||(!m.content.size&&h.parent.canReplace(E-1,E)?(p&&p(d.tr.delete(h.pos-m.nodeSize,h.pos).scrollIntoView()),0):!h.parent.canReplace(E,E+1)||!_.isTextblock&&!rh(d.doc,h.pos)||(p&&p(d.tr.clearIncompatible(h.pos,m.type,m.contentMatchAt(m.childCount)).join(h.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 d=e.pos+s.nodeSize,h=j.empty;for(let _=r.length-1;_>=0;_--)h=j.from(r[_].create(null,h));h=j.from(o.copy(h));let p=t.tr.step(new Ot(e.pos-1,d,e.pos,d,new G(h,1,0),r.length,!0)),m=d+2*r.length;rh(p.doc,m)&&p.join(m),n(p.scrollIntoView())}return!0}let l=pe.findFrom(e,1),u=l&&l.$from.blockRange(l.$to),c=u&&zc(u);if(c!=null&&c>=e.depth)return n&&n(t.tr.lift(u,c).scrollIntoView()),!0;if(a&&ri(s,"start",!0)&&ri(o,"end")){let d=o,h=[];for(;h.push(d),!d.isTextblock;)d=d.lastChild;let p=s,m=1;for(;!p.isTextblock;p=p.firstChild)m++;if(d.canReplace(d.childCount,d.childCount,p.content)){if(n){let _=j.empty;for(let E=h.length-1;E>=0;E--)_=j.from(h[E].copy(_));n(t.tr.step(new Ot(e.pos-h.length,e.pos+s.nodeSize,e.pos+m,e.pos+s.nodeSize-m,new G(_,h.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function l_(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(de.create(e.doc,t<0?i.start(o):i.end(o)))),!0)}}const Sv=l_(-1),vv=l_(1);function Qc(...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 Ka=Qc(s_,(t,e,n)=>{let r=(function(s,a){let{$cursor:l}=s.selection;return!l||(a?!a.endOfTextblock("backward",s):l.parentOffset>0)?null:l})(t,n);if(!r)return!1;let i=Qh(r);if(!i){let s=r.blockRange(),a=s&&zc(s);return a!=null&&(e&&e(t.tr.lift(s,a).scrollIntoView()),!0)}let o=i.nodeBefore;if(!o.type.spec.isolating&&a_(t,i,e))return!0;if(r.parent.content.size==0&&(ri(o,"end")||Q.isSelectable(o))){let s=$c(t.doc,r.before(),r.after(),G.empty);if(s&&s.slice.size<s.to-s.from){if(e){let a=t.tr.step(s);a.setSelection(ri(o,"end")?pe.findFrom(a.doc.resolve(a.mapping.map(i.pos,-1)),-1):Q.create(a.doc,i.pos-o.nodeSize)),e(a.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=Qh(r)}let s=o&&o.nodeBefore;return!(!s||!Q.isSelectable(s))&&(e&&e(t.tr.setSelection(Q.create(t.doc,o.pos-s.nodeSize)).scrollIntoView()),!0)}),tp=Qc(s_,(t,e,n)=>{let r=(function(s,a){let{$cursor:l}=s.selection;return!l||(a?!a.endOfTextblock("forward",s):l.parentOffset<l.parent.content.size)?null:l})(t,n);if(!r)return!1;let i=ep(r);if(!i)return!1;let o=i.nodeAfter;if(a_(t,i,e))return!0;if(r.parent.content.size==0&&(ri(o,"start")||Q.isSelectable(o))){let s=$c(t.doc,r.before(),r.after(),G.empty);if(s&&s.slice.size<s.to-s.from){if(e){let a=t.tr.step(s);a.setSelection(ri(o,"start")?pe.findFrom(a.doc.resolve(a.mapping.map(i.pos)),1):Q.create(a.doc,a.mapping.map(i.pos))),e(a.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=ep(r)}let s=o&&o.nodeAfter;return!(!s||!Q.isSelectable(s))&&(e&&e(t.tr.setSelection(Q.create(t.doc,o.pos)).scrollIntoView()),!0)});const dn={Enter:Qc((t,e)=>{let{$head:n,$anchor:r}=t.selection;return!(!n.parent.type.spec.code||!n.sameParent(r))&&(e&&e(t.tr.insertText(`
16
- `).scrollIntoView()),!0)},(t,e)=>{let n=t.selection,{$from:r,$to:i}=n;if(n instanceof Rt||r.parent.inlineContent||i.parent.inlineContent)return!1;let o=Kl(i.parent.contentMatchAt(i.indexAfter()));if(!o||!o.isTextblock)return!1;if(e){let s=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,a=t.tr.insert(s,o.createAndFill());a.setSelection(de.create(a.doc,s+1)),e(a.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 o=n.before();if(Xo(t.doc,o))return e&&e(t.tr.split(o).scrollIntoView()),!0}let r=n.blockRange(),i=r&&zc(r);return i!=null&&(e&&e(t.tr.lift(r,i).scrollIntoView()),!0)},Av),"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=Kl(i.contentMatchAt(o));if(!s||!i.canReplaceWith(o,o,s))return!1;if(e){let a=n.after(),l=t.tr.replaceWith(a,a,s.createAndFill());l.setSelection(pe.near(l.doc.resolve(a),1)),e(l.scrollIntoView())}return!0},Backspace:Ka,"Mod-Backspace":Ka,"Shift-Backspace":Ka,Delete:tp,"Mod-Delete":tp,"Mod-a":(t,e)=>(e&&e(t.tr.setSelection(new Rt(t.doc))),!0)},c_={"Ctrl-h":dn.Backspace,"Alt-Backspace":dn["Mod-Backspace"],"Ctrl-d":dn.Delete,"Ctrl-Alt-Backspace":dn["Mod-Delete"],"Alt-Delete":dn["Mod-Delete"],"Alt-d":dn["Mod-Delete"],"Ctrl-a":Sv,"Ctrl-e":vv};for(let t in dn)c_[t]=dn[t];const Mo=(typeof navigator!="undefined"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!(typeof os=="undefined"||!os.platform)&&os.platform()=="darwin")?c_:dn;function eu(t,e){return t.reduce((n,r,i)=>n.concat(e(r,i)),[])}var np,Ai={},Ov=(function(){if(np)return Ai;function t(n){return String.fromCharCode(parseInt(n.slice(1),16))}function e(n){return`%${`00${n.charCodeAt(0).toString(16)}`.slice(-2)}`}return np=1,Object.defineProperty(Ai,"__esModule",{value:!0}),Ai.encode=function(n){return btoa(encodeURIComponent(n).replace(/%[0-9A-F]{2}/g,t))},Ai.decode=function(n){return decodeURIComponent(Array.from(atob(n),e).join(""))},Ai})();const Dv=/[^a-zA-Z\u00C0-\u024F\u1E00-\u1EFF\u0400-\u044f\u0300-\u036e]+/,Tv=t=>t.split(Dv).filter(e=>e).map(e=>e[0]).join("")||t[Symbol.iterator]().next().value||"";function u_(t,e){const n=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
15
+ `))),0,0),t.someProp("transformPasted",h=>{s=h(s,t,!0)}),s;let d=t.someProp("clipboardTextParser",h=>h(e,i,r,t));if(d)s=d;else{let h=i.marks(),{schema:p}=t.state,m=ci.fromSchema(p);o=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(_=>{let E=o.appendChild(document.createElement("p"));_&&E.appendChild(m.serializeNode(p.text(_,h)))})}}else t.someProp("transformPastedHTML",d=>{n=d(n,t)}),o=(function(d){let h=/^(\s*<meta [^>]*>)*/.exec(d);h&&(d=d.slice(h[0].length));let p,m=WE().createElement("div"),_=/<([a-z][^>\s]+)/i.exec(d);if((p=_&&GE[_[1].toLowerCase()])&&(d=p.map(E=>"<"+E+">").join("")+d+p.map(E=>"</"+E+">").reverse().join("")),m.innerHTML=(function(E){let A=window.trustedTypes;return A?(Ba||(Ba=A.defaultPolicy||A.createPolicy("ProseMirrorClipboard",{createHTML:g=>g})),Ba.createHTML(E)):E})(d),p)for(let E=0;E<p.length;E++)m=m.querySelector(p[E])||m;return m})(n),fo&&(function(d){let h=d.querySelectorAll(Ue?"span:not([class]):not([style])":"span.Apple-converted-space");for(let p=0;p<h.length;p++){let m=h[p];m.childNodes.length==1&&m.textContent==" "&&m.parentNode&&m.parentNode.replaceChild(d.ownerDocument.createTextNode(" "),m)}})(o);let u=o&&o.querySelector("[data-pm-slice]"),c=u&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(u.getAttribute("data-pm-slice")||"");if(c&&c[3])for(let d=+c[3];d>0;d--){let h=o.firstChild;for(;h&&h.nodeType!=1;)h=h.nextSibling;if(!h)break;o=h}if(s||(s=(t.someProp("clipboardParser")||t.someProp("domParser")||Wi.fromSchema(t.state.schema)).parseSlice(o,{preserveWhitespace:!(!l&&!c),context:i,ruleFromNode:h=>h.nodeName!="BR"||h.nextSibling||!h.parentNode||YS.test(h.parentNode.nodeName)?null:{ignore:!0}})),c)s=(function(d,h){if(!d.size)return d;let p,m=d.content.firstChild.type.schema;try{p=JSON.parse(h)}catch(g){return d}let{content:_,openStart:E,openEnd:A}=d;for(let g=p.length-2;g>=0;g-=2){let S=m.nodes[p[g]];if(!S||S.hasRequiredAttrs())break;_=j.from(S.create(p[g+1],_)),E++,A++}return new G(_,E,A)})(kh(s,+c[1],+c[2]),c[4]);else if(s=G.maxOpen((function(d,h){if(d.childCount<2)return d;for(let p=h.depth;p>=0;p--){let m,_=h.node(p).contentMatchAt(h.index(p)),E=[];if(d.forEach(A=>{if(!E)return;let g,S=_.findWrapping(A.type);if(!S)return E=null;if(g=E.length&&m.length&&$E(S,m,A,E[E.length-1],0))E[E.length-1]=g;else{E.length&&(E[E.length-1]=YE(E[E.length-1],m.length));let O=zE(A,S);E.push(O),_=_.matchType(O.type),m=S}}),E)return j.from(E)}return d})(s.content,i),!0),s.openStart||s.openEnd){let d=0,h=0;for(let p=s.content.firstChild;d<s.openStart&&!p.type.spec.isolating;d++,p=p.firstChild);for(let p=s.content.lastChild;h<s.openEnd&&!p.type.spec.isolating;h++,p=p.lastChild);s=kh(s,d,h)}return t.someProp("transformPasted",d=>{s=d(s,t,l)}),s}const YS=/^(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 zE(t,e,n=0){for(let r=e.length-1;r>=n;r--)t=e[r].create(null,j.from(t));return t}function $E(t,e,n,r,i){if(i<t.length&&i<e.length&&t[i]==e[i]){let o=$E(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(j.from(zE(n,t,i+1))))}}function YE(t,e){if(e==0)return t;let n=t.content.replaceChild(t.childCount-1,YE(t.lastChild,e-1)),r=t.contentMatchAt(t.childCount).fillBefore(j.empty,!0);return t.copy(n.append(r))}function Yl(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=Yl(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(j.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,s.copy(a))}function kh(t,e,n){return e<t.openStart&&(t=new G(Yl(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new G(Yl(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}const GE={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 Mh=null;function WE(){return Mh||(Mh=document.implementation.createHTMLDocument("title"))}let Ba=null;const lt={},ut={},GS={touchstart:!0,touchmove:!0};class WS{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 wn(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function ja(t){t.someProp("handleDOMEvents",e=>{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=r=>Gl(t,r))})}function Gl(t,e){return t.someProp("handleDOMEvents",n=>{let r=n[e.type];return!!r&&(r(t,e)||e.defaultPrevented)})}function XS(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||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(e))return!1;return!0}function Es(t){return{left:t.clientX,top:t.clientY}}function qc(t,e,n,r,i){if(r==-1)return!1;let o=t.state.doc.resolve(r);for(let s=o.depth+1;s>0;s--)if(t.someProp(e,a=>s>o.depth?a(t,n,o.nodeAfter,o.before(s),i,!0):a(t,n,o.node(s),o.before(s),i,!1)))return!0;return!1}function $r(t,e,n){if(t.focused||t.focus(),t.state.selection.eq(e))return;let r=t.state.tr.setSelection(e);r.setMeta("pointer",!0),t.dispatch(r)}function KS(t,e,n,r,i){return qc(t,"handleClickOn",e,n,r)||t.someProp("handleClick",o=>o(t,e,r))||(i?(function(o,s){if(s==-1)return!1;let a,l,u=o.state.selection;u instanceof Q&&(a=u.node);let c=o.state.doc.resolve(s);for(let d=c.depth+1;d>0;d--){let h=d>c.depth?c.nodeAfter:c.node(d);if(Q.isSelectable(h)){l=a&&u.$from.depth>0&&d>=u.$from.depth&&c.before(u.$from.depth+1)==u.$from.pos?c.before(u.$from.depth):c.before(d);break}}return l!=null&&($r(o,Q.create(o.state.doc,l)),!0)})(t,n):(function(o,s){if(s==-1)return!1;let a=o.state.doc.resolve(s),l=a.nodeAfter;return!!(l&&l.isAtom&&Q.isSelectable(l))&&($r(o,new Q(a)),!0)})(t,n))}function qS(t,e,n,r){return qc(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",i=>i(t,e,r))}function JS(t,e,n,r){return qc(t,"handleTripleClickOn",e,n,r)||t.someProp("handleTripleClick",i=>i(t,e,r))||(function(i,o,s){if(s.button!=0)return!1;let a=i.state.doc;if(o==-1)return!!a.inlineContent&&($r(i,de.create(a,0,a.content.size)),!0);let l=a.resolve(o);for(let u=l.depth+1;u>0;u--){let c=u>l.depth?l.nodeAfter:l.node(u),d=l.before(u);if(c.inlineContent)$r(i,de.create(a,d+1,d+1+c.content.size));else{if(!Q.isSelectable(c))continue;$r(i,Q.create(a,d))}return!0}})(t,n,r)}function Wl(t){return _s(t)}ut.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=n.keyCode==16||n.shiftKey,!Ph(t,n)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!pn||!Ue||n.keyCode!=13))if(n.keyCode!=229&&t.domObserver.forceFlush(),!ni||n.keyCode!=13||n.ctrlKey||n.altKey||n.metaKey)t.someProp("handleKeyDown",r=>r(t,n))||$S(t,n)?n.preventDefault():wn(t,"key");else{let r=Date.now();t.input.lastIOSEnter=r,t.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{t.input.lastIOSEnter==r&&(t.someProp("handleKeyDown",i=>i(t,Zn(13,"Enter"))),t.input.lastIOSEnter=0)},200)}},ut.keyup=(t,e)=>{e.keyCode==16&&(t.input.shiftKey=!1)},ut.keypress=(t,e)=>{let n=e;if(Ph(t,n)||!n.charCode||n.ctrlKey&&!n.altKey||yt&&n.metaKey)return;if(t.someProp("handleKeyPress",i=>i(t,n)))return void n.preventDefault();let r=t.state.selection;if(!(r instanceof de&&r.$from.sameParent(r.$to))){let i=String.fromCharCode(n.charCode),o=()=>t.state.tr.insertText(i).scrollIntoView();/[\r\n]/.test(i)||t.someProp("handleTextInput",s=>s(t,r.$from.pos,r.$to.pos,i,o))||t.dispatch(o()),n.preventDefault()}};const XE=yt?"metaKey":"ctrlKey";lt.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let r=Wl(t),i=Date.now(),o="singleClick";i-t.input.lastClick.time<500&&(function(a,l){let u=l.x-a.clientX,c=l.y-a.clientY;return u*u+c*c<100})(n,t.input.lastClick)&&!n[XE]&&t.input.lastClick.button==n.button&&(t.input.lastClick.type=="singleClick"?o="doubleClick":t.input.lastClick.type=="doubleClick"&&(o="tripleClick")),t.input.lastClick={time:i,x:n.clientX,y:n.clientY,type:o,button:n.button};let s=t.posAtCoords(Es(n));s&&(o=="singleClick"?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new ZS(t,s,n,!!r)):(o=="doubleClick"?qS:JS)(t,s.pos,s.inside,n)?n.preventDefault():wn(t,"pointer"))};class ZS{constructor(e,n,r,i){let o,s;if(this.view=e,this.pos=n,this.event=r,this.flushed=i,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!r[XE],this.allowDefault=r.shiftKey,n.inside>-1)o=e.state.doc.nodeAt(n.inside),s=n.inside;else{let c=e.state.doc.resolve(n.pos);o=c.parent,s=c.depth?c.before():0}const a=i?null:r.target,l=a?e.docView.nearestDesc(a,!0):null;this.target=l&&l.nodeDOM.nodeType==1?l.nodeDOM:null;let{selection:u}=e.state;(r.button==0&&o.type.spec.draggable&&o.type.spec.selectable!==!1||u instanceof Q&&u.from<=s&&u.to>s)&&(this.mightDrag={node:o,pos:s,addAttr:!(!this.target||this.target.draggable),setUneditable:!(!this.target||!kt||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()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),wn(e,"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(()=>_n(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(Es(e))),this.updateAllowDefault(e),this.allowDefault||!n?wn(this.view,"pointer"):KS(this.view,n.pos,n.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||Ge&&this.mightDrag&&!this.mightDrag.node.isAtom||Ue&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?($r(this.view,pe.near(this.view.state.doc.resolve(n.pos))),e.preventDefault()):wn(this.view,"pointer")}move(e){this.updateAllowDefault(e),wn(this.view,"pointer"),e.buttons==0&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}function Ph(t,e){return!!t.composing||!!(Ge&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500)&&(t.input.compositionEndedAt=-2e8,!0)}lt.touchstart=t=>{t.input.lastTouch=Date.now(),Wl(t),wn(t,"pointer")},lt.touchmove=t=>{t.input.lastTouch=Date.now(),wn(t,"pointer")},lt.contextmenu=t=>Wl(t);const QS=pn?5e3:-1;function xh(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>_s(t),e))}function KE(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=(function(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp})());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function eO(t){let e=t.domSelectionRange();if(!e.focusNode)return null;let n=(function(i,o){for(;;){if(i.nodeType==3&&o)return i;if(i.nodeType==1&&o>0){if(i.contentEditable=="false")return null;o=Nt(i=i.childNodes[o-1])}else{if(!i.parentNode||qi(i))return null;o=Ye(i),i=i.parentNode}}})(e.focusNode,e.focusOffset),r=(function(i,o){for(;;){if(i.nodeType==3&&o<i.nodeValue.length)return i;if(i.nodeType==1&&o<i.childNodes.length){if(i.contentEditable=="false")return null;i=i.childNodes[o],o=0}else{if(!i.parentNode||qi(i))return null;o=Ye(i)+1,i=i.parentNode}}})(e.focusNode,e.focusOffset);if(n&&r&&n!=r){let i=r.pmViewDesc,o=t.domObserver.lastChangedTextNode;if(n==o||r==o)return o;if(!i||!i.isText(r.nodeValue))return r;if(t.input.compositionNode==r){let s=n.pmViewDesc;if(s&&s.isText(n.nodeValue))return r}}return n||r}function _s(t,e=!1){if(!(pn&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),KE(t),e||t.docView&&t.docView.dirty){let n=Wc(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}}ut.compositionstart=ut.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,n=e.selection.$to;if(e.selection instanceof de&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)||Ue&&wE&&(function(r){let{focusNode:i,focusOffset:o}=r.domSelectionRange();if(!i||i.nodeType!=1||o>=i.childNodes.length)return!1;let s=i.childNodes[o];return s.nodeType==1&&s.contentEditable=="false"})(t)))t.markCursor=t.state.storedMarks||n.marks(),_s(t,!0),t.markCursor=null;else if(_s(t,!e.selection.empty),kt&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=t.domSelectionRange();for(let i=r.focusNode,o=r.focusOffset;i&&i.nodeType==1&&o!=0;){let s=o<0?i.lastChild:i.childNodes[o-1];if(!s)break;if(s.nodeType==3){let a=t.domSelection();a&&a.collapse(s,s.nodeValue.length);break}i=s,o=-1}}t.input.composing=!0}xh(t,QS)},ut.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++,xh(t,20))};const ki=Et&&Pn<15||ni&&LS<604;function Mi(t,e,n,r,i){let o=VE(t,e,n,r,t.state.selection.$from);if(t.someProp("handlePaste",l=>l(t,i,o||G.empty)))return!0;if(!o)return!1;let s=(function(l){return l.openStart==0&&l.openEnd==0&&l.content.childCount==1?l.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 qE(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," "):""}lt.copy=ut.cut=(t,e)=>{let n=e,r=t.state.selection,i=n.type=="cut";if(r.empty)return;let o=ki?null:n.clipboardData,s=r.content(),{dom:a,text:l}=Kc(t,s);o?(n.preventDefault(),o.clearData(),o.setData("text/html",a.innerHTML),o.setData("text/plain",l)):(function(u,c){if(!u.dom.parentNode)return;let d=u.dom.parentNode.appendChild(document.createElement("div"));d.appendChild(c),d.style.cssText="position: fixed; left: -10000px; top: 10px";let h=getSelection(),p=document.createRange();p.selectNodeContents(c),u.dom.blur(),h.removeAllRanges(),h.addRange(p),setTimeout(()=>{d.parentNode&&d.parentNode.removeChild(d),u.focus()},50)})(t,a),i&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))},ut.paste=(t,e)=>{let n=e;if(t.composing&&!pn)return;let r=ki?null:n.clipboardData,i=t.input.shiftKey&&t.input.lastKeyCode!=45;r&&Mi(t,qE(r),r.getData("text/html"),i,n)?n.preventDefault():(function(o,s){if(!o.dom.parentNode)return;let a=o.input.shiftKey||o.state.selection.$from.parent.type.spec.code,l=o.dom.parentNode.appendChild(document.createElement(a?"textarea":"div"));a||(l.contentEditable="true"),l.style.cssText="position: fixed; left: -10000px; top: 10px",l.focus();let u=o.input.shiftKey&&o.input.lastKeyCode!=45;setTimeout(()=>{o.focus(),l.parentNode&&l.parentNode.removeChild(l),a?Mi(o,l.value,null,u,s):Mi(o,l.textContent,l.innerHTML,u,s)},50)})(t,n)};class JE{constructor(e,n,r){this.slice=e,this.move=n,this.node=r}}const tO=yt?"altKey":"ctrlKey";function Fh(t,e){let n=t.someProp("dragCopies",r=>!r(e));return n!=null?n:!e[tO]}lt.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(Es(n));if(!(s&&s.pos>=o.from&&s.pos<=(o instanceof Q?o.to-1:o.to))){if(r&&r.mightDrag)i=Q.create(t.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let d=t.docView.nearestDesc(n.target,!0);d&&d.node.type.spec.draggable&&d!=t.docView&&(i=Q.create(t.state.doc,d.posBefore))}}let a=(i||t.state.selection).content(),{dom:l,text:u,slice:c}=Kc(t,a);(!n.dataTransfer.files.length||!Ue||bE>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(ki?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",ki||n.dataTransfer.setData("text/plain",u),t.dragging=new JE(c,Fh(t,n),i)},lt.dragend=t=>{let e=t.dragging;window.setTimeout(()=>{t.dragging==e&&(t.dragging=null)},50)},ut.dragover=ut.dragenter=(t,e)=>e.preventDefault(),ut.drop=(t,e)=>{try{(function(n,r,i){if(!r.dataTransfer)return;let o=n.posAtCoords(Es(r));if(!o)return;let s=n.state.doc.resolve(o.pos),a=i&&i.slice;a?n.someProp("transformPasted",_=>{a=_(a,n,!1)}):a=VE(n,qE(r.dataTransfer),ki?null:r.dataTransfer.getData("text/html"),!1,s);let l=!(!i||!Fh(n,r));if(n.someProp("handleDrop",_=>_(n,r,a||G.empty,l)))return void r.preventDefault();if(!a)return;r.preventDefault();let u=a?(function(_,E,A){let g=_.resolve(E);if(!A.content.size)return E;let S=A.content;for(let O=0;O<A.openStart;O++)S=S.firstChild.content;for(let O=1;O<=(A.openStart==0&&A.size?2:1);O++)for(let D=g.depth;D>=0;D--){let I=D==g.depth?0:g.pos<=(g.start(D+1)+g.end(D+1))/2?-1:1,R=g.index(D)+(I>0?1:0),y=g.node(D),v=!1;if(O==1)v=y.canReplace(R,R,S);else{let T=y.contentMatchAt(R).findWrapping(S.firstChild.type);v=T&&y.canReplaceWith(R,R,T[0])}if(v)return I==0?g.pos:I<0?g.before(D+1):g.after(D+1)}return null})(n.state.doc,s.pos,a):s.pos;u==null&&(u=s.pos);let c=n.state.tr;if(l){let{node:_}=i;_?_.replace(c):c.deleteSelection()}let d=c.mapping.map(u),h=a.openStart==0&&a.openEnd==0&&a.content.childCount==1,p=c.doc;if(h?c.replaceRangeWith(d,d,a.content.firstChild):c.replaceRange(d,d,a),c.doc.eq(p))return;let m=c.doc.resolve(d);if(h&&Q.isSelectable(a.content.firstChild)&&m.nodeAfter&&m.nodeAfter.sameMarkup(a.content.firstChild))c.setSelection(new Q(m));else{let _=c.mapping.map(u);c.mapping.maps[c.mapping.maps.length-1].forEach((E,A,g,S)=>_=S),c.setSelection(Xc(n,m,c.doc.resolve(_)))}n.focus(),n.dispatch(c.setMeta("uiEvent","drop"))})(t,e,t.dragging)}finally{t.dragging=null}},lt.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())&&_n(t)},20))},lt.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)},lt.beforeinput=(t,e)=>{if(Ue&&pn&&e.inputType=="deleteContentBackward"){t.domObserver.flushSoon();let{domChangeCount:n}=t.input;setTimeout(()=>{if(t.input.domChangeCount!=n||(t.dom.blur(),t.focus(),t.someProp("handleKeyDown",i=>i(t,Zn(8,"Backspace")))))return;let{$cursor:r}=t.state.selection;r&&r.pos>0&&t.dispatch(t.state.tr.delete(r.pos-1,r.pos).scrollIntoView())},50)}};for(let t in ut)lt[t]=ut[t];function Ji(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}class As{constructor(e,n){this.toDOM=e,this.spec=n||lr,this.side=this.spec.side||0}map(e,n,r,i){let{pos:o,deleted:s}=e.mapResult(n.from+i,this.side<0?-1:1);return s?null:new Dt(o-r,o-r,this)}valid(){return!0}eq(e){return this==e||e instanceof As&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Ji(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class Fn{constructor(e,n){this.attrs=e,this.spec=n||lr}map(e,n,r,i){let o=e.map(n.from+i,this.spec.inclusiveStart?-1:1)-r,s=e.map(n.to+i,this.spec.inclusiveEnd?1:-1)-r;return o>=s?null:new Dt(o,s,this)}valid(e,n){return n.from<n.to}eq(e){return this==e||e instanceof Fn&&Ji(this.attrs,e.attrs)&&Ji(this.spec,e.spec)}static is(e){return e.type instanceof Fn}destroy(){}}class Jc{constructor(e,n){this.attrs=e,this.spec=n||lr}map(e,n,r,i){let o=e.mapResult(n.from+i,1);if(o.deleted)return null;let s=e.mapResult(n.to+i,-1);return s.deleted||s.pos<=o.pos?null:new Dt(o.pos-r,s.pos-r,this)}valid(e,n){let r,{index:i,offset:o}=e.content.findIndex(n.from);return o==n.from&&!(r=e.child(i)).isText&&o+r.nodeSize==n.to}eq(e){return this==e||e instanceof Jc&&Ji(this.attrs,e.attrs)&&Ji(this.spec,e.spec)}destroy(){}}class Dt{constructor(e,n,r){this.from=e,this.to=n,this.type=r}copy(e,n){return new Dt(e,n,this.type)}eq(e,n=0){return this.type.eq(e.type)&&this.from+n==e.from&&this.to+n==e.to}map(e,n,r){return this.type.map(e,this,n,r)}static widget(e,n,r){return new Dt(e,e,new As(n,r))}static inline(e,n,r,i){return new Dt(e,n,new Fn(r,i))}static node(e,n,r,i){return new Dt(e,n,new Jc(r,i))}get spec(){return this.type.spec}get inline(){return this.type instanceof Fn}get widget(){return this.type instanceof As}}const kr=[],lr={};class be{constructor(e,n){this.local=e.length?e:kr,this.children=n.length?n:kr}static create(e,n){return n.length?Ko(n,e,0,lr):qe}find(e,n,r){let i=[];return this.findInner(e==null?0:e,n==null?1e9:n,i,0,r),i}findInner(e,n,r,i,o){for(let s=0;s<this.local.length;s++){let a=this.local[s];a.from<=n&&a.to>=e&&(!o||o(a.spec))&&r.push(a.copy(a.from+i,a.to+i))}for(let s=0;s<this.children.length;s+=3)if(this.children[s]<n&&this.children[s+1]>e){let a=this.children[s]+1;this.children[s+2].findInner(e-a,n-a,r,i+a,o)}}map(e,n,r){return this==qe||e.maps.length==0?this:this.mapInner(e,n,0,0,r||lr)}mapInner(e,n,r,i,o){let s;for(let a=0;a<this.local.length;a++){let l=this.local[a].map(e,r,i);l&&l.type.valid(n,l)?(s||(s=[])).push(l):o.onRemove&&o.onRemove(this.local[a].spec)}return this.children.length?(function(a,l,u,c,d,h,p){let m=a.slice();for(let E=0,A=h;E<u.maps.length;E++){let g=0;u.maps[E].forEach((S,O,D,I)=>{let R=I-D-(O-S);for(let y=0;y<m.length;y+=3){let v=m[y+1];if(v<0||S>v+A-g)continue;let T=m[y]+A-g;O>=T?m[y+1]=S<=T?-2:-1:S>=A&&R&&(m[y]+=R,m[y+1]+=R)}g+=R}),A=u.maps[E].map(A,-1)}let _=!1;for(let E=0;E<m.length;E+=3)if(m[E+1]<0){if(m[E+1]==-2){_=!0,m[E+1]=-1;continue}let A=u.map(a[E]+h),g=A-d;if(g<0||g>=c.content.size){_=!0;continue}let S=u.map(a[E+1]+h,-1)-d,{index:O,offset:D}=c.content.findIndex(g),I=c.maybeChild(O);if(I&&D==g&&D+I.nodeSize==S){let R=m[E+2].mapInner(u,I,A+1,a[E]+h+1,p);R!=qe?(m[E]=g,m[E+1]=S,m[E+2]=R):(m[E+1]=-2,_=!0)}else _=!0}if(_){let E=(function(g,S,O,D,I,R,y){function v(T,C){for(let N=0;N<T.local.length;N++){let L=T.local[N].map(D,I,C);L?O.push(L):y.onRemove&&y.onRemove(T.local[N].spec)}for(let N=0;N<T.children.length;N+=3)v(T.children[N+2],T.children[N]+C+1)}for(let T=0;T<g.length;T+=3)g[T+1]==-1&&v(g[T+2],S[T]+R+1);return O})(m,a,l,u,d,h,p),A=Ko(E,c,0,p);l=A.local;for(let g=0;g<m.length;g+=3)m[g+1]<0&&(m.splice(g,3),g-=3);for(let g=0,S=0;g<A.children.length;g+=3){let O=A.children[g];for(;S<m.length&&m[S]<O;)S+=3;m.splice(S,0,A.children[g],A.children[g+1],A.children[g+2])}}return new be(l.sort(nr),m)})(this.children,s||[],e,n,r,i,o):s?new be(s.sort(nr),kr):qe}add(e,n){return n.length?this==qe?be.create(e,n):this.addInner(e,n,0):this}addInner(e,n,r){let i,o=0;e.forEach((a,l)=>{let u,c=l+r;if(u=QE(n,a,c)){for(i||(i=this.children.slice());o<i.length&&i[o]<l;)o+=3;i[o]==l?i[o+2]=i[o+2].addInner(a,u,c+1):i.splice(o,0,l,l+a.nodeSize,Ko(u,a,c+1,lr)),o+=3}});let s=ZE(o?e_(n):n,-r);for(let a=0;a<s.length;a++)s[a].type.valid(e,s[a])||s.splice(a--,1);return new be(s.length?this.local.concat(s).sort(nr):this.local,i||this.children)}remove(e){return e.length==0||this==qe?this:this.removeInner(e,0)}removeInner(e,n){let r=this.children,i=this.local;for(let o=0;o<r.length;o+=3){let s,a=r[o]+n,l=r[o+1]+n;for(let c,d=0;d<e.length;d++)(c=e[d])&&c.from>a&&c.to<l&&(e[d]=null,(s||(s=[])).push(c));if(!s)continue;r==this.children&&(r=this.children.slice());let u=r[o+2].removeInner(s,a+1);u!=qe?r[o+2]=u:(r.splice(o,3),o-=3)}if(i.length){for(let o,s=0;s<e.length;s++)if(o=e[s])for(let a=0;a<i.length;a++)i[a].eq(o,n)&&(i==this.local&&(i=this.local.slice()),i.splice(a--,1))}return r==this.children&&i==this.local?this:i.length||r.length?new be(i,r):qe}forChild(e,n){if(this==qe)return this;if(n.isLeaf)return be.empty;let r,i;for(let a=0;a<this.children.length;a+=3)if(this.children[a]>=e){this.children[a]==e&&(r=this.children[a+2]);break}let o=e+1,s=o+n.content.size;for(let a=0;a<this.local.length;a++){let l=this.local[a];if(l.from<s&&l.to>o&&l.type instanceof Fn){let u=Math.max(o,l.from)-o,c=Math.min(s,l.to)-o;u<c&&(i||(i=[])).push(l.copy(u,c))}}if(i){let a=new be(i.sort(nr),kr);return r?new yn([a,r]):a}return r||qe}eq(e){if(this==e)return!0;if(!(e instanceof be)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let n=0;n<this.local.length;n++)if(!this.local[n].eq(e.local[n]))return!1;for(let n=0;n<this.children.length;n+=3)if(this.children[n]!=e.children[n]||this.children[n+1]!=e.children[n+1]||!this.children[n+2].eq(e.children[n+2]))return!1;return!0}locals(e){return Zc(this.localsInner(e))}localsInner(e){if(this==qe)return kr;if(e.inlineContent||!this.local.some(Fn.is))return this.local;let n=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof Fn||n.push(this.local[r]);return n}forEachSet(e){e(this)}}be.empty=new be([],[]),be.removeOverlap=Zc;const qe=be.empty;class yn{constructor(e){this.members=e}map(e,n){const r=this.members.map(i=>i.map(e,n,lr));return yn.from(r)}forChild(e,n){if(n.isLeaf)return be.empty;let r=[];for(let i=0;i<this.members.length;i++){let o=this.members[i].forChild(e,n);o!=qe&&(o instanceof yn?r=r.concat(o.members):r.push(o))}return yn.from(r)}eq(e){if(!(e instanceof yn)||e.members.length!=this.members.length)return!1;for(let n=0;n<this.members.length;n++)if(!this.members[n].eq(e.members[n]))return!1;return!0}locals(e){let n,r=!0;for(let i=0;i<this.members.length;i++){let o=this.members[i].localsInner(e);if(o.length)if(n){r&&(n=n.slice(),r=!1);for(let s=0;s<o.length;s++)n.push(o[s])}else n=o}return n?Zc(r?n:n.sort(nr)):kr}static from(e){switch(e.length){case 0:return qe;case 1:return e[0];default:return new yn(e.every(n=>n instanceof be)?e:e.reduce((n,r)=>n.concat(r instanceof be?r:r.members),[]))}}forEachSet(e){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(e)}}function ZE(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 Dt(i.from+e,i.to+e,i.type))}return n}function QE(t,e,n){if(e.isLeaf)return null;let r=n+e.nodeSize,i=null;for(let o,s=0;s<t.length;s++)(o=t[s])&&o.from>n&&o.to<r&&((i||(i=[])).push(o),t[s]=null);return i}function e_(t){let e=[];for(let n=0;n<t.length;n++)t[n]!=null&&e.push(t[n]);return e}function Ko(t,e,n,r){let i=[],o=!1;e.forEach((a,l)=>{let u=QE(t,a,l+n);if(u){o=!0;let c=Ko(u,a,n+l+1,r);c!=qe&&i.push(l,l+a.nodeSize,c)}});let s=ZE(o?e_(t):t,-n).sort(nr);for(let a=0;a<s.length;a++)s[a].type.valid(e,s[a])||(r.onRemove&&r.onRemove(s[a].spec),s.splice(a--,1));return s.length||i.length?new be(s,i):qe}function nr(t,e){return t.from-e.from||t.to-e.to}function Zc(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),Hh(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),Hh(e,i+1,o.copy(r.to,o.to)))}}return e}function Hh(t,e,n){for(;e<t.length&&nr(n,t[e])>0;)e++;t.splice(e,0,n)}function Va(t){let e=[];return t.someProp("decorations",n=>{let r=n(t.state);r&&r!=qe&&e.push(r)}),t.cursorWrapper&&e.push(be.create(t.state.doc,[t.cursorWrapper.deco])),yn.from(e)}const nO={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},rO=Et&&Pn<=11;class iO{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class oO{constructor(e,n){this.view=e,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new iO,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let i=0;i<r.length;i++)this.queue.push(r[i]);Et&&Pn<=11&&r.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():Ge&&e.composing&&r.some(i=>i.type=="childList"&&i.target.nodeName=="TR")?(e.input.badSafariComposition=!0,this.flushSoon()):this.flush()}),rO&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.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,nO)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let n=0;n<e.length;n++)this.queue.push(e[n]);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(Ih(this.view)){if(this.suppressingSelectionUpdates)return _n(this.view);if(Et&&Pn<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&pr(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let n,r=new Set;for(let o=e.focusNode;o;o=ti(o))r.add(o);for(let o=e.anchorNode;o;o=ti(o))if(r.has(o)){n=o;break}let i=n&&this.view.docView.nearestDesc(n);return i&&i.ignoreMutation({type:"selection",target:n.nodeType==3?n.parentNode:n})?(this.setCurSelection(),!0):void 0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let r=e.domSelectionRange(),i=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&Ih(e)&&!this.ignoreSelectionChange(r),o=-1,s=-1,a=!1,l=[];if(e.editable)for(let c=0;c<n.length;c++){let d=this.registerMutation(n[c],l);d&&(o=o<0?d.from:Math.min(d.from,o),s=s<0?d.to:Math.max(d.to,s),d.typeOver&&(a=!0))}if(kt&&l.length){let c=l.filter(d=>d.nodeName=="BR");if(c.length==2){let[d,h]=c;d.parentNode&&d.parentNode.parentNode==h.parentNode?h.remove():d.remove()}else{let{focusNode:d}=this.currentSelection;for(let h of c){let p=h.parentNode;!p||p.nodeName!="LI"||d&&sO(e,d)==p||h.remove()}}}else if((Ue||Ge)&&l.some(c=>c.nodeName=="BR")&&(e.input.lastKeyCode==8||e.input.lastKeyCode==46)){for(let c of l)if(c.nodeName=="BR"&&c.parentNode){let d=c.nextSibling;d&&d.nodeType==1&&d.contentEditable=="false"&&c.parentNode.removeChild(c)}}let u=null;o<0&&i&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&qs(r)&&(u=Wc(e))&&u.eq(pe.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,_n(e),this.currentSelection.set(r),e.scrollToSelection()):(o>-1||i)&&(o>-1&&(e.docView.markDirty(o,s),(function(c){if(!Uh.has(c)&&(Uh.set(c,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(c.dom).whiteSpace)!==-1)){if(c.requiresGeckoHackNode=kt,Bh)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."),Bh=!0}})(e)),e.input.badSafariComposition&&(e.input.badSafariComposition=!1,(function(c,d){var h;let{focusNode:p,focusOffset:m}=c.domSelectionRange();for(let _ of d)if(((h=_.parentNode)===null||h===void 0?void 0:h.nodeName)=="TR"){let E=_.nextSibling;for(;E&&E.nodeName!="TD"&&E.nodeName!="TH";)E=E.nextSibling;if(E){let A=E;for(;;){let g=A.firstChild;if(!g||g.nodeType!=1||g.contentEditable=="false"||/^(BR|IMG)$/.test(g.nodeName))break;A=g}A.insertBefore(_,A.firstChild),p==_&&c.domSelection().collapse(_,m)}else _.parentNode.removeChild(_)}})(e,l)),this.handleDOMChange(o,s,a,l),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(r)||_n(e),this.currentSelection.set(r))}registerMutation(e,n){if(n.indexOf(e.target)>-1)return null;let r=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(r==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!r||r.ignoreMutation(e))return null;if(e.type=="childList"){for(let u=0;u<e.addedNodes.length;u++){let c=e.addedNodes[u];n.push(c),c.nodeType==3&&(this.lastChangedTextNode=c)}if(r.contentDOM&&r.contentDOM!=r.dom&&!r.contentDOM.contains(e.target))return{from:r.posBefore,to:r.posAfter};let i=e.previousSibling,o=e.nextSibling;if(Et&&Pn<=11&&e.addedNodes.length)for(let u=0;u<e.addedNodes.length;u++){let{previousSibling:c,nextSibling:d}=e.addedNodes[u];(!c||Array.prototype.indexOf.call(e.addedNodes,c)<0)&&(i=c),(!d||Array.prototype.indexOf.call(e.addedNodes,d)<0)&&(o=d)}let s=i&&i.parentNode==e.target?Ye(i)+1:0,a=r.localPosFromDOM(e.target,s,-1),l=o&&o.parentNode==e.target?Ye(o):e.target.childNodes.length;return{from:a,to:r.localPosFromDOM(e.target,l,1)}}return e.type=="attributes"?{from:r.posAtStart-r.border,to:r.posAtEnd+r.border}:(this.lastChangedTextNode=e.target,{from:r.posAtStart,to:r.posAtEnd,typeOver:e.target.nodeValue==e.oldValue})}}let Uh=new WeakMap,Bh=!1;function jh(t,e){let n=e.startContainer,r=e.startOffset,i=e.endContainer,o=e.endOffset,s=t.domAtPos(t.state.selection.anchor);return pr(s.node,s.offset,i,o)&&([n,r,i,o]=[i,o,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:o}}function sO(t,e){for(let n=e.parentNode;n&&n!=t.dom;n=n.parentNode){let r=t.docView.nearestDesc(n,!0);if(r&&r.node.isBlock)return n}return null}function aO(t){let e=t.pmViewDesc;if(e)return e.parseRule();if(t.nodeName=="BR"&&t.parentNode){if(Ge&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}if(t.parentNode.lastChild==t||Ge&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if(t.nodeName=="IMG"&&t.getAttribute("mark-placeholder"))return{ignore:!0};return null}const lO=/^(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 cO(t,e,n,r,i){let o=t.input.compositionPendingChanges||(t.composing?t.input.compositionID:0);if(t.input.compositionPendingChanges=0,e<0){let R=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,y=Wc(t,R);if(y&&!t.state.selection.eq(y)){if(Ue&&pn&&t.input.lastKeyCode===13&&Date.now()-100<t.input.lastKeyCodeTime&&t.someProp("handleKeyDown",T=>T(t,Zn(13,"Enter"))))return;let v=t.state.tr.setSelection(y);R=="pointer"?v.setMeta("pointer",!0):R=="key"&&v.scrollIntoView(),o&&v.setMeta("composition",o),t.dispatch(v)}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,u,c=t.state.selection,d=(function(R,y,v){let T,{node:C,fromOffset:N,toOffset:L,from:b,to:k}=R.docView.parseRange(y,v),x=R.domSelectionRange(),M=x.anchorNode;if(M&&R.dom.contains(M.nodeType==1?M:M.parentNode)&&(T=[{node:M,offset:x.anchorOffset}],qs(x)||T.push({node:x.focusNode,offset:x.focusOffset})),Ue&&R.input.lastKeyCode===8)for(let le=L;le>N;le--){let ce=C.childNodes[le-1],he=ce.pmViewDesc;if(ce.nodeName=="BR"&&!he){L=le;break}if(!he||he.size)break}let U=R.state.doc,V=R.someProp("domParser")||Wi.fromSchema(R.state.schema),W=U.resolve(b),$=null,oe=V.parse(C,{topNode:W.parent,topMatch:W.parent.contentMatchAt(W.index()),topOpen:!0,from:N,to:L,preserveWhitespace:W.parent.type.whitespace!="pre"||"full",findPositions:T,ruleFromNode:aO,context:W});if(T&&T[0].pos!=null){let le=T[0].pos,ce=T[1]&&T[1].pos;ce==null&&(ce=le),$={anchor:le+b,head:ce+b}}return{doc:oe,sel:$,from:b,to:k}})(t,e,n),h=t.state.doc,p=h.slice(d.from,d.to);t.input.lastKeyCode===8&&Date.now()-100<t.input.lastKeyCodeTime?(l=t.state.selection.to,u="end"):(l=t.state.selection.from,u="start"),t.input.lastKeyCode=null;let m=(function(R,y,v,T,C){let N=R.findDiffStart(y,v);if(N==null)return null;let{a:L,b}=R.findDiffEnd(y,v+R.size,v+y.size);if(C=="end"&&(T-=L+Math.max(0,N-Math.min(L,b))-N),L<N&&R.size<y.size){let k=T<=N&&T>=L?N-T:0;N-=k,N&&N<y.size&&zh(y.textBetween(N-1,N+1))&&(N+=k?1:-1),b=N+(b-L),L=N}else if(b<N){let k=T<=N&&T>=b?N-T:0;N-=k,N&&N<R.size&&zh(R.textBetween(N-1,N+1))&&(N+=k?1:-1),L=N+(L-b),b=N}return{start:N,endA:L,endB:b}})(p.content,d.doc.content,d.from,l,u);if(m&&t.input.domChangeCount++,(ni&&t.input.lastIOSEnter>Date.now()-225||pn)&&i.some(R=>R.nodeType==1&&!lO.test(R.nodeName))&&(!m||m.endA>=m.endB)&&t.someProp("handleKeyDown",R=>R(t,Zn(13,"Enter"))))return void(t.input.lastIOSEnter=0);if(!m){if(!(r&&c instanceof de&&!c.empty&&c.$head.sameParent(c.$anchor))||t.composing||d.sel&&d.sel.anchor!=d.sel.head){if(d.sel){let R=Vh(t,t.state.doc,d.sel);if(R&&!R.eq(t.state.selection)){let y=t.state.tr.setSelection(R);o&&y.setMeta("composition",o),t.dispatch(y)}}return}m={start:c.from,endA:c.to,endB:c.to}}t.state.selection.from<t.state.selection.to&&m.start==m.endB&&t.state.selection instanceof de&&(m.start>t.state.selection.from&&m.start<=t.state.selection.from+2&&t.state.selection.from>=d.from?m.start=t.state.selection.from:m.endA<t.state.selection.to&&m.endA>=t.state.selection.to-2&&t.state.selection.to<=d.to&&(m.endB+=t.state.selection.to-m.endA,m.endA=t.state.selection.to)),Et&&Pn<=11&&m.endB==m.start+1&&m.endA==m.start&&m.start>d.from&&d.doc.textBetween(m.start-d.from-1,m.start-d.from+1)=="  "&&(m.start--,m.endA--,m.endB--);let _=d.doc.resolveNoCache(m.start-d.from),E=d.doc.resolveNoCache(m.endB-d.from),A=h.resolve(m.start),g=_.sameParent(E)&&_.parent.inlineContent&&A.end()>=m.endA;if((ni&&t.input.lastIOSEnter>Date.now()-225&&(!g||i.some(R=>R.nodeName=="DIV"||R.nodeName=="P"))||!g&&_.pos<d.doc.content.size&&(!_.sameParent(E)||!_.parent.inlineContent)&&_.pos<E.pos&&!/\S/.test(d.doc.textBetween(_.pos,E.pos,"","")))&&t.someProp("handleKeyDown",R=>R(t,Zn(13,"Enter"))))return void(t.input.lastIOSEnter=0);if(t.state.selection.anchor>m.start&&(function(R,y,v,T,C){if(v-y<=C.pos-T.pos||za(T,!0,!1)<C.pos)return!1;let N=R.resolve(y);if(!T.parent.isTextblock){let b=N.nodeAfter;return b!=null&&v==y+b.nodeSize}if(N.parentOffset<N.parent.content.size||!N.parent.isTextblock)return!1;let L=R.resolve(za(N,!0,!0));return!(!L.parent.isTextblock||L.pos>v||za(L,!0,!1)<v)&&T.parent.content.cut(T.parentOffset).eq(L.parent.content)})(h,m.start,m.endA,_,E)&&t.someProp("handleKeyDown",R=>R(t,Zn(8,"Backspace"))))return void(pn&&Ue&&t.domObserver.suppressSelectionUpdates());Ue&&m.endB==m.start&&(t.input.lastChromeDelete=Date.now()),pn&&!g&&_.start()!=E.start()&&E.parentOffset==0&&_.depth==E.depth&&d.sel&&d.sel.anchor==d.sel.head&&d.sel.head==m.endA&&(m.endB-=2,E=d.doc.resolveNoCache(m.endB-d.from),setTimeout(()=>{t.someProp("handleKeyDown",function(R){return R(t,Zn(13,"Enter"))})},20));let S,O=m.start,D=m.endA,I=R=>{let y=R||t.state.tr.replace(O,D,d.doc.slice(m.start-d.from,m.endB-d.from));if(d.sel){let v=Vh(t,y.doc,d.sel);v&&!(Ue&&t.composing&&v.empty&&(m.start!=m.endB||t.input.lastChromeDelete<Date.now()-100)&&(v.head==O||v.head==y.mapping.map(D)-1)||Et&&v.empty&&v.head==O)&&y.setSelection(v)}return o&&y.setMeta("composition",o),y.scrollIntoView()};if(g)if(_.pos==E.pos){Et&&Pn<=11&&_.parentOffset==0&&(t.domObserver.suppressSelectionUpdates(),setTimeout(()=>_n(t),20));let R=I(t.state.tr.delete(O,D)),y=h.resolve(m.start).marksAcross(h.resolve(m.endA));y&&R.ensureMarks(y),t.dispatch(R)}else if(m.endA==m.endB&&(S=(function(R,y){let v,T,C,N=R.firstChild.marks,L=y.firstChild.marks,b=N,k=L;for(let M=0;M<L.length;M++)b=L[M].removeFromSet(b);for(let M=0;M<N.length;M++)k=N[M].removeFromSet(k);if(b.length==1&&k.length==0)T=b[0],v="add",C=M=>M.mark(T.addToSet(M.marks));else{if(b.length!=0||k.length!=1)return null;T=k[0],v="remove",C=M=>M.mark(T.removeFromSet(M.marks))}let x=[];for(let M=0;M<y.childCount;M++)x.push(C(y.child(M)));if(j.from(x).eq(R))return{mark:T,type:v}})(_.parent.content.cut(_.parentOffset,E.parentOffset),A.parent.content.cut(A.parentOffset,m.endA-A.start())))){let R=I(t.state.tr);S.type=="add"?R.addMark(O,D,S.mark):R.removeMark(O,D,S.mark),t.dispatch(R)}else if(_.parent.child(_.index()).isText&&_.index()==E.index()-(E.textOffset?0:1)){let R=_.parent.textBetween(_.parentOffset,E.parentOffset),y=()=>I(t.state.tr.insertText(R,O,D));t.someProp("handleTextInput",v=>v(t,O,D,R,y))||t.dispatch(y())}else t.dispatch(I());else t.dispatch(I())}function Vh(t,e,n){return Math.max(n.anchor,n.head)>e.content.size?null:Xc(t,e.resolve(n.anchor),e.resolve(n.head))}function za(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 o=t.node(r).maybeChild(t.indexAfter(r));for(;o&&!o.isLeaf;)o=o.firstChild,i++}return i}function zh(t){if(t.length!=2)return!1;let e=t.charCodeAt(0),n=t.charCodeAt(1);return e>=56320&&e<=57343&&n>=55296&&n<=56319}class t_{constructor(e,n){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 WS,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(Xh),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):typeof e=="function"?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=Gh(this),Yh(this),this.nodeViews=Wh(this),this.docView=gh(this.state.doc,$h(this),Va(this),this.dom,this),this.domObserver=new oO(this,(r,i,o,s)=>cO(this,r,i,o,s)),this.domObserver.start(),(function(r){for(let i in lt){let o=lt[i];r.dom.addEventListener(i,r.input.eventHandlers[i]=s=>{!XS(r,s)||Gl(r,s)||!r.editable&&s.type in ut||o(r,s)},GS[i]?{passive:!0}:void 0)}Ge&&r.dom.addEventListener("input",()=>null),ja(r)})(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let n in e)this._props[n]=e[n];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&ja(this);let n=this._props;this._props=e,e.plugins&&(e.plugins.forEach(Xh),this.directPlugins=e.plugins),this.updateStateInner(e.state,n)}setProps(e){let n={};for(let r in this._props)n[r]=this._props[r];n.state=this.state;for(let r in e)n[r]=e[r];this.update(n)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,n){var r;let i=this.state,o=!1,s=!1;e.storedMarks&&this.composing&&(KE(this),s=!0),this.state=e;let a=i.plugins!=e.plugins||this._props.plugins!=n.plugins;if(a||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let p=Wh(this);(function(m,_){let E=0,A=0;for(let g in m){if(m[g]!=_[g])return!0;E++}for(let g in _)A++;return E!=A})(p,this.nodeViews)&&(this.nodeViews=p,o=!0)}(a||n.handleDOMEvents!=this._props.handleDOMEvents)&&ja(this),this.editable=Gh(this),Yh(this);let l=Va(this),u=$h(this),c=i.plugins==e.plugins||i.doc.eq(e.doc)?e.scrollToSelection>i.scrollToSelection?"to selection":"preserve":"reset",d=o||!this.docView.matchesNode(e.doc,u,l);!d&&e.selection.eq(i.selection)||(s=!0);let h=c=="preserve"&&s&&this.dom.style.overflowAnchor==null&&(function(p){let m,_,E=p.dom.getBoundingClientRect(),A=Math.max(0,E.top);for(let g=(E.left+E.right)/2,S=A+1;S<Math.min(innerHeight,E.bottom);S+=5){let O=p.root.elementFromPoint(g,S);if(!O||O==p.dom||!p.dom.contains(O))continue;let D=O.getBoundingClientRect();if(D.top>=A-20){m=O,_=D.top;break}}return{refDOM:m,refTop:_,stack:hh(p.dom)}})(this);if(s){this.domObserver.stop();let p=d&&(Et||Ue)&&!this.composing&&!i.selection.empty&&!e.selection.empty&&(function(m,_){let E=Math.min(m.$anchor.sharedDepth(m.head),_.$anchor.sharedDepth(_.head));return m.$anchor.start(E)!=_.$anchor.start(E)})(i.selection,e.selection);if(d){let m=Ue?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=eO(this)),!o&&this.docView.update(e.doc,u,l,this)||(this.docView.updateOuterDeco(u),this.docView.destroy(),this.docView=gh(e.doc,u,l,this.dom,this)),!m||this.trackWrites&&this.dom.contains(this.trackWrites)||(p=!0)}p||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&(function(m){let _=m.docView.domFromPos(m.state.selection.anchor,0),E=m.domSelectionRange();return pr(_.node,_.offset,E.anchorNode,E.anchorOffset)})(this))?_n(this,p):(BE(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(i),!((r=this.dragging)===null||r===void 0)&&r.node&&!i.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,i),c=="reset"?this.dom.scrollTop=0:c=="to selection"?this.scrollToSelection():h&&(function({refDOM:p,refTop:m,stack:_}){let E=p?p.getBoundingClientRect().top:0;ph(_,E==0?0:E-m)})(h)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(e&&this.dom.contains(e.nodeType==1?e:e.parentNode)&&!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof Q){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&dh(this,n.getBoundingClientRect(),e)}else dh(this,this.coordsAtPos(this.state.selection.head,1),e)}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(e&&e.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(let n=0;n<this.pluginViews.length;n++){let r=this.pluginViews[n];r.update&&r.update(this,e)}else{this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;n<this.directPlugins.length;n++){let r=this.directPlugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}for(let n=0;n<this.state.plugins.length;n++){let r=this.state.plugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}}}updateDraggedNode(e,n){let r=e.node,i=-1;if(this.state.doc.nodeAt(r.from)==r.node)i=r.from;else{let o=r.from+(this.state.doc.content.size-n.doc.content.size);(o>0&&this.state.doc.nodeAt(o))==r.node&&(i=o)}this.dragging=new JE(e.slice,e.move,i<0?void 0:Q.create(this.state.doc,i))}someProp(e,n){let r,i=this._props&&this._props[e];if(i!=null&&(r=n?n(i):i))return r;for(let s=0;s<this.directPlugins.length;s++){let a=this.directPlugins[s].props[e];if(a!=null&&(r=n?n(a):a))return r}let o=this.state.plugins;if(o)for(let s=0;s<o.length;s++){let a=o[s].props[e];if(a!=null&&(r=n?n(a):a))return r}}hasFocus(){if(Et){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if(e.contentEditable=="false")return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&(function(e){if(e.setActive)return e.setActive();if(Nr)return e.focus(Nr);let n=hh(e);e.focus(Nr==null?{get preventScroll(){return Nr={preventScroll:!0},!0}}:void 0),Nr||(Nr=!1,ph(n,0))})(this.dom),_n(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let n=this.dom.parentNode;n;n=n.parentNode)if(n.nodeType==9||n.nodeType==11&&n.host)return n.getSelection||(Object.getPrototypeOf(n).getSelection=()=>n.ownerDocument.getSelection()),this._root=n}return e||document}updateRoot(){this._root=null}posAtCoords(e){return PS(this,e)}coordsAtPos(e,n=1){return ME(this,e,n)}domAtPos(e,n=0){return this.docView.domFromPos(e,n)}nodeDOM(e){let n=this.docView.descAt(e);return n?n.nodeDOM:null}posAtDOM(e,n,r=-1){let i=this.docView.posFromDOM(e,n,r);if(i==null)throw new RangeError("DOM position not inside the editor");return i}endOfTextblock(e,n){return HS(this,n||this.state,e)}pasteHTML(e,n){return Mi(this,"",e,!1,n||new ClipboardEvent("paste"))}pasteText(e,n){return Mi(this,e,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(e){return Kc(this,e)}destroy(){this.docView&&((function(e){e.domObserver.stop();for(let n in e.input.eventHandlers)e.dom.removeEventListener(n,e.input.eventHandlers[n]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)})(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Va(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,Hl=null)}get isDestroyed(){return this.docView==null}dispatchEvent(e){return(function(n,r){Gl(n,r)||!lt[r.type]||!n.editable&&r.type in ut||lt[r.type](n,r)})(this,e)}domSelectionRange(){let e=this.domSelection();return e?Ge&&this.root.nodeType===11&&(function(n){let r=n.activeElement;for(;r&&r.shadowRoot;)r=r.shadowRoot.activeElement;return r})(this.dom.ownerDocument)==this.dom&&(function(n,r){if(r.getComposedRanges){let s=r.getComposedRanges(n.root)[0];if(s)return jh(n,s)}let i;function o(s){s.preventDefault(),s.stopImmediatePropagation(),i=s.getTargetRanges()[0]}return n.dom.addEventListener("beforeinput",o,!0),document.execCommand("indent"),n.dom.removeEventListener("beforeinput",o,!0),i?jh(n,i):null})(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}function $h(t){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(t.editable),t.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(t.state)),n)for(let r in n)r=="class"?e.class+=" "+n[r]:r=="style"?e.style=(e.style?e.style+";":"")+n[r]:e[r]||r=="contenteditable"||r=="nodeName"||(e[r]=String(n[r]))}),e.translate||(e.translate="no"),[Dt.node(0,t.state.doc.content.size,e)]}function Yh(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:Dt.widget(t.state.selection.from,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function Gh(t){return!t.someProp("editable",e=>e(t.state)===!1)}function Wh(t){let e=Object.create(null);function n(r){for(let i in r)Object.prototype.hasOwnProperty.call(e,i)||(e[i]=r[i])}return t.someProp("nodeViews",n),t.someProp("markViews",n),e}function Xh(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")}t_.prototype.dispatch=function(t){let e=this._props.dispatchTransaction;e?e.call(this,t):this.updateState(this.state.apply(t))};const xe=new class{constructor(t){this.linebreakReplacement=null,this.cached=Object.create(null);let e=this.spec={};for(let r in t)e[r]=t[r];e.nodes=Ve.from(t.nodes),e.marks=Ve.from(t.marks||{}),this.nodes=Yd.compile(this.spec.nodes,this),this.marks=Gs.compile(this.spec.marks,this);let n=Object.create(null);for(let r in this.nodes){if(r in this.marks)throw new RangeError(r+" can not be both a node and a mark");let i=this.nodes[r],o=i.spec.content||"",s=i.spec.marks;if(i.contentMatch=n[o]||(n[o]=dr.parse(o,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!i.isInline||!i.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=i}i.markSet=s=="_"?null:s?Gd(this,s.split(" ")):s!=""&&i.inlineContent?null:[]}for(let r in this.marks){let i=this.marks[r],o=i.spec.excludes;i.excluded=o==null?[i]:o==""?[]:Gd(this,o.split(" "))}this.nodeFromJSON=r=>sr.fromJSON(this,r),this.markFromJSON=r=>fe.fromJSON(this,r),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,e=null,n,r){if(typeof t=="string")t=this.nodeType(t);else{if(!(t instanceof Yd))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 fs(n,n.defaultAttrs,t,fe.setFrom(e))}mark(t,e){return typeof t=="string"&&(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})}]}}}),$a=new Ks("placeholder"),Kh=new Xs({key:$a,props:{decorations(t){if(n_(t.doc))return;const e=t.doc.firstChild,n=Dt.node(0,e.nodeSize,{class:"empty-node","data-placeholder":$a.getState(t)});return be.create(t.doc,[n])}},state:{init:()=>"",apply:(t,e)=>{var n;return(n=t.getMeta($a))!=null?n:e}}});function n_(t){return t.childCount!==1||t.firstChild.childCount!==0}for(var jn={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:"'"},gs={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},uO=typeof navigator!="undefined"&&/Mac/.test(navigator.platform),dO=typeof navigator!="undefined"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),ze=0;ze<10;ze++)jn[48+ze]=jn[96+ze]=String(ze);for(ze=1;ze<=24;ze++)jn[ze+111]="F"+ze;for(ze=65;ze<=90;ze++)jn[ze]=String.fromCharCode(ze+32),gs[ze]=String.fromCharCode(ze);for(var Ya in jn)gs.hasOwnProperty(Ya)||(gs[Ya]=jn[Ya]);const hO=typeof navigator!="undefined"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function pO(t){let e,n,r,i,o=t.split(/-(?!$)/),s=o[o.length-1];s=="Space"&&(s=" ");for(let a=0;a<o.length-1;a++){let l=o[a];if(/^(cmd|meta|m)$/i.test(l))i=!0;else if(/^a(lt)?$/i.test(l))e=!0;else if(/^(c|ctrl|control)$/i.test(l))n=!0;else if(/^s(hift)?$/i.test(l))r=!0;else{if(!/^mod$/i.test(l))throw new Error("Unrecognized modifier name: "+l);hO?i=!0:n=!0}}return e&&(s="Alt-"+s),n&&(s="Ctrl-"+s),i&&(s="Meta-"+s),r&&(s="Shift-"+s),s}function Ga(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 qh(t){return new Xs({props:{handleKeyDown:fO(t)}})}function fO(t){let e=(function(n){let r=Object.create(null);for(let i in n)r[pO(i)]=n[i];return r})(t);return function(n,r){let i,o=(function(a){var l=!(uO&&a.metaKey&&a.shiftKey&&!a.ctrlKey&&!a.altKey||dO&&a.shiftKey&&a.key&&a.key.length==1||a.key=="Unidentified")&&a.key||(a.shiftKey?gs:jn)[a.keyCode]||a.key||"Unidentified";return l=="Esc"&&(l="Escape"),l=="Del"&&(l="Delete"),l=="Left"&&(l="ArrowLeft"),l=="Up"&&(l="ArrowUp"),l=="Right"&&(l="ArrowRight"),l=="Down"&&(l="ArrowDown"),l})(r),s=e[Ga(o,r)];if(s&&s(n.state,n.dispatch,n))return!0;if(o.length==1&&o!=" "){if(r.shiftKey){let a=e[Ga(o,r,!1)];if(a&&a(n.state,n.dispatch,n))return!0}if((r.shiftKey||r.altKey||r.metaKey||o.charCodeAt(0)>127)&&(i=jn[r.keyCode])&&i!=o){let a=e[Ga(i,r)];if(a&&a(n.state,n.dispatch,n))return!0}}return!1}}var Ss=200,He=function(){};He.prototype.append=function(t){return t.length?(t=He.from(t),!this.length&&t||t.length<Ss&&this.leafAppend(t)||this.length<Ss&&t.leafPrepend(this)||this.appendInner(t)):this},He.prototype.prepend=function(t){return t.length?He.from(t).append(this):this},He.prototype.appendInner=function(t){return new mO(this,t)},He.prototype.slice=function(t,e){return t===void 0&&(t=0),e===void 0&&(e=this.length),t>=e?He.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,e))},He.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)},He.prototype.forEach=function(t,e,n){e===void 0&&(e=0),n===void 0&&(n=this.length),e<=n?this.forEachInner(t,e,n,0):this.forEachInvertedInner(t,e,n,0)},He.prototype.map=function(t,e,n){e===void 0&&(e=0),n===void 0&&(n=this.length);var r=[];return this.forEach(function(i,o){return r.push(t(i,o))},e,n),r},He.from=function(t){return t instanceof He?t:t&&t.length?new r_(t):He.empty};var r_=(function(t){function e(r){t.call(this),this.values=r}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(r,i){return r==0&&i==this.length?this:new e(this.values.slice(r,i))},e.prototype.getInner=function(r){return this.values[r]},e.prototype.forEachInner=function(r,i,o,s){for(var a=i;a<o;a++)if(r(this.values[a],s+a)===!1)return!1},e.prototype.forEachInvertedInner=function(r,i,o,s){for(var a=i-1;a>=o;a--)if(r(this.values[a],s+a)===!1)return!1},e.prototype.leafAppend=function(r){if(this.length+r.length<=Ss)return new e(this.values.concat(r.flatten()))},e.prototype.leafPrepend=function(r){if(this.length+r.length<=Ss)return new e(r.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e})(He);He.empty=new r_([]);var mO=(function(t){function e(n,r){t.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.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(n){return n<this.left.length?this.left.get(n):this.right.get(n-this.left.length)},e.prototype.forEachInner=function(n,r,i,o){var s=this.left.length;return!(r<s&&this.left.forEachInner(n,r,Math.min(i,s),o)===!1)&&!(i>s&&this.right.forEachInner(n,Math.max(r-s,0),Math.min(this.length,i)-s,o+s)===!1)&&void 0},e.prototype.forEachInvertedInner=function(n,r,i,o){var s=this.left.length;return!(r>s&&this.right.forEachInvertedInner(n,r-s,Math.max(i,s)-s,o+s)===!1)&&!(i<s&&this.left.forEachInvertedInner(n,Math.min(r,s),i,o)===!1)&&void 0},e.prototype.sliceInner=function(n,r){if(n==0&&r==this.length)return this;var i=this.left.length;return r<=i?this.left.slice(n,r):n>=i?this.right.slice(n-i,r-i):this.left.slice(n,i).append(this.right.slice(0,r-i))},e.prototype.leafAppend=function(n){var r=this.right.leafAppend(n);if(r)return new e(this.left,r)},e.prototype.leafPrepend=function(n){var r=this.left.leafPrepend(n);if(r)return new e(r,this.right)},e.prototype.appendInner=function(n){return this.left.depth>=Math.max(this.right.depth,n.depth)+1?new e(this.left,new e(this.right,n)):new e(this,n)},e})(He);class xt{constructor(e,n){this.items=e,this.eventCount=n}popEvent(e,n){if(this.eventCount==0)return null;let r,i,o=this.items.length;for(;;o--)if(this.items.get(o-1).selection){--o;break}n&&(r=this.remapping(o,this.items.length),i=r.maps.length);let s,a,l=e.tr,u=[],c=[];return this.items.forEach((d,h)=>{if(!d.step)return r||(r=this.remapping(o,h+1),i=r.maps.length),i--,void c.push(d);if(r){c.push(new Yt(d.map));let p,m=d.step.map(r.slice(i));m&&l.maybeStep(m).doc&&(p=l.mapping.maps[l.mapping.maps.length-1],u.push(new Yt(p,void 0,void 0,u.length+c.length))),i--,p&&r.appendMap(p,i)}else l.maybeStep(d.step);return d.selection?(s=r?d.selection.map(r.slice(i)):d.selection,a=new xt(this.items.slice(0,o).append(c.reverse().concat(u)),this.eventCount-1),!1):void 0},this.items.length,0),{remaining:a,transform:l,selection:s}}addTransform(e,n,r,i){let o=[],s=this.eventCount,a=this.items,l=!i&&a.length?a.get(a.length-1):null;for(let c=0;c<e.steps.length;c++){let d,h=e.steps[c].invert(e.docs[c]),p=new Yt(e.mapping.maps[c],h,n);(d=l&&l.merge(p))&&(p=d,c?o.pop():a=a.slice(0,a.length-1)),o.push(p),n&&(s++,n=void 0),i||(l=p)}let u=s-r.depth;return u>EO&&(a=(function(c,d){let h;return c.forEach((p,m)=>{if(p.selection&&d--==0)return h=m,!1}),c.slice(h)})(a,u),s-=u),new xt(a.append(o),s)}remapping(e,n){let r=new Xi;return this.items.forEach((i,o)=>{let s=i.mirrorOffset!=null&&o-i.mirrorOffset>=e?r.maps.length-i.mirrorOffset:void 0;r.appendMap(i.map,s)},e,n),r}addMaps(e){return this.eventCount==0?this:new xt(this.items.append(e.map(n=>new Yt(n))),this.eventCount)}rebased(e,n){if(!this.eventCount)return this;let r=[],i=Math.max(0,this.items.length-n),o=e.mapping,s=e.steps.length,a=this.eventCount;this.items.forEach(h=>{h.selection&&a--},i);let l=n;this.items.forEach(h=>{let p=o.getMirror(--l);if(p==null)return;s=Math.min(s,p);let m=o.maps[p];if(h.step){let _=e.steps[p].invert(e.docs[p]),E=h.selection&&h.selection.map(o.slice(l+1,p));E&&a++,r.push(new Yt(m,_,E))}else r.push(new Yt(m))},i);let u=[];for(let h=n;h<s;h++)u.push(new Yt(o.maps[h]));let c=this.items.slice(0,i).append(u).append(r),d=new xt(c,a);return d.emptyItemCount()>500&&(d=d.compress(this.items.length-r.length)),d}emptyItemCount(){let e=0;return this.items.forEach(n=>{n.step||e++}),e}compress(e=this.items.length){let n=this.remapping(0,e),r=n.maps.length,i=[],o=0;return this.items.forEach((s,a)=>{if(a>=e)i.push(s),s.selection&&o++;else if(s.step){let l=s.step.map(n.slice(r)),u=l&&l.getMap();if(r--,u&&n.appendMap(u,r),l){let c=s.selection&&s.selection.map(n.slice(r));c&&o++;let d,h=new Yt(u.invert(),l,c),p=i.length-1;(d=i.length&&i[p].merge(h))?i[p]=d:i.push(h)}}else s.map&&r--},this.items.length,0),new xt(He.from(i.reverse()),o)}}xt.empty=new xt(He.empty,0);class Yt{constructor(e,n,r,i){this.map=e,this.step=n,this.selection=r,this.mirrorOffset=i}merge(e){if(this.step&&e.step&&!e.selection){let n=e.step.merge(this.step);if(n)return new Yt(n.getMap().invert(),n,this.selection)}}}class Tn{constructor(e,n,r,i,o){this.done=e,this.undone=n,this.prevRanges=r,this.prevTime=i,this.prevComposition=o}}const EO=20;function Jh(t){let e=[];for(let n=t.length-1;n>=0&&e.length==0;n--)t[n].forEach((r,i,o,s)=>e.push(o,s));return e}function Wa(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 Xa=!1,Zh=null;function qo(t){let e=t.plugins;if(Zh!=e){Xa=!1,Zh=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){Xa=!0;break}}return Xa}const rr=new Ks("history"),_O=new Ks("closeHistory");function AO(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new Xs({key:rr,state:{init:()=>new Tn(xt.empty,xt.empty,null,0,-1),apply:(e,n,r)=>(function(i,o,s,a){let l,u=s.getMeta(rr);if(u)return u.historyState;s.getMeta(_O)&&(i=new Tn(i.done,i.undone,null,0,-1));let c=s.getMeta("appendedTransaction");if(s.steps.length==0)return i;if(c&&c.getMeta(rr))return c.getMeta(rr).redo?new Tn(i.done.addTransform(s,void 0,a,qo(o)),i.undone,Jh(s.mapping.maps),i.prevTime,i.prevComposition):new Tn(i.done,i.undone.addTransform(s,void 0,a,qo(o)),null,i.prevTime,i.prevComposition);if(s.getMeta("addToHistory")===!1||c&&c.getMeta("addToHistory")===!1)return(l=s.getMeta("rebased"))?new Tn(i.done.rebased(s,l),i.undone.rebased(s,l),Wa(i.prevRanges,s.mapping),i.prevTime,i.prevComposition):new Tn(i.done.addMaps(s.mapping.maps),i.undone.addMaps(s.mapping.maps),Wa(i.prevRanges,s.mapping),i.prevTime,i.prevComposition);{let d=s.getMeta("composition"),h=i.prevTime==0||!c&&i.prevComposition!=d&&(i.prevTime<(s.time||0)-a.newGroupDelay||!(function(m,_){if(!_)return!1;if(!m.docChanged)return!0;let E=!1;return m.mapping.maps[0].forEach((A,g)=>{for(let S=0;S<_.length;S+=2)A<=_[S+1]&&g>=_[S]&&(E=!0)}),E})(s,i.prevRanges)),p=c?Wa(i.prevRanges,s.mapping):Jh(s.mapping.maps);return new Tn(i.done.addTransform(s,h?o.selection.getBookmark():void 0,a,qo(o)),xt.empty,p,s.time,d==null?i.prevComposition:d)}})(n,r,e,t)},config:t,props:{handleDOMEvents:{beforeinput(e,n){let r=n.inputType,i=r=="historyUndo"?o_:r=="historyRedo"?Xl:null;return!(!i||!e.editable)&&(n.preventDefault(),i(e.state,e.dispatch))}}}})}function i_(t,e){return(n,r)=>{let i=rr.getState(n);if(!i||(t?i.undone:i.done).eventCount==0)return!1;if(r){let o=(function(s,a,l){let u=qo(a),c=rr.get(a).spec.config,d=(l?s.undone:s.done).popEvent(a,u);if(!d)return null;let h=d.selection.resolve(d.transform.doc),p=(l?s.done:s.undone).addTransform(d.transform,a.selection.getBookmark(),c,u),m=new Tn(l?p:d.remaining,l?d.remaining:p,null,0,-1);return d.transform.setSelection(h).setMeta(rr,{redo:l,historyState:m})})(i,n,t);o&&r(e?o.scrollIntoView():o)}return!0}}const o_=i_(!1,!0),Xl=i_(!0,!0),s_=(t,e)=>!t.selection.empty&&(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function ri(t,e,n=!1){for(let r=t;r;r=e=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}function Qh(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 ep(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 Kl(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 gO=(t,e)=>{let{$from:n,$to:r}=t.selection;if(t.selection instanceof Q&&t.selection.node.isBlock)return!(!n.parentOffset||!Xo(t.doc,n.pos)||(e&&e(t.tr.split(n.pos).scrollIntoView()),0));if(!n.parent.isBlock)return!1;if(e){let i=r.parentOffset==r.parent.content.size,o=t.tr;(t.selection instanceof de||t.selection instanceof Rt)&&o.deleteSelection();let s=n.depth==0?null:Kl(n.node(-1).contentMatchAt(n.indexAfter(-1))),a=i&&s?[{type:s}]:void 0,l=Xo(o.doc,o.mapping.map(n.pos),1,a);if(a||l||!Xo(o.doc,o.mapping.map(n.pos),1,s?[{type:s}]:void 0)||(s&&(a=[{type:s}]),l=!0),l&&(o.split(o.mapping.map(n.pos),1,a),!i&&!n.parentOffset&&n.parent.type!=s)){let u=o.mapping.map(n.before()),c=o.doc.resolve(u);s&&n.node(-1).canReplaceWith(c.index(),c.index()+1,s)&&o.setNodeMarkup(o.mapping.map(n.before()),s)}e(o.scrollIntoView())}return!0};function a_(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(d,h,p){let m=h.nodeBefore,_=h.nodeAfter,E=h.index();return!(!(m&&_&&m.type.compatibleContent(_.type))||(!m.content.size&&h.parent.canReplace(E-1,E)?(p&&p(d.tr.delete(h.pos-m.nodeSize,h.pos).scrollIntoView()),0):!h.parent.canReplace(E,E+1)||!_.isTextblock&&!rh(d.doc,h.pos)||(p&&p(d.tr.clearIncompatible(h.pos,m.type,m.contentMatchAt(m.childCount)).join(h.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 d=e.pos+s.nodeSize,h=j.empty;for(let _=r.length-1;_>=0;_--)h=j.from(r[_].create(null,h));h=j.from(o.copy(h));let p=t.tr.step(new vt(e.pos-1,d,e.pos,d,new G(h,1,0),r.length,!0)),m=d+2*r.length;rh(p.doc,m)&&p.join(m),n(p.scrollIntoView())}return!0}let l=pe.findFrom(e,1),u=l&&l.$from.blockRange(l.$to),c=u&&zc(u);if(c!=null&&c>=e.depth)return n&&n(t.tr.lift(u,c).scrollIntoView()),!0;if(a&&ri(s,"start",!0)&&ri(o,"end")){let d=o,h=[];for(;h.push(d),!d.isTextblock;)d=d.lastChild;let p=s,m=1;for(;!p.isTextblock;p=p.firstChild)m++;if(d.canReplace(d.childCount,d.childCount,p.content)){if(n){let _=j.empty;for(let E=h.length-1;E>=0;E--)_=j.from(h[E].copy(_));n(t.tr.step(new vt(e.pos-h.length,e.pos+s.nodeSize,e.pos+m,e.pos+s.nodeSize-m,new G(_,h.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function l_(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(de.create(e.doc,t<0?i.start(o):i.end(o)))),!0)}}const SO=l_(-1),OO=l_(1);function Qc(...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 Ka=Qc(s_,(t,e,n)=>{let r=(function(s,a){let{$cursor:l}=s.selection;return!l||(a?!a.endOfTextblock("backward",s):l.parentOffset>0)?null:l})(t,n);if(!r)return!1;let i=Qh(r);if(!i){let s=r.blockRange(),a=s&&zc(s);return a!=null&&(e&&e(t.tr.lift(s,a).scrollIntoView()),!0)}let o=i.nodeBefore;if(!o.type.spec.isolating&&a_(t,i,e))return!0;if(r.parent.content.size==0&&(ri(o,"end")||Q.isSelectable(o))){let s=$c(t.doc,r.before(),r.after(),G.empty);if(s&&s.slice.size<s.to-s.from){if(e){let a=t.tr.step(s);a.setSelection(ri(o,"end")?pe.findFrom(a.doc.resolve(a.mapping.map(i.pos,-1)),-1):Q.create(a.doc,i.pos-o.nodeSize)),e(a.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=Qh(r)}let s=o&&o.nodeBefore;return!(!s||!Q.isSelectable(s))&&(e&&e(t.tr.setSelection(Q.create(t.doc,o.pos-s.nodeSize)).scrollIntoView()),!0)}),tp=Qc(s_,(t,e,n)=>{let r=(function(s,a){let{$cursor:l}=s.selection;return!l||(a?!a.endOfTextblock("forward",s):l.parentOffset<l.parent.content.size)?null:l})(t,n);if(!r)return!1;let i=ep(r);if(!i)return!1;let o=i.nodeAfter;if(a_(t,i,e))return!0;if(r.parent.content.size==0&&(ri(o,"start")||Q.isSelectable(o))){let s=$c(t.doc,r.before(),r.after(),G.empty);if(s&&s.slice.size<s.to-s.from){if(e){let a=t.tr.step(s);a.setSelection(ri(o,"start")?pe.findFrom(a.doc.resolve(a.mapping.map(i.pos)),1):Q.create(a.doc,a.mapping.map(i.pos))),e(a.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=ep(r)}let s=o&&o.nodeAfter;return!(!s||!Q.isSelectable(s))&&(e&&e(t.tr.setSelection(Q.create(t.doc,o.pos)).scrollIntoView()),!0)});const dn={Enter:Qc((t,e)=>{let{$head:n,$anchor:r}=t.selection;return!(!n.parent.type.spec.code||!n.sameParent(r))&&(e&&e(t.tr.insertText(`
16
+ `).scrollIntoView()),!0)},(t,e)=>{let n=t.selection,{$from:r,$to:i}=n;if(n instanceof Rt||r.parent.inlineContent||i.parent.inlineContent)return!1;let o=Kl(i.parent.contentMatchAt(i.indexAfter()));if(!o||!o.isTextblock)return!1;if(e){let s=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,a=t.tr.insert(s,o.createAndFill());a.setSelection(de.create(a.doc,s+1)),e(a.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 o=n.before();if(Xo(t.doc,o))return e&&e(t.tr.split(o).scrollIntoView()),!0}let r=n.blockRange(),i=r&&zc(r);return i!=null&&(e&&e(t.tr.lift(r,i).scrollIntoView()),!0)},gO),"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=Kl(i.contentMatchAt(o));if(!s||!i.canReplaceWith(o,o,s))return!1;if(e){let a=n.after(),l=t.tr.replaceWith(a,a,s.createAndFill());l.setSelection(pe.near(l.doc.resolve(a),1)),e(l.scrollIntoView())}return!0},Backspace:Ka,"Mod-Backspace":Ka,"Shift-Backspace":Ka,Delete:tp,"Mod-Delete":tp,"Mod-a":(t,e)=>(e&&e(t.tr.setSelection(new Rt(t.doc))),!0)},c_={"Ctrl-h":dn.Backspace,"Alt-Backspace":dn["Mod-Backspace"],"Ctrl-d":dn.Delete,"Ctrl-Alt-Backspace":dn["Mod-Delete"],"Alt-Delete":dn["Mod-Delete"],"Alt-d":dn["Mod-Delete"],"Ctrl-a":SO,"Ctrl-e":OO};for(let t in dn)c_[t]=dn[t];const Mo=(typeof navigator!="undefined"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!(typeof os=="undefined"||!os.platform)&&os.platform()=="darwin")?c_:dn;function eu(t,e){return t.reduce((n,r,i)=>n.concat(e(r,i)),[])}var np,gi={},vO=(function(){if(np)return gi;function t(n){return String.fromCharCode(parseInt(n.slice(1),16))}function e(n){return`%${`00${n.charCodeAt(0).toString(16)}`.slice(-2)}`}return np=1,Object.defineProperty(gi,"__esModule",{value:!0}),gi.encode=function(n){return btoa(encodeURIComponent(n).replace(/%[0-9A-F]{2}/g,t))},gi.decode=function(n){return decodeURIComponent(Array.from(atob(n),e).join(""))},gi})();const DO=/[^a-zA-Z\u00C0-\u024F\u1E00-\u1EFF\u0400-\u044f\u0300-\u036e]+/,TO=t=>t.split(DO).filter(e=>e).map(e=>e[0]).join("")||t[Symbol.iterator]().next().value||"";function u_(t,e){const n=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
17
17
  <rect x="0" y="0" width="100" height="100" fill="${d_(t)}"/>
18
18
  <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>
19
- </svg>`.replace(/\s+/g," ");return"data:image/svg+xml;base64,"+Ov.encode(n)}function d_(t){const e=(function(n){let r=0;for(let i=0;i<n.length;i++)r=(r<<5)-r+n.charCodeAt(i),r&=r;return Math.abs(r)})(t)%op.length;return op[e]}function Zs(t,e){const n=e.lastIndex;let r;const i=[];for(;(r=e.exec(t))!==null;)i.push(r),r[0]===""&&(e.lastIndex+=1);return e.lastIndex=n,i}function ql(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 h_(t){try{return new URL(t).hostname}catch(e){return}}const Rv=13;function rp(t){return t.keyCode===Rv&&!t.shiftKey}function Po(t){const e=t.replace(/%2F/g,"/").replace(/^.*?\/([^/]+?)(?:\?.*)?$/,"$1"),n=decodeURIComponent(e);if(/%[0-9A-Fa-f]{2}/.test(n))try{return decodeURIComponent(n.replace(/\+/g,"%20"))}catch(r){return n}return n}function Jl(t,e,n){return Math.max(t,Math.min(e,n))}function ip(t,e){return t.localeCompare(e,void 0,{usage:"search",sensitivity:"base"})===0}function yv(t){return[...t.matchAll(/^|\s+/g)].map(n=>n.index+n[0].length).map(n=>t.substring(n))}const op=["#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"],Pi=(t,e,n=void 0)=>eu(t,r=>{if(typeof r=="string")return e(r,n);switch(r.type){case"bold":case"italic":case"strikethrough":case"blockquote":case"bulletlist":case"bulletList":case"bulletpoint":case"bulletPoint":return[{type:r.type,children:Pi(r.children,e,r.type)}];case"link":return[{type:r.type,url:r.url,children:Pi(r.children,e,r.type)}];case"actionlink":case"actionLink":case"actionbutton":case"actionButton":return[{type:r.type,action:r.action,params:r.params,children:Pi(r.children,e,r.type)}];case"mention":case"autolink":case"autoLink":case"codeblock":case"codeBlock":case"codespan":case"codeSpan":case"suppressed":case"emoji":case"customemoji":case"customEmoji":return[r]}});function vn(t,e){return n=>{const r=n;let i=0;const o=[];for(const s of Zs(n,t)){s.index-i>0&&o.push(r.substring(i,s.index));const a=e(s);Array.isArray(a)?o.push(...a):o.push(a),i=s.index+s[0].length}return i<n.length&&o.push(n.substring(i)),o}}function p_(t){return t.replace(/<!!mention:.*?\|([^>]*)>/gim,"@$1").replace(/<!!customemoji:(.*?)>/gim,"$1")}const sp="’'()[]{}<>:,‒–—―…!.«»-‐?‘’“”;/⁄␠·&@*\\•^¤¢$€£¥₩₪†‡°¡¿¬#№%‰‱¶′§~¨_|¦⁂☞∴‽※".replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");var Zl=(t=>(t[t.italic=1]="italic",t[t.strikethrough=2]="strikethrough",t[t.bold=4]="bold",t))(Zl||{});const Iv=[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(n=>n.source).join("|"),"g")}),Cv={_:1,"*":4,"~":2};function Nv(t){return f_(t,0)}function f_(t,e=0){const n=Iv[e],r=n?(function(i){const o=bv.getOrCompute(i,()=>new RegExp(`(?:^|[\\s${sp}])(?:${i.source})(?=[\\s${sp}]|$)`,"g")),s=vn(o,a=>{const l=a[0][1],u=a[1]||a[2]||a[3]||a[4]||a[5]||a[6];return[" ",{type:Zl[Cv[l]],children:[u]}]});return a=>{const[l,...u]=s(" "+a);return l.length>1&&u.unshift(l.substring(1)),u}})(n):()=>[t];return Pi(r(t),(i,o)=>o==="bold"||o==="italic"||o==="strikethrough"?f_(i,e|Zl[o]):[i])}const bv=(function(){const t=(function(){try{return new WeakMap}catch(e){const n={has:()=>!1,get:()=>{},set:()=>n};return n}})();return{getOrCompute(e,n){if(t.has(e))return t.get(e);const r=n();return t.set(e,r),r}}})();var Ql=function(t,e){return Ql=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},Ql(t,e)};function Eo(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}Ql(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var Pe=function(){return Pe=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},Pe.apply(this,arguments)};var wv=Object.prototype.hasOwnProperty;function yt(t){return typeof t=="boolean"}function Gn(t,e){for(var n=t.length-1;n>=0;n--)e(t[n])===!0&&t.splice(n,1)}function fr(t){throw new Error("Unhandled case for value: '".concat(t,"'"))}var xo=/\s+/,m_=(function(){function t(e){e===void 0&&(e={}),this.tagName="",this.attrs={},this.innerHTML="",this.tagName=e.tagName||"",this.attrs=e.attrs||{},this.innerHTML=e.innerHtml||e.innerHTML||""}return t.prototype.setTagName=function(e){return this.tagName=e,this},t.prototype.getTagName=function(){return this.tagName},t.prototype.setAttr=function(e,n){return this.getAttrs()[e]=n,this},t.prototype.getAttr=function(e){return this.getAttrs()[e]},t.prototype.setAttrs=function(e){return Object.assign(this.getAttrs(),e),this},t.prototype.getAttrs=function(){return this.attrs},t.prototype.setClass=function(e){return this.setAttr("class",e)},t.prototype.addClass=function(e){for(var n,r=this.getClass(),i=r?r.split(xo):[],o=e.split(xo);n=o.shift();)i.indexOf(n)===-1&&i.push(n);return this.getAttrs().class=i.join(" "),this},t.prototype.removeClass=function(e){for(var n,r=this.getClass(),i=r?r.split(xo):[],o=e.split(xo);i.length&&(n=o.shift());){var s=i.indexOf(n);s!==-1&&i.splice(s,1)}return this.getAttrs().class=i.join(" "),this},t.prototype.getClass=function(){return this.getAttrs().class||""},t.prototype.hasClass=function(e){return(" "+this.getClass()+" ").indexOf(" "+e+" ")!==-1},t.prototype.setInnerHTML=function(e){return this.innerHTML=e,this},t.prototype.setInnerHtml=function(e){return this.setInnerHTML(e)},t.prototype.getInnerHTML=function(){return this.innerHTML||""},t.prototype.getInnerHtml=function(){return this.getInnerHTML()},t.prototype.toAnchorString=function(){var e=this.getTagName(),n=this.buildAttrsStr();return["<",e,n=n?" "+n:"",">",this.getInnerHtml(),"</",e,">"].join("")},t.prototype.buildAttrsStr=function(){var e=this.getAttrs(),n=[];for(var r in e)wv.call(e,r)&&n.push(r+'="'+e[r]+'"');return n.join(" ")},t})();function ap(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 qa(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 kv=(function(){function t(e){e===void 0&&(e={}),this.newWindow=!1,this.truncate={},this.className="",this.newWindow=e.newWindow||!1,this.truncate=e.truncate||{},this.className=e.className||""}return t.prototype.build=function(e){return new m_({tagName:"a",attrs:this.createAttrs(e),innerHtml:this.processAnchorText(e.getAnchorText())})},t.prototype.createAttrs=function(e){var n={href:e.getAnchorHref()},r=this.createCssClass(e);return r&&(n.class=r),this.newWindow&&(n.target="_blank",n.rel="noopener noreferrer"),this.truncate.length&&this.truncate.length<e.getAnchorText().length&&(n.title=e.getAnchorHref()),n},t.prototype.createCssClass=function(e){var n=this.className;if(n){for(var r=[n],i=e.getCssClassSuffixes(),o=0,s=i.length;o<s;o++)r.push(n+"-"+i[o]);return r.join(" ")}return""},t.prototype.processAnchorText=function(e){return e=this.doTruncate(e)},t.prototype.doTruncate=function(e){var n=this.truncate;if(!n.length)return e;var r=n.length,i=n.location;return i==="smart"?(function(o,s,a){var l,u;if(a==null?(a="&hellip;",u=3,l=8):(u=a.length,l=a.length),o.length<=s)return o;var c=s-u,d=(function(A){var S={},v=A,D=v.match(/^([a-z]+):\/\//i);return D&&(S.scheme=D[1],v=v.slice(D[0].length)),(D=v.match(/^(.*?)(?=(\?|#|\/|$))/i))&&(S.host=D[1],v=v.slice(D[0].length)),(D=v.match(/^\/(.*?)(?=(\?|#|$))/i))&&(S.path=D[1],v=v.slice(D[0].length)),(D=v.match(/^\?(.*?)(?=(#|$))/i))&&(S.query=D[1],v=v.slice(D[0].length)),(D=v.match(/^#(.*?)$/i))&&(S.fragment=D[1]),S})(o);if(d.query){var h=d.query.match(/^(.*?)(?=(\?|#))(.*?)$/i);h&&(d.query=d.query.substr(0,h[1].length),o=ap(d))}if(o.length<=s||(d.host&&(d.host=d.host.replace(/^www\./,""),o=ap(d)),o.length<=s))return o;var p="";if(d.host&&(p+=d.host),p.length>=c)return d.host.length===s?(d.host.substr(0,s-u)+a).substr(0,c+l):qa(p,c,a).substr(0,c+l);var m="";if(d.path&&(m+="/"+d.path),d.query&&(m+="?"+d.query),m){if((p+m).length>=c)return(p+m).length==s?(p+m).substr(0,s):(p+qa(m,c-p.length,a)).substr(0,c+l);p+=m}if(d.fragment){var _="#"+d.fragment;if((p+_).length>=c)return(p+_).length==s?(p+_).substr(0,s):(p+qa(_,c-p.length,a)).substr(0,c+l);p+=_}if(d.scheme&&d.host){var E=d.scheme+"://";if((p+E).length<c)return(E+p).substr(0,s)}if(p.length<=s)return p;var g="";return c>0&&(g=p.substr(-1*Math.floor(c/2))),(p.substr(0,Math.ceil(c/2))+a+g).substr(0,c+l)})(e,r):i==="middle"?(function(o,s,a){if(o.length<=s)return o;var l,u;a==null?(a="&hellip;",l=8,u=3):(l=a.length,u=a.length);var c=s-u,d="";return c>0&&(d=o.substr(-1*Math.floor(c/2))),(o.substr(0,Math.ceil(c/2))+a+d).substr(0,c+l)})(e,r):(function(o,s,a){return(function(l,u,c){var d;return l.length>u&&(c==null?(c="&hellip;",d=3):d=c.length,l=l.substring(0,u-d)+c),l})(o,s,a)})(e,r)},t})(),_o=(function(){function t(e){this._=null,this.matchedText="",this.offset=0,this.tagBuilder=e.tagBuilder,this.matchedText=e.matchedText,this.offset=e.offset}return t.prototype.getMatchedText=function(){return this.matchedText},t.prototype.setOffset=function(e){this.offset=e},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 ui(t){return t>=65&&t<=90||t>=97&&t<=122}function Xe(t){return t>=48&&t<=57}function tu(t){return t==34||t==39}function Or(t){return t<8232?t<160?t>=9&&t<=13||t==32:t<5760?t==160:t==5760||t>=8192&&t<=8202:t<8287?t>=8232&&t<=8233||t==8239:t<12288?t==8287:t==12288||t==65279}function Dr(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||t==174:t==181||t==186: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:t==748||t==750:t<910?t<895?t<886?t>=768&&t<=884:t>=886&&t<=887||t>=890&&t<=893:t<904?t==895||t==902:t>=904&&t<=906||t==908: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:t==1369||t>=1377&&t<=1415:t<1808?t<1552?t<1476?t<1471?t>=1425&&t<=1469:t==1471||t>=1473&&t<=1474:t<1488?t>=1476&&t<=1477||t==1479: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||t==1791:t<2230?t<2042?t<1869?t>=1808&&t<=1866:t>=1869&&t<=1969||t>=1984&&t<=2037:t<2112?t==2042||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||t==2482:t<2503?t>=2486&&t<=2489||t>=2492&&t<=2500:t>=2503&&t<=2504||t>=2507&&t<=2510:t<2534?t<2524?t==2519: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:t==2620||t>=2622&&t<=2626:t<2649?t<2635?t>=2631&&t<=2632:t>=2635&&t<=2637||t==2641:t<2662?t>=2649&&t<=2652||t==2654: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||t==2768:t<2809?t>=2784&&t<=2787||t>=2790&&t<=2799:t==2809||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:t==2929||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||t==2972: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:t==3024||t==3031: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||t==3294: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?t==3517:t>=3520&&t<=3526||t==3530:t<3544?t>=3535&&t<=3540||t==3542: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:t==3716||t>=3719&&t<=3720:t<3754?t<3737?t<3725?t==3722:t==3725||t>=3732&&t<=3735:t<3749?t>=3737&&t<=3743||t>=3745&&t<=3747:t==3749||t==3751:t<3776?t<3757?t>=3754&&t<=3755:t>=3757&&t<=3769||t>=3771&&t<=3773:t<3784?t>=3776&&t<=3780||t==3782:t>=3784&&t<=3789||t>=3792&&t<=3801:t<4176?t<3902?t<3872?t<3840?t>=3804&&t<=3807:t==3840||t>=3864&&t<=3865:t<3895?t>=3872&&t<=3881||t==3893:t==3895||t==3897: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:t==4038||t>=4096&&t<=4169:t<4688?t<4301?t<4256?t>=4176&&t<=4253:t>=4256&&t<=4293||t==4295:t<4348?t==4301||t>=4304&&t<=4346:t>=4348&&t<=4680||t>=4682&&t<=4685:t<4746?t<4698?t>=4688&&t<=4694||t==4696: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?t==4800: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||t==6103: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||t==6823: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?t==8025:t==8027||t==8029:t<8118?t>=8031&&t<=8061||t>=8064&&t<=8116:t>=8118&&t<=8124||t==8126: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?t==8205:t==8252||t==8265:t<8336?t==8305||t==8319:t>=8336&&t<=8348||t>=8400&&t<=8432:t<8579?t<8486?t<8469?t<8455?t==8450:t==8455||t>=8458&&t<=8467:t<8482?t==8469||t>=8473&&t<=8477:t==8482||t==8484:t<8495?t<8488?t==8486:t==8488||t>=8490&&t<=8493:t<8517?t>=8495&&t<=8505||t>=8508&&t<=8511:t>=8517&&t<=8521||t==8526:t<9410?t<9e3?t<8592?t>=8579&&t<=8580:t>=8592&&t<=8703||t>=8986&&t<=8987:t<9193?t==9e3||t==9167:t>=9193&&t<=9203||t>=9208&&t<=9210:t<9723?t<9654?t==9410||t>=9642&&t<=9643:t==9654||t==9664: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:t==11088||t==11093: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:t==11559||t==11565:t<11647?t>=11568&&t<=11623||t==11631: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:t==11823||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?t==12951:t==12953||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?t==43259:t==43261||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||t==64318: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 E_(t){return t<58?t<44?t==33:t==44||t==46:t<63?t>=58&&t<=59:t==63||t==94}function Lv(t){return t<91?t==40:t==91||t==123}function lp(t){return t<93?t==41:t==93||t==125}var Mv=/^(?: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|ελ|ευ|бг|ею|рф|გე|닷넷|닷컴|삼성|한국|コム|世界|中信|中国|中國|企业|佛山|信息|健康|八卦|公司|公益|台湾|台灣|商城|商店|商标|嘉里|在线|大拿|娱乐|家電|广东|微博|慈善|手机|招聘|政务|政府|新闻|时尚|書籍|机构|游戏|澳門|点看|移动|网址|网店|网站|网络|联通|谷歌|购物|通販|集团|食品|餐厅|香港)$/,__=/https?:\/\//i,Pv=new RegExp("^"+__.source,"i"),xv=/^(javascript|vbscript):/i,Fv=/^[A-Za-z][-.+A-Za-z0-9]*:(\/\/)?([^:/]*)/,Hv=/^(?:\/\/)?([^/#?:]+)/,Zi=ui;function g_(t){return ui(t)||Xe(t)||t===43||t===45||t===46}var zn=Dr;function nu(t){return t===95||zn(t)}function A_(t){return Dr(t)||(function(e){return e<91?e<47?e>=35&&e<=43||e==45:e<61?e==47:e==61||e==64:e<95?e==91||e==93:e<123?e==95:e>=123&&e<=126||e==10003})(t)||E_(t)}function ru(t){return t===47||t===63||t===35}function cp(t){return Mv.test(t.toLowerCase())}var Uv=/^(?:(?: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]?)$/,Bv=/[:/?#]/,jv=/^(https?:\/\/)?(?:www\.)?/i,Vv=/^\/\//,S_=(function(t){function e(n){var r=t.call(this,n)||this;return r.type="url",r.url="",r.urlMatchType="scheme",r.protocolRelativeMatch=!1,r.stripPrefix={scheme:!0,www:!0},r.stripTrailingSlash=!0,r.decodePercentEncoding=!0,r.protocolPrepended=!1,r.urlMatchType=n.urlMatchType,r.url=n.url,r.protocolRelativeMatch=n.protocolRelativeMatch,r.stripPrefix=n.stripPrefix,r.stripTrailingSlash=n.stripTrailingSlash,r.decodePercentEncoding=n.decodePercentEncoding,r}return Eo(e,t),e.prototype.getType=function(){return"url"},e.prototype.getUrlMatchType=function(){return this.urlMatchType},e.prototype.getUrl=function(){var n=this.url;return this.protocolRelativeMatch||this.urlMatchType==="scheme"||this.protocolPrepended||(n=this.url="http://"+n,this.protocolPrepended=!0),n},e.prototype.getAnchorHref=function(){return this.getUrl().replace(/&amp;/g,"&")},e.prototype.getAnchorText=function(){var n=this.getMatchedText();return this.protocolRelativeMatch&&(n=n.replace(Vv,"")),this.stripPrefix.scheme&&(n=n.replace(Pv,"")),this.stripPrefix.www&&(n=(function(r){return r.includes("www.")?r.replace(jv,"$1"):r})(n)),this.stripTrailingSlash&&(n=(function(r){return r.charAt(r.length-1)==="/"&&(r=r.slice(0,-1)),r})(n)),this.decodePercentEncoding&&(n=(function(r){var i=r.replace(/%(?:22|26|27|3C|3E)/gi,function(o){return o==="%22"?"&quot;":o==="%26"?"&amp;":o==="%27"?"&#39;":o==="%3C"||o==="%3c"?"&lt;":"&gt;"});if(i.includes("%"))try{return decodeURIComponent(i)}catch(o){}return i})(n)),n},e})(_o),zv=/^mailto:/i,v_=Dr;function iu(t){return v_(t)||(function(e){return e<47?e<42?e==33||e>=35&&e<=39:e>=42&&e<=43||e==45:e<63?e==47||e==61:e<94?e==63:e>=94&&e<=96||e>=123&&e<=126})(t)}var O_=(function(t){function e(n){var r=t.call(this,n)||this;return r.type="email",r.email="",r.email=n.email,r}return Eo(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})(_o);function D_(t){return t===95||Dr(t)}var $v=["twitter","facebook","instagram","tiktok","youtube"],Yv=(function(t){function e(n){var r=t.call(this,n)||this;return r.type="hashtag",r.serviceName="twitter",r.hashtag="",r.serviceName=n.serviceName,r.hashtag=n.hashtag,r}return Eo(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 n=this.serviceName,r=this.hashtag;switch(n){case"twitter":return"https://twitter.com/hashtag/"+r;case"facebook":return"https://www.facebook.com/hashtag/"+r;case"instagram":return"https://instagram.com/explore/tags/"+r;case"tiktok":return"https://www.tiktok.com/tag/"+r;case"youtube":return"https://youtube.com/hashtag/"+r;default:fr(n)}},e.prototype.getAnchorText=function(){return"#"+this.hashtag},e.prototype.getCssClassSuffixes=function(){var n=t.prototype.getCssClassSuffixes.call(this),r=this.getServiceName();return r&&n.push(r),n},e})(_o),Gv={twitter:/^@\w{1,15}$/,instagram:/^@[_\w]{1,30}$/,soundcloud:/^@[-a-z0-9_]{3,25}$/,tiktok:/^@[.\w]{1,23}[\w]$/,youtube:/^@[-.·\w]{3,30}$/};function T_(t){return t===45||t===46||t===95||ui(t)||Xe(t)}var Wv=["twitter","instagram","soundcloud","tiktok","youtube"],Xv=(function(t){function e(n){var r=t.call(this,n)||this;return r.type="mention",r.serviceName="twitter",r.mention="",r.mention=n.mention,r.serviceName=n.serviceName,r}return Eo(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:fr(this.serviceName)}},e.prototype.getAnchorText=function(){return"@"+this.mention},e.prototype.getCssClassSuffixes=function(){var n=t.prototype.getCssClassSuffixes.call(this),r=this.getServiceName();return r&&n.push(r),n},e})(_o),Kv=/[-. ()]/,qv=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 R_(t){return t===45||t===46||t===32}function ou(t){return t===44||t===59}var Jv=(function(t){function e(n){var r=t.call(this,n)||this;return r.type="phone",r.number="",r.plusSign=!1,r.number=n.number,r.plusSign=n.plusSign,r}return Eo(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})(_o),Zv=(function(){function t(e,n){this.charIdx=0,this.matches=[],this._stateMachines=[],this.schemeUrlMachinesCount=0,this.text=e,this.tagBuilder=n.tagBuilder,this.stripPrefix=n.stripPrefix,this.stripTrailingSlash=n.stripTrailingSlash,this.decodePercentEncoding=n.decodePercentEncoding,this.hashtagServiceName=n.hashtagServiceName,this.mentionServiceName=n.mentionServiceName}return Object.defineProperty(t.prototype,"stateMachines",{get:function(){return this._stateMachines},enumerable:!1,configurable:!0}),t.prototype.addMachine=function(e){this._stateMachines.push(e),dp(e)&&this.schemeUrlMachinesCount++},t.prototype.removeMachine=function(e){this._stateMachines=this._stateMachines.filter(function(n){return n!==e}),dp(e)&&this.schemeUrlMachinesCount--},t.prototype.hasSchemeUrlMachine=function(){return this.schemeUrlMachinesCount>0},t})();function Qs(t,e,n){var r=t.charIdx;if(n===35)t.addMachine({type:2,startIdx:r,state:28,acceptStateReached:!1});else if(n===64)t.addMachine((function(o,s){return{type:3,startIdx:o,state:s,acceptStateReached:!1}})(r,30));else if(n===47)t.addMachine(ec(r,11));else if(n===43)t.addMachine(Ja(r,37));else if(n===40)t.addMachine(Ja(r,32));else{if(Xe(n)&&(t.addMachine(Ja(r,38)),t.addMachine((function(o,s){return{type:0,startIdx:o,state:s,acceptStateReached:!1,matchType:2,octetsEncountered:1}})(r,13))),v_(n)){var i=e.toLowerCase()==="m"?15:22;t.addMachine((function(o,s){return{type:1,startIdx:o,state:s,acceptStateReached:!1}})(r,i))}Zi(n)&&t.addMachine(ea(r,0)),Dr(n)&&t.addMachine(ec(r,5))}}function Qv(t,e,n){n===58?e.state=2:n===45?e.state=1:g_(n)||t.removeMachine(e)}function eO(t,e,n){var r=t.charIdx;n===45||(n===47?(t.removeMachine(e),t.addMachine(ec(r,11))):g_(n)?e.state=0:t.removeMachine(e))}function tO(t,e,n){var r=t.charIdx;n===47?e.state=3:n===46?t.removeMachine(e):zn(n)?(e.state=5,Zi(n)&&t.addMachine(ea(r,0))):t.removeMachine(e)}function nO(t,e,n){n===47?e.state=4:A_(n)?(e.state=10,e.acceptStateReached=!0):ve(t,e)}function rO(t,e,n,r){r===47?(e.state=10,e.acceptStateReached=!0):zn(r)?(e.state=5,e.acceptStateReached=!0):t.removeMachine(e)}function iO(t,e,n){n===47?e.state=12:t.removeMachine(e)}function oO(t,e,n){zn(n)?e.state=5:t.removeMachine(e)}function sO(t,e,n){n===46?e.state=7:n===45?e.state=6:n===58?e.state=8:ru(n)?e.state=10:nu(n)||ve(t,e)}function aO(t,e,n,r){r===45||(r===46?ve(t,e):zn(r)?e.state=5:ve(t,e))}function lO(t,e,n,r){r===46?ve(t,e):zn(r)?(e.state=5,e.acceptStateReached=!0):ve(t,e)}function cO(t,e,n){n===46?e.state=14:n===58?e.state=8:Xe(n)||(ru(n)?e.state=10:Dr(n)?t.removeMachine(e):ve(t,e))}function uO(t,e,n){Xe(n)?(e.octetsEncountered++,e.octetsEncountered===4&&(e.acceptStateReached=!0),e.state=13):ve(t,e)}function dO(t,e,n){Xe(n)?e.state=9:ve(t,e)}function hO(t,e,n){Xe(n)||(ru(n)?e.state=10:ve(t,e))}function pO(t,e,n){A_(n)||ve(t,e)}function fO(t,e,n,r){n.toLowerCase()==="a"?e.state=16:Tr(t,e,r)}function mO(t,e,n,r){n.toLowerCase()==="i"?e.state=17:Tr(t,e,r)}function EO(t,e,n,r){n.toLowerCase()==="l"?e.state=18:Tr(t,e,r)}function _O(t,e,n,r){n.toLowerCase()==="t"?e.state=19:Tr(t,e,r)}function gO(t,e,n,r){n.toLowerCase()==="o"?e.state=20:Tr(t,e,r)}function AO(t,e,n){n===58?e.state=21:Tr(t,e,n)}function SO(t,e,n){iu(n)?e.state=22:t.removeMachine(e)}function Tr(t,e,n){n===46?e.state=23:n===64?e.state=24:iu(n)?e.state=22:t.removeMachine(e)}function vO(t,e,n){n===46||n===64?t.removeMachine(e):iu(n)?e.state=22:t.removeMachine(e)}function OO(t,e,n){zn(n)?e.state=25:t.removeMachine(e)}function DO(t,e,n){n===46?e.state=27:n===45?e.state=26:nu(n)||ve(t,e)}function TO(t,e,n){n===45||n===46?ve(t,e):nu(n)?e.state=25:ve(t,e)}function RO(t,e,n){n===46||n===45?ve(t,e):zn(n)?(e.state=25,e.acceptStateReached=!0):ve(t,e)}function yO(t,e,n){D_(n)?(e.state=29,e.acceptStateReached=!0):t.removeMachine(e)}function IO(t,e,n){D_(n)||ve(t,e)}function CO(t,e,n){T_(n)?(e.state=31,e.acceptStateReached=!0):t.removeMachine(e)}function NO(t,e,n){T_(n)||(Dr(n)?t.removeMachine(e):ve(t,e))}function bO(t,e,n,r){Xe(r)?e.state=38:(t.removeMachine(e),Qs(t,n,r))}function wO(t,e,n,r){Xe(r)?e.state=33:t.removeMachine(e),Qs(t,n,r)}function kO(t,e,n){Xe(n)?e.state=34:t.removeMachine(e)}function LO(t,e,n){Xe(n)?e.state=35:t.removeMachine(e)}function MO(t,e,n){n===41?e.state=36:t.removeMachine(e)}function PO(t,e,n,r){Xe(r)?e.state=38:R_(r)?e.state=39:t.removeMachine(e)}function xO(t,e,n,r){var i=t.charIdx;e.acceptStateReached=!0,ou(r)?e.state=40:r===35?e.state=41:Xe(r)||(r===40?e.state=32:R_(r)?e.state=39:(ve(t,e),Zi(r)&&t.addMachine(ea(i,0))))}function FO(t,e,n,r){Xe(r)?e.state=38:r===40?e.state=32:(ve(t,e),Qs(t,n,r))}function HO(t,e,n){ou(n)||(n===35?e.state=41:Xe(n)?e.state=38:ve(t,e))}function UO(t,e,n){ou(n)?e.state=40:Xe(n)?t.removeMachine(e):ve(t,e)}function ve(t,e){var n=t.matches,r=t.text,i=t.charIdx,o=t.tagBuilder,s=t.stripPrefix,a=t.stripTrailingSlash,l=t.decodePercentEncoding,u=t.hashtagServiceName,c=t.mentionServiceName;if(t.removeMachine(e),e.acceptStateReached){var d,h,p=e.startIdx,m=r.slice(e.startIdx,i);switch(m=(function(g){for(var A={"(":0,"{":0,"[":0},S=0;S<g.length;S++){var v=g.charAt(S);Lv(y=g.charCodeAt(S))?A[v]++:lp(y)&&A[up[v]]--}for(var D=g.length-1;D>=0;){var y;if(v=g.charAt(D),lp(y=g.charCodeAt(D))){var R=up[v];if(!(A[R]<0))break;A[R]++,D--}else{if(!E_(y))break;D--}}return g.slice(0,D+1)})(m),e.type){case 0:if(r.charCodeAt(e.startIdx-1)===64)return;switch(e.matchType){case 0:var _=__.exec(m);if(_&&(p+=_.index,m=m.slice(_.index)),!(function(g){if(xv.test(g))return!1;var A=g.match(Fv);if(!A)return!1;var S=!!A[1],v=A[2];return!!S||!(v.indexOf(".")===-1||!/[A-Za-z]/.test(v))})(m))return;break;case 1:if(!(function(g){var A=g.match(Hv);if(!A)return!1;var S=A[0].split(".");return!(S.length<2||!cp(S[S.length-1]))})(m))return;break;case 2:if(h=m.split(Bv,1)[0],!Uv.test(h))return;break;default:fr(e)}n.push(new S_({tagBuilder:o,matchedText:m,offset:p,urlMatchType:BO(e.matchType),url:m,protocolRelativeMatch:m.slice(0,2)==="//",stripPrefix:s,stripTrailingSlash:a,decodePercentEncoding:l}));break;case 1:cp(m.split(".").pop())&&n.push(new O_({tagBuilder:o,matchedText:m,offset:p,email:m.replace(zv,"")}));break;case 2:m.length<=140&&n.push(new Yv({tagBuilder:o,matchedText:m,offset:p,serviceName:u,hashtag:m.slice(1)}));break;case 3:(function(g,A){return Gv[A].test(g)})(m,c)&&n.push(new Xv({tagBuilder:o,matchedText:m,offset:p,serviceName:c,mention:m.slice(1)}));break;case 4:if(m=m.replace(/ +$/g,""),((d=m).charAt(0)==="+"||Kv.test(d))&&qv.test(d)){var E=m.replace(/[^0-9,;#]/g,"");n.push(new Jv({tagBuilder:o,matchedText:m,offset:p,number:E,plusSign:m.charAt(0)==="+"}))}break;default:fr(e)}}}function BO(t){switch(t){case 0:return"scheme";case 1:return"tld";case 2:return"ipV4";default:fr(t)}}var up={")":"(","}":"{","]":"["};function ea(t,e){return{type:0,startIdx:t,state:e,acceptStateReached:!1,matchType:0}}function ec(t,e){return{type:0,startIdx:t,state:e,acceptStateReached:!1,matchType:1}}function Ja(t,e){return{type:4,startIdx:t,state:e,acceptStateReached:!1}}function dp(t){return t.type===0&&t.matchType===0}var Jt=function(t){t===void 0&&(t={}),this.idx=t.idx!==void 0?t.idx:-1,this.type=t.type||"tag",this.name=t.name||"",this.isOpening=!!t.isOpening,this.isClosing=!!t.isClosing},su=new Jt,jO=function(t,e){this.charIdx=0,this.state=0,this.currentDataIdx=0,this.currentTag=su,this.html=t,this.callbacks=e};function VO(t,e){e==="<"&&nn(t)}function zO(t,e,n){e==="!"?t.state=13:e==="/"?(t.state=2,t.currentTag=new Jt(Pe(Pe({},t.currentTag),{isClosing:!0}))):e==="<"?nn(t):ui(n)?(t.state=3,t.currentTag=new Jt(Pe(Pe({},t.currentTag),{isOpening:!0}))):(t.state=0,t.currentTag=su)}function $O(t,e,n){Or(n)?(t.currentTag=new Jt(Pe(Pe({},t.currentTag),{name:Za(t)})),t.state=4):e==="<"?nn(t):e==="/"?(t.currentTag=new Jt(Pe(Pe({},t.currentTag),{name:Za(t)})),t.state=12):e===">"?(t.currentTag=new Jt(Pe(Pe({},t.currentTag),{name:Za(t)})),rn(t)):ui(n)||Xe(n)||e===":"||Mt(t)}function YO(t,e,n){e===">"?Mt(t):ui(n)?t.state=3:Mt(t)}function GO(t,e,n){Or(n)||(e==="/"?t.state=12:e===">"?rn(t):e==="<"?nn(t):e==="="||tu(n)||(function(r){return r>=0&&r<=31||r==127})(n)?Mt(t):t.state=5)}function WO(t,e,n){Or(n)?t.state=6:e==="/"?t.state=12:e==="="?t.state=7:e===">"?rn(t):e==="<"?nn(t):tu(n)&&Mt(t)}function XO(t,e,n){Or(n)||(e==="/"?t.state=12:e==="="?t.state=7:e===">"?rn(t):e==="<"?nn(t):tu(n)?Mt(t):t.state=5)}function KO(t,e,n){Or(n)||(e==='"'?t.state=8:e==="'"?t.state=9:/[>=`]/.test(e)?Mt(t):e==="<"?nn(t):t.state=10)}function qO(t,e){e==='"'&&(t.state=11)}function JO(t,e){e==="'"&&(t.state=11)}function ZO(t,e,n){Or(n)?t.state=4:e===">"?rn(t):e==="<"&&nn(t)}function QO(t,e,n){Or(n)?t.state=4:e==="/"?t.state=12:e===">"?rn(t):e==="<"?nn(t):(t.state=4,(function(r){r.charIdx--})(t))}function e0(t,e){e===">"?(t.currentTag=new Jt(Pe(Pe({},t.currentTag),{isClosing:!0})),rn(t)):Mt(t)}function t0(t){var e=t.html,n=t.charIdx;e.slice(n,n+2)==="--"?(t.charIdx++,t.currentTag=new Jt(Pe(Pe({},t.currentTag),{type:"comment"})),t.state=14):e.slice(n,n+7).toUpperCase()==="DOCTYPE"?(t.charIdx+=6,t.currentTag=new Jt(Pe(Pe({},t.currentTag),{type:"doctype"})),t.state=20):Mt(t)}function n0(t,e){e==="-"?t.state=15:e===">"?Mt(t):t.state=16}function r0(t,e){e==="-"?t.state=18:e===">"?Mt(t):t.state=16}function i0(t,e){e==="-"&&(t.state=17)}function o0(t,e){t.state=e==="-"?18:16}function s0(t,e){e===">"?rn(t):e==="!"?t.state=19:e==="-"||(t.state=16)}function a0(t,e){e==="-"?t.state=17:e===">"?rn(t):t.state=16}function l0(t,e){e===">"?rn(t):e==="<"&&nn(t)}function Mt(t){t.state=0,t.currentTag=su}function nn(t){t.state=1,t.currentTag=new Jt({idx:t.charIdx})}function rn(t){var e=t.html.slice(t.currentDataIdx,t.currentTag.idx);e&&t.callbacks.onText(e,t.currentDataIdx);var n=t.currentTag;n.type==="comment"?t.callbacks.onComment(n.idx):n.type==="doctype"?t.callbacks.onDoctype(n.idx):(n.isOpening&&t.callbacks.onOpenTag(n.name,n.idx),n.isClosing&&t.callbacks.onCloseTag(n.name,n.idx)),Mt(t),t.currentDataIdx=t.charIdx+1}function Za(t){var e=t.currentTag.idx+(t.currentTag.isClosing?2:1);return t.html.slice(e,t.charIdx).toLowerCase()}var c0=(function(){function t(e){e===void 0&&(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(o){return o==null&&(o=!0),yt(o)?{schemeMatches:o,tldMatches:o,ipV4Matches:o}:{schemeMatches:!yt(o.schemeMatches)||o.schemeMatches,tldMatches:!yt(o.tldMatches)||o.tldMatches,ipV4Matches:!yt(o.ipV4Matches)||o.ipV4Matches}})(e.urls),this.email=yt(e.email)?e.email:this.email,this.phone=yt(e.phone)?e.phone:this.phone,this.hashtag=e.hashtag||this.hashtag,this.mention=e.mention||this.mention,this.newWindow=yt(e.newWindow)?e.newWindow:this.newWindow,this.stripPrefix=(function(o){return o==null&&(o=!0),yt(o)?{scheme:o,www:o}:{scheme:!yt(o.scheme)||o.scheme,www:!yt(o.www)||o.www}})(e.stripPrefix),this.stripTrailingSlash=yt(e.stripTrailingSlash)?e.stripTrailingSlash:this.stripTrailingSlash,this.decodePercentEncoding=yt(e.decodePercentEncoding)?e.decodePercentEncoding:this.decodePercentEncoding,this.sanitizeHtml=e.sanitizeHtml||!1;var n=this.mention;if(n!==!1&&Wv.indexOf(n)===-1)throw new Error("invalid `mention` cfg '".concat(n,"' - see docs"));var r,i=this.hashtag;if(i!==!1&&$v.indexOf(i)===-1)throw new Error("invalid `hashtag` cfg '".concat(i,"' - see docs"));this.truncate=typeof(r=e.truncate)=="number"?{length:r,location:"end"}:Pe({length:Number.POSITIVE_INFINITY,location:"end"},r),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(e){var n=this,r=["a","style","script"],i=0,o=[];return(function(s,a){for(var l=new jO(s,a),u=s.length;l.charIdx<u;){var c=s.charAt(l.charIdx),d=s.charCodeAt(l.charIdx);switch(l.state){case 0:VO(l,c);break;case 1:zO(l,c,d);break;case 2:YO(l,c,d);break;case 3:$O(l,c,d);break;case 4:GO(l,c,d);break;case 5:WO(l,c,d);break;case 6:XO(l,c,d);break;case 7:KO(l,c,d);break;case 8:qO(l,c);break;case 9:JO(l,c);break;case 10:ZO(l,c,d);break;case 11:QO(l,c,d);break;case 12:e0(l,c);break;case 13:t0(l);break;case 14:n0(l,c);break;case 15:r0(l,c);break;case 16:i0(l,c);break;case 17:o0(l,c);break;case 18:s0(l,c);break;case 19:a0(l,c);break;case 20:l0(l,c);break;default:fr(l.state)}l.charIdx++}l.currentDataIdx<l.charIdx&&(function(h){var p=h.html.slice(h.currentDataIdx,h.charIdx);h.callbacks.onText(p,h.currentDataIdx),h.currentDataIdx=h.charIdx+1})(l)})(e,{onOpenTag:function(s){r.indexOf(s)>=0&&i++},onText:function(s,a){if(i===0){var l=s.split(/(&nbsp;|&#160;|&lt;|&#60;|&gt;|&#62;|&quot;|&#34;|&#39;)/gi),u=a;l.forEach(function(c,d){if(d%2==0){var h=n.parseText(c,u);o.push.apply(o,(function(p,m,_){if(_||arguments.length===2)for(var E,g=0,A=m.length;g<A;g++)!E&&g in m||(E||(E=Array.prototype.slice.call(m,0,g)),E[g]=m[g]);return p.concat(E||Array.prototype.slice.call(m))})([],(function(p,m){var _=typeof Symbol=="function"&&p[Symbol.iterator];if(!_)return p;var E,g,A=_.call(p),S=[];try{for(;(m===void 0||m-- >0)&&!(E=A.next()).done;)S.push(E.value)}catch(v){g={error:v}}finally{try{E&&!E.done&&(_=A.return)&&_.call(A)}finally{if(g)throw g.error}}return S})(h),!1))}u+=c.length})}},onCloseTag:function(s){r.indexOf(s)>=0&&(i=Math.max(i-1,0))},onComment:function(){},onDoctype:function(){}}),o=this.compactMatches(o),o=this.removeUnwantedMatches(o)},t.prototype.compactMatches=function(e){e.sort(u0);for(var n=0;n<e.length-1;){var r=e[n],i=r.getOffset(),o=r.getMatchedText().length;if(n+1<e.length&&e[n+1].getOffset()===i){var s=e[n+1].getMatchedText().length>o?n:n+1;e.splice(s,1)}else n++}return e},t.prototype.removeUnwantedMatches=function(e){return this.hashtag||Gn(e,function(n){return n.getType()==="hashtag"}),this.email||Gn(e,function(n){return n.getType()==="email"}),this.phone||Gn(e,function(n){return n.getType()==="phone"}),this.mention||Gn(e,function(n){return n.getType()==="mention"}),this.urls.schemeMatches||Gn(e,function(n){return n.getType()==="url"&&n.getUrlMatchType()==="scheme"}),this.urls.tldMatches||Gn(e,function(n){return n.getType()==="url"&&n.getUrlMatchType()==="tld"}),this.urls.ipV4Matches||Gn(e,function(n){return n.getType()==="url"&&n.getUrlMatchType()==="ipV4"}),e},t.prototype.parseText=function(e,n){n=n||0;for(var r=(function(s,a){for(var l=new Zv(s,a);l.charIdx<l.text.length;l.charIdx++){var u=s.charAt(l.charIdx),c=s.charCodeAt(l.charIdx);if(l.stateMachines.length===0)Qs(l,u,c);else{for(var d=l.stateMachines.length-1;d>=0;d--){var h=l.stateMachines[d];switch(h.state){case 11:iO(l,h,c);break;case 12:oO(l,h,c);break;case 0:Qv(l,h,c);break;case 1:eO(l,h,c);break;case 2:tO(l,h,c);break;case 3:nO(l,h,c);break;case 4:rO(l,h,0,c);break;case 5:sO(l,h,c);break;case 6:aO(l,h,0,c);break;case 7:lO(l,h,0,c);break;case 13:cO(l,h,c);break;case 14:uO(l,h,c);break;case 8:dO(l,h,c);break;case 9:hO(l,h,c);break;case 10:pO(l,h,c);break;case 15:fO(l,h,u,c);break;case 16:mO(l,h,u,c);break;case 17:EO(l,h,u,c);break;case 18:_O(l,h,u,c);break;case 19:gO(l,h,u,c);break;case 20:AO(l,h,c);break;case 21:SO(l,h,c);break;case 22:Tr(l,h,c);break;case 23:vO(l,h,c);break;case 24:OO(l,h,c);break;case 25:DO(l,h,c);break;case 26:TO(l,h,c);break;case 27:RO(l,h,c);break;case 28:yO(l,h,c);break;case 29:IO(l,h,c);break;case 30:CO(l,h,c);break;case 31:NO(l,h,c);break;case 32:wO(l,h,u,c);break;case 33:kO(l,h,c);break;case 34:LO(l,h,c);break;case 35:MO(l,h,c);break;case 36:PO(l,h,0,c);break;case 37:bO(l,h,u,c);break;case 38:xO(l,h,0,c);break;case 39:FO(l,h,u,c);break;case 40:HO(l,h,c);break;case 41:UO(l,h,c);break;default:fr(h.state)}}if(!l.hasSchemeUrlMachine()&&l.charIdx>0&&Zi(c)){var p=l.text.charCodeAt(l.charIdx-1);Zi(p)||l.addMachine(ea(l.charIdx,0))}}}for(var m=l.stateMachines.length-1;m>=0;m--)l.stateMachines.forEach(function(_){return ve(l,_)});return l.matches})(e,{tagBuilder:this.getTagBuilder(),stripPrefix:this.stripPrefix,stripTrailingSlash:this.stripTrailingSlash,decodePercentEncoding:this.decodePercentEncoding,hashtagServiceName:this.hashtag,mentionServiceName:this.mention||"twitter"}),i=0,o=r.length;i<o;i++)r[i].setOffset(n+r[i].getOffset());return r},t.prototype.link=function(e){if(!e)return"";this.sanitizeHtml&&(e=e.replace(/</g,"&lt;").replace(/>/g,"&gt;"));for(var n=this.parse(e),r=new Array(2*n.length+1),i=0,o=0,s=n.length;o<s;o++){var a=n[o];r.push(e.substring(i,a.getOffset())),r.push(this.createMatchReturnVal(a)),i=a.getOffset()+a.getMatchedText().length}return r.push(e.substring(i)),r.join("")},t.prototype.createMatchReturnVal=function(e){var n;return this.replaceFn&&(n=this.replaceFn.call(this.context,e)),typeof n=="string"?n:n===!1?e.getMatchedText():n instanceof m_?n.toAnchorString():e.buildTag().toAnchorString()},t.prototype.getTagBuilder=function(){var e=this.tagBuilder;return e||(e=this.tagBuilder=new kv({newWindow:this.newWindow,truncate:this.truncate,className:this.className})),e},t.version="4.1.5",t})();function u0(t,e){return t.getOffset()-e.getOffset()}function y_(t,e=t){return{type:"autolink",url:t,text:e}}const d0=()=>vn(/```([^]+?)```/g,([t,e])=>({type:"codespan",text:p_(e)})),h0=vn(/<!!mention:([^>\s]*?)\|(.*?)>/gm,([t,e,n])=>(function(r,i){return{type:"mention",id:r,text:i}})(decodeURIComponent(e),n)),p0=vn(/<!!customemoji:(.*?)>/gm,([t,e])=>(function(n){return{type:"customemoji",text:n}})(e)),I_=vn(/<((?:https?|mailto):.*?)\|(.*?)>/gi,([t,e,n])=>(function(r,i=[]){return{type:"link",url:r,children:i}})(e,[n])),f0=vn(/<actionlink:([^|]+)[|]([^>]*)>/gi,([t,e,n])=>{const{action:r,params:i}=C_(e);return(function(o,s,a=[]){return{type:"actionlink",action:o,params:s,children:a}})(r,i,[n])}),m0=vn(/<actionbutton:([^|]+)[|]([^>]*)>/gi,([t,e,n])=>{const{action:r,params:i}=C_(e);return(function(o,s,a=[]){return{type:"actionbutton",action:o,params:s,children:a}})(r,i,[n])});function C_(t){const e=t.indexOf("?");return e===-1?{action:t,params:{}}:{action:t.slice(0,e),params:Object.fromEntries(new URLSearchParams(t.slice(e)))}}const E0=vn(/(?:^|\n)(?:\s*[-*+]\s+[^\n]+(?:\n|$))+/g,([t])=>(function(e=[]){return{type:"bulletlist",children:e}})([t.startsWith(`
20
- `)?t.slice(1):t])),_0=vn(/^\s*[-*+]\s+([^\n]+)(?:\n|$)/gm,([t,e])=>({type:"bulletpoint",children:[e]})),N_=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 Zs(t,e)){const a=s[0],l=s[1],u=l.match(n);if(u&&Number(u[1])<Number(u[2]))continue;const c=l.match(r);if(c){const p=Number(c[1]),m=Number(c[2]),_=Number(c[3]),E=Number(c[4]);if(p<=23&&_<=23&&m<=59&&E<=59)continue}const d=a.startsWith(l)?s.index:s.index+1;d-i>0&&o.push(t.substring(i,d));const h=y_("tel:"+l.replace(/[^0-9+]/g,""),l);o.push(h),i=d+l.length}return i<t.length&&o.push(t.substring(i)),o},b_=t=>I_(t).flatMap(e=>typeof e=="string"?Qa(e):["<",...Qa(e.url),...Qa("|"+e.children[0]+">")]),Qa=t=>{const e=c0.parse(t,{urls:!0,email:!0,phone:!1,hashtag:!1,mention:!1}),n=[];let r=0;for(const i of e){const o=i.getOffset(),s=i.getMatchedText(),a=s.length;let l=s;i instanceof O_?l="mailto:"+i.getEmail():i instanceof S_&&(l=i.getUrl()),o>r&&n.push(t.substring(r,o)),n.push(y_(l,s)),r=o+a}return r<t.length&&n.push(t.substring(r)),n},g0=["Codeblock","Codespan","FormattedLink","Wikitext","Autolink","Actions","Mention","Mention","BulletPoint","CustomEmoji"],A0=(function(t){const e=RegExp(`[^${t}]+${t}?|${t}`,"g");return n=>Array.from(n.match(e)||[])})(`
21
- `);function w_(t,e={except:[]}){const n=(function(i={except:[]}){var a;const o={multilineSteps:[],singlelineSteps:[]},s=(a=i.except)!=null?a:g0.filter(l=>!i.only.includes(l));return s.includes("BulletPoint")||o.multilineSteps.push(E0,_0),s.includes("Mention")||o.singlelineSteps.push(h0),s.includes("CustomEmoji")||o.singlelineSteps.push(p0),s.includes("Codespan")||o.multilineSteps.push(d0()),s.includes("FormattedLink")||o.singlelineSteps.push(I_),s.includes("Actions")||(o.singlelineSteps.push(f0),o.singlelineSteps.push(m0)),s.includes("Wikitext")||o.singlelineSteps.push(Nv),s.includes("Autolink")||o.singlelineSteps.push(b_,N_),o})(e);let r=L_(t,n);return r=M_(r,!1),r}function k_(t){return w_(t,{except:["FormattedLink","Actions"]})}function L_(t,e){let n=[t];return n=el(n,e.multilineSteps),n=el(n,[A0]),n=el(n,e.singlelineSteps),n=au(n),n}function el(t,e){return e.reduce((n,r)=>Pi(n,r),t)}function au(t){const e=[];let n=-1;for(const r of t)typeof r=="string"?typeof e[n]=="string"?e[n]+=r:e[++n]=r:e[++n]="children"in r?{...r,children:au(r.children)}:r;return e}function M_(t,e){const n=[];let r=[];for(let i=0;i<t.length;i++){const o=t[i];if(typeof o=="string")r.push(o);else if("children"in o){r.length>0&&(n.push(r.join("")),r=[]);const s=M_(o.children,e||o.type==="link"||o.type==="actionbutton"||o.type==="actionlink");n.push({...o,children:s})}else o.type==="autolink"&&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 S0(){let t,e=0;return n=>{const r=(o=Date.now())=>{if(window.clearTimeout(t),t=void 0,e=o,n.isDestroyed)return;const s=(function(a){a=a.removeMark(0,a.doc.content.size,xe.marks.bold),a=a.removeMark(0,a.doc.content.size,xe.marks.italic),a=a.removeMark(0,a.doc.content.size,xe.marks.strikethrough),a.doc.firstChild;const l=(function(u){const c=[];let d,h="";return u.descendants((p,m)=>(p.isText?(h+=p.text,d!=null||(d=m)):h&&d!==void 0&&(c.push({text:h,pos:d}),h="",d=void 0),p.type!==xe.nodes.mention)),h&&d!==void 0&&c.push({text:h,pos:d}),c})(a.doc);for(const{text:u,pos:c}of l){const d=w_(u,{only:["Wikitext"]});[a]=P_(a,c,d)}return a})(n.state.tr);n.dispatch(s)},i=Date.now();i-e<300?t||(t=window.setTimeout(r,300)):r(i)}}function P_(t,e,n,r=0,i=[]){for(const o of n)if(typeof o=="string"){for(const s of i)t.addMark(e+r,e+r+o.length,s.create());r+=o.length}else if(o.type==="bold"||o.type==="italic"||o.type==="strikethrough"){r+=1;const s=xe.marks[o.type],a=[...i,s];[t,r]=P_(t,e,o.children,r,a),r+=1}else re.unreachable();return[t,r]}function hp(t){return(e,n)=>{if(!n)return!0;let r=e.tr;const i=de.between(e.selection.$from,e.selection.$to);return r=r.replaceRangeWith(i.from,i.from,xe.text(t,r.storedMarks)),r=r.replaceRangeWith(i.to+1,i.to+1,xe.text(t,r.storedMarks)),r=r.setSelection(de.near(r.doc.resolve(i.to+1))),n(r),!0}}function v0(t,e,n){const r=e.clipboardData;if(!r)return!1;const i=(function(o){const s=o.items||[],a={"image/gif":"gif","image/png":"png","image/jpeg":"jpg","image/svg+xml":"svg"},l=Array.from(s).filter(d=>d.kind==="file"&&a[d.type]);if(l.length===0||o.types.includes("text/rtf"))return;const u=l[0];let c=u.getAsFile();if(!c.name){const d="image."+a[u.type];c=new File([c],d,{type:u.type,lastModified:Date.now()})}return c})(r);return i?n(i):(function(o,s){const a=o.state.tr.insertText(s).scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste");o.dispatch(a)})(t,r.getData("text/plain")),!0}function pp(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 Xs({key:new Ks("suggestions"),view(){return{update:(l,u)=>{const c=this.key.getState(u),d=this.key.getState(l.state);if(!c||!d)return;const h=c.active&&d.active&&c.range.from!==d.range.from,p=!c.active&&d.active,m=c.active&&!d.active,_=!p&&!m&&c.text!==d.text;(m||h)&&o({view:l,range:c.range,text:c.text}),_&&!h&&i({view:l,range:d.range,text:d.text}),(p||h)&&r({view:l,range:d.range,text:d.text})}}},state:{init:()=>({active:!1,range:{from:0,to:0},text:null}),apply(l,u){const{selection:c}=l,d={...u};if(c.from===c.to){(c.from<u.range.from||c.from>u.range.to)&&(d.active=!1);const h=c.$from,p=e(h);p?(d.active=!0,d.range=p.range,d.text=p.text):d.active=!1}else d.active=!1;return d.active||(d.range={from:0,to:0},d.text=null),d}},props:{handleKeyDown(l,u){var d;const c=this.getState(l.state);return!!(c!=null&&c.active)&&((d=s({view:l,event:u}))!=null?d:!1)},decorations(l){const u=this.getState(l);return u!=null&&u.active?be.create(l.doc,[Dt.inline(u.range.from,u.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 fp=(t,e)=>n=>{var l;const r=(l=n.nodeBefore)==null?void 0:l.text;if(!r)return;const i=r.match(t);if(!i)return;const o=i[2],s=n.pos-o.length,a=n.pos;if(!n.doc.rangeHasMark(s,a,e.marks.literal))return{range:{from:s,to:a},text:o}},O0=/(^|\s)(:[^:\s]+:?)$/,D0=/(^|\s)(@[^@]*)$/;function lu({placeholder:t,disabled:e,className:n="",characterLimit:r,spellcheck:i}){const o=ho(),s=X(),a=X(null);return z(()=>(s.current=(function(l,u,c,d,h){const p=Ur.create({schema:xe,plugins:[...h.filter(T0),gv(),qh({...Mo,"Mod-z":o_,"Mod-y":Xl,"Mod-Shift-z":Xl,"Mod-b":hp("*"),"Mod-i":hp("_"),"Mod-Enter":Mo.Enter,"Shift-Enter":Mo.Enter,Enter:c}),qh({Enter:Mo.Enter}),Kh]}),m=S0(),_=new t_(l,{handlePaste:(E,g,A)=>v0(E,g,d),clipboardTextSerializer(E){const g=[];return E.content.forEach(A=>{A&&g.push(p_(A.textContent))}),g.join()},state:p,dispatchTransaction(E){E=(E=E.removeStoredMark(xe.marks.literal)).removeStoredMark(xe.marks.emoji);const g=_.state.apply(E);_.state.doc.eq(g.doc)||u(new vs(g.doc)),_.updateState(g),E.steps.some(A=>A instanceof $e)&&m(_)}});return _})(a.current,l=>o.onChange(l),()=>!!o.onEnter&&(o.onEnter(),!0),l=>o.onPasteImage(l),[o.emojiSuggesterPlugin(),o.mentionsPlugin()]),o.setEditorView(s.current),()=>{var l;o.setEditorView(void 0),(l=s.current)==null||l.destroy()}),[o]),z(()=>{var l;(l=s.current)==null||l.setProps({editable:()=>!e})},[e]),z(()=>mt(()=>{var l,u,c;return(c=s.current)==null?void 0:c.setProps({attributes:{spellcheck:String((u=(l=o.spellcheck$.get())!=null?l:i)!=null?u:!1),class:"t-text-input","aria-label":"Message Field",role:"textbox"}})}),[o,i]),z(()=>mt(()=>{var u;const l=s.current;l==null||l.dispatch(l.state.tr.setMeta(Kh,(u=o.placeholder$.get())!=null?u:t))}),[o,t]),z(()=>{r&&Number.isInteger(r)&&o.setMaxLength(r)},[r,o]),f("div",{className:`t-editor ${n}`,ref:a})}function mp(t){if(t.startsWith(":"))throw new Error("Not implemented");{const e=xe.marks.emoji.create({emoji:t});return xe.text(t,[e])}}function Ep(t,e){const n=encodeURIComponent(t);return xe.nodes.mention.create({id:t,name:e},xe.text(`<!!mention:${n}|${e}>`))}const Ls=class Ls{constructor(e){this.doc=e,this.size=this.doc.content.size,this.hasContent=n_(this.doc)}hasNonWhitespaceContent(){return this.hasContent&&(function(e){let n=!1;return e.descendants(r=>!(r.isText&&r.text&&/\S/.test(r.text))||(n=!0,!1)),n})(this.doc)}asText(){return this.doc.textContent.replace(/\xa0/g," ")}};Ls.EMPTY=new Ls(xe.topNodeType.create());let vs=Ls;function T0(t){return t!=null}function _p(t,e){let n=0;return(...r)=>{n&&(clearTimeout(n),n=0),n=setTimeout(()=>{t(...r)},e)}}class x_{constructor(e,n,r){this.state$=e,this.device$=n,this.userPermissions$=r,this.currentDoc=vs.EMPTY,this.maxLength=1e4,this.markAsTyping=(function(i,o){let s=!1;return(...a)=>{if(!s)return s=!0,setTimeout(()=>{s=!1},o),i(...a)}})(()=>{var i;(i=this.controller)==null||i.markAsTyping()},5e3),this._suggesterKeydownHandlers={emoji:void 0,mention:void 0},this.toggleEmojiPicker=i=>{const o=this.state$.showEmojiPicker;i!=null||(i=!o.peek()),o.set(i),i===!1&&this.focus()},this.spellcheck$=se(),this.placeholder$=se()}setEditorView(e){this.editorView=e}emojiSuggesterPlugin(){if(this.device$.peek().supportsEmojiPicker)return pp({debug:!1,matcher:fp(O0,xe),onEnter:e=>this.suggestEmoji(e.text,e.range),onChange:e=>this.suggestEmoji(e.text,e.range),onExit:()=>this.onExitSuggester(),onKeyDown:({event:e})=>{var n,r,i;return(i=(r=(n=this._suggesterKeydownHandlers).emoji)==null?void 0:r.call(n,e.key))!=null?i:!1}})}mentionsPlugin(){const e=this.userPermissions$.peek();if(re.defined(e),e.canMention)return pp({debug:!1,matcher:fp(D0,xe),onEnter:n=>this.suggestMention(n.text,n.range),onChange:n=>this.suggestMention(n.text,n.range),onExit:()=>this.onExitSuggester(),onKeyDown:({event:n})=>{var r,i,o;return(o=(i=(r=this._suggesterKeydownHandlers).mention)==null?void 0:i.call(r,n.key))!=null?o:!1}})}closeSuggester(){re.defined(this._suggestionRange),(function(e,n){const{from:r,to:i}=n,o=e.state.tr.addMark(r,i,xe.marks.literal.create());e.dispatch(o)})(this.editorView,this._suggestionRange)}listenKeydown(e,n){this._suggesterKeydownHandlers[e]=n}onExitSuggester(){this._suggestionRange=void 0,this.state$.suggestEmojiQuery.set(void 0),this.state$.suggestMentionQuery.set(void 0)}suggestEmoji(e,n){e.length<2||(this._suggestionRange=n,this.state$.suggestEmojiQuery.set(e))}suggestMention(e,n){e.length<1||(this._suggestionRange=n,this.state$.suggestMentionQuery.set(e))}onPasteImage(e){re.defined(this.uploadFile),this.uploadFile(e)}onChange(e){var r;this.currentDoc=e;const n=e.size>this.maxLength&&e.asText().length>this.maxLength;e.hasContent&&this.markAsTyping(),this.state$.assign({atTextLimit:n,isEmpty:!e.hasNonWhitespaceContent(),characterCount:e.size===0?0:e.size-2}),(r=this.controller)==null||r.storeDraft(()=>e.asText())}setMaxLength(e){this.maxLength=e}focus({skipProseMirrorStuff:e}={skipProseMirrorStuff:!1}){var n,r;e?(n=this.editorView)==null||n.dom.focus():(r=this.editorView)==null||r.focus()}setText(e){this.editorView&&(function(n,r){const i=n.state.doc.content.size,o=r.split(/(<!!(?:mention|customemoji):.*?>)/g).filter(a=>a||a.length).map(a=>{const[l,u,c]=a.match(/<!!mention:(.*)\|(.*)>/)||[null];if(l&&u&&c)return Ep(u,c);const[d,h]=a.match(/<!!customemoji:(.*?)>/)||[null];return d&&h?mp(h):xe.text(a)}),s=n.state.tr.replaceWith(0,i,o);n.dispatch(s)})(this.editorView,e)}typeText(e){this.editorView&&(function(n,r,i="replace"){const o=n.state.doc.content.size,s=i=="insert"?n.state.tr.insertText(r):n.state.tr.insertText(r,0,o);n.dispatch(s)})(this.editorView,e,"insert")}getText(){return this.currentDoc.asText().trim()}clearText(){this.editorView&&(function(e){const n=e.state.doc.content.size,r=e.state.tr.insertText("",0,n);e.dispatch(r)})(this.editorView)}selectEmoji(e){re.defined(this.editorView),(function(n,r,i){const o=mp(r);if(i){const{from:a,to:l}=i,u=n.state.tr.deleteRange(a,l);n.dispatch(u)}const s=n.state.tr.replaceSelectionWith(o,!1);n.dispatch(s)})(this.editorView,e,this._suggestionRange),this.focus()}selectMention(e){re.defined(this.editorView),(function(n,r,i){const o=Ep(r.id,r.name);let s=n.state.tr;if(i){const{from:a,to:l}=i;s=s.replaceRangeWith(a,l,o)}else s=s.replaceSelectionWith(o,!1);s=s.insertText(" "),n.dispatch(s)})(this.editorView,e,this._suggestionRange),this.focus()}}const R0=Symbol("no_render");function Je(t){const e=ct(!1),n=X({_value:typeof t=="function"?t():t.peek(),get value(){return setTimeout(()=>{e.set(!0)}),n.current._value},set value(r){n.current._value=r}});return J(()=>{if(!e.get())return R0;const r=typeof t=="function"?t():t.get();return n.current.value=r,r}),n.current}function on(){const t=po(),e=ae(),n=tE(),r=Qe(),i=Je(e.app$.appMetadata),o=Je(e.currentUser$),s=Je(e.state$.currentConversation),a=Je(e.state$.currentConversationId),l=Je(e.t$),u=Je(e.device$),c=Je(e.themeCustom$),d=Je(e.chatSearchState$),h=Je(e.focusedMessage$),p=Je(()=>{var E;const _=e.state$.currentConversationId.get();return(E=_&&e.state$.typing.child(_).get())!=null?E:{many:!1,users:[]}}),m=Je(()=>{const _=e.state$.currentConversationId.get();return _&&e.state$.participants.child(_).get()});return Z(()=>({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 u.value},get themeCustom(){return c.value.value},get typing(){return p.value},get participants(){return m.value},get focusedMessage(){return h.value},get chatSearchState(){return d.value}}),[i,n,s,a,o,u,e,l,r,c,p,m,t,d,h])}function cu(){const t=po(),e=ae(),n=Qe(),r=tE(),i=Je(e.app$.appMetadata),o=Je(e.currentUser$),s=Je(e.t$),a=Je(e.device$),l=Je(e.themeCustom$);return Z(()=>({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])}const y0=(()=>{if(typeof window!="undefined"){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&&(e.code===22||e.code===1014||e.name==="QuotaExceededError"||e.name==="NS_ERROR_DOM_QUOTA_REACHED")&&t&&t.length!==0}}return!1})(),st={};y0?(st.setItem=window.localStorage.setItem.bind(window.localStorage),st.getItem=window.localStorage.getItem.bind(window.localStorage),st.removeItem=window.localStorage.removeItem.bind(window.localStorage),st.isSupported=!0):(st.setItem=function(){},st.getItem=function(){return null},st.removeItem=function(){},st.isSupported=!1),st.set=(t,e)=>st.setItem(t,JSON.stringify(e)),st.get=t=>JSON.parse(st.getItem(t)||"null");const tc="talkjs_drafts",I0=(function(t,e){let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>e(...r),t)}})(200,(t,e,n,r)=>{const i=F_(t,e,n),o=JSON.parse(st.getItem(tc)||"{}"),s=r();s.match(/^\s*$/)?delete o[i]:o[i]=s,st.setItem(tc,JSON.stringify(o))}),F_=(t,e,n)=>`draft_${t}_${e}_${n}`;function at(t,e,n,r){return new(n||(n=Promise))(function(i,o){function s(u){try{l(r.next(u))}catch(c){o(c)}}function a(u){try{l(r.throw(u))}catch(c){o(c)}}function l(u){var c;u.done?i(u.value):(c=u.value,c instanceof n?c:new n(function(d){d(c)})).then(s,a)}l((r=r.apply(t,e||[])).next())})}let go=class{constructor(){this.listeners={}}on(t,e,n){if(this.listeners[t]||(this.listeners[t]=new Set),n==null?void 0:n.once){const r=(...i)=>{this.un(t,r),e(...i)};return this.listeners[t].add(r),()=>this.un(t,r)}return this.listeners[t].add(e),()=>this.un(t,e)}un(t,e){var n;(n=this.listeners[t])===null||n===void 0||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(n=>n(...e))}};const Fo={decode:function(t,e){return at(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||t.length===0)throw new Error("channelData must be a non-empty array");if(e<=0)throw new Error("duration must be greater than 0");if(typeof t[0]=="number"&&(t=[t]),!t[0]||t[0].length===0)throw new Error("channelData must contain non-empty channel arrays");(function(r){const i=r[0];if(i.some(o=>o>1||o<-1)){const o=i.length;let s=0;for(let a=0;a<o;a++){const l=Math.abs(i[a]);l>s&&(s=l)}for(const a of r)for(let l=0;l<o;l++)a[l]/=s}})(t);const n=t.map(r=>r instanceof Float32Array?r:Float32Array.from(r));return{duration:e,length:n[0].length,sampleRate:n[0].length/e,numberOfChannels:n.length,getChannelData:r=>{const i=n[r];if(!i)throw new Error(`Channel ${r} not found`);return i},copyFromChannel:AudioBuffer.prototype.copyFromChannel,copyToChannel:AudioBuffer.prototype.copyToChannel}}};function H_(t,e){const n=e.xmlns?document.createElementNS(e.xmlns,t):document.createElement(t);for(const[r,i]of Object.entries(e))if(r==="children"&&i)for(const[o,s]of Object.entries(i))s instanceof Node?n.appendChild(s):typeof s=="string"?n.appendChild(document.createTextNode(s)):n.appendChild(H_(o,s));else r==="style"?Object.assign(n.style,i):r==="textContent"?n.textContent=i:n.setAttribute(r,i.toString());return n}function gp(t,e,n){const r=H_(t,e||{});return n==null||n.appendChild(r),r}var C0=Object.freeze({__proto__:null,createElement:gp,default:gp});const N0={fetchBlob:function(t,e,n){return at(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(i,o){at(this,void 0,void 0,function*(){if(!i.body||!i.headers)return;const s=i.body.getReader(),a=Number(i.headers.get("Content-Length"))||0;let l=0;const u=c=>{l+=(c==null?void 0:c.length)||0;const d=Math.round(l/a*100);o(d)};try{for(;;){const c=yield s.read();if(c.done)break;u(c.value)}}catch(c){console.warn("Progress tracking error:",c)}})})(r.clone(),e),r.blob()})}};function Ie(t){let e=t;const n=new Set;return{get value(){return e},set(r){Object.is(e,r)||(e=r,n.forEach(i=>i(e)))},update(r){this.set(r(e))},subscribe:r=>(n.add(r),()=>n.delete(r))}}function Qn(t,e){const n=Ie(t());return e.forEach(r=>r.subscribe(()=>{const i=t();Object.is(n.value,i)||n.set(i)})),{get value(){return n.value},subscribe:r=>n.subscribe(r)}}function yn(t,e){let n;const r=()=>{n&&(n(),n=void 0),n=t()},i=e.map(o=>o.subscribe(r));return r(),()=>{n&&(n(),n=void 0),i.forEach(o=>o())}}class b0 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(e){super(),this.isExternalMedia=!1,this.reactiveMediaEventCleanups=[],e.media?(this.media=e.media,this.isExternalMedia=!0):this.media=document.createElement("audio"),this._isPlaying=Ie(!1),this._currentTime=Ie(0),this._duration=Ie(0),this._volume=Ie(this.media.volume),this._muted=Ie(this.media.muted),this._playbackRate=Ie(this.media.playbackRate||1),this._seeking=Ie(!1),this.setupReactiveMediaEvents(),e.mediaControls&&(this.media.controls=!0),e.autoplay&&(this.media.autoplay=!0),e.playbackRate!=null&&this.onMediaEvent("canplay",()=>{e.playbackRate!=null&&(this.media.playbackRate=e.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(e,n,r){return this.media.addEventListener(e,n,r),()=>this.media.removeEventListener(e,n,r)}getSrc(){return this.media.currentSrc||this.media.src||""}revokeSrc(){const e=this.getSrc();e.startsWith("blob:")&&URL.revokeObjectURL(e)}canPlayType(e){return this.media.canPlayType(e)!==""}setSrc(e,n){const r=this.getSrc();if(e&&r===e)return;this.revokeSrc();const i=n instanceof Blob&&(this.canPlayType(n.type)||!e)?URL.createObjectURL(n):e;if(r&&this.media.removeAttribute("src"),i||e)try{this.media.src=i}catch(o){this.media.src=e}}destroy(){this.reactiveMediaEventCleanups.forEach(e=>e()),this.reactiveMediaEventCleanups=[],this.isExternalMedia||(this.media.pause(),this.revokeSrc(),this.media.removeAttribute("src"),this.media.load(),this.media.remove())}setMediaElement(e){this.reactiveMediaEventCleanups.forEach(n=>n()),this.reactiveMediaEventCleanups=[],this.media=e,this.setupReactiveMediaEvents()}play(){return at(this,void 0,void 0,function*(){try{return yield this.media.play()}catch(e){if(e instanceof DOMException&&e.name==="AbortError")return;throw e}})}pause(){this.media.pause()}isPlaying(){return!this.media.paused&&!this.media.ended}setTime(e){this.media.currentTime=Math.max(0,Math.min(e,this.getDuration()))}getDuration(){return this.media.duration}getCurrentTime(){return this.media.currentTime}getVolume(){return this.media.volume}setVolume(e){this.media.volume=e}getMuted(){return this.media.muted}setMuted(e){this.media.muted=e}getPlaybackRate(){return this.media.playbackRate}isSeeking(){return this.media.seeking}setPlaybackRate(e,n){n!=null&&(this.media.preservesPitch=n),this.media.playbackRate=e}getMediaElement(){return this.media}setSinkId(e){return this.media.setSinkId(e)}}function w0({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 k0({barAlign:t,halfHeight:e,topHeight:n,totalHeight:r,canvasHeight:i}){return t==="top"?0:t==="bottom"?i-r:e-n}function Ap(t,e,n){const r=e-t.left,i=n-t.top;return[r/t.width,i/t.height]}function U_(t){return!!(t.barWidth||t.barGap||t.barAlign)}function Sp(t,e){if(!U_(e))return t;const n=e.barWidth||.5,r=n+(e.barGap||n/2);return r===0?t:Math.floor(t/r)*r}function vp({scrollLeft:t,totalWidth:e,numCanvases:n}){if(e===0)return[0];const r=t/e,i=Math.floor(r*n);return[i-1,i,i+1]}function Op(t){const e=t._cleanup;typeof e=="function"&&e()}class L0 extends go{constructor(e,n){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=e;const r=this.parentFromOptionsContainer(e.container);this.parent=r;const[i,o]=this.initHtml();r.appendChild(i),this.container=i,this.scrollContainer=o.querySelector(".scroll"),this.wrapper=o.querySelector(".wrapper"),this.canvasWrapper=o.querySelector(".canvases"),this.progressWrapper=o.querySelector(".progress"),this.cursor=o.querySelector(".cursor"),n&&o.appendChild(n),this.initEvents()}parentFromOptionsContainer(e){let n;if(typeof e=="string"?n=document.querySelector(e):e instanceof HTMLElement&&(n=e),!n)throw new Error("Container not found");return n}initEvents(){this.wrapper.addEventListener("click",n=>{const r=this.wrapper.getBoundingClientRect(),[i,o]=Ap(r,n.clientX,n.clientY);this.emit("click",i,o)}),this.wrapper.addEventListener("dblclick",n=>{const r=this.wrapper.getBoundingClientRect(),[i,o]=Ap(r,n.clientX,n.clientY);this.emit("dblclick",i,o)}),this.options.dragToSeek!==!0&&typeof this.options.dragToSeek!="object"||this.initDrag(),this.scrollStream=(function(n){const r=Ie({scrollLeft:n.scrollLeft,scrollWidth:n.scrollWidth,clientWidth:n.clientWidth}),i=Qn(()=>(function(a){const{scrollLeft:l,scrollWidth:u,clientWidth:c}=a;if(u===0)return{startX:0,endX:1};const d=l/u,h=(l+c)/u;return{startX:Math.max(0,Math.min(1,d)),endX:Math.max(0,Math.min(1,h))}})(r.value),[r]),o=Qn(()=>(function(a){return{left:a.scrollLeft,right:a.scrollLeft+a.clientWidth}})(r.value),[r]),s=()=>{r.set({scrollLeft:n.scrollLeft,scrollWidth:n.scrollWidth,clientWidth:n.clientWidth})};return n.addEventListener("scroll",s,{passive:!0}),{scrollData:r,percentages:i,bounds:o,cleanup:()=>{n.removeEventListener("scroll",s),Op(r)}}})(this.scrollContainer);const e=yn(()=>{const{startX:n,endX:r}=this.scrollStream.percentages.value,{left:i,right:o}=this.scrollStream.bounds.value;this.emit("scroll",n,r,i,o)},[this.scrollStream.percentages,this.scrollStream.bounds]);if(this.subscriptions.push(e),typeof ResizeObserver=="function"){const n=this.createDelay(100);this.resizeObserver=new ResizeObserver(()=>{n().then(()=>this.onContainerResize()).catch(()=>{})}),this.resizeObserver.observe(this.scrollContainer)}}onContainerResize(){const e=this.parent.clientWidth;e===this.lastContainerWidth&&this.options.height!=="auto"||(this.lastContainerWidth=e,this.reRender(),this.emit("resize"))}initDrag(){if(this.dragStream)return;this.dragStream=(function(n,r={}){const{threshold:i=3,mouseButton:o=0,touchDelay:s=100}=r,a=Ie(null),l=new Map,u=matchMedia("(pointer: coarse)").matches;let c=()=>{};const d=h=>{if(h.button!==o||(l.set(h.pointerId,h),l.size>1))return;let p=h.clientX,m=h.clientY,_=!1;const E=Date.now(),g=n.getBoundingClientRect(),{left:A,top:S}=g,v=O=>{if(O.defaultPrevented||l.size>1||u&&Date.now()-E<s)return;const T=O.clientX,C=O.clientY,N=T-p,k=C-m;(_||Math.abs(N)>i||Math.abs(k)>i)&&(O.preventDefault(),O.stopPropagation(),_||(a.set({type:"start",x:p-A,y:m-S}),_=!0),a.set({type:"move",x:T-A,y:C-S,deltaX:N,deltaY:k}),p=T,m=C)},D=O=>{if(l.delete(O.pointerId),_){const T=O.clientX,C=O.clientY;a.set({type:"end",x:T-A,y:C-S})}c()},y=O=>{l.delete(O.pointerId),O.relatedTarget&&O.relatedTarget!==document.documentElement||D(O)},R=O=>{_&&(O.stopPropagation(),O.preventDefault())},I=O=>{O.defaultPrevented||l.size>1||_&&O.preventDefault()};document.addEventListener("pointermove",v),document.addEventListener("pointerup",D),document.addEventListener("pointerout",y),document.addEventListener("pointercancel",y),document.addEventListener("touchmove",I,{passive:!1}),document.addEventListener("click",R,{capture:!0}),c=()=>{document.removeEventListener("pointermove",v),document.removeEventListener("pointerup",D),document.removeEventListener("pointerout",y),document.removeEventListener("pointercancel",y),document.removeEventListener("touchmove",I),setTimeout(()=>{document.removeEventListener("click",R,{capture:!0})},10)}};return n.addEventListener("pointerdown",d),{signal:a,cleanup:()=>{c(),n.removeEventListener("pointerdown",d),l.clear(),Op(a)}}})(this.wrapper);const e=yn(()=>{const n=this.dragStream.signal.value;if(!n)return;const r=this.wrapper.getBoundingClientRect().width,i=(o=n.x/r)<0?0:o>1?1:o;var o;n.type==="start"?(this.isDragging=!0,this.emit("dragstart",i)):n.type==="move"?this.emit("drag",i):n.type==="end"&&(this.isDragging=!1,this.emit("dragend",i))},[this.dragStream.signal]);this.subscriptions.push(e)}initHtml(){const e=document.createElement("div"),n=e.attachShadow({mode:"open"}),r=this.options.cspNonce&&typeof this.options.cspNonce=="string"?this.options.cspNonce.replace(/"/g,""):"";return n.innerHTML=`
19
+ </svg>`.replace(/\s+/g," ");return"data:image/svg+xml;base64,"+vO.encode(n)}function d_(t){const e=(function(n){let r=0;for(let i=0;i<n.length;i++)r=(r<<5)-r+n.charCodeAt(i),r&=r;return Math.abs(r)})(t)%op.length;return op[e]}function Zs(t,e){const n=e.lastIndex;let r;const i=[];for(;(r=e.exec(t))!==null;)i.push(r),r[0]===""&&(e.lastIndex+=1);return e.lastIndex=n,i}function ql(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 h_(t){try{return new URL(t).hostname}catch(e){return}}const RO=13;function rp(t){return t.keyCode===RO&&!t.shiftKey}function Po(t){const e=t.replace(/%2F/g,"/").replace(/^.*?\/([^/]+?)(?:\?.*)?$/,"$1"),n=decodeURIComponent(e);if(/%[0-9A-Fa-f]{2}/.test(n))try{return decodeURIComponent(n.replace(/\+/g,"%20"))}catch(r){return n}return n}function Jl(t,e,n){return Math.max(t,Math.min(e,n))}function ip(t,e){return t.localeCompare(e,void 0,{usage:"search",sensitivity:"base"})===0}function IO(t){return[...t.matchAll(/^|\s+/g)].map(n=>n.index+n[0].length).map(n=>t.substring(n))}const op=["#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"],Pi=(t,e,n=void 0)=>eu(t,r=>{if(typeof r=="string")return e(r,n);switch(r.type){case"bold":case"italic":case"strikethrough":case"blockquote":case"bulletlist":case"bulletList":case"bulletpoint":case"bulletPoint":return[{type:r.type,children:Pi(r.children,e,r.type)}];case"link":return[{type:r.type,url:r.url,children:Pi(r.children,e,r.type)}];case"actionlink":case"actionLink":case"actionbutton":case"actionButton":return[{type:r.type,action:r.action,params:r.params,children:Pi(r.children,e,r.type)}];case"mention":case"autolink":case"autoLink":case"codeblock":case"codeBlock":case"codespan":case"codeSpan":case"suppressed":case"emoji":case"customemoji":case"customEmoji":return[r]}});function On(t,e){return n=>{const r=n;let i=0;const o=[];for(const s of Zs(n,t)){s.index-i>0&&o.push(r.substring(i,s.index));const a=e(s);Array.isArray(a)?o.push(...a):o.push(a),i=s.index+s[0].length}return i<n.length&&o.push(n.substring(i)),o}}function p_(t){return t.replace(/<!!mention:.*?\|([^>]*)>/gim,"@$1").replace(/<!!customemoji:(.*?)>/gim,"$1")}const sp="’'()[]{}<>:,‒–—―…!.«»-‐?‘’“”;/⁄␠·&@*\\•^¤¢$€£¥₩₪†‡°¡¿¬#№%‰‱¶′§~¨_|¦⁂☞∴‽※".replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");var Zl=(t=>(t[t.italic=1]="italic",t[t.strikethrough=2]="strikethrough",t[t.bold=4]="bold",t))(Zl||{});const yO=[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(n=>n.source).join("|"),"g")}),CO={_:1,"*":4,"~":2};function NO(t){return f_(t,0)}function f_(t,e=0){const n=yO[e],r=n?(function(i){const o=bO.getOrCompute(i,()=>new RegExp(`(?:^|[\\s${sp}])(?:${i.source})(?=[\\s${sp}]|$)`,"g")),s=On(o,a=>{const l=a[0][1],u=a[1]||a[2]||a[3]||a[4]||a[5]||a[6];return[" ",{type:Zl[CO[l]],children:[u]}]});return a=>{const[l,...u]=s(" "+a);return l.length>1&&u.unshift(l.substring(1)),u}})(n):()=>[t];return Pi(r(t),(i,o)=>o==="bold"||o==="italic"||o==="strikethrough"?f_(i,e|Zl[o]):[i])}const bO=(function(){const t=(function(){try{return new WeakMap}catch(e){const n={has:()=>!1,get:()=>{},set:()=>n};return n}})();return{getOrCompute(e,n){if(t.has(e))return t.get(e);const r=n();return t.set(e,r),r}}})();var Ql=function(t,e){return Ql=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},Ql(t,e)};function Eo(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}Ql(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var Pe=function(){return Pe=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},Pe.apply(this,arguments)};var wO=Object.prototype.hasOwnProperty;function It(t){return typeof t=="boolean"}function Gn(t,e){for(var n=t.length-1;n>=0;n--)e(t[n])===!0&&t.splice(n,1)}function fr(t){throw new Error("Unhandled case for value: '".concat(t,"'"))}var xo=/\s+/,m_=(function(){function t(e){e===void 0&&(e={}),this.tagName="",this.attrs={},this.innerHTML="",this.tagName=e.tagName||"",this.attrs=e.attrs||{},this.innerHTML=e.innerHtml||e.innerHTML||""}return t.prototype.setTagName=function(e){return this.tagName=e,this},t.prototype.getTagName=function(){return this.tagName},t.prototype.setAttr=function(e,n){return this.getAttrs()[e]=n,this},t.prototype.getAttr=function(e){return this.getAttrs()[e]},t.prototype.setAttrs=function(e){return Object.assign(this.getAttrs(),e),this},t.prototype.getAttrs=function(){return this.attrs},t.prototype.setClass=function(e){return this.setAttr("class",e)},t.prototype.addClass=function(e){for(var n,r=this.getClass(),i=r?r.split(xo):[],o=e.split(xo);n=o.shift();)i.indexOf(n)===-1&&i.push(n);return this.getAttrs().class=i.join(" "),this},t.prototype.removeClass=function(e){for(var n,r=this.getClass(),i=r?r.split(xo):[],o=e.split(xo);i.length&&(n=o.shift());){var s=i.indexOf(n);s!==-1&&i.splice(s,1)}return this.getAttrs().class=i.join(" "),this},t.prototype.getClass=function(){return this.getAttrs().class||""},t.prototype.hasClass=function(e){return(" "+this.getClass()+" ").indexOf(" "+e+" ")!==-1},t.prototype.setInnerHTML=function(e){return this.innerHTML=e,this},t.prototype.setInnerHtml=function(e){return this.setInnerHTML(e)},t.prototype.getInnerHTML=function(){return this.innerHTML||""},t.prototype.getInnerHtml=function(){return this.getInnerHTML()},t.prototype.toAnchorString=function(){var e=this.getTagName(),n=this.buildAttrsStr();return["<",e,n=n?" "+n:"",">",this.getInnerHtml(),"</",e,">"].join("")},t.prototype.buildAttrsStr=function(){var e=this.getAttrs(),n=[];for(var r in e)wO.call(e,r)&&n.push(r+'="'+e[r]+'"');return n.join(" ")},t})();function ap(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 qa(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 LO=(function(){function t(e){e===void 0&&(e={}),this.newWindow=!1,this.truncate={},this.className="",this.newWindow=e.newWindow||!1,this.truncate=e.truncate||{},this.className=e.className||""}return t.prototype.build=function(e){return new m_({tagName:"a",attrs:this.createAttrs(e),innerHtml:this.processAnchorText(e.getAnchorText())})},t.prototype.createAttrs=function(e){var n={href:e.getAnchorHref()},r=this.createCssClass(e);return r&&(n.class=r),this.newWindow&&(n.target="_blank",n.rel="noopener noreferrer"),this.truncate.length&&this.truncate.length<e.getAnchorText().length&&(n.title=e.getAnchorHref()),n},t.prototype.createCssClass=function(e){var n=this.className;if(n){for(var r=[n],i=e.getCssClassSuffixes(),o=0,s=i.length;o<s;o++)r.push(n+"-"+i[o]);return r.join(" ")}return""},t.prototype.processAnchorText=function(e){return e=this.doTruncate(e)},t.prototype.doTruncate=function(e){var n=this.truncate;if(!n.length)return e;var r=n.length,i=n.location;return i==="smart"?(function(o,s,a){var l,u;if(a==null?(a="&hellip;",u=3,l=8):(u=a.length,l=a.length),o.length<=s)return o;var c=s-u,d=(function(g){var S={},O=g,D=O.match(/^([a-z]+):\/\//i);return D&&(S.scheme=D[1],O=O.slice(D[0].length)),(D=O.match(/^(.*?)(?=(\?|#|\/|$))/i))&&(S.host=D[1],O=O.slice(D[0].length)),(D=O.match(/^\/(.*?)(?=(\?|#|$))/i))&&(S.path=D[1],O=O.slice(D[0].length)),(D=O.match(/^\?(.*?)(?=(#|$))/i))&&(S.query=D[1],O=O.slice(D[0].length)),(D=O.match(/^#(.*?)$/i))&&(S.fragment=D[1]),S})(o);if(d.query){var h=d.query.match(/^(.*?)(?=(\?|#))(.*?)$/i);h&&(d.query=d.query.substr(0,h[1].length),o=ap(d))}if(o.length<=s||(d.host&&(d.host=d.host.replace(/^www\./,""),o=ap(d)),o.length<=s))return o;var p="";if(d.host&&(p+=d.host),p.length>=c)return d.host.length===s?(d.host.substr(0,s-u)+a).substr(0,c+l):qa(p,c,a).substr(0,c+l);var m="";if(d.path&&(m+="/"+d.path),d.query&&(m+="?"+d.query),m){if((p+m).length>=c)return(p+m).length==s?(p+m).substr(0,s):(p+qa(m,c-p.length,a)).substr(0,c+l);p+=m}if(d.fragment){var _="#"+d.fragment;if((p+_).length>=c)return(p+_).length==s?(p+_).substr(0,s):(p+qa(_,c-p.length,a)).substr(0,c+l);p+=_}if(d.scheme&&d.host){var E=d.scheme+"://";if((p+E).length<c)return(E+p).substr(0,s)}if(p.length<=s)return p;var A="";return c>0&&(A=p.substr(-1*Math.floor(c/2))),(p.substr(0,Math.ceil(c/2))+a+A).substr(0,c+l)})(e,r):i==="middle"?(function(o,s,a){if(o.length<=s)return o;var l,u;a==null?(a="&hellip;",l=8,u=3):(l=a.length,u=a.length);var c=s-u,d="";return c>0&&(d=o.substr(-1*Math.floor(c/2))),(o.substr(0,Math.ceil(c/2))+a+d).substr(0,c+l)})(e,r):(function(o,s,a){return(function(l,u,c){var d;return l.length>u&&(c==null?(c="&hellip;",d=3):d=c.length,l=l.substring(0,u-d)+c),l})(o,s,a)})(e,r)},t})(),_o=(function(){function t(e){this._=null,this.matchedText="",this.offset=0,this.tagBuilder=e.tagBuilder,this.matchedText=e.matchedText,this.offset=e.offset}return t.prototype.getMatchedText=function(){return this.matchedText},t.prototype.setOffset=function(e){this.offset=e},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 ui(t){return t>=65&&t<=90||t>=97&&t<=122}function Xe(t){return t>=48&&t<=57}function tu(t){return t==34||t==39}function vr(t){return t<8232?t<160?t>=9&&t<=13||t==32:t<5760?t==160:t==5760||t>=8192&&t<=8202:t<8287?t>=8232&&t<=8233||t==8239:t<12288?t==8287:t==12288||t==65279}function Dr(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||t==174:t==181||t==186: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:t==748||t==750:t<910?t<895?t<886?t>=768&&t<=884:t>=886&&t<=887||t>=890&&t<=893:t<904?t==895||t==902:t>=904&&t<=906||t==908: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:t==1369||t>=1377&&t<=1415:t<1808?t<1552?t<1476?t<1471?t>=1425&&t<=1469:t==1471||t>=1473&&t<=1474:t<1488?t>=1476&&t<=1477||t==1479: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||t==1791:t<2230?t<2042?t<1869?t>=1808&&t<=1866:t>=1869&&t<=1969||t>=1984&&t<=2037:t<2112?t==2042||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||t==2482:t<2503?t>=2486&&t<=2489||t>=2492&&t<=2500:t>=2503&&t<=2504||t>=2507&&t<=2510:t<2534?t<2524?t==2519: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:t==2620||t>=2622&&t<=2626:t<2649?t<2635?t>=2631&&t<=2632:t>=2635&&t<=2637||t==2641:t<2662?t>=2649&&t<=2652||t==2654: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||t==2768:t<2809?t>=2784&&t<=2787||t>=2790&&t<=2799:t==2809||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:t==2929||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||t==2972: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:t==3024||t==3031: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||t==3294: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?t==3517:t>=3520&&t<=3526||t==3530:t<3544?t>=3535&&t<=3540||t==3542: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:t==3716||t>=3719&&t<=3720:t<3754?t<3737?t<3725?t==3722:t==3725||t>=3732&&t<=3735:t<3749?t>=3737&&t<=3743||t>=3745&&t<=3747:t==3749||t==3751:t<3776?t<3757?t>=3754&&t<=3755:t>=3757&&t<=3769||t>=3771&&t<=3773:t<3784?t>=3776&&t<=3780||t==3782:t>=3784&&t<=3789||t>=3792&&t<=3801:t<4176?t<3902?t<3872?t<3840?t>=3804&&t<=3807:t==3840||t>=3864&&t<=3865:t<3895?t>=3872&&t<=3881||t==3893:t==3895||t==3897: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:t==4038||t>=4096&&t<=4169:t<4688?t<4301?t<4256?t>=4176&&t<=4253:t>=4256&&t<=4293||t==4295:t<4348?t==4301||t>=4304&&t<=4346:t>=4348&&t<=4680||t>=4682&&t<=4685:t<4746?t<4698?t>=4688&&t<=4694||t==4696: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?t==4800: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||t==6103: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||t==6823: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?t==8025:t==8027||t==8029:t<8118?t>=8031&&t<=8061||t>=8064&&t<=8116:t>=8118&&t<=8124||t==8126: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?t==8205:t==8252||t==8265:t<8336?t==8305||t==8319:t>=8336&&t<=8348||t>=8400&&t<=8432:t<8579?t<8486?t<8469?t<8455?t==8450:t==8455||t>=8458&&t<=8467:t<8482?t==8469||t>=8473&&t<=8477:t==8482||t==8484:t<8495?t<8488?t==8486:t==8488||t>=8490&&t<=8493:t<8517?t>=8495&&t<=8505||t>=8508&&t<=8511:t>=8517&&t<=8521||t==8526:t<9410?t<9e3?t<8592?t>=8579&&t<=8580:t>=8592&&t<=8703||t>=8986&&t<=8987:t<9193?t==9e3||t==9167:t>=9193&&t<=9203||t>=9208&&t<=9210:t<9723?t<9654?t==9410||t>=9642&&t<=9643:t==9654||t==9664: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:t==11088||t==11093: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:t==11559||t==11565:t<11647?t>=11568&&t<=11623||t==11631: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:t==11823||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?t==12951:t==12953||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?t==43259:t==43261||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||t==64318: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 E_(t){return t<58?t<44?t==33:t==44||t==46:t<63?t>=58&&t<=59:t==63||t==94}function kO(t){return t<91?t==40:t==91||t==123}function lp(t){return t<93?t==41:t==93||t==125}var MO=/^(?: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|ελ|ευ|бг|ею|рф|გე|닷넷|닷컴|삼성|한국|コム|世界|中信|中国|中國|企业|佛山|信息|健康|八卦|公司|公益|台湾|台灣|商城|商店|商标|嘉里|在线|大拿|娱乐|家電|广东|微博|慈善|手机|招聘|政务|政府|新闻|时尚|書籍|机构|游戏|澳門|点看|移动|网址|网店|网站|网络|联通|谷歌|购物|通販|集团|食品|餐厅|香港)$/,__=/https?:\/\//i,PO=new RegExp("^"+__.source,"i"),xO=/^(javascript|vbscript):/i,FO=/^[A-Za-z][-.+A-Za-z0-9]*:(\/\/)?([^:/]*)/,HO=/^(?:\/\/)?([^/#?:]+)/,Zi=ui;function A_(t){return ui(t)||Xe(t)||t===43||t===45||t===46}var zn=Dr;function nu(t){return t===95||zn(t)}function g_(t){return Dr(t)||(function(e){return e<91?e<47?e>=35&&e<=43||e==45:e<61?e==47:e==61||e==64:e<95?e==91||e==93:e<123?e==95:e>=123&&e<=126||e==10003})(t)||E_(t)}function ru(t){return t===47||t===63||t===35}function cp(t){return MO.test(t.toLowerCase())}var UO=/^(?:(?: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]?)$/,BO=/[:/?#]/,jO=/^(https?:\/\/)?(?:www\.)?/i,VO=/^\/\//,S_=(function(t){function e(n){var r=t.call(this,n)||this;return r.type="url",r.url="",r.urlMatchType="scheme",r.protocolRelativeMatch=!1,r.stripPrefix={scheme:!0,www:!0},r.stripTrailingSlash=!0,r.decodePercentEncoding=!0,r.protocolPrepended=!1,r.urlMatchType=n.urlMatchType,r.url=n.url,r.protocolRelativeMatch=n.protocolRelativeMatch,r.stripPrefix=n.stripPrefix,r.stripTrailingSlash=n.stripTrailingSlash,r.decodePercentEncoding=n.decodePercentEncoding,r}return Eo(e,t),e.prototype.getType=function(){return"url"},e.prototype.getUrlMatchType=function(){return this.urlMatchType},e.prototype.getUrl=function(){var n=this.url;return this.protocolRelativeMatch||this.urlMatchType==="scheme"||this.protocolPrepended||(n=this.url="http://"+n,this.protocolPrepended=!0),n},e.prototype.getAnchorHref=function(){return this.getUrl().replace(/&amp;/g,"&")},e.prototype.getAnchorText=function(){var n=this.getMatchedText();return this.protocolRelativeMatch&&(n=n.replace(VO,"")),this.stripPrefix.scheme&&(n=n.replace(PO,"")),this.stripPrefix.www&&(n=(function(r){return r.includes("www.")?r.replace(jO,"$1"):r})(n)),this.stripTrailingSlash&&(n=(function(r){return r.charAt(r.length-1)==="/"&&(r=r.slice(0,-1)),r})(n)),this.decodePercentEncoding&&(n=(function(r){var i=r.replace(/%(?:22|26|27|3C|3E)/gi,function(o){return o==="%22"?"&quot;":o==="%26"?"&amp;":o==="%27"?"&#39;":o==="%3C"||o==="%3c"?"&lt;":"&gt;"});if(i.includes("%"))try{return decodeURIComponent(i)}catch(o){}return i})(n)),n},e})(_o),zO=/^mailto:/i,O_=Dr;function iu(t){return O_(t)||(function(e){return e<47?e<42?e==33||e>=35&&e<=39:e>=42&&e<=43||e==45:e<63?e==47||e==61:e<94?e==63:e>=94&&e<=96||e>=123&&e<=126})(t)}var v_=(function(t){function e(n){var r=t.call(this,n)||this;return r.type="email",r.email="",r.email=n.email,r}return Eo(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})(_o);function D_(t){return t===95||Dr(t)}var $O=["twitter","facebook","instagram","tiktok","youtube"],YO=(function(t){function e(n){var r=t.call(this,n)||this;return r.type="hashtag",r.serviceName="twitter",r.hashtag="",r.serviceName=n.serviceName,r.hashtag=n.hashtag,r}return Eo(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 n=this.serviceName,r=this.hashtag;switch(n){case"twitter":return"https://twitter.com/hashtag/"+r;case"facebook":return"https://www.facebook.com/hashtag/"+r;case"instagram":return"https://instagram.com/explore/tags/"+r;case"tiktok":return"https://www.tiktok.com/tag/"+r;case"youtube":return"https://youtube.com/hashtag/"+r;default:fr(n)}},e.prototype.getAnchorText=function(){return"#"+this.hashtag},e.prototype.getCssClassSuffixes=function(){var n=t.prototype.getCssClassSuffixes.call(this),r=this.getServiceName();return r&&n.push(r),n},e})(_o),GO={twitter:/^@\w{1,15}$/,instagram:/^@[_\w]{1,30}$/,soundcloud:/^@[-a-z0-9_]{3,25}$/,tiktok:/^@[.\w]{1,23}[\w]$/,youtube:/^@[-.·\w]{3,30}$/};function T_(t){return t===45||t===46||t===95||ui(t)||Xe(t)}var WO=["twitter","instagram","soundcloud","tiktok","youtube"],XO=(function(t){function e(n){var r=t.call(this,n)||this;return r.type="mention",r.serviceName="twitter",r.mention="",r.mention=n.mention,r.serviceName=n.serviceName,r}return Eo(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:fr(this.serviceName)}},e.prototype.getAnchorText=function(){return"@"+this.mention},e.prototype.getCssClassSuffixes=function(){var n=t.prototype.getCssClassSuffixes.call(this),r=this.getServiceName();return r&&n.push(r),n},e})(_o),KO=/[-. ()]/,qO=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 R_(t){return t===45||t===46||t===32}function ou(t){return t===44||t===59}var JO=(function(t){function e(n){var r=t.call(this,n)||this;return r.type="phone",r.number="",r.plusSign=!1,r.number=n.number,r.plusSign=n.plusSign,r}return Eo(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})(_o),ZO=(function(){function t(e,n){this.charIdx=0,this.matches=[],this._stateMachines=[],this.schemeUrlMachinesCount=0,this.text=e,this.tagBuilder=n.tagBuilder,this.stripPrefix=n.stripPrefix,this.stripTrailingSlash=n.stripTrailingSlash,this.decodePercentEncoding=n.decodePercentEncoding,this.hashtagServiceName=n.hashtagServiceName,this.mentionServiceName=n.mentionServiceName}return Object.defineProperty(t.prototype,"stateMachines",{get:function(){return this._stateMachines},enumerable:!1,configurable:!0}),t.prototype.addMachine=function(e){this._stateMachines.push(e),dp(e)&&this.schemeUrlMachinesCount++},t.prototype.removeMachine=function(e){this._stateMachines=this._stateMachines.filter(function(n){return n!==e}),dp(e)&&this.schemeUrlMachinesCount--},t.prototype.hasSchemeUrlMachine=function(){return this.schemeUrlMachinesCount>0},t})();function Qs(t,e,n){var r=t.charIdx;if(n===35)t.addMachine({type:2,startIdx:r,state:28,acceptStateReached:!1});else if(n===64)t.addMachine((function(o,s){return{type:3,startIdx:o,state:s,acceptStateReached:!1}})(r,30));else if(n===47)t.addMachine(ec(r,11));else if(n===43)t.addMachine(Ja(r,37));else if(n===40)t.addMachine(Ja(r,32));else{if(Xe(n)&&(t.addMachine(Ja(r,38)),t.addMachine((function(o,s){return{type:0,startIdx:o,state:s,acceptStateReached:!1,matchType:2,octetsEncountered:1}})(r,13))),O_(n)){var i=e.toLowerCase()==="m"?15:22;t.addMachine((function(o,s){return{type:1,startIdx:o,state:s,acceptStateReached:!1}})(r,i))}Zi(n)&&t.addMachine(ea(r,0)),Dr(n)&&t.addMachine(ec(r,5))}}function QO(t,e,n){n===58?e.state=2:n===45?e.state=1:A_(n)||t.removeMachine(e)}function ev(t,e,n){var r=t.charIdx;n===45||(n===47?(t.removeMachine(e),t.addMachine(ec(r,11))):A_(n)?e.state=0:t.removeMachine(e))}function tv(t,e,n){var r=t.charIdx;n===47?e.state=3:n===46?t.removeMachine(e):zn(n)?(e.state=5,Zi(n)&&t.addMachine(ea(r,0))):t.removeMachine(e)}function nv(t,e,n){n===47?e.state=4:g_(n)?(e.state=10,e.acceptStateReached=!0):Oe(t,e)}function rv(t,e,n,r){r===47?(e.state=10,e.acceptStateReached=!0):zn(r)?(e.state=5,e.acceptStateReached=!0):t.removeMachine(e)}function iv(t,e,n){n===47?e.state=12:t.removeMachine(e)}function ov(t,e,n){zn(n)?e.state=5:t.removeMachine(e)}function sv(t,e,n){n===46?e.state=7:n===45?e.state=6:n===58?e.state=8:ru(n)?e.state=10:nu(n)||Oe(t,e)}function av(t,e,n,r){r===45||(r===46?Oe(t,e):zn(r)?e.state=5:Oe(t,e))}function lv(t,e,n,r){r===46?Oe(t,e):zn(r)?(e.state=5,e.acceptStateReached=!0):Oe(t,e)}function cv(t,e,n){n===46?e.state=14:n===58?e.state=8:Xe(n)||(ru(n)?e.state=10:Dr(n)?t.removeMachine(e):Oe(t,e))}function uv(t,e,n){Xe(n)?(e.octetsEncountered++,e.octetsEncountered===4&&(e.acceptStateReached=!0),e.state=13):Oe(t,e)}function dv(t,e,n){Xe(n)?e.state=9:Oe(t,e)}function hv(t,e,n){Xe(n)||(ru(n)?e.state=10:Oe(t,e))}function pv(t,e,n){g_(n)||Oe(t,e)}function fv(t,e,n,r){n.toLowerCase()==="a"?e.state=16:Tr(t,e,r)}function mv(t,e,n,r){n.toLowerCase()==="i"?e.state=17:Tr(t,e,r)}function Ev(t,e,n,r){n.toLowerCase()==="l"?e.state=18:Tr(t,e,r)}function _v(t,e,n,r){n.toLowerCase()==="t"?e.state=19:Tr(t,e,r)}function Av(t,e,n,r){n.toLowerCase()==="o"?e.state=20:Tr(t,e,r)}function gv(t,e,n){n===58?e.state=21:Tr(t,e,n)}function Sv(t,e,n){iu(n)?e.state=22:t.removeMachine(e)}function Tr(t,e,n){n===46?e.state=23:n===64?e.state=24:iu(n)?e.state=22:t.removeMachine(e)}function Ov(t,e,n){n===46||n===64?t.removeMachine(e):iu(n)?e.state=22:t.removeMachine(e)}function vv(t,e,n){zn(n)?e.state=25:t.removeMachine(e)}function Dv(t,e,n){n===46?e.state=27:n===45?e.state=26:nu(n)||Oe(t,e)}function Tv(t,e,n){n===45||n===46?Oe(t,e):nu(n)?e.state=25:Oe(t,e)}function Rv(t,e,n){n===46||n===45?Oe(t,e):zn(n)?(e.state=25,e.acceptStateReached=!0):Oe(t,e)}function Iv(t,e,n){D_(n)?(e.state=29,e.acceptStateReached=!0):t.removeMachine(e)}function yv(t,e,n){D_(n)||Oe(t,e)}function Cv(t,e,n){T_(n)?(e.state=31,e.acceptStateReached=!0):t.removeMachine(e)}function Nv(t,e,n){T_(n)||(Dr(n)?t.removeMachine(e):Oe(t,e))}function bv(t,e,n,r){Xe(r)?e.state=38:(t.removeMachine(e),Qs(t,n,r))}function wv(t,e,n,r){Xe(r)?e.state=33:t.removeMachine(e),Qs(t,n,r)}function Lv(t,e,n){Xe(n)?e.state=34:t.removeMachine(e)}function kv(t,e,n){Xe(n)?e.state=35:t.removeMachine(e)}function Mv(t,e,n){n===41?e.state=36:t.removeMachine(e)}function Pv(t,e,n,r){Xe(r)?e.state=38:R_(r)?e.state=39:t.removeMachine(e)}function xv(t,e,n,r){var i=t.charIdx;e.acceptStateReached=!0,ou(r)?e.state=40:r===35?e.state=41:Xe(r)||(r===40?e.state=32:R_(r)?e.state=39:(Oe(t,e),Zi(r)&&t.addMachine(ea(i,0))))}function Fv(t,e,n,r){Xe(r)?e.state=38:r===40?e.state=32:(Oe(t,e),Qs(t,n,r))}function Hv(t,e,n){ou(n)||(n===35?e.state=41:Xe(n)?e.state=38:Oe(t,e))}function Uv(t,e,n){ou(n)?e.state=40:Xe(n)?t.removeMachine(e):Oe(t,e)}function Oe(t,e){var n=t.matches,r=t.text,i=t.charIdx,o=t.tagBuilder,s=t.stripPrefix,a=t.stripTrailingSlash,l=t.decodePercentEncoding,u=t.hashtagServiceName,c=t.mentionServiceName;if(t.removeMachine(e),e.acceptStateReached){var d,h,p=e.startIdx,m=r.slice(e.startIdx,i);switch(m=(function(A){for(var g={"(":0,"{":0,"[":0},S=0;S<A.length;S++){var O=A.charAt(S);kO(I=A.charCodeAt(S))?g[O]++:lp(I)&&g[up[O]]--}for(var D=A.length-1;D>=0;){var I;if(O=A.charAt(D),lp(I=A.charCodeAt(D))){var R=up[O];if(!(g[R]<0))break;g[R]++,D--}else{if(!E_(I))break;D--}}return A.slice(0,D+1)})(m),e.type){case 0:if(r.charCodeAt(e.startIdx-1)===64)return;switch(e.matchType){case 0:var _=__.exec(m);if(_&&(p+=_.index,m=m.slice(_.index)),!(function(A){if(xO.test(A))return!1;var g=A.match(FO);if(!g)return!1;var S=!!g[1],O=g[2];return!!S||!(O.indexOf(".")===-1||!/[A-Za-z]/.test(O))})(m))return;break;case 1:if(!(function(A){var g=A.match(HO);if(!g)return!1;var S=g[0].split(".");return!(S.length<2||!cp(S[S.length-1]))})(m))return;break;case 2:if(h=m.split(BO,1)[0],!UO.test(h))return;break;default:fr(e)}n.push(new S_({tagBuilder:o,matchedText:m,offset:p,urlMatchType:Bv(e.matchType),url:m,protocolRelativeMatch:m.slice(0,2)==="//",stripPrefix:s,stripTrailingSlash:a,decodePercentEncoding:l}));break;case 1:cp(m.split(".").pop())&&n.push(new v_({tagBuilder:o,matchedText:m,offset:p,email:m.replace(zO,"")}));break;case 2:m.length<=140&&n.push(new YO({tagBuilder:o,matchedText:m,offset:p,serviceName:u,hashtag:m.slice(1)}));break;case 3:(function(A,g){return GO[g].test(A)})(m,c)&&n.push(new XO({tagBuilder:o,matchedText:m,offset:p,serviceName:c,mention:m.slice(1)}));break;case 4:if(m=m.replace(/ +$/g,""),((d=m).charAt(0)==="+"||KO.test(d))&&qO.test(d)){var E=m.replace(/[^0-9,;#]/g,"");n.push(new JO({tagBuilder:o,matchedText:m,offset:p,number:E,plusSign:m.charAt(0)==="+"}))}break;default:fr(e)}}}function Bv(t){switch(t){case 0:return"scheme";case 1:return"tld";case 2:return"ipV4";default:fr(t)}}var up={")":"(","}":"{","]":"["};function ea(t,e){return{type:0,startIdx:t,state:e,acceptStateReached:!1,matchType:0}}function ec(t,e){return{type:0,startIdx:t,state:e,acceptStateReached:!1,matchType:1}}function Ja(t,e){return{type:4,startIdx:t,state:e,acceptStateReached:!1}}function dp(t){return t.type===0&&t.matchType===0}var Jt=function(t){t===void 0&&(t={}),this.idx=t.idx!==void 0?t.idx:-1,this.type=t.type||"tag",this.name=t.name||"",this.isOpening=!!t.isOpening,this.isClosing=!!t.isClosing},su=new Jt,jv=function(t,e){this.charIdx=0,this.state=0,this.currentDataIdx=0,this.currentTag=su,this.html=t,this.callbacks=e};function Vv(t,e){e==="<"&&nn(t)}function zv(t,e,n){e==="!"?t.state=13:e==="/"?(t.state=2,t.currentTag=new Jt(Pe(Pe({},t.currentTag),{isClosing:!0}))):e==="<"?nn(t):ui(n)?(t.state=3,t.currentTag=new Jt(Pe(Pe({},t.currentTag),{isOpening:!0}))):(t.state=0,t.currentTag=su)}function $v(t,e,n){vr(n)?(t.currentTag=new Jt(Pe(Pe({},t.currentTag),{name:Za(t)})),t.state=4):e==="<"?nn(t):e==="/"?(t.currentTag=new Jt(Pe(Pe({},t.currentTag),{name:Za(t)})),t.state=12):e===">"?(t.currentTag=new Jt(Pe(Pe({},t.currentTag),{name:Za(t)})),rn(t)):ui(n)||Xe(n)||e===":"||Mt(t)}function Yv(t,e,n){e===">"?Mt(t):ui(n)?t.state=3:Mt(t)}function Gv(t,e,n){vr(n)||(e==="/"?t.state=12:e===">"?rn(t):e==="<"?nn(t):e==="="||tu(n)||(function(r){return r>=0&&r<=31||r==127})(n)?Mt(t):t.state=5)}function Wv(t,e,n){vr(n)?t.state=6:e==="/"?t.state=12:e==="="?t.state=7:e===">"?rn(t):e==="<"?nn(t):tu(n)&&Mt(t)}function Xv(t,e,n){vr(n)||(e==="/"?t.state=12:e==="="?t.state=7:e===">"?rn(t):e==="<"?nn(t):tu(n)?Mt(t):t.state=5)}function Kv(t,e,n){vr(n)||(e==='"'?t.state=8:e==="'"?t.state=9:/[>=`]/.test(e)?Mt(t):e==="<"?nn(t):t.state=10)}function qv(t,e){e==='"'&&(t.state=11)}function Jv(t,e){e==="'"&&(t.state=11)}function Zv(t,e,n){vr(n)?t.state=4:e===">"?rn(t):e==="<"&&nn(t)}function Qv(t,e,n){vr(n)?t.state=4:e==="/"?t.state=12:e===">"?rn(t):e==="<"?nn(t):(t.state=4,(function(r){r.charIdx--})(t))}function e0(t,e){e===">"?(t.currentTag=new Jt(Pe(Pe({},t.currentTag),{isClosing:!0})),rn(t)):Mt(t)}function t0(t){var e=t.html,n=t.charIdx;e.slice(n,n+2)==="--"?(t.charIdx++,t.currentTag=new Jt(Pe(Pe({},t.currentTag),{type:"comment"})),t.state=14):e.slice(n,n+7).toUpperCase()==="DOCTYPE"?(t.charIdx+=6,t.currentTag=new Jt(Pe(Pe({},t.currentTag),{type:"doctype"})),t.state=20):Mt(t)}function n0(t,e){e==="-"?t.state=15:e===">"?Mt(t):t.state=16}function r0(t,e){e==="-"?t.state=18:e===">"?Mt(t):t.state=16}function i0(t,e){e==="-"&&(t.state=17)}function o0(t,e){t.state=e==="-"?18:16}function s0(t,e){e===">"?rn(t):e==="!"?t.state=19:e==="-"||(t.state=16)}function a0(t,e){e==="-"?t.state=17:e===">"?rn(t):t.state=16}function l0(t,e){e===">"?rn(t):e==="<"&&nn(t)}function Mt(t){t.state=0,t.currentTag=su}function nn(t){t.state=1,t.currentTag=new Jt({idx:t.charIdx})}function rn(t){var e=t.html.slice(t.currentDataIdx,t.currentTag.idx);e&&t.callbacks.onText(e,t.currentDataIdx);var n=t.currentTag;n.type==="comment"?t.callbacks.onComment(n.idx):n.type==="doctype"?t.callbacks.onDoctype(n.idx):(n.isOpening&&t.callbacks.onOpenTag(n.name,n.idx),n.isClosing&&t.callbacks.onCloseTag(n.name,n.idx)),Mt(t),t.currentDataIdx=t.charIdx+1}function Za(t){var e=t.currentTag.idx+(t.currentTag.isClosing?2:1);return t.html.slice(e,t.charIdx).toLowerCase()}var c0=(function(){function t(e){e===void 0&&(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(o){return o==null&&(o=!0),It(o)?{schemeMatches:o,tldMatches:o,ipV4Matches:o}:{schemeMatches:!It(o.schemeMatches)||o.schemeMatches,tldMatches:!It(o.tldMatches)||o.tldMatches,ipV4Matches:!It(o.ipV4Matches)||o.ipV4Matches}})(e.urls),this.email=It(e.email)?e.email:this.email,this.phone=It(e.phone)?e.phone:this.phone,this.hashtag=e.hashtag||this.hashtag,this.mention=e.mention||this.mention,this.newWindow=It(e.newWindow)?e.newWindow:this.newWindow,this.stripPrefix=(function(o){return o==null&&(o=!0),It(o)?{scheme:o,www:o}:{scheme:!It(o.scheme)||o.scheme,www:!It(o.www)||o.www}})(e.stripPrefix),this.stripTrailingSlash=It(e.stripTrailingSlash)?e.stripTrailingSlash:this.stripTrailingSlash,this.decodePercentEncoding=It(e.decodePercentEncoding)?e.decodePercentEncoding:this.decodePercentEncoding,this.sanitizeHtml=e.sanitizeHtml||!1;var n=this.mention;if(n!==!1&&WO.indexOf(n)===-1)throw new Error("invalid `mention` cfg '".concat(n,"' - see docs"));var r,i=this.hashtag;if(i!==!1&&$O.indexOf(i)===-1)throw new Error("invalid `hashtag` cfg '".concat(i,"' - see docs"));this.truncate=typeof(r=e.truncate)=="number"?{length:r,location:"end"}:Pe({length:Number.POSITIVE_INFINITY,location:"end"},r),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(e){var n=this,r=["a","style","script"],i=0,o=[];return(function(s,a){for(var l=new jv(s,a),u=s.length;l.charIdx<u;){var c=s.charAt(l.charIdx),d=s.charCodeAt(l.charIdx);switch(l.state){case 0:Vv(l,c);break;case 1:zv(l,c,d);break;case 2:Yv(l,c,d);break;case 3:$v(l,c,d);break;case 4:Gv(l,c,d);break;case 5:Wv(l,c,d);break;case 6:Xv(l,c,d);break;case 7:Kv(l,c,d);break;case 8:qv(l,c);break;case 9:Jv(l,c);break;case 10:Zv(l,c,d);break;case 11:Qv(l,c,d);break;case 12:e0(l,c);break;case 13:t0(l);break;case 14:n0(l,c);break;case 15:r0(l,c);break;case 16:i0(l,c);break;case 17:o0(l,c);break;case 18:s0(l,c);break;case 19:a0(l,c);break;case 20:l0(l,c);break;default:fr(l.state)}l.charIdx++}l.currentDataIdx<l.charIdx&&(function(h){var p=h.html.slice(h.currentDataIdx,h.charIdx);h.callbacks.onText(p,h.currentDataIdx),h.currentDataIdx=h.charIdx+1})(l)})(e,{onOpenTag:function(s){r.indexOf(s)>=0&&i++},onText:function(s,a){if(i===0){var l=s.split(/(&nbsp;|&#160;|&lt;|&#60;|&gt;|&#62;|&quot;|&#34;|&#39;)/gi),u=a;l.forEach(function(c,d){if(d%2==0){var h=n.parseText(c,u);o.push.apply(o,(function(p,m,_){if(_||arguments.length===2)for(var E,A=0,g=m.length;A<g;A++)!E&&A in m||(E||(E=Array.prototype.slice.call(m,0,A)),E[A]=m[A]);return p.concat(E||Array.prototype.slice.call(m))})([],(function(p,m){var _=typeof Symbol=="function"&&p[Symbol.iterator];if(!_)return p;var E,A,g=_.call(p),S=[];try{for(;(m===void 0||m-- >0)&&!(E=g.next()).done;)S.push(E.value)}catch(O){A={error:O}}finally{try{E&&!E.done&&(_=g.return)&&_.call(g)}finally{if(A)throw A.error}}return S})(h),!1))}u+=c.length})}},onCloseTag:function(s){r.indexOf(s)>=0&&(i=Math.max(i-1,0))},onComment:function(){},onDoctype:function(){}}),o=this.compactMatches(o),o=this.removeUnwantedMatches(o)},t.prototype.compactMatches=function(e){e.sort(u0);for(var n=0;n<e.length-1;){var r=e[n],i=r.getOffset(),o=r.getMatchedText().length;if(n+1<e.length&&e[n+1].getOffset()===i){var s=e[n+1].getMatchedText().length>o?n:n+1;e.splice(s,1)}else n++}return e},t.prototype.removeUnwantedMatches=function(e){return this.hashtag||Gn(e,function(n){return n.getType()==="hashtag"}),this.email||Gn(e,function(n){return n.getType()==="email"}),this.phone||Gn(e,function(n){return n.getType()==="phone"}),this.mention||Gn(e,function(n){return n.getType()==="mention"}),this.urls.schemeMatches||Gn(e,function(n){return n.getType()==="url"&&n.getUrlMatchType()==="scheme"}),this.urls.tldMatches||Gn(e,function(n){return n.getType()==="url"&&n.getUrlMatchType()==="tld"}),this.urls.ipV4Matches||Gn(e,function(n){return n.getType()==="url"&&n.getUrlMatchType()==="ipV4"}),e},t.prototype.parseText=function(e,n){n=n||0;for(var r=(function(s,a){for(var l=new ZO(s,a);l.charIdx<l.text.length;l.charIdx++){var u=s.charAt(l.charIdx),c=s.charCodeAt(l.charIdx);if(l.stateMachines.length===0)Qs(l,u,c);else{for(var d=l.stateMachines.length-1;d>=0;d--){var h=l.stateMachines[d];switch(h.state){case 11:iv(l,h,c);break;case 12:ov(l,h,c);break;case 0:QO(l,h,c);break;case 1:ev(l,h,c);break;case 2:tv(l,h,c);break;case 3:nv(l,h,c);break;case 4:rv(l,h,0,c);break;case 5:sv(l,h,c);break;case 6:av(l,h,0,c);break;case 7:lv(l,h,0,c);break;case 13:cv(l,h,c);break;case 14:uv(l,h,c);break;case 8:dv(l,h,c);break;case 9:hv(l,h,c);break;case 10:pv(l,h,c);break;case 15:fv(l,h,u,c);break;case 16:mv(l,h,u,c);break;case 17:Ev(l,h,u,c);break;case 18:_v(l,h,u,c);break;case 19:Av(l,h,u,c);break;case 20:gv(l,h,c);break;case 21:Sv(l,h,c);break;case 22:Tr(l,h,c);break;case 23:Ov(l,h,c);break;case 24:vv(l,h,c);break;case 25:Dv(l,h,c);break;case 26:Tv(l,h,c);break;case 27:Rv(l,h,c);break;case 28:Iv(l,h,c);break;case 29:yv(l,h,c);break;case 30:Cv(l,h,c);break;case 31:Nv(l,h,c);break;case 32:wv(l,h,u,c);break;case 33:Lv(l,h,c);break;case 34:kv(l,h,c);break;case 35:Mv(l,h,c);break;case 36:Pv(l,h,0,c);break;case 37:bv(l,h,u,c);break;case 38:xv(l,h,0,c);break;case 39:Fv(l,h,u,c);break;case 40:Hv(l,h,c);break;case 41:Uv(l,h,c);break;default:fr(h.state)}}if(!l.hasSchemeUrlMachine()&&l.charIdx>0&&Zi(c)){var p=l.text.charCodeAt(l.charIdx-1);Zi(p)||l.addMachine(ea(l.charIdx,0))}}}for(var m=l.stateMachines.length-1;m>=0;m--)l.stateMachines.forEach(function(_){return Oe(l,_)});return l.matches})(e,{tagBuilder:this.getTagBuilder(),stripPrefix:this.stripPrefix,stripTrailingSlash:this.stripTrailingSlash,decodePercentEncoding:this.decodePercentEncoding,hashtagServiceName:this.hashtag,mentionServiceName:this.mention||"twitter"}),i=0,o=r.length;i<o;i++)r[i].setOffset(n+r[i].getOffset());return r},t.prototype.link=function(e){if(!e)return"";this.sanitizeHtml&&(e=e.replace(/</g,"&lt;").replace(/>/g,"&gt;"));for(var n=this.parse(e),r=new Array(2*n.length+1),i=0,o=0,s=n.length;o<s;o++){var a=n[o];r.push(e.substring(i,a.getOffset())),r.push(this.createMatchReturnVal(a)),i=a.getOffset()+a.getMatchedText().length}return r.push(e.substring(i)),r.join("")},t.prototype.createMatchReturnVal=function(e){var n;return this.replaceFn&&(n=this.replaceFn.call(this.context,e)),typeof n=="string"?n:n===!1?e.getMatchedText():n instanceof m_?n.toAnchorString():e.buildTag().toAnchorString()},t.prototype.getTagBuilder=function(){var e=this.tagBuilder;return e||(e=this.tagBuilder=new LO({newWindow:this.newWindow,truncate:this.truncate,className:this.className})),e},t.version="4.1.5",t})();function u0(t,e){return t.getOffset()-e.getOffset()}function I_(t,e=t){return{type:"autolink",url:t,text:e}}const d0=()=>On(/```([^]+?)```/g,([t,e])=>({type:"codespan",text:p_(e)})),h0=On(/<!!mention:([^>\s]*?)\|(.*?)>/gm,([t,e,n])=>(function(r,i){return{type:"mention",id:r,text:i}})(decodeURIComponent(e),n)),p0=On(/<!!customemoji:(.*?)>/gm,([t,e])=>(function(n){return{type:"customemoji",text:n}})(e)),y_=On(/<((?:https?|mailto):.*?)\|(.*?)>/gi,([t,e,n])=>(function(r,i=[]){return{type:"link",url:r,children:i}})(e,[n])),f0=On(/<actionlink:([^|]+)[|]([^>]*)>/gi,([t,e,n])=>{const{action:r,params:i}=C_(e);return(function(o,s,a=[]){return{type:"actionlink",action:o,params:s,children:a}})(r,i,[n])}),m0=On(/<actionbutton:([^|]+)[|]([^>]*)>/gi,([t,e,n])=>{const{action:r,params:i}=C_(e);return(function(o,s,a=[]){return{type:"actionbutton",action:o,params:s,children:a}})(r,i,[n])});function C_(t){const e=t.indexOf("?");return e===-1?{action:t,params:{}}:{action:t.slice(0,e),params:Object.fromEntries(new URLSearchParams(t.slice(e)))}}const E0=On(/(?:^|\n)(?:\s*[-*+]\s+[^\n]+(?:\n|$))+/g,([t])=>(function(e=[]){return{type:"bulletlist",children:e}})([t.startsWith(`
20
+ `)?t.slice(1):t])),_0=On(/^\s*[-*+]\s+([^\n]+)(?:\n|$)/gm,([t,e])=>({type:"bulletpoint",children:[e]})),N_=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 Zs(t,e)){const a=s[0],l=s[1],u=l.match(n);if(u&&Number(u[1])<Number(u[2]))continue;const c=l.match(r);if(c){const p=Number(c[1]),m=Number(c[2]),_=Number(c[3]),E=Number(c[4]);if(p<=23&&_<=23&&m<=59&&E<=59)continue}const d=a.startsWith(l)?s.index:s.index+1;d-i>0&&o.push(t.substring(i,d));const h=I_("tel:"+l.replace(/[^0-9+]/g,""),l);o.push(h),i=d+l.length}return i<t.length&&o.push(t.substring(i)),o},b_=t=>y_(t).flatMap(e=>typeof e=="string"?Qa(e):["<",...Qa(e.url),...Qa("|"+e.children[0]+">")]),Qa=t=>{const e=c0.parse(t,{urls:!0,email:!0,phone:!1,hashtag:!1,mention:!1}),n=[];let r=0;for(const i of e){const o=i.getOffset(),s=i.getMatchedText(),a=s.length;let l=s;i instanceof v_?l="mailto:"+i.getEmail():i instanceof S_&&(l=i.getUrl()),o>r&&n.push(t.substring(r,o)),n.push(I_(l,s)),r=o+a}return r<t.length&&n.push(t.substring(r)),n},A0=["Codeblock","Codespan","FormattedLink","Wikitext","Autolink","Actions","Mention","Mention","BulletPoint","CustomEmoji"],g0=(function(t){const e=RegExp(`[^${t}]+${t}?|${t}`,"g");return n=>Array.from(n.match(e)||[])})(`
21
+ `);function w_(t,e={except:[]}){const n=(function(i={except:[]}){var a;const o={multilineSteps:[],singlelineSteps:[]},s=(a=i.except)!=null?a:A0.filter(l=>!i.only.includes(l));return s.includes("BulletPoint")||o.multilineSteps.push(E0,_0),s.includes("Mention")||o.singlelineSteps.push(h0),s.includes("CustomEmoji")||o.singlelineSteps.push(p0),s.includes("Codespan")||o.multilineSteps.push(d0()),s.includes("FormattedLink")||o.singlelineSteps.push(y_),s.includes("Actions")||(o.singlelineSteps.push(f0),o.singlelineSteps.push(m0)),s.includes("Wikitext")||o.singlelineSteps.push(NO),s.includes("Autolink")||o.singlelineSteps.push(b_,N_),o})(e);let r=k_(t,n);return r=M_(r,!1),r}function L_(t){return w_(t,{except:["FormattedLink","Actions"]})}function k_(t,e){let n=[t];return n=el(n,e.multilineSteps),n=el(n,[g0]),n=el(n,e.singlelineSteps),n=au(n),n}function el(t,e){return e.reduce((n,r)=>Pi(n,r),t)}function au(t){const e=[];let n=-1;for(const r of t)typeof r=="string"?typeof e[n]=="string"?e[n]+=r:e[++n]=r:e[++n]="children"in r?{...r,children:au(r.children)}:r;return e}function M_(t,e){const n=[];let r=[];for(let i=0;i<t.length;i++){const o=t[i];if(typeof o=="string")r.push(o);else if("children"in o){r.length>0&&(n.push(r.join("")),r=[]);const s=M_(o.children,e||o.type==="link"||o.type==="actionbutton"||o.type==="actionlink");n.push({...o,children:s})}else o.type==="autolink"&&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 S0(){let t,e=0;return n=>{const r=(o=Date.now())=>{if(window.clearTimeout(t),t=void 0,e=o,n.isDestroyed)return;const s=(function(a){a=a.removeMark(0,a.doc.content.size,xe.marks.bold),a=a.removeMark(0,a.doc.content.size,xe.marks.italic),a=a.removeMark(0,a.doc.content.size,xe.marks.strikethrough),a.doc.firstChild;const l=(function(u){const c=[];let d,h="";return u.descendants((p,m)=>(p.isText?(h+=p.text,d!=null||(d=m)):h&&d!==void 0&&(c.push({text:h,pos:d}),h="",d=void 0),p.type!==xe.nodes.mention)),h&&d!==void 0&&c.push({text:h,pos:d}),c})(a.doc);for(const{text:u,pos:c}of l){const d=w_(u,{only:["Wikitext"]});[a]=P_(a,c,d)}return a})(n.state.tr);n.dispatch(s)},i=Date.now();i-e<300?t||(t=window.setTimeout(r,300)):r(i)}}function P_(t,e,n,r=0,i=[]){for(const o of n)if(typeof o=="string"){for(const s of i)t.addMark(e+r,e+r+o.length,s.create());r+=o.length}else if(o.type==="bold"||o.type==="italic"||o.type==="strikethrough"){r+=1;const s=xe.marks[o.type],a=[...i,s];[t,r]=P_(t,e,o.children,r,a),r+=1}else re.unreachable();return[t,r]}function hp(t){return(e,n)=>{if(!n)return!0;let r=e.tr;const i=de.between(e.selection.$from,e.selection.$to);return r=r.replaceRangeWith(i.from,i.from,xe.text(t,r.storedMarks)),r=r.replaceRangeWith(i.to+1,i.to+1,xe.text(t,r.storedMarks)),r=r.setSelection(de.near(r.doc.resolve(i.to+1))),n(r),!0}}function O0(t,e,n){const r=e.clipboardData;if(!r)return!1;const i=(function(o){const s=o.items||[],a={"image/gif":"gif","image/png":"png","image/jpeg":"jpg","image/svg+xml":"svg"},l=Array.from(s).filter(d=>d.kind==="file"&&a[d.type]);if(l.length===0||o.types.includes("text/rtf"))return;const u=l[0];let c=u.getAsFile();if(!c.name){const d="image."+a[u.type];c=new File([c],d,{type:u.type,lastModified:Date.now()})}return c})(r);return i?n(i):(function(o,s){const a=o.state.tr.insertText(s).scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste");o.dispatch(a)})(t,r.getData("text/plain")),!0}function pp(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 Xs({key:new Ks("suggestions"),view(){return{update:(l,u)=>{const c=this.key.getState(u),d=this.key.getState(l.state);if(!c||!d)return;const h=c.active&&d.active&&c.range.from!==d.range.from,p=!c.active&&d.active,m=c.active&&!d.active,_=!p&&!m&&c.text!==d.text;(m||h)&&o({view:l,range:c.range,text:c.text}),_&&!h&&i({view:l,range:d.range,text:d.text}),(p||h)&&r({view:l,range:d.range,text:d.text})}}},state:{init:()=>({active:!1,range:{from:0,to:0},text:null}),apply(l,u){const{selection:c}=l,d={...u};if(c.from===c.to){(c.from<u.range.from||c.from>u.range.to)&&(d.active=!1);const h=c.$from,p=e(h);p?(d.active=!0,d.range=p.range,d.text=p.text):d.active=!1}else d.active=!1;return d.active||(d.range={from:0,to:0},d.text=null),d}},props:{handleKeyDown(l,u){var d;const c=this.getState(l.state);return!!(c!=null&&c.active)&&((d=s({view:l,event:u}))!=null?d:!1)},decorations(l){const u=this.getState(l);return u!=null&&u.active?be.create(l.doc,[Dt.inline(u.range.from,u.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 fp=(t,e)=>n=>{var l;const r=(l=n.nodeBefore)==null?void 0:l.text;if(!r)return;const i=r.match(t);if(!i)return;const o=i[2],s=n.pos-o.length,a=n.pos;if(!n.doc.rangeHasMark(s,a,e.marks.literal))return{range:{from:s,to:a},text:o}},v0=/(^|\s)(:[^:\s]+:?)$/,D0=/(^|\s)(@[^@]*)$/;function lu({placeholder:t,disabled:e,className:n="",characterLimit:r,spellcheck:i}){const o=ho(),s=X(),a=X(null);return z(()=>(s.current=(function(l,u,c,d,h){const p=Ur.create({schema:xe,plugins:[...h.filter(T0),AO(),qh({...Mo,"Mod-z":o_,"Mod-y":Xl,"Mod-Shift-z":Xl,"Mod-b":hp("*"),"Mod-i":hp("_"),"Mod-Enter":Mo.Enter,"Shift-Enter":Mo.Enter,Enter:c}),qh({Enter:Mo.Enter}),Kh]}),m=S0(),_=new t_(l,{handlePaste:(E,A,g)=>O0(E,A,d),clipboardTextSerializer(E){const A=[];return E.content.forEach(g=>{g&&A.push(p_(g.textContent))}),A.join()},state:p,dispatchTransaction(E){E=(E=E.removeStoredMark(xe.marks.literal)).removeStoredMark(xe.marks.emoji);const A=_.state.apply(E);_.state.doc.eq(A.doc)||u(new Os(A.doc)),_.updateState(A),E.steps.some(g=>g instanceof $e)&&m(_)}});return _})(a.current,l=>o.onChange(l),()=>!!o.onEnter&&(o.onEnter(),!0),l=>o.onPasteImage(l),[o.emojiSuggesterPlugin(),o.mentionsPlugin()]),o.setEditorView(s.current),()=>{var l;o.setEditorView(void 0),(l=s.current)==null||l.destroy()}),[o]),z(()=>{var l;(l=s.current)==null||l.setProps({editable:()=>!e})},[e]),z(()=>mt(()=>{var l,u,c;return(c=s.current)==null?void 0:c.setProps({attributes:{spellcheck:String((u=(l=o.spellcheck$.get())!=null?l:i)!=null?u:!1),class:"t-text-input","aria-label":"Message Field",role:"textbox"}})}),[o,i]),z(()=>mt(()=>{var u;const l=s.current;l==null||l.dispatch(l.state.tr.setMeta(Kh,(u=o.placeholder$.get())!=null?u:t))}),[o,t]),z(()=>{r&&Number.isInteger(r)&&o.setMaxLength(r)},[r,o]),f("div",{className:`t-editor ${n}`,ref:a})}function mp(t){if(t.startsWith(":"))throw new Error("Not implemented");{const e=xe.marks.emoji.create({emoji:t});return xe.text(t,[e])}}function Ep(t,e){const n=encodeURIComponent(t);return xe.nodes.mention.create({id:t,name:e},xe.text(`<!!mention:${n}|${e}>`))}const ks=class ks{constructor(e){this.doc=e,this.size=this.doc.content.size,this.hasContent=n_(this.doc)}hasNonWhitespaceContent(){return this.hasContent&&(function(e){let n=!1;return e.descendants(r=>!(r.isText&&r.text&&/\S/.test(r.text))||(n=!0,!1)),n})(this.doc)}asText(){return this.doc.textContent.replace(/\xa0/g," ")}};ks.EMPTY=new ks(xe.topNodeType.create());let Os=ks;function T0(t){return t!=null}function _p(t,e){let n=0;return(...r)=>{n&&(clearTimeout(n),n=0),n=setTimeout(()=>{t(...r)},e)}}class x_{constructor(e,n,r){this.state$=e,this.device$=n,this.userPermissions$=r,this.currentDoc=Os.EMPTY,this.maxLength=1e4,this.markAsTyping=(function(i,o){let s=!1;return(...a)=>{if(!s)return s=!0,setTimeout(()=>{s=!1},o),i(...a)}})(()=>{var i;(i=this.controller)==null||i.markAsTyping()},5e3),this._suggesterKeydownHandlers={emoji:void 0,mention:void 0},this.toggleEmojiPicker=i=>{const o=this.state$.showEmojiPicker;i!=null||(i=!o.peek()),o.set(i),i===!1&&this.focus()},this.spellcheck$=se(),this.placeholder$=se()}setEditorView(e){this.editorView=e}emojiSuggesterPlugin(){if(this.device$.peek().supportsEmojiPicker)return pp({debug:!1,matcher:fp(v0,xe),onEnter:e=>this.suggestEmoji(e.text,e.range),onChange:e=>this.suggestEmoji(e.text,e.range),onExit:()=>this.onExitSuggester(),onKeyDown:({event:e})=>{var n,r,i;return(i=(r=(n=this._suggesterKeydownHandlers).emoji)==null?void 0:r.call(n,e.key))!=null?i:!1}})}mentionsPlugin(){const e=this.userPermissions$.peek();if(re.defined(e),e.canMention)return pp({debug:!1,matcher:fp(D0,xe),onEnter:n=>this.suggestMention(n.text,n.range),onChange:n=>this.suggestMention(n.text,n.range),onExit:()=>this.onExitSuggester(),onKeyDown:({event:n})=>{var r,i,o;return(o=(i=(r=this._suggesterKeydownHandlers).mention)==null?void 0:i.call(r,n.key))!=null?o:!1}})}closeSuggester(){re.defined(this._suggestionRange),(function(e,n){const{from:r,to:i}=n,o=e.state.tr.addMark(r,i,xe.marks.literal.create());e.dispatch(o)})(this.editorView,this._suggestionRange)}listenKeydown(e,n){this._suggesterKeydownHandlers[e]=n}onExitSuggester(){this._suggestionRange=void 0,this.state$.suggestEmojiQuery.set(void 0),this.state$.suggestMentionQuery.set(void 0)}suggestEmoji(e,n){e.length<2||(this._suggestionRange=n,this.state$.suggestEmojiQuery.set(e))}suggestMention(e,n){e.length<1||(this._suggestionRange=n,this.state$.suggestMentionQuery.set(e))}onPasteImage(e){re.defined(this.uploadFile),this.uploadFile(e)}onChange(e){var r;this.currentDoc=e;const n=e.size>this.maxLength&&e.asText().length>this.maxLength;e.hasContent&&this.markAsTyping(),this.state$.assign({atTextLimit:n,isEmpty:!e.hasNonWhitespaceContent(),characterCount:e.size===0?0:e.size-2}),(r=this.controller)==null||r.storeDraft(()=>e.asText())}setMaxLength(e){this.maxLength=e}focus({skipProseMirrorStuff:e}={skipProseMirrorStuff:!1}){var n,r;e?(n=this.editorView)==null||n.dom.focus():(r=this.editorView)==null||r.focus()}setText(e){this.editorView&&(function(n,r){const i=n.state.doc.content.size,o=r.split(/(<!!(?:mention|customemoji):.*?>)/g).filter(a=>a||a.length).map(a=>{const[l,u,c]=a.match(/<!!mention:(.*)\|(.*)>/)||[null];if(l&&u&&c)return Ep(u,c);const[d,h]=a.match(/<!!customemoji:(.*?)>/)||[null];return d&&h?mp(h):xe.text(a)}),s=n.state.tr.replaceWith(0,i,o);n.dispatch(s)})(this.editorView,e)}typeText(e){this.editorView&&(function(n,r,i="replace"){const o=n.state.doc.content.size,s=i=="insert"?n.state.tr.insertText(r):n.state.tr.insertText(r,0,o);n.dispatch(s)})(this.editorView,e,"insert")}getText(){return this.currentDoc.asText().trim()}clearText(){this.editorView&&(function(e){const n=e.state.doc.content.size,r=e.state.tr.insertText("",0,n);e.dispatch(r)})(this.editorView)}selectEmoji(e){re.defined(this.editorView),(function(n,r,i){const o=mp(r);if(i){const{from:a,to:l}=i,u=n.state.tr.deleteRange(a,l);n.dispatch(u)}const s=n.state.tr.replaceSelectionWith(o,!1);n.dispatch(s)})(this.editorView,e,this._suggestionRange),this.focus()}selectMention(e){re.defined(this.editorView),(function(n,r,i){const o=Ep(r.id,r.name);let s=n.state.tr;if(i){const{from:a,to:l}=i;s=s.replaceRangeWith(a,l,o)}else s=s.replaceSelectionWith(o,!1);s=s.insertText(" "),n.dispatch(s)})(this.editorView,e,this._suggestionRange),this.focus()}}const R0=Symbol("no_render");function Je(t){const e=ct(!1),n=X({_value:typeof t=="function"?t():t.peek(),get value(){return setTimeout(()=>{e.set(!0)}),n.current._value},set value(r){n.current._value=r}});return J(()=>{if(!e.get())return R0;const r=typeof t=="function"?t():t.get();return n.current.value=r,r}),n.current}function on(){const t=po(),e=ae(),n=tE(),r=Qe(),i=Je(e.app$.appMetadata),o=Je(e.currentUser$),s=Je(e.state$.currentConversation),a=Je(e.state$.currentConversationId),l=Je(e.t$),u=Je(e.device$),c=Je(e.themeCustom$),d=Je(e.chatSearchState$),h=Je(e.focusedMessage$),p=Je(()=>{var E;const _=e.state$.currentConversationId.get();return(E=_&&e.state$.typing.child(_).get())!=null?E:{many:!1,users:[]}}),m=Je(()=>{const _=e.state$.currentConversationId.get();return _&&e.state$.participants.child(_).get()});return Z(()=>({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 u.value},get themeCustom(){return c.value.value},get typing(){return p.value},get participants(){return m.value},get focusedMessage(){return h.value},get chatSearchState(){return d.value}}),[i,n,s,a,o,u,e,l,r,c,p,m,t,d,h])}function cu(){const t=po(),e=ae(),n=Qe(),r=tE(),i=Je(e.app$.appMetadata),o=Je(e.currentUser$),s=Je(e.t$),a=Je(e.device$),l=Je(e.themeCustom$);return Z(()=>({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])}const I0=(()=>{if(typeof window!="undefined"){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&&(e.code===22||e.code===1014||e.name==="QuotaExceededError"||e.name==="NS_ERROR_DOM_QUOTA_REACHED")&&t&&t.length!==0}}return!1})(),st={};I0?(st.setItem=window.localStorage.setItem.bind(window.localStorage),st.getItem=window.localStorage.getItem.bind(window.localStorage),st.removeItem=window.localStorage.removeItem.bind(window.localStorage),st.isSupported=!0):(st.setItem=function(){},st.getItem=function(){return null},st.removeItem=function(){},st.isSupported=!1),st.set=(t,e)=>st.setItem(t,JSON.stringify(e)),st.get=t=>JSON.parse(st.getItem(t)||"null");const tc="talkjs_drafts",y0=(function(t,e){let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>e(...r),t)}})(200,(t,e,n,r)=>{const i=F_(t,e,n),o=JSON.parse(st.getItem(tc)||"{}"),s=r();s.match(/^\s*$/)?delete o[i]:o[i]=s,st.setItem(tc,JSON.stringify(o))}),F_=(t,e,n)=>`draft_${t}_${e}_${n}`;function at(t,e,n,r){return new(n||(n=Promise))(function(i,o){function s(u){try{l(r.next(u))}catch(c){o(c)}}function a(u){try{l(r.throw(u))}catch(c){o(c)}}function l(u){var c;u.done?i(u.value):(c=u.value,c instanceof n?c:new n(function(d){d(c)})).then(s,a)}l((r=r.apply(t,e||[])).next())})}let Ao=class{constructor(){this.listeners={}}on(t,e,n){if(this.listeners[t]||(this.listeners[t]=new Set),n==null?void 0:n.once){const r=(...i)=>{this.un(t,r),e(...i)};return this.listeners[t].add(r),()=>this.un(t,r)}return this.listeners[t].add(e),()=>this.un(t,e)}un(t,e){var n;(n=this.listeners[t])===null||n===void 0||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(n=>n(...e))}};const Fo={decode:function(t,e){return at(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||t.length===0)throw new Error("channelData must be a non-empty array");if(e<=0)throw new Error("duration must be greater than 0");if(typeof t[0]=="number"&&(t=[t]),!t[0]||t[0].length===0)throw new Error("channelData must contain non-empty channel arrays");(function(r){const i=r[0];if(i.some(o=>o>1||o<-1)){const o=i.length;let s=0;for(let a=0;a<o;a++){const l=Math.abs(i[a]);l>s&&(s=l)}for(const a of r)for(let l=0;l<o;l++)a[l]/=s}})(t);const n=t.map(r=>r instanceof Float32Array?r:Float32Array.from(r));return{duration:e,length:n[0].length,sampleRate:n[0].length/e,numberOfChannels:n.length,getChannelData:r=>{const i=n[r];if(!i)throw new Error(`Channel ${r} not found`);return i},copyFromChannel:AudioBuffer.prototype.copyFromChannel,copyToChannel:AudioBuffer.prototype.copyToChannel}}};function H_(t,e){const n=e.xmlns?document.createElementNS(e.xmlns,t):document.createElement(t);for(const[r,i]of Object.entries(e))if(r==="children"&&i)for(const[o,s]of Object.entries(i))s instanceof Node?n.appendChild(s):typeof s=="string"?n.appendChild(document.createTextNode(s)):n.appendChild(H_(o,s));else r==="style"?Object.assign(n.style,i):r==="textContent"?n.textContent=i:n.setAttribute(r,i.toString());return n}function Ap(t,e,n){const r=H_(t,e||{});return n==null||n.appendChild(r),r}var C0=Object.freeze({__proto__:null,createElement:Ap,default:Ap});const N0={fetchBlob:function(t,e,n){return at(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(i,o){at(this,void 0,void 0,function*(){if(!i.body||!i.headers)return;const s=i.body.getReader(),a=Number(i.headers.get("Content-Length"))||0;let l=0;const u=c=>{l+=(c==null?void 0:c.length)||0;const d=Math.round(l/a*100);o(d)};try{for(;;){const c=yield s.read();if(c.done)break;u(c.value)}}catch(c){console.warn("Progress tracking error:",c)}})})(r.clone(),e),r.blob()})}};function ye(t){let e=t;const n=new Set;return{get value(){return e},set(r){Object.is(e,r)||(e=r,n.forEach(i=>i(e)))},update(r){this.set(r(e))},subscribe:r=>(n.add(r),()=>n.delete(r))}}function Qn(t,e){const n=ye(t());return e.forEach(r=>r.subscribe(()=>{const i=t();Object.is(n.value,i)||n.set(i)})),{get value(){return n.value},subscribe:r=>n.subscribe(r)}}function In(t,e){let n;const r=()=>{n&&(n(),n=void 0),n=t()},i=e.map(o=>o.subscribe(r));return r(),()=>{n&&(n(),n=void 0),i.forEach(o=>o())}}class b0 extends Ao{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(e){super(),this.isExternalMedia=!1,this.reactiveMediaEventCleanups=[],e.media?(this.media=e.media,this.isExternalMedia=!0):this.media=document.createElement("audio"),this._isPlaying=ye(!1),this._currentTime=ye(0),this._duration=ye(0),this._volume=ye(this.media.volume),this._muted=ye(this.media.muted),this._playbackRate=ye(this.media.playbackRate||1),this._seeking=ye(!1),this.setupReactiveMediaEvents(),e.mediaControls&&(this.media.controls=!0),e.autoplay&&(this.media.autoplay=!0),e.playbackRate!=null&&this.onMediaEvent("canplay",()=>{e.playbackRate!=null&&(this.media.playbackRate=e.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(e,n,r){return this.media.addEventListener(e,n,r),()=>this.media.removeEventListener(e,n,r)}getSrc(){return this.media.currentSrc||this.media.src||""}revokeSrc(){const e=this.getSrc();e.startsWith("blob:")&&URL.revokeObjectURL(e)}canPlayType(e){return this.media.canPlayType(e)!==""}setSrc(e,n){const r=this.getSrc();if(e&&r===e)return;this.revokeSrc();const i=n instanceof Blob&&(this.canPlayType(n.type)||!e)?URL.createObjectURL(n):e;if(r&&this.media.removeAttribute("src"),i||e)try{this.media.src=i}catch(o){this.media.src=e}}destroy(){this.reactiveMediaEventCleanups.forEach(e=>e()),this.reactiveMediaEventCleanups=[],this.isExternalMedia||(this.media.pause(),this.revokeSrc(),this.media.removeAttribute("src"),this.media.load(),this.media.remove())}setMediaElement(e){this.reactiveMediaEventCleanups.forEach(n=>n()),this.reactiveMediaEventCleanups=[],this.media=e,this.setupReactiveMediaEvents()}play(){return at(this,void 0,void 0,function*(){try{return yield this.media.play()}catch(e){if(e instanceof DOMException&&e.name==="AbortError")return;throw e}})}pause(){this.media.pause()}isPlaying(){return!this.media.paused&&!this.media.ended}setTime(e){this.media.currentTime=Math.max(0,Math.min(e,this.getDuration()))}getDuration(){return this.media.duration}getCurrentTime(){return this.media.currentTime}getVolume(){return this.media.volume}setVolume(e){this.media.volume=e}getMuted(){return this.media.muted}setMuted(e){this.media.muted=e}getPlaybackRate(){return this.media.playbackRate}isSeeking(){return this.media.seeking}setPlaybackRate(e,n){n!=null&&(this.media.preservesPitch=n),this.media.playbackRate=e}getMediaElement(){return this.media}setSinkId(e){return this.media.setSinkId(e)}}function w0({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 L0({barAlign:t,halfHeight:e,topHeight:n,totalHeight:r,canvasHeight:i}){return t==="top"?0:t==="bottom"?i-r:e-n}function gp(t,e,n){const r=e-t.left,i=n-t.top;return[r/t.width,i/t.height]}function U_(t){return!!(t.barWidth||t.barGap||t.barAlign)}function Sp(t,e){if(!U_(e))return t;const n=e.barWidth||.5,r=n+(e.barGap||n/2);return r===0?t:Math.floor(t/r)*r}function Op({scrollLeft:t,totalWidth:e,numCanvases:n}){if(e===0)return[0];const r=t/e,i=Math.floor(r*n);return[i-1,i,i+1]}function vp(t){const e=t._cleanup;typeof e=="function"&&e()}class k0 extends Ao{constructor(e,n){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=e;const r=this.parentFromOptionsContainer(e.container);this.parent=r;const[i,o]=this.initHtml();r.appendChild(i),this.container=i,this.scrollContainer=o.querySelector(".scroll"),this.wrapper=o.querySelector(".wrapper"),this.canvasWrapper=o.querySelector(".canvases"),this.progressWrapper=o.querySelector(".progress"),this.cursor=o.querySelector(".cursor"),n&&o.appendChild(n),this.initEvents()}parentFromOptionsContainer(e){let n;if(typeof e=="string"?n=document.querySelector(e):e instanceof HTMLElement&&(n=e),!n)throw new Error("Container not found");return n}initEvents(){this.wrapper.addEventListener("click",n=>{const r=this.wrapper.getBoundingClientRect(),[i,o]=gp(r,n.clientX,n.clientY);this.emit("click",i,o)}),this.wrapper.addEventListener("dblclick",n=>{const r=this.wrapper.getBoundingClientRect(),[i,o]=gp(r,n.clientX,n.clientY);this.emit("dblclick",i,o)}),this.options.dragToSeek!==!0&&typeof this.options.dragToSeek!="object"||this.initDrag(),this.scrollStream=(function(n){const r=ye({scrollLeft:n.scrollLeft,scrollWidth:n.scrollWidth,clientWidth:n.clientWidth}),i=Qn(()=>(function(a){const{scrollLeft:l,scrollWidth:u,clientWidth:c}=a;if(u===0)return{startX:0,endX:1};const d=l/u,h=(l+c)/u;return{startX:Math.max(0,Math.min(1,d)),endX:Math.max(0,Math.min(1,h))}})(r.value),[r]),o=Qn(()=>(function(a){return{left:a.scrollLeft,right:a.scrollLeft+a.clientWidth}})(r.value),[r]),s=()=>{r.set({scrollLeft:n.scrollLeft,scrollWidth:n.scrollWidth,clientWidth:n.clientWidth})};return n.addEventListener("scroll",s,{passive:!0}),{scrollData:r,percentages:i,bounds:o,cleanup:()=>{n.removeEventListener("scroll",s),vp(r)}}})(this.scrollContainer);const e=In(()=>{const{startX:n,endX:r}=this.scrollStream.percentages.value,{left:i,right:o}=this.scrollStream.bounds.value;this.emit("scroll",n,r,i,o)},[this.scrollStream.percentages,this.scrollStream.bounds]);if(this.subscriptions.push(e),typeof ResizeObserver=="function"){const n=this.createDelay(100);this.resizeObserver=new ResizeObserver(()=>{n().then(()=>this.onContainerResize()).catch(()=>{})}),this.resizeObserver.observe(this.scrollContainer)}}onContainerResize(){const e=this.parent.clientWidth;e===this.lastContainerWidth&&this.options.height!=="auto"||(this.lastContainerWidth=e,this.reRender(),this.emit("resize"))}initDrag(){if(this.dragStream)return;this.dragStream=(function(n,r={}){const{threshold:i=3,mouseButton:o=0,touchDelay:s=100}=r,a=ye(null),l=new Map,u=matchMedia("(pointer: coarse)").matches;let c=()=>{};const d=h=>{if(h.button!==o||(l.set(h.pointerId,h),l.size>1))return;let p=h.clientX,m=h.clientY,_=!1;const E=Date.now(),A=n.getBoundingClientRect(),{left:g,top:S}=A,O=v=>{if(v.defaultPrevented||l.size>1||u&&Date.now()-E<s)return;const T=v.clientX,C=v.clientY,N=T-p,L=C-m;(_||Math.abs(N)>i||Math.abs(L)>i)&&(v.preventDefault(),v.stopPropagation(),_||(a.set({type:"start",x:p-g,y:m-S}),_=!0),a.set({type:"move",x:T-g,y:C-S,deltaX:N,deltaY:L}),p=T,m=C)},D=v=>{if(l.delete(v.pointerId),_){const T=v.clientX,C=v.clientY;a.set({type:"end",x:T-g,y:C-S})}c()},I=v=>{l.delete(v.pointerId),v.relatedTarget&&v.relatedTarget!==document.documentElement||D(v)},R=v=>{_&&(v.stopPropagation(),v.preventDefault())},y=v=>{v.defaultPrevented||l.size>1||_&&v.preventDefault()};document.addEventListener("pointermove",O),document.addEventListener("pointerup",D),document.addEventListener("pointerout",I),document.addEventListener("pointercancel",I),document.addEventListener("touchmove",y,{passive:!1}),document.addEventListener("click",R,{capture:!0}),c=()=>{document.removeEventListener("pointermove",O),document.removeEventListener("pointerup",D),document.removeEventListener("pointerout",I),document.removeEventListener("pointercancel",I),document.removeEventListener("touchmove",y),setTimeout(()=>{document.removeEventListener("click",R,{capture:!0})},10)}};return n.addEventListener("pointerdown",d),{signal:a,cleanup:()=>{c(),n.removeEventListener("pointerdown",d),l.clear(),vp(a)}}})(this.wrapper);const e=In(()=>{const n=this.dragStream.signal.value;if(!n)return;const r=this.wrapper.getBoundingClientRect().width,i=(o=n.x/r)<0?0:o>1?1:o;var o;n.type==="start"?(this.isDragging=!0,this.emit("dragstart",i)):n.type==="move"?this.emit("drag",i):n.type==="end"&&(this.isDragging=!1,this.emit("dragend",i))},[this.dragStream.signal]);this.subscriptions.push(e)}initHtml(){const e=document.createElement("div"),n=e.attachShadow({mode:"open"}),r=this.options.cspNonce&&typeof this.options.cspNonce=="string"?this.options.cspNonce.replace(/"/g,""):"";return n.innerHTML=`
22
22
  <style${r?` nonce="${r}"`:""}>
23
23
  :host {
24
24
  user-select: none;
@@ -91,16 +91,16 @@
91
91
  <div class="cursor" part="cursor"></div>
92
92
  </div>
93
93
  </div>
94
- `,[e,n]}setOptions(e){if(this.options.container!==e.container){const n=this.parentFromOptionsContainer(e.container);n.appendChild(this.container),this.parent=n}e.dragToSeek!==!0&&typeof this.options.dragToSeek!="object"||this.initDrag(),this.options=e,this.reRender()}getWrapper(){return this.wrapper}getWidth(){return this.scrollContainer.clientWidth}getScroll(){return this.scrollContainer.scrollLeft}setScroll(e){this.scrollContainer.scrollLeft=e}setScrollPercentage(e){const{scrollWidth:n}=this.scrollContainer,r=n*e;this.setScroll(r)}destroy(){var e;this.subscriptions.forEach(n=>n()),this.container.remove(),this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),(e=this.unsubscribeOnScroll)===null||e===void 0||e.forEach(n=>n()),this.unsubscribeOnScroll=[],this.dragStream&&(this.dragStream.cleanup(),this.dragStream=null),this.scrollStream&&(this.scrollStream.cleanup(),this.scrollStream=null)}createDelay(e=10){let n,r;const i=()=>{n&&(clearTimeout(n),n=void 0),r&&(r(),r=void 0)};return this.timeouts.push(i),()=>new Promise((o,s)=>{i(),r=s,n=setTimeout(()=>{n=void 0,r=void 0,o()},e)})}getHeight(e,n){var r;const i=((r=this.audioData)===null||r===void 0?void 0:r.numberOfChannels)||1;return(function({optionsHeight:o,optionsSplitChannels:s,parentHeight:a,numberOfChannels:l,defaultHeight:u=128}){if(o==null)return u;const c=Number(o);if(!isNaN(c))return c;if(o==="auto"){const d=a||u;return s!=null&&s.every(h=>!h.overlay)?d/l:d}return u})({optionsHeight:e,optionsSplitChannels:n,parentHeight:this.parent.clientHeight,numberOfChannels:i,defaultHeight:128})}convertColorValues(e,n){return(function(r,i,o){if(!Array.isArray(r))return r||"";if(r.length===0)return"#999";if(r.length<2)return r[0]||"";const s=document.createElement("canvas"),a=s.getContext("2d"),l=o!=null?o:s.height*i,u=a.createLinearGradient(0,0,0,l||i),c=1/(r.length-1);return r.forEach((d,h)=>{u.addColorStop(h*c,d)}),u})(e,this.getPixelRatio(),n==null?void 0:n.canvas.height)}getPixelRatio(){return e=window.devicePixelRatio,Math.max(1,e||1);var e}renderBarWaveform(e,n,r,i){const{width:o,height:s}=r.canvas,{halfHeight:a,barWidth:l,barRadius:u,barIndexScale:c,barSpacing:d,barMinHeight:h}=(function({width:m,height:_,length:E,options:g,pixelRatio:A}){const S=_/2,v=g.barWidth?g.barWidth*A:1,D=g.barGap?g.barGap*A:g.barWidth?v/2:0,y=v+D||1;return{halfHeight:S,barWidth:v,barGap:D,barRadius:g.barRadius||0,barMinHeight:g.barMinHeight?g.barMinHeight*A:0,barIndexScale:E>0?m/y/E:0,barSpacing:y}})({width:o,height:s,length:(e[0]||[]).length,options:n,pixelRatio:this.getPixelRatio()}),p=(function({channelData:m,barIndexScale:_,barSpacing:E,barWidth:g,halfHeight:A,vScale:S,canvasHeight:v,barAlign:D,barMinHeight:y}){const R=m[0]||[],I=m[1]||R,O=R.length,T=[];let C=0,N=0,k=0;for(let b=0;b<=O;b++){const L=Math.round(b*_);if(L>C){const{topHeight:U,totalHeight:V}=w0({maxTop:N,maxBottom:k,halfHeight:A,vScale:S,barMinHeight:y,barAlign:D}),W=k0({barAlign:D,halfHeight:A,topHeight:U,totalHeight:V,canvasHeight:v});T.push({x:C*E,y:W,width:g,height:V}),C=L,N=0,k=0}const x=Math.abs(R[b]||0),M=Math.abs(I[b]||0);x>N&&(N=x),M>k&&(k=M)}return T})({channelData:e,barIndexScale:c,barSpacing:d,barWidth:l,halfHeight:a,vScale:i,canvasHeight:s,barAlign:n.barAlign,barMinHeight:h});r.beginPath();for(const m of p)u&&"roundRect"in r?r.roundRect(m.x,m.y,m.width,m.height,u):r.rect(m.x,m.y,m.width,m.height);r.fill(),r.closePath()}renderLineWaveform(e,n,r,i){const{width:o,height:s}=r.canvas,a=(function({channelData:l,width:u,height:c,vScale:d}){const h=c/2,p=l[0]||[];return[p,l[1]||p].map((m,_)=>{const E=m.length,g=E?u/E:0,A=h,S=_===0?-1:1,v=[{x:0,y:A}];let D=0,y=0;for(let R=0;R<=E;R++){const I=Math.round(R*g);if(I>D){const T=A+(Math.round(y*h*d)||1)*S;v.push({x:D,y:T}),D=I,y=0}const O=Math.abs(m[R]||0);O>y&&(y=O)}return v.push({x:D,y:A}),v})})({channelData:e,width:o,height:s,vScale:i});r.beginPath();for(const l of a)if(l.length){r.moveTo(l[0].x,l[0].y);for(let u=1;u<l.length;u++){const c=l[u];r.lineTo(c.x,c.y)}}r.fill(),r.closePath()}renderWaveform(e,n,r){if(r.fillStyle=this.convertColorValues(n.waveColor,r),n.renderFunction)return void n.renderFunction(e,r);const i=(function({channelData:o,barHeight:s,normalize:a,maxPeak:l}){var u;const c=s||1;if(!a)return c;const d=o[0];if(!d||d.length===0)return c;let h=l!=null?l:0;if(!l)for(let p=0;p<d.length;p++){const m=(u=d[p])!==null&&u!==void 0?u:0,_=Math.abs(m);_>h&&(h=_)}return h?c/h:c})({channelData:e,barHeight:n.barHeight,normalize:n.normalize,maxPeak:n.maxPeak});U_(n)?this.renderBarWaveform(e,n,r,i):this.renderLineWaveform(e,n,r,i)}renderSingleCanvas(e,n,r,i,o,s,a){const l=this.getPixelRatio(),u=document.createElement("canvas");u.width=Math.round(r*l),u.height=Math.round(i*l),u.style.width=`${r}px`,u.style.height=`${i}px`,u.style.left=`${Math.round(o)}px`,s.appendChild(u);const c=u.getContext("2d");if(n.renderFunction?(c.fillStyle=this.convertColorValues(n.waveColor,c),n.renderFunction(e,c)):this.renderWaveform(e,n,c),u.width>0&&u.height>0){const d=u.cloneNode(),h=d.getContext("2d");h.drawImage(u,0,0),h.globalCompositeOperation="source-in",h.fillStyle=this.convertColorValues(n.progressColor,h),h.fillRect(0,0,u.width,u.height),a.appendChild(d)}}renderMultiCanvas(e,n,r,i,o,s){const a=this.getPixelRatio(),{clientWidth:l}=this.scrollContainer,u=r/a,c=(function({clientWidth:m,totalWidth:_,options:E}){return Sp(Math.min(8e3,m,_),E)})({clientWidth:l,totalWidth:u,options:n});let d={};if(c===0)return;const h=m=>{if(m<0||m>=p||d[m])return;d[m]=!0;const _=m*c;let E=Math.min(u-_,c);if(E=Sp(E,n),E<=0)return;const g=(function({channelData:A,offset:S,clampedWidth:v,totalWidth:D}){return A.map(y=>{const R=Math.floor(S/D*y.length),I=Math.floor((S+v)/D*y.length);return y.slice(R,I)})})({channelData:e,offset:_,clampedWidth:E,totalWidth:u});this.renderSingleCanvas(g,n,E,i,_,o,s)},p=Math.ceil(u/c);if(this.isScrollable){if(vp({scrollLeft:this.scrollContainer.scrollLeft,totalWidth:u,numCanvases:p}).forEach(m=>h(m)),p>1){const m=this.on("scroll",()=>{const{scrollLeft:_}=this.scrollContainer;Object.keys(d).length>10&&(o.innerHTML="",s.innerHTML="",d={}),vp({scrollLeft:_,totalWidth:u,numCanvases:p}).forEach(E=>h(E))});this.unsubscribeOnScroll.push(m)}}else for(let m=0;m<p;m++)h(m)}renderChannel(e,n,r,i){var{overlay:o}=n,s=(function(c,d){var h={};for(var p in c)Object.prototype.hasOwnProperty.call(c,p)&&d.indexOf(p)<0&&(h[p]=c[p]);if(c!=null&&typeof Object.getOwnPropertySymbols=="function"){var m=0;for(p=Object.getOwnPropertySymbols(c);m<p.length;m++)d.indexOf(p[m])<0&&Object.prototype.propertyIsEnumerable.call(c,p[m])&&(h[p[m]]=c[p[m]])}return h})(n,["overlay"]);const a=document.createElement("div"),l=this.getHeight(s.height,s.splitChannels);a.style.height=`${l}px`,o&&i>0&&(a.style.marginTop=`-${l}px`),this.canvasWrapper.style.minHeight=`${l}px`,this.canvasWrapper.appendChild(a);const u=a.cloneNode();this.progressWrapper.appendChild(u),this.renderMultiCanvas(e,s,r,l,a,u)}render(e){return at(this,void 0,void 0,function*(){var n;this.timeouts.forEach(u=>u()),this.timeouts=[],this.canvasWrapper.innerHTML="",this.progressWrapper.innerHTML="",this.options.width!=null&&(this.scrollContainer.style.width=typeof this.options.width=="number"?`${this.options.width}px`:this.options.width);const r=this.getPixelRatio(),i=this.scrollContainer.clientWidth,{scrollWidth:o,isScrollable:s,useParentWidth:a,width:l}=(function({duration:u,minPxPerSec:c=0,parentWidth:d,fillParent:h,pixelRatio:p}){const m=Math.ceil(u*c),_=m>d,E=!!(h&&!_);return{scrollWidth:m,isScrollable:_,useParentWidth:E,width:(E?d:m)*p}})({duration:e.duration,minPxPerSec:this.options.minPxPerSec||0,parentWidth:i,fillParent:this.options.fillParent,pixelRatio:r});if(this.isScrollable=s,this.wrapper.style.width=a?"100%":`${o}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=e,this.emit("render"),this.options.splitChannels)for(let u=0;u<e.numberOfChannels;u++){const c=Object.assign(Object.assign({},this.options),(n=this.options.splitChannels)===null||n===void 0?void 0:n[u]);this.renderChannel([e.getChannelData(u)],c,l,u)}else{const u=[e.getChannelData(0)];e.numberOfChannels>1&&u.push(e.getChannelData(1)),this.renderChannel(u,this.options,l,0)}Promise.resolve().then(()=>this.emit("rendered"))})}reRender(){if(this.unsubscribeOnScroll.forEach(r=>r()),this.unsubscribeOnScroll=[],!this.audioData)return;const{scrollWidth:e}=this.scrollContainer,{right:n}=this.progressWrapper.getBoundingClientRect();if(this.render(this.audioData),this.isScrollable&&e!==this.scrollContainer.scrollWidth){const{right:r}=this.progressWrapper.getBoundingClientRect(),i=(function(o){const s=2*o;return(s<0?Math.floor(s):Math.ceil(s))/2})(r-n);this.scrollContainer.scrollLeft+=i}}zoom(e){this.options.minPxPerSec=e,this.reRender()}scrollIntoView(e,n=!1){const{scrollLeft:r,scrollWidth:i,clientWidth:o}=this.scrollContainer,s=e*i,a=r,l=r+o,u=o/2;if(this.isDragging)s+30>l?this.scrollContainer.scrollLeft+=30:s-30<a&&(this.scrollContainer.scrollLeft-=30);else{(s<a||s>l)&&(this.scrollContainer.scrollLeft=s-(this.options.autoCenter?u:0));const c=s-r-u;n&&this.options.autoCenter&&c>0&&(this.scrollContainer.scrollLeft+=c)}}renderProgress(e,n){if(isNaN(e))return;const r=100*e;this.canvasWrapper.style.clipPath=`polygon(${r}% 0%, 100% 0%, 100% 100%, ${r}% 100%)`,this.progressWrapper.style.width=`${r}%`,this.cursor.style.left=`${r}%`,this.cursor.style.transform=this.options.cursorWidth?`translateX(-${e*this.options.cursorWidth}px)`:"",this.isScrollable&&this.options.autoScroll&&this.audioData&&this.audioData.duration>0&&this.scrollIntoView(e,n)}exportImage(e,n,r){return at(this,void 0,void 0,function*(){const i=this.canvasWrapper.querySelectorAll("canvas");if(!i.length)throw new Error("No waveform data");if(r==="dataURL"){const o=Array.from(i).map(s=>s.toDataURL(e,n));return Promise.resolve(o)}return Promise.all(Array.from(i).map(o=>new Promise((s,a)=>{o.toBlob(l=>{l?s(l):a(new Error("Could not export image"))},e,n)})))})}}class M0 extends go{constructor(){super(...arguments),this.animationFrameId=null,this.isRunning=!1}start(){if(this.isRunning)return;this.isRunning=!0;const e=()=>{this.isRunning&&(this.emit("tick"),this.animationFrameId=requestAnimationFrame(e))};e()}stop(){this.isRunning=!1,this.animationFrameId!==null&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=null)}destroy(){this.stop()}}class tl extends go{constructor(e=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=e,this.gainNode=this.audioContext.createGain(),this.gainNode.connect(this.audioContext.destination)}load(){return at(this,void 0,void 0,function*(){})}get src(){return this.currentSrc}set src(e){if(this.currentSrc=e,this._duration=void 0,!e)return this.buffer=null,void this.emit("emptied");fetch(e).then(n=>{if(n.status>=400)throw new Error(`Failed to fetch ${e}: ${n.status} (${n.statusText})`);return n.arrayBuffer()}).then(n=>this.currentSrc!==e?null:this.audioContext.decodeAudioData(n)).then(n=>{this.currentSrc===e&&(this.buffer=n,this.emit("loadedmetadata"),this.emit("canplay"),this.autoplay&&this.play())}).catch(n=>{console.error("WebAudioPlayer load error:",n)})}_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 e=this.playedDuration*this._playbackRate;(e>=this.duration||e<0)&&(e=0,this.playedDuration=0),this.bufferNode.start(this.audioContext.currentTime,e),this.playStartTime=this.audioContext.currentTime,this.bufferNode.onended=()=>{this.currentTime>=this.duration&&(this.pause(),this.emit("ended"))}}_pause(){var e;this.paused=!0,(e=this.bufferNode)===null||e===void 0||e.stop(),this.playedDuration+=this.audioContext.currentTime-this.playStartTime}play(){return at(this,void 0,void 0,function*(){this.paused&&(this._play(),this.emit("play"))})}pause(){this.paused||(this._pause(),this.emit("pause"))}stopAt(e){const n=e-this.currentTime,r=this.bufferNode;r==null||r.stop(this.audioContext.currentTime+n),r==null||r.addEventListener("ended",()=>{r===this.bufferNode&&(this.bufferNode=null,this.pause())},{once:!0})}setSinkId(e){return at(this,void 0,void 0,function*(){return this.audioContext.setSinkId(e)})}get playbackRate(){return this._playbackRate}set playbackRate(e){this._playbackRate=e,this.bufferNode&&(this.bufferNode.playbackRate.value=e)}get currentTime(){return(this.paused?this.playedDuration:this.playedDuration+(this.audioContext.currentTime-this.playStartTime))*this._playbackRate}set currentTime(e){const n=!this.paused;n&&this._pause(),this.playedDuration=e/this._playbackRate,n&&this._play(),this.emit("seeking"),this.emit("timeupdate")}get duration(){var e,n;return(e=this._duration)!==null&&e!==void 0?e:((n=this.buffer)===null||n===void 0?void 0:n.duration)||0}set duration(e){this._duration=e}get volume(){return this.gainNode.gain.value}set volume(e){this.gainNode.gain.value=e,this.emit("volumechange")}get muted(){return this._muted}set muted(e){this._muted!==e&&(this._muted=e,this._muted?this.gainNode.disconnect():this.gainNode.connect(this.audioContext.destination))}canPlayType(e){return/^(audio|video)\//.test(e)}getGainNode(){return this.gainNode}getChannelData(){const e=[];if(!this.buffer)return e;const n=this.buffer.numberOfChannels;for(let r=0;r<n;r++)e.push(this.buffer.getChannelData(r));return e}removeAttribute(e){switch(e){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 P0={waveColor:"#999",progressColor:"#555",cursorWidth:1,minPxPerSec:0,fillParent:!0,interact:!0,dragToSeek:!1,autoScroll:!0,autoCenter:!0,sampleRate:8e3};class Qi extends b0{static create(e){return new Qi(e)}getState(){return this.wavesurferState}getRenderer(){return this.renderer}constructor(e){const n=e.media||(e.backend==="WebAudio"?new tl:void 0);super({media:n,mediaControls:e.mediaControls,autoplay:e.autoplay,playbackRate:e.audioRate}),this.plugins=[],this.decodedData=null,this.stopAtPosition=null,this.subscriptions=[],this.mediaSubscriptions=[],this.abortController=null,this.reactiveCleanups=[],this.options=Object.assign({},P0,e);const{state:r,actions:i}=(function(a){var l,u,c,d,h,p;const m=(l=a==null?void 0:a.currentTime)!==null&&l!==void 0?l:Ie(0),_=(u=a==null?void 0:a.duration)!==null&&u!==void 0?u:Ie(0),E=(c=a==null?void 0:a.isPlaying)!==null&&c!==void 0?c:Ie(!1),g=(d=a==null?void 0:a.isSeeking)!==null&&d!==void 0?d:Ie(!1),A=(h=a==null?void 0:a.volume)!==null&&h!==void 0?h:Ie(1),S=(p=a==null?void 0:a.playbackRate)!==null&&p!==void 0?p:Ie(1),v=Ie(null),D=Ie(null),y=Ie(""),R=Ie(0),I=Ie(0),O=Qn(()=>!E.value,[E]),T=Qn(()=>v.value!==null,[v]),C=Qn(()=>T.value&&_.value>0,[T,_]),N=Qn(()=>m.value,[m]),k=Qn(()=>_.value>0?m.value/_.value:0,[m,_]);return{state:{currentTime:m,duration:_,isPlaying:E,isPaused:O,isSeeking:g,volume:A,playbackRate:S,audioBuffer:v,peaks:D,url:y,zoom:R,scrollPosition:I,canPlay:T,isReady:C,progress:N,progressPercent:k},actions:{setCurrentTime:b=>{const L=Math.max(0,Math.min(_.value||1/0,b));m.set(L)},setDuration:b=>{_.set(Math.max(0,b))},setPlaying:b=>{E.set(b)},setSeeking:b=>{g.set(b)},setVolume:b=>{const L=Math.max(0,Math.min(1,b));A.set(L)},setPlaybackRate:b=>{const L=Math.max(.1,Math.min(16,b));S.set(L)},setAudioBuffer:b=>{v.set(b),b&&_.set(b.duration)},setPeaks:b=>{D.set(b)},setUrl:b=>{y.set(b)},setZoom:b=>{R.set(Math.max(0,b))},setScrollPosition:b=>{I.set(Math.max(0,b))}}}})({isPlaying:this.isPlayingSignal,currentTime:this.currentTimeSignal,duration:this.durationSignal,volume:this.volumeSignal,playbackRate:this.playbackRateSignal,isSeeking:this.seekingSignal});this.wavesurferState=r,this.wavesurferActions=i,this.timer=new M0;const o=n?void 0:this.getMediaElement();this.renderer=new L0(this.options,o),this.initPlayerEvents(),this.initRendererEvents(),this.initTimerEvents(),this.initReactiveState(),this.initPlugins();const s=this.options.url||this.getSrc()||"";Promise.resolve().then(()=>{this.emit("init");const{peaks:a,duration:l}=this.options;(s||a&&l)&&this.load(s,a,l).catch(u=>{this.emit("error",u instanceof Error?u:new Error(String(u)))})})}updateProgress(e=this.getCurrentTime()){return this.renderer.renderProgress(e/this.getDuration(),this.isPlaying()),e}initTimerEvents(){this.subscriptions.push(this.timer.on("tick",()=>{if(!this.isSeeking()){const e=this.updateProgress();this.emit("timeupdate",e),this.emit("audioprocess",e),this.stopAtPosition!=null&&this.isPlaying()&&e>=this.stopAtPosition&&this.pause()}}))}initReactiveState(){this.reactiveCleanups.push((function(e,n){const r=[];r.push(yn(()=>{const s=e.isPlaying.value;n.emit(s?"play":"pause")},[e.isPlaying])),r.push(yn(()=>{const s=e.currentTime.value;n.emit("timeupdate",s),e.isPlaying.value&&n.emit("audioprocess",s)},[e.currentTime,e.isPlaying])),r.push(yn(()=>{e.isSeeking.value&&n.emit("seeking",e.currentTime.value)},[e.isSeeking,e.currentTime]));let i=!1;r.push(yn(()=>{e.isReady.value&&!i&&(i=!0,n.emit("ready",e.duration.value))},[e.isReady,e.duration]));let o=!1;return r.push(yn(()=>{const s=e.isPlaying.value,a=e.currentTime.value,l=e.duration.value,u=l>0&&a>=l;o&&!s&&u&&n.emit("finish"),o=s&&u},[e.isPlaying,e.currentTime,e.duration])),r.push(yn(()=>{const s=e.zoom.value;s>0&&n.emit("zoom",s)},[e.zoom])),()=>{r.forEach(s=>s())}})(this.wavesurferState,{emit:this.emit.bind(this)}))}initPlayerEvents(){this.isPlaying()&&(this.emit("play"),this.timer.start()),this.mediaSubscriptions.push(this.onMediaEvent("timeupdate",()=>{const e=this.updateProgress();this.emit("timeupdate",e)}),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 e;this.emit("error",(e=this.getMediaElement().error)!==null&&e!==void 0?e:new Error("Media error")),this.stopAtPosition=null}))}initRendererEvents(){this.subscriptions.push(this.renderer.on("click",(e,n)=>{this.options.interact&&(this.seekTo(e),this.emit("interaction",e*this.getDuration()),this.emit("click",e,n))}),this.renderer.on("dblclick",(e,n)=>{this.emit("dblclick",e,n)}),this.renderer.on("scroll",(e,n,r,i)=>{const o=this.getDuration();this.emit("scroll",e*o,n*o,r,i)}),this.renderer.on("render",()=>{this.emit("redraw")}),this.renderer.on("rendered",()=>{this.emit("redrawcomplete")}),this.renderer.on("dragstart",e=>{this.emit("dragstart",e)}),this.renderer.on("dragend",e=>{this.emit("dragend",e)}),this.renderer.on("resize",()=>{this.emit("resize")}));{let e;const n=this.renderer.on("drag",r=>{var i;if(!this.options.interact)return;this.renderer.renderProgress(r),clearTimeout(e);let o=0;const s=this.options.dragToSeek;this.isPlaying()?o=0:s===!0?o=200:s&&typeof s=="object"&&(o=(i=s.debounceTime)!==null&&i!==void 0?i:200),e=setTimeout(()=>{this.seekTo(r)},o),this.emit("interaction",r*this.getDuration()),this.emit("drag",r)});this.subscriptions.push(()=>{clearTimeout(e),n()})}}initPlugins(){var e;!((e=this.options.plugins)===null||e===void 0)&&e.length&&this.options.plugins.forEach(n=>{this.registerPlugin(n)})}unsubscribePlayerEvents(){this.mediaSubscriptions.forEach(e=>e()),this.mediaSubscriptions=[]}setOptions(e){this.options=Object.assign({},this.options,e),e.duration&&!e.peaks&&(this.decodedData=Fo.createBuffer(this.exportPeaks(),e.duration)),e.peaks&&e.duration&&(this.decodedData=Fo.createBuffer(e.peaks,e.duration)),this.renderer.setOptions(this.options),e.audioRate&&this.setPlaybackRate(e.audioRate),e.mediaControls!=null&&(this.getMediaElement().controls=e.mediaControls)}registerPlugin(e){if(this.plugins.includes(e))return e;e._init(this),this.plugins.push(e);const n=e.once("destroy",()=>{this.plugins=this.plugins.filter(r=>r!==e),this.subscriptions=this.subscriptions.filter(r=>r!==n)});return this.subscriptions.push(n),e}unregisterPlugin(e){this.plugins=this.plugins.filter(n=>n!==e),e.destroy()}getWrapper(){return this.renderer.getWrapper()}getWidth(){return this.renderer.getWidth()}getScroll(){return this.renderer.getScroll()}setScroll(e){return this.renderer.setScroll(e)}setScrollTime(e){const n=e/this.getDuration();this.renderer.setScrollPercentage(n)}getActivePlugins(){return this.plugins}loadAudio(e,n,r,i){return at(this,void 0,void 0,function*(){var o;if(this.emit("load",e),!this.options.media&&this.isPlaying()&&this.pause(),this.decodedData=null,this.stopAtPosition=null,(o=this.abortController)===null||o===void 0||o.abort(),this.abortController=null,!n&&!r){const a=this.options.fetchParams||{};window.AbortController&&!a.signal&&(this.abortController=new AbortController,a.signal=this.abortController.signal);const l=c=>this.emit("loading",c);n=yield N0.fetchBlob(e,l,a);const u=this.options.blobMimeType;u&&(n=new Blob([n],{type:u}))}this.setSrc(e,n);const s=yield new Promise(a=>{const l=i||this.getDuration();l?a(l):this.mediaSubscriptions.push(this.onMediaEvent("loadedmetadata",()=>a(this.getDuration()),{once:!0}))});if(!e&&!n){const a=this.getMediaElement();a instanceof tl&&(a.duration=s)}if(r)this.decodedData=Fo.createBuffer(r,s||0);else if(n){const a=yield n.arrayBuffer();this.decodedData=yield Fo.decode(a,this.options.sampleRate)}this.decodedData&&(this.emit("decode",this.getDuration()),this.renderer.render(this.decodedData)),this.emit("ready",this.getDuration())})}load(e,n,r){return at(this,void 0,void 0,function*(){try{return yield this.loadAudio(e,void 0,n,r)}catch(i){throw this.emit("error",i),i}})}loadBlob(e,n,r){return at(this,void 0,void 0,function*(){try{return yield this.loadAudio("",e,n,r)}catch(i){throw this.emit("error",i),i}})}zoom(e){if(!this.decodedData)throw new Error("No audio loaded");this.renderer.zoom(e),this.emit("zoom",e)}getDecodedData(){return this.decodedData}exportPeaks({channels:e=2,maxLength:n=8e3,precision:r=1e4}={}){if(!this.decodedData)throw new Error("The audio has not been decoded yet");const i=Math.min(e,this.decodedData.numberOfChannels),o=[];for(let s=0;s<i;s++){const a=this.decodedData.getChannelData(s),l=[],u=a.length/n;for(let c=0;c<n;c++){const d=a.slice(Math.floor(c*u),Math.ceil((c+1)*u));let h=0;for(let p=0;p<d.length;p++){const m=d[p];Math.abs(m)>Math.abs(h)&&(h=m)}l.push(Math.round(h*r)/r)}o.push(l)}return o}getDuration(){let e=super.getDuration()||0;return e!==0&&e!==1/0||!this.decodedData||(e=this.decodedData.duration),e}toggleInteraction(e){this.options.interact=e}setTime(e){this.stopAtPosition=null,super.setTime(e),this.updateProgress(e),this.emit("timeupdate",e)}seekTo(e){const n=this.getDuration()*e;this.setTime(n)}play(e,n){const r=Object.create(null,{play:{get:()=>super.play}});return at(this,void 0,void 0,function*(){e!=null&&this.setTime(e);const i=yield r.play.call(this);return n!=null&&(this.media instanceof tl?this.media.stopAt(n):this.stopAtPosition=n),i})}playPause(){return at(this,void 0,void 0,function*(){return this.isPlaying()?this.pause():this.play()})}stop(){this.pause(),this.setTime(0)}skip(e){this.setTime(this.getCurrentTime()+e)}empty(){this.load("",[[0]],.001)}setMediaElement(e){this.unsubscribePlayerEvents(),super.setMediaElement(e),this.initPlayerEvents()}exportImage(){return at(this,arguments,void 0,function*(e="image/png",n=1,r="dataURL"){return this.renderer.exportImage(e,n,r)})}destroy(){var e;this.emit("destroy"),(e=this.abortController)===null||e===void 0||e.abort(),this.plugins.forEach(n=>n.destroy()),this.subscriptions.forEach(n=>n()),this.unsubscribePlayerEvents(),this.reactiveCleanups.forEach(n=>n()),this.reactiveCleanups=[],this.timer.destroy(),this.renderer.destroy(),super.destroy()}}Qi.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}},Qi.dom=C0;var B_=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];s===3?r[0]=a:s===4?r[1]=Object.assign(r[1]||{},a):s===5?(r[1]=r[1]||{})[e[++o]]=a:s===6?r[1][e[++o]]+=a+"":s?(i=t.apply(a,B_(t,a,n,["",null])),r.push(i),a[0]?e[0]|=2:(e[o-2]=0,e[o]=i)):r.push(a)}return r},Dp=new Map;function x0(t){var e=Dp.get(this);return e||(e=new Map,Dp.set(this,e)),(e=B_(this,e.get(t)||(e.set(t,e=(function(n){for(var r,i,o=1,s="",a="",l=[0],u=function(h){o===1&&(h||(s=s.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?l.push(0,h,s):o===3&&(h||s)?(l.push(3,h,s),o=2):o===2&&s==="..."&&h?l.push(4,h,0):o===2&&s&&!h?l.push(5,0,!0,s):o>=5&&((s||!h&&o===5)&&(l.push(o,0,s,i),o=6),h&&(l.push(o,h,0,i),o=6)),s=""},c=0;c<n.length;c++){c&&(o===1&&u(),u(c));for(var d=0;d<n[c].length;d++)r=n[c][d],o===1?r==="<"?(u(),l=[l],o=3):s+=r:o===4?s==="--"&&r===">"?(o=1,s=""):s=r+s[0]:a?r===a?a="":s+=r:r==='"'||r==="'"?a=r:r===">"?(u(),o=1):o&&(r==="="?(o=5,i=s,s=""):r==="/"&&(o<5||n[c][d+1]===">")?(u(),o===3&&(l=l[0]),o=l,(l=l[0]).push(2,0,o),o=0):r===" "||r===" "||r===`
95
- `||r==="\r"?(u(),o=2):s+=r),o===3&&s==="!--"&&(o=4,l=l[0])}return u(),l})(t)),e),arguments,[])).length>1?e:e[0]}const F0={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,TALK_GMK:"AIzaSyAsz0mHH8fOjpcBfWeCfDVOFPh-nWgsxbs"},H0=(function(t){return F0[t]})("TALK_GMK");function uu(t,e=10){const n=Sr(Bc),[r,i]=ee([]);return z(()=>{if(!t)return;const o=n.conversation(t).subscribeParticipants(s=>i(s!=null?s:[]));return e>10&&o.connected.then(async()=>{for(;o.state.type==="active"&&!o.state.loadedAll&&o.state.latestSnapshot!==null&&o.state.latestSnapshot.length<e;){const s=Math.min(e-o.state.latestSnapshot.length,50);await o.loadMore(s)}}),()=>{o.unsubscribe()}},[t,n,e]),r}const j_=/^\/.*[^\\]\/[im]*$/;function Tp(t){return j_.test(t)?!Os(t).test(""):!1}function Os(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 V_(t){const e=t.replace(/\./g,"\\.").replace(/\*/g,".*");return new RegExp("^"+e+"$","i")}function U0(t,e){const n=h_(e),r=V_(t);return n!==void 0&&r.test(n)}const B0=/^[]/g;function z_(t){return t.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}function nc(t,e){!t()&&!e&&(e=t.toString().replace(/^function\s*\(\)\s*\{\s*return\s*(.*);\s*\}\s*$/,"`$1`")+" was not true")}(t=>{function e(r){}function n(r,i){(function(o,s){switch(s){case"undefined":return o===void 0;case String:return typeof o=="string"||o instanceof String;case Boolean:return typeof o=="boolean"||o instanceof Boolean;case Number:return typeof o=="number"||o instanceof Number;default:return o instanceof s}})(r,i)||(i.name,String(r))}t.defined=e,t.has=function(r,i){r[i]},t.is=n,t.equals=function(r,i){},t.oneOf=function(r,i){i.includes(r)||JSON.stringify(i)},t.isArray=function(r,i){n(r,Array),r&&r.length>0&&n(r[0],i)},t.optional=function(r,i){r!==void 0&&n(r,i)},t.falsy=function(r){},t.never=function(r){}})(nc||(nc={}));const Yr=nc,j0=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"),V0=/\uFE0F/g,z0="‍";function $0(t){if(t===":arslan:")return"https://cdn.talkjs.com/__assets/5461191341cea882b3f227c085d5772c.gif";const e=(function(r){const i=[];let o=0,s=0,a=0;for(;a<r.length;)o=r.charCodeAt(a++),s?(i.push((65536+(s-55296<<10)+(o-56320)).toString(16)),s=0):55296<=o&&o<=56319?s=o:i.push(o.toString(16));return i.join("-")})((n=t).indexOf(z0)<0?n.replace(V0,""):n);var n;return`https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/svg/${e}.svg`}class $_{constructor({mode:e,allowedHostnames:n,allowedPhoneNrs:r,allowedMatches:i,forbiddenMatches:o,forbiddenWords:s,suppressLinks:a,suppressEmailAddresses:l,suppressPhoneNumbers:u,replacement:c}){if(Yr.oneOf(e,["all","otherOnly","off"]),this.mode=e,this.suppressLinks=a!==!1,this.suppressEmailAddresses=l!==!1,this.suppressPhoneNumbers=u!==!1,this.allowedHostnames=n||[],this.allowedPhoneNrs=(r||[]).filter(d=>d).map(d=>d.replace(/[^0-9]/g,"")),this.allowedMatches=(i||[]).filter(Tp).map(d=>Os(d)),this.forbiddenMatches=(o||[]).filter(Tp).map(d=>Os(d)),s){const d=s.split(`
96
- `).map(h=>h.trim().toLowerCase()).filter(h=>h.length>0&&!h.startsWith("#")).map(h=>z_(h));d.length&&this.forbiddenMatches.push(new RegExp(`\\b(${d.join("|")})\\b`,"gi"))}Yr(()=>this.allowedMatches.every(d=>d.flags.includes("g")),"All regexes in `suppressContactInfo.allowedMatches` must be global. Check `allowedMatches`!"),Yr(()=>this.forbiddenMatches.every(d=>d.flags.includes("g")),"All regexes in `suppressContactInfo.forbiddenMatches` must be global. Check `forbiddenMatches`!"),c=c==null?void 0:c.trim(),this.replacement=c&&c.length>0?c:void 0}shouldSuppress({isContentBySender:e}){return this.mode==="all"||this.mode==="otherOnly"&&!e}}function du(t){var n,r,i,o,s,a,l,u,c,d,h,p,m,_;let e="";return t.t&&(e=`(${t.t("CONTACT_INFORMATION_HIDDEN")})`),{formattedLinks:(n=t.formattedLinks)!=null?n:"plaintext",markup:(r=t.markup)!=null?r:!1,useFallbackMentions:(i=t.useFallbackMentions)!=null?i:!1,sameTabLinkRules:(o=t.sameTabLinkRules)!=null?o:[],enableEmojiImageFallback:(s=t.enableEmojiImageFallback)!=null?s:!1,highlight:(a=t.highlight)!=null?a:[],highlightFromWordBeginnings:(l=t.highlightFromWordBeginnings)!=null?l:!1,contactInfo:(u=t.contactInfo)!=null?u:!1,suppression:(c=t.suppression)!=null?c:new $_({mode:"off"}),contactInfoHiddenText:(p=(h=t.contactInfoHiddenText)!=null?h:(d=t.suppression)==null?void 0:d.replacement)!=null?p:e,customEmojiUrls:(m=t.customEmojiUrls)!=null?m:{},enableActions:(_=t.enableActions)!=null?_:!0}}function Y0({id:t,text:e}){var i;const n=ae(),r=J(()=>{var a;if(n.type==="ConversationListStore")return;const o=n.state$.currentConversationId.get(),s=o&&n.state$.participants.child(o).get();return(a=s==null?void 0:s.find(l=>l.user.id===t))==null?void 0:a.user});return f("span",{className:"t-mention","t-is-current-user":J(n.extUserId$)===t?"":void 0,children:`@${(i=r==null?void 0:r.name)!=null?i:e}`})}function G0({message:t,type:e,action:n,params:r,children:i}){const o=li(),s=q(l=>{l.preventDefault(),o.triggerMessageAction(t,n,r)},[o,t,n,r]),a={"t-action":n,onClick:s};return e==="actionButton"?f("button",{...a,type:"button",children:i}):f("a",{...a,href:"#",children:i})}function Y_(t,e={},n){return mr(t,{...du(e),message:n})}function mr(t,e){const n=t.flatMap(r=>{if(typeof r=="string")return nl(r,e.highlight,e.highlightFromWordBeginnings);switch(r.type){case"bold":case"italic":case"strikethrough":case"blockquote":case"bulletpoint":case"bulletPoint":return W0(r,e);case"bulletlist":case"bulletList":return[me("ul",null,...mr(r.children,e))];case"autolink":case"autoLink":case"link":return K0(r,e);case"codeblock":case"codeBlock":return[f("code",{"data-language":r.language,children:nl(r.text,e.highlight,e.highlightFromWordBeginnings)})];case"codespan":case"codeSpan":return f("code",{children:nl((i=r.text,i.replace(/^\s*\n/m,"").replace(/\n\s*$/m,"")),e.highlight,e.highlightFromWordBeginnings)});case"mention":return Yr.falsy(e.useFallbackMentions),f(Y0,{id:r.id,text:r.text},r.id);case"suppressed":return[f("i",{children:e.contactInfoHiddenText})];case"emoji":return e.enableEmojiImageFallback?[f(X0,{unicode:r.text})]:[r.text];case"actionlink":case"actionLink":case"actionbutton":case"actionButton":return q0(r,e);case"customemoji":case"customEmoji":return r.text;default:Yr.never(r)}var i});return n.every(r=>typeof r=="string")?[n.join("")]:n}function Ho(t){return t.normalize("NFKC").normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase()}function nl(t,e,n=!1){if(!t||!e.length)return[t];const r=Ho(t),i=t.toLowerCase()!==r,o=e.map(l=>Ho(l).trim()).filter(l=>l.length),s=(function(l){const u=l.map(d=>d.trim()).filter(d=>d).sort((d,h)=>h.length-d.length);if(u.length===0)return B0;const c=u.map(z_).join("|");return new RegExp(c,"gi")})(o),a=Zs(r,n?new RegExp(`(?<=^|\\s)(${s.source})`,s.flags):s).map(l=>({offset:l.index,matchedText:l[0],index:l.index}));return ql(t,a,({index:l,matchedText:u})=>[f("mark",{className:"t-highlighted-text",children:i?(function(c,d,h){let p=0,m=0;for(;m<d&&p<c.length;)m+=Ho(c[p]).length,p+=1;let _=p;for(;m<d+h&&_<c.length;)m+=Ho(c[_]).length,_+=1;return c.substring(p,_)})(t,l,u.length):t.slice(l,l+u.length)})])}const W0=(t,e)=>[me({bold:"strong",italic:"em",strikethrough:"del",blockquote:"blockquote",bulletpoint:"li",bulletPoint:"li"}[t.type],null,...mr(t.children,e))];function X0({unicode:t}){const[e,n]=ee(()=>t!==":arslan:");return z(()=>{e&&!iE(t)&&n(!1)},[]),e?f("span",{className:"t-emoji",children:t}):f("img",{className:"t-emoji",src:$0(t),alt:t})}const K0=(t,e)=>{const n="children"in t?t.children:[t.text];switch(e.formattedLinks){case"link":return[me("a",{target:(function(r,i){for(const o of r)if(j_.test(o)){if(Os(o).test(i))return"_top"}else if(U0(o,i))return"_top";return"_blank"})(e.sameTabLinkRules,t.url),href:t.url,rel:"noreferrer"},...mr(n,e))];case"plaintext":return"children"in t&&t.children.every(r=>typeof r=="string")?[t.children.join("")]:[me(ie,null,...mr(n,e))];default:Yr.never(e.formattedLinks)}},q0=(t,e)=>e.enableActions?[me(G0,{type:t.type==="actionlink"?"actionLink":t.type==="actionbutton"?"actionButton":t.type,action:t.action,params:t.params,message:e.message},...mr(t.children,e))]:"children"in t&&t.children.every(n=>typeof n=="string")?[t.children.join("")]:[me(ie,null,...mr(t.children,e))];function J0(t,e){return Jo(t,du(e))}function Jo(t,e){return t.flatMap(n=>{if(typeof n=="string"){let r=[n];return r=rl(r,i=>(function(o,s){if(s.contactInfo!=="suppress")return[o];const{suppression:{forbiddenMatches:a,allowedMatches:l}}=s,u=eu(a,c=>Zs(o,c)).filter(([c])=>!l.some(d=>c.match(d)!==null)).map(c=>({offset:c.index,matchedText:c[0]}));return ql(o,u,()=>[{type:"suppressed",text:"CONTACT_INFORMATION_HIDDEN"}])})(i,e)),r=rl(r,i=>(function(o){return ql(o,(function(s){const a=[];let l;for(;l=j0.exec(s);){const u=l[0],c=l.index;a.push({offset:c,matchedText:u})}return a})(o),s=>[{type:"emoji",text:s.matchedText}])})(i)),r=rl(r,i=>(function(o,s){if(s.contactInfo!=="suppress")return[o];const a=[];if((s.suppression.suppressEmailAddresses||s.suppression.suppressLinks)&&a.push(b_),s.suppression.suppressPhoneNumbers&&a.push(N_),a.length===0)return[o];const l=L_(o,{multilineSteps:[],singlelineSteps:a}),u=l.map(c=>typeof c=="string"?c:Rp(c.url,s.suppression)?c.text:{type:"suppressed",text:"CONTACT_INFORMATION_HIDDEN"});return au(u)})(i,e)),r}switch(n.type){case"bold":case"italic":case"strikethrough":case"blockquote":case"bulletlist":case"bulletList":case"bulletpoint":case"bulletPoint":return{type:n.type,children:Jo(n.children,e)};case"codespan":case"codeSpan":case"codeblock":case"codeBlock":case"suppressed":case"emoji":case"customemoji":case"customEmoji":return n;case"mention":return{type:"mention",id:n.id,text:n.text};case"autolink":case"autoLink":return(function(r,i){return i.contactInfo==="link"?r:i.contactInfo==="suppress"?Rp(r.url,i.suppression)?r:{type:"suppressed",text:"CONTACT_INFORMATION_HIDDEN"}:r.text})(n,e);case"link":return{type:"link",url:n.url,children:Jo(n.children,e)};case"actionlink":case"actionLink":case"actionbutton":case"actionButton":return{type:n.type,action:n.action,params:n.params,children:Jo(n.children,e)}}})}function rl(t,e){return eu(t,n=>typeof n=="string"?e(n):[n])}function Rp(t,e){if(e.allowedMatches.some(n=>t.match(n)!==null))return!0;if(e.forbiddenMatches.some(n=>t.match(n)!==null))return!1;if(t.startsWith("mailto:")){const n=t.substring(7).replace(/^.*@/,"");return!e.suppressEmailAddresses||yp(e.allowedHostnames,n)}if(t.startsWith("tel:")){const n=t.substring(4).replace(/[^0-9]/g,"");return!e.suppressPhoneNumbers||e.allowedPhoneNrs.some(r=>n.endsWith(r))}{const n=h_(t);return!e.suppressLinks||!n||yp(e.allowedHostnames,n)}}function yp(t,e){for(const n of t)if(V_(n).test(e))return!0;return!1}function Ao({block:t,nonInteractive:e,message:n,className:r=""}){const i=ae(),o=!e,s=J(i.highlightedStrings$),a=i.type==="ConversationListStore",{nodes:l,roleOptions:u}=(function(h,p){var y;const m=ae(),_=J(m.app$.role);re.defined(_);const E=p.type==="UserMessage",g=((y=p.sender)==null?void 0:y.id)===m.extUserId$.peek(),A=_.suppressContactInfo,S=E&&A.shouldSuppress({isContentBySender:g}),v=J0(h.children,{contactInfo:S?"suppress":"link",suppression:A}),D={sameTabLinkRules:_.sameTabLinkRules,contactInfoHiddenText:_.suppressContactInfo.replacement||`(${m.t$.peek().CONTACT_INFORMATION_HIDDEN})`};return{nodes:v,roleOptions:D}})(t,n),c=Y_(l,{enableEmojiImageFallback:!0,formattedLinks:o?"link":"plaintext",enableActions:o,highlight:s,highlightFromWordBeginnings:a,...u},n),d=(function(h){return h.every(m=>typeof m=="object"&&m.type==="emoji")?`t-emoji-only t-emoji-count-${h.length}`:""})(l);return me("span",{className:`t-text ${r} ${d}`},...c)}function At({text:t,className:e=""}){const n=ae();return me("span",{className:`t-highlightable ${e}`},...Y_([t],{enableEmojiImageFallback:!0,formattedLinks:"plaintext",enableActions:!1,highlight:J(n.highlightedStrings$),highlightFromWordBeginnings:n.type==="ConversationListStore"},null))}function hu(t){const e=Qe(),n=ae(),{className:r="",...i}=t,o=J(()=>n.state$.messages.child(t.common.conversation.id).lookup.child(t.message.id).content.child(0).url.get());return f("div",{className:`t-message-content ${r}`,children:t.message.content.map(s=>{var a;return f(Z0,{block:s,theme:e,downloadUrl:o,...i},t.message.createdAt+((a=t.message.editedAt)!=null?a:0))})})}function Z0({common:t,block:e,message:n,theme:r,downloadUrl:i}){const o=(function(s,a){switch(a.type){case"text":return s.TextBlock;case"location":return s.LocationBlock;case"file":switch(a.subtype){case"image":return s.ImageBlock;case"video":return s.VideoBlock;case"voice":return s.VoiceBlock;case"audio":return s.AudioBlock;default:return s.FileBlock}default:re.never(a)}})(r,e);return f(o,{block:e,common:t,message:n,downloadUrl:i})}const Q0=27;function So(t,e,n=!0){const r=q(o=>{o.keyCode===Q0&&t()},[t]),i=q(o=>{o.target.closest(e)===null&&t(o)},[e,t]);z(()=>{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])}const eD=".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)}",tD={focusable:"false",preserveAspectRatio:"xMidYMid meet"};var Ip,Cp,il,Np,bp,wp={exports:{}};function nD(){return Cp?Ip:(Cp=1,Ip="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}function rD(){if(Np)return il;Np=1;var t=nD();function e(){}function n(){}return n.resetWarningCache=e,il=function(){function r(s,a,l,u,c,d){if(d!==t){var h=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 h.name="Invariant Violation",h}}function i(){return r}r.isRequired=r;var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:e};return o.PropTypes=o,o},il}function iD(){return bp||(bp=1,wp.exports=rD()()),wp.exports}const Me=Ys(iD()),K=_t(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:c,height:d,viewBox:h=`0 0 ${c} ${d}`,...p}={}){const{tabindex:m,..._}=p,E={...tD,..._,width:c,height:d,viewBox:h};return E["aria-label"]||E["aria-labelledby"]?(E.role="img",m!=null&&(E.focusable="true",E.tabindex=m)):E["aria-hidden"]=!0,E})({...o,tabindex:n}),u=l;return t&&(u.className=t),a!=null&&(u.tabIndex=typeof a=="number"?a:Number(n)),s&&(u.ref=s),r&&(u.xmlns=r),i&&(u.preserveAspectRatio=i),F.createElement("svg",u,e)});K.displayName="Icon",K.propTypes={"aria-hidden":Me.oneOfType([Me.bool,Me.oneOf(["true","false"])]),"aria-label":Me.string,"aria-labelledby":Me.string,children:Me.node,className:Me.string,height:Me.oneOfType([Me.number,Me.string]),preserveAspectRatio:Me.string,tabIndex:Me.oneOfType([Me.number,Me.string]),viewBox:Me.string,width:Me.oneOfType([Me.number,Me.string]),xmlns:Me.string};const oD=F.forwardRef(function({children:t,size:e=16,...n},r){return e===20||e==="20"||e==="20px"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",...n},f("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"}),f("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):e===24||e==="24"||e==="24px"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...n},f("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):F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("path",{d:"M13 24 4 15 5.414 13.586 13 21.171 26.586 7.586 28 9 13 24z"}),t)}),sD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("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"}),f("path",{d:"M11.5,11A2.5,2.5,0,1,0,14,13.5,2.48,2.48,0,0,0,11.5,11Z"}),f("path",{d:"M20.5,11A2.5,2.5,0,1,0,23,13.5,2.48,2.48,0,0,0,20.5,11Z"}),f("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)}),aD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("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"}),f("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"}),f("path",{d:"M11.5,11A2.5,2.5,0,1,0,14,13.5,2.48,2.48,0,0,0,11.5,11Z"}),f("path",{d:"M20.5,11A2.5,2.5,0,1,0,23,13.5,2.48,2.48,0,0,0,20.5,11Z"}),f("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)}),lD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("circle",{cx:"8",cy:"16",r:"2"}),f("circle",{cx:"16",cy:"16",r:"2"}),f("circle",{cx:"24",cy:"16",r:"2"}),t)}),cD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("circle",{cx:"16",cy:"8",r:"2"}),f("circle",{cx:"16",cy:"16",r:"2"}),f("circle",{cx:"16",cy:"24",r:"2"}),t)}),uD=F.forwardRef(function({children:t,size:e=16,...n},r){return e==="glyph"||e==="glyph"||e==="glyphpx"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 6 10",fill:"currentColor",...n},f("path",{d:"M0 5 5 0 5.7.7 1.4 5 5.7 9.3 5 10z"}),t):e===16||e==="16"||e==="16px"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},f("path",{d:"M5 8 10 3 10.7 3.7 6.4 8 10.7 12.3 10 13z"}),t):F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("path",{d:"M10 16 20 6 21.4 7.4 12.8 16 21.4 24.6 20 26z"}),t)}),dD=F.forwardRef(function({children:t,size:e=16,...n},r){return e==="glyph"||e==="glyph"||e==="glyphpx"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 6 10",fill:"currentColor",...n},f("path",{d:"M6 5 1 10 .3 9.3 4.6 5 .3.7 1 0z"}),t):e===16||e==="16"||e==="16px"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},f("path",{d:"M11 8 6 13 5.3 12.3 9.6 8 5.3 3.7 6 3z"}),t):F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("path",{d:"M22 16 12 26 10.6 24.6 19.2 16 10.6 7.4 12 6z"}),t)}),hD=F.forwardRef(function({children:t,size:e=16,...n},r){return e==="glyph"||e==="glyph"||e==="glyphpx"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10 6",fill:"currentColor",...n},f("path",{d:"M5 0 10 5 9.3 5.7 5 1.4.7 5.7 0 5z"}),t):e===16||e==="16"||e==="16px"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},f("path",{d:"M8 5 13 10 12.3 10.7 8 6.4 3.7 10.7 3 10z"}),t):F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("path",{d:"M16 10 26 20 24.6 21.4 16 12.8 7.4 21.4 6 20z"}),t)}),pD=F.forwardRef(function({children:t,size:e=16,...n},r){return e==="glyph"||e==="glyph"||e==="glyphpx"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10 6",fill:"currentColor",...n},f("path",{d:"M5 6 0 1 .7.3 5 4.6 9.3.3 10 1z"}),t):e===16||e==="16"||e==="16px"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},f("path",{d:"M8 11 3 6 3.7 5.3 8 9.6 12.3 5.3 13 6z"}),t):F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("path",{d:"M16 22 6 12 7.4 10.6 16 19.2 24.6 10.6 26 12z"}),t)}),fD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("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)}),mD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("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)}),ED=F.forwardRef(function({children:t,size:e=16,...n},r){return e===16||e==="16"||e==="16px"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},f("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"}),f("path",{d:"M13,12v2H3v-2H2v2l0,0c0,0.6,0.4,1,1,1h10c0.6,0,1-0.4,1-1l0,0v-2H13z"}),t):F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("path",{d:"M26,24v4H6V24H4v4H4a2,2,0,0,0,2,2H26a2,2,0,0,0,2-2h0V24Z"}),f("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)}),_D=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("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)}),gD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("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"}),f("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)}),AD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("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)}),SD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("path",{d:"M2 26H30V28H2z"}),f("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)}),vD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("path",{d:"M12 12H14V24H12z"}),f("path",{d:"M18 12H20V24H18z"}),f("path",{d:"M4,6V8H6V28a2,2,0,0,0,2,2H24a2,2,0,0,0,2-2V8h2V6ZM8,28V8H24V28Z"}),f("path",{d:"M12 2H20V4H12z"}),t)}),OD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("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)}),DD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("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)}),TD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("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"}),f("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)}),RD=F.forwardRef(function({children:t,size:e=16,...n},r){return e===16||e==="16"||e==="16px"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},f("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"}),f("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"}),f("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):F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("path",{d:"M17 22 17 14 13 14 13 16 15 16 15 22 12 22 12 24 20 24 20 22 17 22z"}),f("path",{d:"M16,8a1.5,1.5,0,1,0,1.5,1.5A1.5,1.5,0,0,0,16,8Z"}),f("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)}),yD=F.forwardRef(function({children:t,size:e=16,...n},r){return e===16||e==="16"||e==="16px"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},f("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):F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("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)}),ID=F.forwardRef(function({children:t,size:e=16,...n},r){return e===16||e==="16"||e==="16px"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},f("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):F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("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)}),CD=F.forwardRef(function({children:t,size:e=16,...n},r){return e===16||e==="16"||e==="16px"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},f("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):e===20||e==="20"||e==="20px"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",...n},f("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):e===24||e==="24"||e==="24px"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...n},f("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):F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("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)}),ND=F.forwardRef(function({children:t,size:e=16,...n},r){return e===16||e==="16"||e==="16px"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},f("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):F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("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)}),bD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("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"}),f("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)}),wD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("path",{d:"M23,14v3A7,7,0,0,1,9,17V14H7v3a9,9,0,0,0,8,8.94V28H11v2H21V28H17V25.94A9,9,0,0,0,25,17V14Z"}),f("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)}),kD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("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)}),LD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("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"}),f("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)}),MD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("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)});function B(t){const{type:e,className:n,...r}=t;return f(PD[e],{className:`t-icon ${n||""}`,...r})}const PD={checkmark:oD,emoji:sD,addEmoji:aD,search:F.forwardRef(function({children:t,size:e=16,...n},r){return e===16||e==="16"||e==="16px"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},f("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):F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("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)}),plus:F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("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)}),email:F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("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)}),horizontalDots:lD,verticalDots:cD,chevronLeft:uD,chevronRight:dD,chevronUp:hD,chevronDown:pD,arrowsVertical:gD,arrowUp:yD,arrowLeft:ID,arrowRight:CD,arrowDown:ND,close:fD,inProgress:mD,download:ED,attachment:_D,reply:AD,edit:SD,trash:vD,pin:OD,play:t=>f(DD,{viewBox:"-1 0 31 32",...t}),pause:TD,info:RD,send:F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("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:bD,microphone:wD,stop:kD,spinner:function(t){const e=`t-spin ${t.className||""}`;return f("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:f("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:LD,movie:MD};function pu(){return f(B,{type:"spinner","aria-label":J(ae().t$).LOADING,className:"t-loading-icon"})}const G_={"emoji-picker-element":"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/+esm","mpegts.js":"https://cdn.jsdelivr.net/npm/mpegts.js@1.7.3","opus-media-recorder-wasm":"https://cdn.jsdelivr.net/npm/opus-media-recorder@0.8.0/WebMOpusEncoder.wasm"};async function xD(t,e){if(typeof window=="undefined"||window.document===void 0)return new Promise(()=>{});try{const n=t!=null?t:Vr.emojiPickerTranslationUrl,r=G_["emoji-picker-element"],[i,o]=await Promise.all([kp(r),kp(n)]),s=e!=null?e:Vr.emojiDataUrl,a={...i,i18n:o.default,dataSource:s};return await new a.Database({dataSource:s}).ready(),a}catch(n){return kl.error("Failed to load emoji picker:",n),new Promise(()=>{})}}async function kp(t){return import(t).catch(()=>new Function("url","return import(url)")(t)).catch(()=>{throw new Error("Cannot dynamically import module in this environment")})}function fu(){const t=ae(),[e,n]=ee();return Wm(()=>{const r=t.translationData$.get();t.app$.get()&&t.currentUser$.get()&&r&&(function(i,o){const s=JSON.stringify([i,o]);if(s in ol)return ol[s];const a=xD(i,o);return ol[s]=a,a})(r.emojiPickerTranslationUrl,r.emojiDataUrl).then(i=>n({value:i}))},[]),e}const ol={};function ta(t){const{onClose:e,onEmojiSelected:n}=rS(),r=X(null),i=ae(),o=J(i.t$),s=fu();return z(()=>{if(!s)return;re.defined(r.current);const a=r.current,l=a.shadowRoot;(function(d,h){const p=document.createElement("style");p.textContent=h,d.appendChild(p)})(l,eD);const u=d=>{var p;const h=(p=d.detail.unicode)!=null?p:d.detail.name;n(h)};function c(d){d.pointerType==="mouse"&&(l.querySelector("section").dataset.hasMouse="true")}return a.addEventListener("emoji-click",u),a.addEventListener("pointermove",c,{once:!0}),a.i18n=s.value.i18n,()=>{a.removeEventListener("emoji-click",u),a.removeEventListener("pointermove",c)}},[s,n]),z(()=>{var a;s&&r.current&&!i.device$.isMobile.peek()&&((a=r.current.shadowRoot.getElementById("search"))==null||a.focus())},[s,i]),So(()=>e(),".t-emoji-picker"),f("div",s?{className:"t-emoji-picker",children:f("emoji-picker",{locale:o.locale,ref:r,class:t.colorScheme,"data-source":s.value.dataSource})}:{className:"t-emoji-picker","t-loading":"",children:f(pu,{})})}function mu({messageId:t,colorScheme:e}){const{closePopover:n}=jc(),r=li();return f("div",{className:"t-reaction-picker",children:f(nE.Provider,{value:{onClose:n,onEmojiSelected:i=>{r.addReaction(t,i),n()}},children:f(ta,{colorScheme:e})})})}function rc(){return rc=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},rc.apply(null,arguments)}function W_(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function ic(t,e){return ic=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},ic(t,e)}function X_(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,ic(t,e)}var Lp,Mp,sl,Pp,xp,Fp={exports:{}};function FD(){if(Pp)return sl;Pp=1;var t=Mp?Lp:(Mp=1,Lp="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");function e(){}function n(){}return n.resetWarningCache=e,sl=function(){function r(s,a,l,u,c,d){if(d!==t){var h=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 h.name="Invariant Violation",h}}function i(){return r}r.isRequired=r;var o={array:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:e};return o.PropTypes=o,o},sl}function Hp(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}xp||(xp=1,Fp.exports=FD()()),Fp.exports;const Up=!1,K_=F.createContext(null);var yi="unmounted",Xn="exited",Kn="entering",Mr="entered",oc="exiting",cn=(function(t){function e(r,i){var o;o=t.call(this,r,i)||this;var s,a=i&&!i.isMounting?r.enter:r.appear;return o.appearStatus=null,r.in?a?(s=Xn,o.appearStatus=Kn):s=Mr:s=r.unmountOnExit||r.mountOnEnter?yi:Xn,o.state={status:s},o.nextCallback=null,o}X_(e,t),e.getDerivedStateFromProps=function(r,i){return r.in&&i.status===yi?{status:Xn}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(r){var i=null;if(r!==this.props){var o=this.state.status;this.props.in?o!==Kn&&o!==Mr&&(i=Kn):o!==Kn&&o!==Mr||(i=oc)}this.updateStatus(!1,i)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var r,i,o,s=this.props.timeout;return r=i=o=s,s!=null&&typeof s!="number"&&(r=s.exit,i=s.enter,o=s.appear!==void 0?s.appear:i),{exit:r,enter:i,appear:o}},n.updateStatus=function(r,i){r===void 0&&(r=!1),i!==null?(this.cancelNextCallback(),i===Kn?this.performEnter(r):this.performExit()):this.props.unmountOnExit&&this.state.status===Xn&&this.setState({status:yi})},n.performEnter=function(r){var i=this,o=this.props.enter,s=this.context?this.context.isMounting:r,a=this.props.nodeRef?[s]:[F.findDOMNode(this),s],l=a[0],u=a[1],c=this.getTimeouts(),d=s?c.appear:c.enter;!r&&!o||Up?this.safeSetState({status:Mr},function(){i.props.onEntered(l)}):(this.props.onEnter(l,u),this.safeSetState({status:Kn},function(){i.props.onEntering(l,u),i.onTransitionEnd(d,function(){i.safeSetState({status:Mr},function(){i.props.onEntered(l,u)})})}))},n.performExit=function(){var r=this,i=this.props.exit,o=this.getTimeouts(),s=this.props.nodeRef?void 0:F.findDOMNode(this);i&&!Up?(this.props.onExit(s),this.safeSetState({status:oc},function(){r.props.onExiting(s),r.onTransitionEnd(o.exit,function(){r.safeSetState({status:Xn},function(){r.props.onExited(s)})})})):this.safeSetState({status:Xn},function(){r.props.onExited(s)})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(r,i){i=this.setNextCallback(i),this.setState(r,i)},n.setNextCallback=function(r){var i=this,o=!0;return this.nextCallback=function(s){o&&(o=!1,i.nextCallback=null,r(s))},this.nextCallback.cancel=function(){o=!1},this.nextCallback},n.onTransitionEnd=function(r,i){this.setNextCallback(i);var o=this.props.nodeRef?this.props.nodeRef.current:F.findDOMNode(this),s=r==null&&!this.props.addEndListener;if(o&&!s){if(this.props.addEndListener){var a=this.props.nodeRef?[this.nextCallback]:[o,this.nextCallback],l=a[0],u=a[1];this.props.addEndListener(l,u)}r!=null&&setTimeout(this.nextCallback,r)}else setTimeout(this.nextCallback,0)},n.render=function(){var r=this.state.status;if(r===yi)return null;var i=this.props,o=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var s=W_(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return F.createElement(K_.Provider,{value:null},typeof o=="function"?o(r,s):F.cloneElement(F.Children.only(o),s))},e})(F.Component);function wr(){}cn.contextType=K_,cn.propTypes={},cn.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:wr,onEntering:wr,onEntered:wr,onExit:wr,onExiting:wr,onExited:wr},cn.UNMOUNTED=yi,cn.EXITED=Xn,cn.ENTERING=Kn,cn.ENTERED=Mr,cn.EXITING=oc;var al=function(t,e){return t&&e&&e.split(" ").forEach(function(n){return i=n,void((r=t).classList?r.classList.remove(i):typeof r.className=="string"?r.className=Hp(r.className,i):r.setAttribute("class",Hp(r.className&&r.className.baseVal||"",i)));var r,i})},sc=(function(t){function e(){for(var r,i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return(r=t.call.apply(t,[this].concat(o))||this).appliedClasses={appear:{},enter:{},exit:{}},r.onEnter=function(a,l){var u=r.resolveArguments(a,l),c=u[0],d=u[1];r.removeClasses(c,"exit"),r.addClass(c,d?"appear":"enter","base"),r.props.onEnter&&r.props.onEnter(a,l)},r.onEntering=function(a,l){var u=r.resolveArguments(a,l),c=u[0],d=u[1]?"appear":"enter";r.addClass(c,d,"active"),r.props.onEntering&&r.props.onEntering(a,l)},r.onEntered=function(a,l){var u=r.resolveArguments(a,l),c=u[0],d=u[1]?"appear":"enter";r.removeClasses(c,d),r.addClass(c,d,"done"),r.props.onEntered&&r.props.onEntered(a,l)},r.onExit=function(a){var l=r.resolveArguments(a)[0];r.removeClasses(l,"appear"),r.removeClasses(l,"enter"),r.addClass(l,"exit","base"),r.props.onExit&&r.props.onExit(a)},r.onExiting=function(a){var l=r.resolveArguments(a)[0];r.addClass(l,"exit","active"),r.props.onExiting&&r.props.onExiting(a)},r.onExited=function(a){var l=r.resolveArguments(a)[0];r.removeClasses(l,"exit"),r.addClass(l,"exit","done"),r.props.onExited&&r.props.onExited(a)},r.resolveArguments=function(a,l){return r.props.nodeRef?[r.props.nodeRef.current,a]:[a,l]},r.getClassNames=function(a){var l=r.props.classNames,u=typeof l=="string",c=u?(u&&l?l+"-":"")+a:l[a];return{baseClassName:c,activeClassName:u?c+"-active":l[a+"Active"],doneClassName:u?c+"-done":l[a+"Done"]}},r}X_(e,t);var n=e.prototype;return n.addClass=function(r,i,o){var s=this.getClassNames(i)[o+"ClassName"],a=this.getClassNames("enter").doneClassName;i==="appear"&&o==="done"&&a&&(s+=" "+a),o==="active"&&r&&r.scrollTop,s&&(this.appliedClasses[i][o]=s,(function(l,u){l&&u&&u.split(" ").forEach(function(c){return h=c,void((d=l).classList?d.classList.add(h):(function(p,m){return p.classList?!!m&&p.classList.contains(m):(" "+(p.className.baseVal||p.className)+" ").indexOf(" "+m+" ")!==-1})(d,h)||(typeof d.className=="string"?d.className=d.className+" "+h:d.setAttribute("class",(d.className&&d.className.baseVal||"")+" "+h)));var d,h})})(r,s))},n.removeClasses=function(r,i){var o=this.appliedClasses[i],s=o.base,a=o.active,l=o.done;this.appliedClasses[i]={},s&&al(r,s),a&&al(r,a),l&&al(r,l)},n.render=function(){var r=this.props;r.classNames;var i=W_(r,["classNames"]);return F.createElement(cn,rc({},i,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},e})(F.Component);sc.defaultProps={classNames:""},sc.propTypes={};const HD={ltr:["ArrowLeft","ArrowRight"],rtl:["ArrowRight","ArrowLeft"],ttb:["ArrowUp","ArrowDown"]};function q_(t,{focused:e,setFocused:n,itemCount:r,dir:i,onConfirm:o,onSpace:s}){if(r===0)return!1;const a=c=>{c=Jl(0,c,r-1),n(c)},[l,u]=HD[i];switch(t){case l:return a(e-1),!0;case u:return a(e+1),!0;case" ":return!!s&&s();case"Enter":case"Tab":return o(),!0}return!1}function J_({focused:t,setFocused:e,buttonId:n}){We(()=>{var a;const s=n(t);s&&((a=document.getElementById(s))==null||a.scrollIntoView({block:"nearest"}))},[t,n]);const r=q(s=>{const a=s.currentTarget.dataset.index;e(+a)},[e]),i=Z(()=>({role:"menu","aria-activedescendant":n(t)}),[t,n]),o=q(s=>({onMouseMove:r,id:n(s),"data-index":s}),[r,n]);return{containerProps:i,itemProps:o}}function Eu(t){const[e,n]=ee([]),[r,i]=ee([]),[o,s]=ee(0),[a,l]=ee(0),u=fu(),c=Z(()=>(u==null?void 0:u.value)&&new u.value.Database({dataSource:u.value.dataSource}),[u]),d=ho(),h=J(d.state$.suggestEmojiQuery);z(()=>{c&&(h?(async function(){const A=await c.getPreferredSkinTone();l(A);let S=await c.getEmojiBySearchQuery(h);if(S=S.filter(v=>v.url||(function(D){return D.version<=oE&&!BD.includes(D.unicode)})(v)),(function(v,D){D.sort((y,R)=>{var T,C;const I=(T=y.shortcodes)==null?void 0:T.find(N=>N.startsWith(v)),O=(C=R.shortcodes)==null?void 0:C.find(N=>N.startsWith(v));return I&&!O?-1:!I&&O?1:I&&O?I.length-O.length:0})})(h.substring(1),S),s(0),n(S),S.length>0&&i(S),h.endsWith(":")){const v=h.slice(1,-1),D=S.find(y=>{var R;return(R=y.shortcodes)==null?void 0:R.includes(v)});D&&d.selectEmoji(Ii(D,A))}})():n([]))},[h,d,c]);const p=q(A=>{const S=e[A];return S&&"emoji-button-"+Ii(S,a)},[e,a]),{containerProps:m,itemProps:_}=J_({focused:o,setFocused:s,buttonId:p}),E=e.length>0;So(()=>d.closeSuggester(),".t-emoji-suggest-bar",E),z(()=>{if(E)return d.listenKeydown("emoji",A=>q_(A,{dir:"ltr",focused:o,setFocused:s,itemCount:e.length,onConfirm(){const S=e[o];re.defined(S),d.selectEmoji(Ii(S,a))}})),()=>{d.listenKeydown("emoji",void 0)};d.listenKeydown("emoji",void 0)},[d,e,o,E,a]);const g=X(null);return f(sc,{in:E,timeout:100,classNames:"slide",mountOnEnter:!0,unmountOnExit:!0,nodeRef:g,children:f("div",{className:"t-emoji-suggest-bar",ref:g,...m,children:r.map((A,S)=>f(UD,{emoji:A,skinTone:a,focused:S===o,onSelect:v=>d.selectEmoji(v),..._(S)},Ii(A,a)))})})}function Ii(t,e){return ac(t)?Z_(t,e):t.name}function ac(t){return!!t.unicode}function UD(t){var l;const{emoji:e,focused:n,skinTone:r,onSelect:i,...o}=t,s=((l=e.shortcodes)!=null?l:[]).join(", "),a=ac(e)?[e.unicode,s].join(", "):s;return f("button",{"t-focused":n?"":void 0,title:s,"aria-label":a,onClick:()=>i(Ii(e,r)),...o,children:ac(e)?Z_(e,r):null})}function Z_(t,e){var r,i;const n=(r=t.skins)==null?void 0:r.find(o=>o.tone===e);return(i=n==null?void 0:n.unicode)!=null?i:t.unicode}const BD=["🏻","🏼","🏽","🏾","🏿"],jD=["top","right","bottom","left"],Ds=Math.min,cr=Math.max,Ts=Math.round,Uo=Math.floor,Zt=t=>({x:t,y:t}),VD={left:"right",right:"left",bottom:"top",top:"bottom"},zD={start:"end",end:"start"};function Bp(t,e,n){return cr(t,Ds(e,n))}function vo(t,e){return typeof t=="function"?t(e):t}function Er(t){return t.split("-")[0]}function na(t){return t.split("-")[1]}function Q_(t){return t==="x"?"y":"x"}function eg(t){return t==="y"?"height":"width"}const $D=new Set(["top","bottom"]);function kn(t){return $D.has(Er(t))?"y":"x"}function tg(t){return Q_(kn(t))}function lc(t){return t.replace(/start|end/g,e=>zD[e])}const jp=["left","right"],Vp=["right","left"],YD=["top","bottom"],GD=["bottom","top"];function WD(t,e,n,r){const i=na(t);let o=(function(s,a,l){switch(s){case"top":case"bottom":return l?a?Vp:jp:a?jp:Vp;case"left":case"right":return a?YD:GD;default:return[]}})(Er(t),n==="start",r);return i&&(o=o.map(s=>s+"-"+i),e&&(o=o.concat(o.map(lc)))),o}function Bo(t){return t.replace(/left|right|bottom|top/g,e=>VD[e])}function Rs(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 zp(t,e,n){let{reference:r,floating:i}=t;const o=kn(e),s=tg(e),a=eg(s),l=Er(e),u=o==="y",c=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,h=r[a]/2-i[a]/2;let p;switch(l){case"top":p={x:c,y:r.y-i.height};break;case"bottom":p={x:c,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(na(e)){case"start":p[s]-=h*(n&&u?-1:1);break;case"end":p[s]+=h*(n&&u?-1:1)}return p}async function ys(t,e){var n;e===void 0&&(e={});const{x:r,y:i,platform:o,rects:s,elements:a,strategy:l}=t,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:h=!1,padding:p=0}=vo(e,t),m=(function(D){return typeof D!="number"?(function(y){return{top:0,right:0,bottom:0,left:0,...y}})(D):{top:D,right:D,bottom:D,left:D}})(p),_=a[h?d==="floating"?"reference":"floating":d],E=Rs(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(_)))==null||n?_:_.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),g=d==="floating"?{x:r,y:i,width:s.floating.width,height:s.floating.height}:s.reference,A=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),S=await(o.isElement==null?void 0:o.isElement(A))&&await(o.getScale==null?void 0:o.getScale(A))||{x:1,y:1},v=Rs(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:A,strategy:l}):g);return{top:(E.top-v.top+m.top)/S.y,bottom:(v.bottom-E.bottom+m.bottom)/S.y,left:(E.left-v.left+m.left)/S.x,right:(v.right-E.right+m.right)/S.x}}function $p(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Yp(t){return jD.some(e=>t[e]>=0)}const XD=new Set(["left","top"]);function ra(){return typeof window!="undefined"}function ii(t){return _u(t)?(t.nodeName||"").toLowerCase():"#document"}function Tt(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Qt(t){var e;return(e=(_u(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function _u(t){return!!ra()&&(t instanceof Node||t instanceof Tt(t).Node)}function Ht(t){return!!ra()&&(t instanceof Element||t instanceof Tt(t).Element)}function tn(t){return!!ra()&&(t instanceof HTMLElement||t instanceof Tt(t).HTMLElement)}function cc(t){return!(!ra()||typeof ShadowRoot=="undefined")&&(t instanceof ShadowRoot||t instanceof Tt(t).ShadowRoot)}const KD=new Set(["inline","contents"]);function eo(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=Ut(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!KD.has(i)}const qD=new Set(["table","td","th"]);function JD(t){return qD.has(ii(t))}const ZD=[":popover-open",":modal"];function Is(t){return ZD.some(e=>{try{return t.matches(e)}catch(n){return!1}})}const QD=["transform","translate","scale","rotate","perspective"],eT=["transform","translate","scale","rotate","perspective","filter"],tT=["paint","layout","strict","content"];function uc(t){const e=gu(),n=Ht(t)?Ut(t):t;return QD.some(r=>!!n[r]&&n[r]!=="none")||!!n.containerType&&n.containerType!=="normal"||!e&&!!n.backdropFilter&&n.backdropFilter!=="none"||!e&&!!n.filter&&n.filter!=="none"||eT.some(r=>(n.willChange||"").includes(r))||tT.some(r=>(n.contain||"").includes(r))}function gu(){return!(typeof CSS=="undefined"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const nT=new Set(["html","body","#document"]);function Gr(t){return nT.has(ii(t))}function Ut(t){return Tt(t).getComputedStyle(t)}function ia(t){return Ht(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Ln(t){if(ii(t)==="html")return t;const e=t.assignedSlot||t.parentNode||cc(t)&&t.host||Qt(t);return cc(e)?e.host:e}function ng(t){const e=Ln(t);return Gr(e)?t.ownerDocument?t.ownerDocument.body:t.body:tn(e)&&eo(e)?e:ng(e)}function to(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=ng(t),o=i===((r=t.ownerDocument)==null?void 0:r.body),s=Tt(i);if(o){const a=dc(s);return e.concat(s,s.visualViewport||[],eo(i)?i:[],a&&n?to(a):[])}return e.concat(i,to(i,[],n))}function dc(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function rg(t){const e=Ut(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=tn(t),o=i?t.offsetWidth:n,s=i?t.offsetHeight:r,a=Ts(n)!==o||Ts(r)!==s;return a&&(n=o,r=s),{width:n,height:r,$:a}}function Au(t){return Ht(t)?t:t.contextElement}function Wr(t){const e=Au(t);if(!tn(e))return Zt(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:o}=rg(e);let s=(o?Ts(n.width):n.width)/r,a=(o?Ts(n.height):n.height)/i;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const rT=Zt(0);function ig(t){const e=Tt(t);return gu()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:rT}function _r(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),o=Au(t);let s=Zt(1);e&&(r?Ht(r)&&(s=Wr(r)):s=Wr(t));const a=(function(h,p,m){return p===void 0&&(p=!1),!(!m||p&&m!==Tt(h))&&p})(o,n,r)?ig(o):Zt(0);let l=(i.left+a.x)/s.x,u=(i.top+a.y)/s.y,c=i.width/s.x,d=i.height/s.y;if(o){const h=Tt(o),p=r&&Ht(r)?Tt(r):r;let m=h,_=dc(m);for(;_&&r&&p!==m;){const E=Wr(_),g=_.getBoundingClientRect(),A=Ut(_),S=g.left+(_.clientLeft+parseFloat(A.paddingLeft))*E.x,v=g.top+(_.clientTop+parseFloat(A.paddingTop))*E.y;l*=E.x,u*=E.y,c*=E.x,d*=E.y,l+=S,u+=v,m=Tt(_),_=dc(m)}}return Rs({width:c,height:d,x:l,y:u})}function Cs(t,e){const n=ia(t).scrollLeft;return e?e.left+n:_r(Qt(t)).left+n}function og(t,e){const n=t.getBoundingClientRect();return{x:n.left+e.scrollLeft-Cs(t,n),y:n.top+e.scrollTop}}const iT=new Set(["absolute","fixed"]);function Gp(t,e,n){let r;if(e==="viewport")r=(function(i,o){const s=Tt(i),a=Qt(i),l=s.visualViewport;let u=a.clientWidth,c=a.clientHeight,d=0,h=0;if(l){u=l.width,c=l.height;const m=gu();(!m||m&&o==="fixed")&&(d=l.offsetLeft,h=l.offsetTop)}const p=Cs(a);if(p<=0){const m=a.ownerDocument,_=m.body,E=getComputedStyle(_),g=m.compatMode==="CSS1Compat"&&parseFloat(E.marginLeft)+parseFloat(E.marginRight)||0,A=Math.abs(a.clientWidth-_.clientWidth-g);A<=25&&(u-=A)}else p<=25&&(u+=p);return{width:u,height:c,x:d,y:h}})(t,n);else if(e==="document")r=(function(i){const o=Qt(i),s=ia(i),a=i.ownerDocument.body,l=cr(o.scrollWidth,o.clientWidth,a.scrollWidth,a.clientWidth),u=cr(o.scrollHeight,o.clientHeight,a.scrollHeight,a.clientHeight);let c=-s.scrollLeft+Cs(i);const d=-s.scrollTop;return Ut(a).direction==="rtl"&&(c+=cr(o.clientWidth,a.clientWidth)-l),{width:l,height:u,x:c,y:d}})(Qt(t));else if(Ht(e))r=(function(i,o){const s=_r(i,!0,o==="fixed"),a=s.top+i.clientTop,l=s.left+i.clientLeft,u=tn(i)?Wr(i):Zt(1);return{width:i.clientWidth*u.x,height:i.clientHeight*u.y,x:l*u.x,y:a*u.y}})(e,n);else{const i=ig(t);r={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return Rs(r)}function sg(t,e){const n=Ln(t);return!(n===e||!Ht(n)||Gr(n))&&(Ut(n).position==="fixed"||sg(n,e))}function oT(t,e,n){const r=tn(e),i=Qt(e),o=n==="fixed",s=_r(t,!0,o,e);let a={scrollLeft:0,scrollTop:0};const l=Zt(0);function u(){l.x=Cs(i)}if(r||!r&&!o)if((ii(e)!=="body"||eo(i))&&(a=ia(e)),r){const d=_r(e,!0,o,e);l.x=d.x+e.clientLeft,l.y=d.y+e.clientTop}else i&&u();o&&!r&&i&&u();const c=!i||r||o?Zt(0):og(i,a);return{x:s.left+a.scrollLeft-l.x-c.x,y:s.top+a.scrollTop-l.y-c.y,width:s.width,height:s.height}}function ll(t){return Ut(t).position==="static"}function Wp(t,e){if(!tn(t)||Ut(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return Qt(t)===n&&(n=n.ownerDocument.body),n}function Xp(t,e){const n=Tt(t);if(Is(t))return n;if(!tn(t)){let i=Ln(t);for(;i&&!Gr(i);){if(Ht(i)&&!ll(i))return i;i=Ln(i)}return n}let r=Wp(t,e);for(;r&&JD(r)&&ll(r);)r=Wp(r,e);return r&&Gr(r)&&ll(r)&&!uc(r)?n:r||(function(i){let o=Ln(i);for(;tn(o)&&!Gr(o);){if(uc(o))return o;if(Is(o))return null;o=Ln(o)}return null})(t)||n}const sT={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:r,strategy:i}=t;const o=i==="fixed",s=Qt(r),a=!!e&&Is(e.floating);if(r===s||a&&o)return n;let l={scrollLeft:0,scrollTop:0},u=Zt(1);const c=Zt(0),d=tn(r);if((d||!d&&!o)&&((ii(r)!=="body"||eo(s))&&(l=ia(r)),tn(r))){const p=_r(r);u=Wr(r),c.x=p.x+r.clientLeft,c.y=p.y+r.clientTop}const h=!s||d||o?Zt(0):og(s,l);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x+h.x,y:n.y*u.y-l.scrollTop*u.y+c.y+h.y}},getDocumentElement:Qt,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:r,strategy:i}=t;const o=n==="clippingAncestors"?Is(e)?[]:(function(u,c){const d=c.get(u);if(d)return d;let h=to(u,[],!1).filter(E=>Ht(E)&&ii(E)!=="body"),p=null;const m=Ut(u).position==="fixed";let _=m?Ln(u):u;for(;Ht(_)&&!Gr(_);){const E=Ut(_),g=uc(_);g||E.position!=="fixed"||(p=null),(m?!g&&!p:!g&&E.position==="static"&&p&&iT.has(p.position)||eo(_)&&!g&&sg(u,_))?h=h.filter(A=>A!==_):p=E,_=Ln(_)}return c.set(u,h),h})(e,this._c):[].concat(n),s=[...o,r],a=s[0],l=s.reduce((u,c)=>{const d=Gp(e,c,i);return u.top=cr(d.top,u.top),u.right=Ds(d.right,u.right),u.bottom=Ds(d.bottom,u.bottom),u.left=cr(d.left,u.left),u},Gp(e,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:Xp,getElementRects:async function(t){const e=this.getOffsetParent||Xp,n=this.getDimensions,r=await n(t.floating);return{reference:oT(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}=rg(t);return{width:e,height:n}},getScale:Wr,isElement:Ht,isRTL:function(t){return Ut(t).direction==="rtl"}};function Kp(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function ag(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=Au(t),c=i||o?[...u?to(u):[],...to(e)]:[];c.forEach(E=>{i&&E.addEventListener("scroll",n,{passive:!0}),o&&E.addEventListener("resize",n)});const d=u&&a?(function(E,g){let A,S=null;const v=Qt(E);function D(){var y;clearTimeout(A),(y=S)==null||y.disconnect(),S=null}return(function y(R,I){R===void 0&&(R=!1),I===void 0&&(I=1),D();const O=E.getBoundingClientRect(),{left:T,top:C,width:N,height:k}=O;if(R||g(),!N||!k)return;const b={rootMargin:-Uo(C)+"px "+-Uo(v.clientWidth-(T+N))+"px "+-Uo(v.clientHeight-(C+k))+"px "+-Uo(T)+"px",threshold:cr(0,Ds(1,I))||1};let L=!0;function x(M){const U=M[0].intersectionRatio;if(U!==I){if(!L)return y();U?y(!1,U):A=setTimeout(()=>{y(!1,1e-7)},1e3)}U!==1||Kp(O,E.getBoundingClientRect())||y(),L=!1}try{S=new IntersectionObserver(x,{...b,root:v.ownerDocument})}catch(M){S=new IntersectionObserver(x,b)}S.observe(E)})(!0),D})(u,n):null;let h,p=-1,m=null;s&&(m=new ResizeObserver(E=>{let[g]=E;g&&g.target===u&&m&&(m.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var A;(A=m)==null||A.observe(e)})),n()}),u&&!l&&m.observe(u),m.observe(e));let _=l?_r(t):null;return l&&(function E(){const g=_r(t);_&&!Kp(_,g)&&n(),_=g,h=requestAnimationFrame(E)})(),n(),()=>{var E;c.forEach(g=>{i&&g.removeEventListener("scroll",n),o&&g.removeEventListener("resize",n)}),d==null||d(),(E=m)==null||E.disconnect(),m=null,l&&cancelAnimationFrame(h)}}const aT=function(t){return t===void 0&&(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(u,c){const{placement:d,platform:h,elements:p}=u,m=await(h.isRTL==null?void 0:h.isRTL(p.floating)),_=Er(d),E=na(d),g=kn(d)==="y",A=XD.has(_)?-1:1,S=m&&g?-1:1,v=vo(c,u);let{mainAxis:D,crossAxis:y,alignmentAxis:R}=typeof v=="number"?{mainAxis:v,crossAxis:0,alignmentAxis:null}:{mainAxis:v.mainAxis||0,crossAxis:v.crossAxis||0,alignmentAxis:v.alignmentAxis};return E&&typeof R=="number"&&(y=E==="end"?-1*R:R),g?{x:y*S,y:D*A}:{x:D*A,y:y*S}})(e,t);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:s}}}}},lT=function(t){return t===void 0&&(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:E=>{let{x:g,y:A}=E;return{x:g,y:A}}},...l}=vo(t,e),u={x:n,y:r},c=await ys(e,l),d=kn(Er(i)),h=Q_(d);let p=u[h],m=u[d];if(o){const E=h==="y"?"bottom":"right";p=Bp(p+c[h==="y"?"top":"left"],p,p-c[E])}if(s){const E=d==="y"?"bottom":"right";m=Bp(m+c[d==="y"?"top":"left"],m,m-c[E])}const _=a.fn({...e,[h]:p,[d]:m});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[h]:o,[d]:s}}}}}},cT=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:i,middlewareData:o,rects:s,initialPlacement:a,platform:l,elements:u}=e,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:_=!0,...E}=vo(t,e);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const g=Er(i),A=kn(a),S=Er(a)===a,v=await(l.isRTL==null?void 0:l.isRTL(u.floating)),D=h||(S||!_?[Bo(a)]:(function(b){const L=Bo(b);return[lc(b),L,lc(L)]})(a)),y=m!=="none";!h&&y&&D.push(...WD(a,_,m,v));const R=[a,...D],I=await ys(e,E),O=[];let T=((r=o.flip)==null?void 0:r.overflows)||[];if(c&&O.push(I[g]),d){const b=(function(L,x,M){M===void 0&&(M=!1);const U=na(L),V=tg(L),W=eg(V);let $=V==="x"?U===(M?"end":"start")?"right":"left":U==="start"?"bottom":"top";return x.reference[W]>x.floating[W]&&($=Bo($)),[$,Bo($)]})(i,s,v);O.push(I[b[0]],I[b[1]])}if(T=[...T,{placement:i,overflows:O}],!O.every(b=>b<=0)){var C,N;const b=(((C=o.flip)==null?void 0:C.index)||0)+1,L=R[b];if(L&&(!(d==="alignment"&&A!==kn(L))||T.every(M=>kn(M.placement)!==A||M.overflows[0]>0)))return{data:{index:b,overflows:T},reset:{placement:L}};let x=(N=T.filter(M=>M.overflows[0]<=0).sort((M,U)=>M.overflows[1]-U.overflows[1])[0])==null?void 0:N.placement;if(!x)switch(p){case"bestFit":{var k;const M=(k=T.filter(U=>{if(y){const V=kn(U.placement);return V===A||V==="y"}return!0}).map(U=>[U.placement,U.overflows.filter(V=>V>0).reduce((V,W)=>V+W,0)]).sort((U,V)=>U[1]-V[1])[0])==null?void 0:k[0];M&&(x=M);break}case"initialPlacement":x=a}if(i!==x)return{reset:{placement:x}}}return{}}}},uT=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:r="referenceHidden",...i}=vo(t,e);switch(r){case"referenceHidden":{const o=$p(await ys(e,{...i,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Yp(o)}}}case"escaped":{const o=$p(await ys(e,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:o,escaped:Yp(o)}}}default:return{}}}}},dT=(t,e,n)=>{const r=new Map,i={platform:sT,...n},o={...i.platform,_c:r};return(async(s,a,l)=>{const{placement:u="bottom",strategy:c="absolute",middleware:d=[],platform:h}=l,p=d.filter(Boolean),m=await(h.isRTL==null?void 0:h.isRTL(a));let _=await h.getElementRects({reference:s,floating:a,strategy:c}),{x:E,y:g}=zp(_,u,m),A=u,S={},v=0;for(let D=0;D<p.length;D++){const{name:y,fn:R}=p[D],{x:I,y:O,data:T,reset:C}=await R({x:E,y:g,initialPlacement:u,placement:A,strategy:c,middlewareData:S,rects:_,platform:h,elements:{reference:s,floating:a}});E=I!=null?I:E,g=O!=null?O:g,S={...S,[y]:{...S[y],...T}},C&&v<=50&&(v++,typeof C=="object"&&(C.placement&&(A=C.placement),C.rects&&(_=C.rects===!0?await h.getElementRects({reference:s,floating:a,strategy:c}):C.rects),{x:E,y:g}=zp(_,A,m)),D=-1)}return{x:E,y:g,placement:A,strategy:c,middlewareData:S}})(t,e,{...i,platform:o})};var Zo=typeof document!="undefined"?We:function(){};function Ns(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!Ns(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;r--!==0;)if(!{}.hasOwnProperty.call(e,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if((o!=="_owner"||!t.$$typeof)&&!Ns(t[o],e[o]))return!1}return!0}return t!=t&&e!=e}function lg(t){return typeof window=="undefined"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function qp(t,e){const n=lg(t);return Math.round(e*n)/n}function cl(t){const e=X(t);return Zo(()=>{e.current=t}),e}function cg(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:s}={},transform:a=!0,whileElementsMounted:l,open:u}=t,[c,d]=ee({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[h,p]=ee(r);Ns(h,r)||p(r);const[m,_]=ee(null),[E,g]=ee(null),A=q(U=>{U!==y.current&&(y.current=U,_(U))},[]),S=q(U=>{U!==R.current&&(R.current=U,g(U))},[]),v=o||m,D=s||E,y=X(null),R=X(null),I=X(c),O=l!=null,T=cl(l),C=cl(i),N=cl(u),k=q(()=>{if(!y.current||!R.current)return;const U={placement:e,strategy:n,middleware:h};C.current&&(U.platform=C.current),dT(y.current,R.current,U).then(V=>{const W={...V,isPositioned:N.current!==!1};b.current&&!Ns(I.current,W)&&(I.current=W,Fs(()=>{d(W)}))})},[h,e,n,C,N]);Zo(()=>{u===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,d(U=>({...U,isPositioned:!1})))},[u]);const b=X(!1);Zo(()=>(b.current=!0,()=>{b.current=!1}),[]),Zo(()=>{if(v&&(y.current=v),D&&(R.current=D),v&&D){if(T.current)return T.current(v,D,k);k()}},[v,D,k,T,O]);const L=Z(()=>({reference:y,floating:R,setReference:A,setFloating:S}),[A,S]),x=Z(()=>({reference:v,floating:D}),[v,D]),M=Z(()=>{const U={position:n,left:0,top:0};if(!x.floating)return U;const V=qp(x.floating,c.x),W=qp(x.floating,c.y);return a?{...U,transform:"translate("+V+"px, "+W+"px)",...lg(x.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:V,top:W}},[n,a,x.floating,c.x,c.y]);return Z(()=>({...c,update:k,refs:L,elements:x,floatingStyles:M}),[c,k,L,x,M])}const hT=(t,e)=>({...lT(t),options:[t,e]}),ug=(t,e)=>({...cT(t),options:[t,e]}),pT=(t,e)=>({...uT(t),options:[t,e]});var dg=["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])"],bs=dg.join(","),hg=typeof Element=="undefined",gr=hg?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Qo=!hg&&Element.prototype.getRootNode?function(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}:function(t){return t==null?void 0:t.ownerDocument},no=function(t,e){var n;e===void 0&&(e=!0);var r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"inert");return r===""||r==="true"||e&&t&&no(t.parentNode)},pg=function(t,e,n){if(no(t))return[];var r=Array.prototype.slice.apply(t.querySelectorAll(bs));return e&&gr.call(t,bs)&&r.unshift(t),r=r.filter(n)},ws=function(t,e,n){for(var r=[],i=Array.from(t);i.length;){var o=i.shift();if(!no(o,!1))if(o.tagName==="SLOT"){var s=o.assignedElements(),a=s.length?s:o.children,l=ws(a,!0,n);n.flatten?r.push.apply(r,l):r.push({scopeParent:o,candidates:l})}else{gr.call(o,bs)&&n.filter(o)&&(e||!t.includes(o))&&r.push(o);var u=o.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(o),c=!no(u,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(o));if(u&&c){var d=ws(u===!0?o.children:u.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},fg=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Cn=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||(function(e){var n,r=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"contenteditable");return r===""||r==="true"})(t))&&!fg(t)?0:t.tabIndex},fT=function(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex},mg=function(t){return t.tagName==="INPUT"},mT=function(t){return(function(e){return mg(e)&&e.type==="radio"})(t)&&!(function(e){if(!e.name)return!0;var n,r=e.form||Qo(e),i=function(s){return r.querySelectorAll('input[type="radio"][name="'+s+'"]')};if(typeof window!="undefined"&&window.CSS!==void 0&&typeof window.CSS.escape=="function")n=i(window.CSS.escape(e.name));else try{n=i(e.name)}catch(s){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",s.message),!1}var o=(function(s,a){for(var l=0;l<s.length;l++)if(s[l].checked&&s[l].form===a)return s[l]})(n,e.form);return!o||o===e})(t)},Jp=function(t){var e=t.getBoundingClientRect(),n=e.width,r=e.height;return n===0&&r===0},ET=function(t,e){var n=e.displayCheck,r=e.getShadowRoot;if(n==="full-native"&&"checkVisibility"in t)return!t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if(getComputedStyle(t).visibility==="hidden")return!0;var i=gr.call(t,"details>summary:first-of-type")?t.parentElement:t;if(gr.call(i,"details:not([open]) *"))return!0;if(n&&n!=="full"&&n!=="full-native"&&n!=="legacy-full"){if(n==="non-zero-area")return Jp(t)}else{if(typeof r=="function"){for(var o=t;t;){var s=t.parentElement,a=Qo(t);if(s&&!s.shadowRoot&&r(s)===!0)return Jp(t);t=t.assignedSlot?t.assignedSlot:s||a===t.ownerDocument?s:a.host}t=o}if((function(l){var u,c,d,h,p=l&&Qo(l),m=(u=p)===null||u===void 0?void 0:u.host,_=!1;if(p&&p!==l)for(_=!!((c=m)!==null&&c!==void 0&&(d=c.ownerDocument)!==null&&d!==void 0&&d.contains(m)||l!=null&&(h=l.ownerDocument)!==null&&h!==void 0&&h.contains(l));!_&&m;){var E,g,A;_=!((g=m=(E=p=Qo(m))===null||E===void 0?void 0:E.host)===null||g===void 0||(A=g.ownerDocument)===null||A===void 0||!A.contains(m))}return _})(t))return!t.getClientRects().length;if(n!=="legacy-full")return!0}return!1},ks=function(t,e){return!(e.disabled||no(e)||(function(n){return mg(n)&&n.type==="hidden"})(e)||ET(e,t)||(function(n){return n.tagName==="DETAILS"&&Array.prototype.slice.apply(n.children).some(function(r){return r.tagName==="SUMMARY"})})(e)||(function(n){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(n.tagName))for(var r=n.parentElement;r;){if(r.tagName==="FIELDSET"&&r.disabled){for(var i=0;i<r.children.length;i++){var o=r.children.item(i);if(o.tagName==="LEGEND")return!!gr.call(r,"fieldset[disabled] *")||!o.contains(n)}return!0}r=r.parentElement}return!1})(e))},hc=function(t,e){return!(mT(e)||Cn(e)<0||!ks(t,e))},_T=function(t){var e=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(e)||e>=0)},Eg=function(t){var e=[],n=[];return t.forEach(function(r,i){var o=!!r.scopeParent,s=o?r.scopeParent:r,a=(function(u,c){var d=Cn(u);return d<0&&c&&!fg(u)?0:d})(s,o),l=o?Eg(r.candidates):s;a===0?o?e.push.apply(e,l):e.push(s):n.push({documentOrder:i,tabIndex:a,item:r,isScope:o,content:l})}),n.sort(fT).reduce(function(r,i){return i.isScope?r.push.apply(r,i.content):r.push(i.content),r},[]).concat(e)},oa=function(t,e){var n;return n=(e=e||{}).getShadowRoot?ws([t],e.includeContainer,{filter:hc.bind(null,e),flatten:!1,getShadowRoot:e.getShadowRoot,shadowRootFilter:_T}):pg(t,e.includeContainer,hc.bind(null,e)),Eg(n)},Su=function(t,e){return(e=e||{}).getShadowRoot?ws([t],e.includeContainer,{filter:ks.bind(null,e),flatten:!0,getShadowRoot:e.getShadowRoot}):pg(t,e.includeContainer,ks.bind(null,e))},qn=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return gr.call(t,bs)!==!1&&hc(e,t)},gT=dg.concat("iframe").join(","),es=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return gr.call(t,gT)!==!1&&ks(e,t)};const AT=Object.freeze(Object.defineProperty({__proto__:null,focusable:Su,getTabIndex:Cn,isFocusable:es,isTabbable:qn,tabbable:oa},Symbol.toStringTag,{value:"Module"}));function pc(t){return(t==null?void 0:t.ownerDocument)||document}var xi=typeof document!="undefined"?We:function(){};const _g=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Zp(t,e){const n=oa(t,_g()),r=n.length;if(r===0)return;const i=(function(s){let a=s.activeElement;for(;((l=a)==null||(l=l.shadowRoot)==null?void 0:l.activeElement)!=null;){var l;a=a.shadowRoot.activeElement}return a})(pc(t)),o=n.indexOf(i);return n[o===-1?e===1?0:r-1:o+e]}function ul(t,e){const n=e||t.currentTarget,r=t.relatedTarget;return!r||!(function(i,o){if(!i||!o)return!1;const s=o.getRootNode==null?void 0:o.getRootNode();if(i.contains(o))return!0;if(s&&cc(s)){let a=o;for(;a;){if(i===a)return!0;a=a.parentNode||a.host}}return!1})(n,r)}function ST(t){oa(t,_g()).forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")})}function Qp(t){t.querySelectorAll("[data-tabindex]").forEach(e=>{const n=e.dataset.tabindex;delete e.dataset.tabindex,n?e.setAttribute("tabindex",n):e.removeAttribute("tabindex")})}const vT={...bc};let ef=!1,OT=0;const tf=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+OT++,DT=vT.useId||function(){const[t,e]=ee(()=>ef?tf():void 0);return xi(()=>{t==null&&e(tf())},[]),z(()=>{ef=!0},[]),t};function gg(t){return"data-floating-ui-"+t}const Ag={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},nf=_t(function(t,e){const[n,r]=ee();return xi(()=>{/apple/i.test(navigator.vendor)&&r("button")},[]),f("span",{...t,ref:e,tabIndex:0,role:n,"aria-hidden":!n||void 0,[gg("focus-guard")]:"",style:Ag})}),Sg=si(null),rf=gg("portal");function TT(t){const{children:e,id:n,root:r,preserveTabOrder:i=!0}=t,o=(function(_){_===void 0&&(_={});const{id:E,root:g}=_,A=DT(),S=RT(),[v,D]=ee(null),y=X(null);return xi(()=>()=>{v==null||v.remove(),queueMicrotask(()=>{y.current=null})},[v]),xi(()=>{if(!A||y.current)return;const R=E?document.getElementById(E):null;if(!R)return;const I=document.createElement("div");I.id=A,I.setAttribute(rf,""),R.appendChild(I),y.current=I,D(I)},[E,A]),xi(()=>{if(g===null||!A||y.current)return;let R=g||(S==null?void 0:S.portalNode);R&&!_u(R)&&(R=R.current),R=R||document.body;let I=null;E&&(I=document.createElement("div"),I.id=E,R.appendChild(I));const O=document.createElement("div");O.id=A,O.setAttribute(rf,""),R=I||R,R.appendChild(O),y.current=O,D(O)},[E,g,A,S]),v})({id:n,root:r}),[s,a]=ee(null),l=X(null),u=X(null),c=X(null),d=X(null),h=s==null?void 0:s.modal,p=s==null?void 0:s.open,m=!!s&&!s.modal&&s.open&&i&&!(!r&&!o);return z(()=>{if(o&&i&&!h)return o.addEventListener("focusin",_,!0),o.addEventListener("focusout",_,!0),()=>{o.removeEventListener("focusin",_,!0),o.removeEventListener("focusout",_,!0)};function _(E){o&&ul(E)&&(E.type==="focusin"?Qp:ST)(o)}},[o,i,h]),z(()=>{o&&(p||Qp(o))},[p,o]),f(Sg.Provider,{value:Z(()=>({preserveTabOrder:i,beforeOutsideRef:l,afterOutsideRef:u,beforeInsideRef:c,afterInsideRef:d,portalNode:o,setFocusManagerState:a}),[i,o]),children:[m&&o&&f(nf,{"data-type":"outside",ref:l,onFocus:_=>{if(ul(_,o)){var E;(E=c.current)==null||E.focus()}else{const A=s?s.domReference:null,S=Zp(pc(g=A).body,-1)||g;S==null||S.focus()}var g}}),m&&o&&f("span",{"aria-owns":o.id,style:Ag}),o&&yc(e,o),m&&o&&f(nf,{"data-type":"outside",ref:u,onFocus:_=>{if(ul(_,o)){var E;(E=d.current)==null||E.focus()}else{const A=s?s.domReference:null,S=Zp(pc(g=A).body,1)||g;S==null||S.focus(),s!=null&&s.closeOnFocusOut&&(s==null||s.onOpenChange(!1,_.nativeEvent,"focus-out"))}var g}})]})}const RT=()=>Sr(Sg);var jo={exports:{}};function fc(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function of(t,e){var n=typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=vg(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(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
97
- In 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 l=n.next();return s=l.done,l},e:function(l){a=!0,o=l},f:function(){try{s||n.return==null||n.return()}finally{if(a)throw o}}}}function yT(t,e,n){return(e=(function(r){var i=(function(o,s){if(typeof o!="object"||!o)return o;var a=o[Symbol.toPrimitive];if(a!==void 0){var l=a.call(o,s);if(typeof l!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(s==="string"?String:Number)(o)})(r,"string");return typeof i=="symbol"?i:i+""})(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function sf(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function af(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?sf(Object(n),!0).forEach(function(r){yT(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):sf(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function IT(t){return(function(e){if(Array.isArray(e))return fc(e)})(t)||(function(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)})(t)||vg(t)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
98
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function vg(t,e){if(t){if(typeof t=="string")return fc(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?fc(t,e):void 0}}var hn={getActiveTrap:function(t){return(t==null?void 0:t.length)>0?t[t.length-1]:null},activateTrap:function(t,e){e!==hn.getActiveTrap(t)&&hn.pauseTrap(t);var n=t.indexOf(e);n===-1||t.splice(n,1),t.push(e)},deactivateTrap:function(t,e){var n=t.indexOf(e);n!==-1&&t.splice(n,1),hn.unpauseTrap(t)},pauseTrap:function(t){var e=hn.getActiveTrap(t);e==null||e._setPausedState(!0)},unpauseTrap:function(t){var e=hn.getActiveTrap(t);e&&!e._isManuallyPaused()&&e._setPausedState(!1)}},Fi=function(t){return(t==null?void 0:t.key)==="Tab"||(t==null?void 0:t.keyCode)===9},CT=function(t){return Fi(t)&&!t.shiftKey},NT=function(t){return Fi(t)&&t.shiftKey},lf=function(t){return setTimeout(t,0)},Si=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 typeof t=="function"?t.apply(void 0,n):t},Vo=function(t){return t.target.shadowRoot&&typeof t.composedPath=="function"?t.composedPath()[0]:t.target},bT=[];const wT=Object.freeze(Object.defineProperty({__proto__:null,createFocusTrap:function(t,e){var n,r=(e==null?void 0:e.document)||document,i=(e==null?void 0:e.trapStack)||bT,o=af({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isolateSubtrees:!1,isKeyForward:CT,isKeyBackward:NT},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(O,T,C){return O&&O[T]!==void 0?O[T]:o[C||T]},l=function(O,T){var C=typeof(T==null?void 0:T.composedPath)=="function"?T.composedPath():void 0;return s.containerGroups.findIndex(function(N){var k=N.container,b=N.tabbableNodes;return k.contains(O)||(C==null?void 0:C.includes(k))||b.find(function(L){return L===O})})},u=function(O){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},C=T.hasFallback,N=C!==void 0&&C,k=T.params,b=k===void 0?[]:k,L=o[O];if(typeof L=="function"&&(L=L.apply(void 0,IT(b))),L===!0&&(L=void 0),!L){if(L===void 0||L===!1)return L;throw new Error("`".concat(O,"` was specified but was not a node, or did not return a node"))}var x=L;if(typeof L=="string"){try{x=r.querySelector(L)}catch(M){throw new Error("`".concat(O,'` appears to be an invalid selector; error="').concat(M.message,'"'))}if(!x&&!N)throw new Error("`".concat(O,"` as selector refers to no known node"))}return x},c=function(){var O=u("initialFocus",{hasFallback:!0});if(O===!1)return!1;if(O===void 0||O&&!es(O,o.tabbableOptions))if(l(r.activeElement)>=0)O=r.activeElement;else{var T=s.tabbableGroups[0];O=T&&T.firstTabbableNode||u("fallbackFocus")}else O===null&&(O=u("fallbackFocus"));if(!O)throw new Error("Your focus-trap needs to have at least one focusable element");return O},d=function(){if(s.containerGroups=s.containers.map(function(O){var T=oa(O,o.tabbableOptions),C=Su(O,o.tabbableOptions),N=T.length>0?T[0]:void 0,k=T.length>0?T[T.length-1]:void 0,b=C.find(function(M){return qn(M)}),L=C.slice().reverse().find(function(M){return qn(M)}),x=!!T.find(function(M){return Cn(M)>0});return{container:O,tabbableNodes:T,focusableNodes:C,posTabIndexesFound:x,firstTabbableNode:N,lastTabbableNode:k,firstDomTabbableNode:b,lastDomTabbableNode:L,nextTabbableNode:function(M){var U=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],V=T.indexOf(M);return V<0?U?C.slice(C.indexOf(M)+1).find(function(W){return qn(W)}):C.slice(0,C.indexOf(M)).reverse().find(function(W){return qn(W)}):T[V+(U?1:-1)]}}}),s.tabbableGroups=s.containerGroups.filter(function(O){return O.tabbableNodes.length>0}),s.tabbableGroups.length<=0&&!u("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(O){return O.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.")},h=function(O){var T=O.activeElement;if(T)return T.shadowRoot&&T.shadowRoot.activeElement!==null?h(T.shadowRoot):T},p=function(O){O!==!1&&O!==h(document)&&(O&&O.focus?(O.focus({preventScroll:!!o.preventScroll}),s.mostRecentlyFocusedNode=O,(function(T){return T.tagName&&T.tagName.toLowerCase()==="input"&&typeof T.select=="function"})(O)&&O.select()):p(c()))},m=function(O){var T=u("setReturnFocus",{params:[O]});return T||T!==!1&&O},_=function(O){var T=O.target,C=O.event,N=O.isBackward,k=N!==void 0&&N;T=T||Vo(C),d();var b=null;if(s.tabbableGroups.length>0){var L=l(T,C),x=L>=0?s.containerGroups[L]:void 0;if(L<0)b=k?s.tabbableGroups[s.tabbableGroups.length-1].lastTabbableNode:s.tabbableGroups[0].firstTabbableNode;else if(k){var M=s.tabbableGroups.findIndex(function(le){var ce=le.firstTabbableNode;return T===ce});if(M<0&&(x.container===T||es(T,o.tabbableOptions)&&!qn(T,o.tabbableOptions)&&!x.nextTabbableNode(T,!1))&&(M=L),M>=0){var U=M===0?s.tabbableGroups.length-1:M-1,V=s.tabbableGroups[U];b=Cn(T)>=0?V.lastTabbableNode:V.lastDomTabbableNode}else Fi(C)||(b=x.nextTabbableNode(T,!1))}else{var W=s.tabbableGroups.findIndex(function(le){var ce=le.lastTabbableNode;return T===ce});if(W<0&&(x.container===T||es(T,o.tabbableOptions)&&!qn(T,o.tabbableOptions)&&!x.nextTabbableNode(T))&&(W=L),W>=0){var $=W===s.tabbableGroups.length-1?0:W+1,oe=s.tabbableGroups[$];b=Cn(T)>=0?oe.firstTabbableNode:oe.firstDomTabbableNode}else Fi(C)||(b=x.nextTabbableNode(T))}}else b=u("fallbackFocus");return b},E=function(O){var T=Vo(O);l(T,O)>=0||(Si(o.clickOutsideDeactivates,O)?n.deactivate({returnFocus:o.returnFocusOnDeactivate}):Si(o.allowOutsideClick,O)||O.preventDefault())},g=function(O){var T=Vo(O),C=l(T,O)>=0;if(C||T instanceof Document)C&&(s.mostRecentlyFocusedNode=T);else{var N;O.stopImmediatePropagation();var k=!0;if(s.mostRecentlyFocusedNode)if(Cn(s.mostRecentlyFocusedNode)>0){var b=l(s.mostRecentlyFocusedNode),L=s.containerGroups[b].tabbableNodes;if(L.length>0){var x=L.findIndex(function(M){return M===s.mostRecentlyFocusedNode});x>=0&&(o.isKeyForward(s.recentNavEvent)?x+1<L.length&&(N=L[x+1],k=!1):x-1>=0&&(N=L[x-1],k=!1))}}else s.containerGroups.some(function(M){return M.tabbableNodes.some(function(U){return Cn(U)>0})})||(k=!1);else k=!1;k&&(N=_({target:s.mostRecentlyFocusedNode,isBackward:o.isKeyBackward(s.recentNavEvent)})),p(N||s.mostRecentlyFocusedNode||c())}s.recentNavEvent=void 0},A=function(O){(o.isKeyForward(O)||o.isKeyBackward(O))&&(function(T){var C=arguments.length>1&&arguments[1]!==void 0&&arguments[1];s.recentNavEvent=T;var N=_({event:T,isBackward:C});N&&(Fi(T)&&T.preventDefault(),p(N))})(O,o.isKeyBackward(O))},S=function(O){(function(T){return(T==null?void 0:T.key)==="Escape"||(T==null?void 0:T.key)==="Esc"||(T==null?void 0:T.keyCode)===27})(O)&&Si(o.escapeDeactivates,O)!==!1&&(O.preventDefault(),n.deactivate())},v=function(O){var T=Vo(O);l(T,O)>=0||Si(o.clickOutsideDeactivates,O)||Si(o.allowOutsideClick,O)||(O.preventDefault(),O.stopImmediatePropagation())},D=function(){if(s.active)return hn.activateTrap(i,n),s.delayInitialFocusTimer=o.delayInitialFocus?lf(function(){p(c())}):p(c()),r.addEventListener("focusin",g,!0),r.addEventListener("mousedown",E,{capture:!0,passive:!1}),r.addEventListener("touchstart",E,{capture:!0,passive:!1}),r.addEventListener("click",v,{capture:!0,passive:!1}),r.addEventListener("keydown",A,{capture:!0,passive:!1}),r.addEventListener("keydown",S),n},y=function(){if(s.active)return r.removeEventListener("focusin",g,!0),r.removeEventListener("mousedown",E,!0),r.removeEventListener("touchstart",E,!0),r.removeEventListener("click",v,!0),r.removeEventListener("keydown",A,!0),r.removeEventListener("keydown",S),n},R=typeof window!="undefined"&&"MutationObserver"in window?new MutationObserver(function(O){O.some(function(T){return Array.from(T.removedNodes).some(function(C){return C===s.mostRecentlyFocusedNode})})&&p(c())}):void 0,I=function(){R&&(R.disconnect(),s.active&&!s.paused&&s.containers.map(function(O){R.observe(O,{subtree:!0,childList:!0})}))};return n={get active(){return s.active},get paused(){return s.paused},activate:function(O){if(s.active)return this;var T=a(O,"onActivate"),C=a(O,"onPostActivate"),N=a(O,"checkCanFocusTrap"),k=hn.getActiveTrap(i),b=!1;k&&!k.paused&&(k._setSubtreeIsolation(!1),b=!0);try{N||d(),s.active=!0,s.paused=!1,s.nodeFocusedBeforeActivation=h(r),T==null||T();var L=function(){N&&d(),D(),I(),o.isolateSubtrees&&n._setSubtreeIsolation(!0),C==null||C()};if(N)return N(s.containers.concat()).then(L,L),this;L()}catch(x){throw k===hn.getActiveTrap(i)&&b&&k._setSubtreeIsolation(!0),x}return this},deactivate:function(O){if(!s.active)return this;var T=af({onDeactivate:o.onDeactivate,onPostDeactivate:o.onPostDeactivate,checkCanReturnFocus:o.checkCanReturnFocus},O);clearTimeout(s.delayInitialFocusTimer),s.delayInitialFocusTimer=void 0,s.paused||n._setSubtreeIsolation(!1),s.alreadyInert.clear(),y(),s.active=!1,s.paused=!1,I(),hn.deactivateTrap(i,n);var C=a(T,"onDeactivate"),N=a(T,"onPostDeactivate"),k=a(T,"checkCanReturnFocus"),b=a(T,"returnFocus","returnFocusOnDeactivate");C==null||C();var L=function(){lf(function(){b&&p(m(s.nodeFocusedBeforeActivation)),N==null||N()})};return b&&k?(k(m(s.nodeFocusedBeforeActivation)).then(L,L),this):(L(),this)},pause:function(O){return s.active?(s.manuallyPaused=!0,this._setPausedState(!0,O)):this},unpause:function(O){return s.active?(s.manuallyPaused=!1,i[i.length-1]!==this?this:this._setPausedState(!1,O)):this},updateContainerElements:function(O){var T=[].concat(O).filter(Boolean);return s.containers=T.map(function(C){return typeof C=="string"?r.querySelector(C):C}),o.isolateSubtrees&&(function(C){s.active&&!s.paused&&n._setSubtreeIsolation(!1),s.adjacentElements.clear(),s.alreadyInert.clear();var N,k=new Set,b=new Set,L=of(C);try{for(L.s();!(N=L.n()).done;){var x=N.value;k.add(x);for(var M=typeof ShadowRoot!="undefined"&&x.getRootNode()instanceof ShadowRoot,U=x;U;){k.add(U);var V=U.parentElement,W=[];V?W=V.children:!V&&M&&(W=U.getRootNode().children,V=U.getRootNode().host,M=typeof ShadowRoot!="undefined"&&V.getRootNode()instanceof ShadowRoot);var $,oe=of(W);try{for(oe.s();!($=oe.n()).done;){var le=$.value;b.add(le)}}catch(ce){oe.e(ce)}finally{oe.f()}U=V}}}catch(ce){L.e(ce)}finally{L.f()}k.forEach(function(ce){b.delete(ce)}),s.adjacentElements=b})(s.containers),s.active&&(d(),o.isolateSubtrees&&!s.paused&&n._setSubtreeIsolation(!0)),I(),this}},Object.defineProperties(n,{_isManuallyPaused:{value:function(){return s.manuallyPaused}},_setPausedState:{value:function(O,T){if(s.paused===O)return this;if(s.paused=O,O){var C=a(T,"onPause"),N=a(T,"onPostPause");C==null||C(),y(),I(),n._setSubtreeIsolation(!1),N==null||N()}else{var k=a(T,"onUnpause"),b=a(T,"onPostUnpause");k==null||k(),n._setSubtreeIsolation(!0),d(),D(),I(),b==null||b()}return this}},_setSubtreeIsolation:{value:function(O){o.isolateSubtrees&&s.adjacentElements.forEach(function(T){O?((T.inert||T.hasAttribute("inert"))&&s.alreadyInert.add(T),T.inert=!0):s.alreadyInert.has(T)||(T.inert=!1)})}}}),n.updateContainerElements(t),n}},Symbol.toStringTag,{value:"Module"})),kT=Uc(wT),LT=Uc(AT);var cf,MT=(function(){if(cf)return jo.exports;function t(m){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(_){return typeof _}:function(_){return _&&typeof Symbol=="function"&&_.constructor===Symbol&&_!==Symbol.prototype?"symbol":typeof _},t(m)}var e,n;function r(m,_,E){return _&&(function(g,A){for(var S=0;S<A.length;S++){var v=A[S];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(g,l(v.key),v)}})(m.prototype,_),Object.defineProperty(m,"prototype",{writable:!1}),m}function i(m,_,E){return _=s(_),(function(g,A){if(A&&(t(A)=="object"||typeof A=="function"))return A;if(A!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(S){if(S===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return S})(g)})(m,o()?Reflect.construct(_,E||[],s(m).constructor):_.apply(m,E))}function o(){try{var m=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(_){}return(o=function(){return!!m})()}function s(m){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(_){return _.__proto__||Object.getPrototypeOf(_)},s(m)}function a(m,_){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(E,g){return E.__proto__=g,E},a(m,_)}function l(m){var _=(function(E,g){if(t(E)!="object"||!E)return E;var A=E[Symbol.toPrimitive];if(A!==void 0){var S=A.call(E,g);if(t(S)!="object")return S;throw new TypeError("@@toPrimitive must return a primitive value.")}return(g==="string"?String:Number)(E)})(m,"string");return t(_)=="symbol"?_:_+""}cf=1;var u=zm,c=kT.createFocusTrap,d=LT.isFocusable,h=parseInt((e=(n=/^(\d+)\./.exec(u.version))===null||n===void 0?void 0:n[1])!==null&&e!==void 0?e:0,10),p=(function(m){function _(E){var g;(function(v,D){if(!(v instanceof D))throw new TypeError("Cannot call a class as a function")})(this,_),(function(v,D,y){(D=l(D))in v?Object.defineProperty(v,D,{value:y,enumerable:!0,configurable:!0,writable:!0}):v[D]=y})(g=i(this,_,[E]),"getNodeForOption",function(v){var D,y=(D=this.internalOptions[v])!==null&&D!==void 0?D:this.originalOptions[v];if(typeof y=="function"){for(var R=arguments.length,I=new Array(R>1?R-1:0),O=1;O<R;O++)I[O-1]=arguments[O];y=y.apply(void 0,I)}if(y===!0&&(y=void 0),!y){if(y===void 0||y===!1)return y;throw new Error("`".concat(v,"` was specified but was not a node, or did not return a node"))}var T,C=y;if(typeof y=="string"&&!(C=(T=this.getDocument())===null||T===void 0?void 0:T.querySelector(y)))throw new Error("`".concat(v,"` as selector refers to no known node"));return C}),g.handleDeactivate=g.handleDeactivate.bind(g),g.handlePostDeactivate=g.handlePostDeactivate.bind(g),g.handleClickOutsideDeactivates=g.handleClickOutsideDeactivates.bind(g),g.internalOptions={returnFocusOnDeactivate:!1,checkCanReturnFocus:null,onDeactivate:g.handleDeactivate,onPostDeactivate:g.handlePostDeactivate,clickOutsideDeactivates:g.handleClickOutsideDeactivates},g.originalOptions={returnFocusOnDeactivate:!0,onDeactivate:null,onPostDeactivate:null,checkCanReturnFocus:null,clickOutsideDeactivates:!1};var A=E.focusTrapOptions;for(var S in A)Object.prototype.hasOwnProperty.call(A,S)&&(S!=="returnFocusOnDeactivate"&&S!=="onDeactivate"&&S!=="onPostDeactivate"&&S!=="checkCanReturnFocus"&&S!=="clickOutsideDeactivates"?g.internalOptions[S]=A[S]:g.originalOptions[S]=A[S]);return g.outsideClick=null,g.focusTrapElements=E.containerElements||[],g.updatePreviousElement(),g}return(function(E,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function");E.prototype=Object.create(g&&g.prototype,{constructor:{value:E,writable:!0,configurable:!0}}),Object.defineProperty(E,"prototype",{writable:!1}),g&&a(E,g)})(_,m),r(_,[{key:"getDocument",value:function(){return this.props.focusTrapOptions.document||(typeof document!="undefined"?document:void 0)}},{key:"getReturnFocusNode",value:function(){var E=this.getNodeForOption("setReturnFocus",this.previouslyFocusedElement);return E||E!==!1&&this.previouslyFocusedElement}},{key:"updatePreviousElement",value:function(){var E=this.getDocument();E&&(this.previouslyFocusedElement=E.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(E){var g=typeof this.originalOptions.clickOutsideDeactivates=="function"?this.originalOptions.clickOutsideDeactivates.call(null,E):this.originalOptions.clickOutsideDeactivates;return g&&(this.outsideClick={target:E.target,allowDeactivation:g}),g}},{key:"handleDeactivate",value:function(){this.originalOptions.onDeactivate&&this.originalOptions.onDeactivate.call(null),this.deactivateTrap()}},{key:"handlePostDeactivate",value:function(){var E=this,g=function(){var A=E.getReturnFocusNode(),S=!(!E.originalOptions.returnFocusOnDeactivate||A==null||!A.focus||E.outsideClick&&(!E.outsideClick.allowDeactivation||d(E.outsideClick.target,E.internalOptions.tabbableOptions))),v=E.internalOptions.preventScroll,D=v!==void 0&&v;S&&A.focus({preventScroll:D}),E.originalOptions.onPostDeactivate&&E.originalOptions.onPostDeactivate.call(null),E.outsideClick=null};this.originalOptions.checkCanReturnFocus?this.originalOptions.checkCanReturnFocus.call(null,this.getReturnFocusNode()).then(g,g):g()}},{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(E){if(this.focusTrap){E.containerElements!==this.props.containerElements&&this.focusTrap.updateContainerElements(this.props.containerElements);var g=!E.active&&this.props.active,A=E.active&&!this.props.active,S=!E.paused&&this.props.paused,v=E.paused&&!this.props.paused;if(g&&(this.updatePreviousElement(),this.focusTrap.activate()),A)return void this.deactivateTrap();S&&this.focusTrap.pause(),v&&this.focusTrap.unpause()}else E.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 E=this,g=this.props.children?u.Children.only(this.props.children):void 0;if(g){if(g.type&&g.type===u.Fragment)throw new Error("A focus-trap cannot use a Fragment as its child container. Try replacing it with a <div> element.");return u.cloneElement(g,{ref:function(A){var S=E.props.containerElements;g&&(h>=19?typeof g.props.ref=="function"?g.props.ref(A):g.props.ref&&(g.props.ref.current=A):typeof g.ref=="function"?g.ref(A):g.ref&&(g.ref.current=A)),E.focusTrapElements=S||[A]}})}return null}}])})(u.Component);return p.defaultProps={active:!0,paused:!1,focusTrapOptions:{},_createFocusTrap:c},jo.exports=p,jo.exports.FocusTrap=p,jo.exports})();function Og(t){var g,A;const{children:e,preferredPlacement:n="top-start",anchorElement:r,boundaryElement:i,trapFocus:o=!1,initialFocus:s,portal:a,...l}=t,{anchor:u,boundary:c}=Z(()=>({anchor:uf(r),boundary:i?uf(i):void 0}),[r,i]);let d=[];c&&(d=[ug({boundary:c,fallbackPlacements:["top-start","top-end","bottom-start","bottom-end","top","bottom"]}),hT({boundary:c,padding:8}),pT({boundary:c})]);const{refs:h,floatingStyles:p,middlewareData:m}=cg({placement:n,middleware:d,whileElementsMounted:ag});We(()=>{u&&h.setReference(u)},[h,u]);const _=o?f(MT.FocusTrap,{focusTrapOptions:{initialFocus:s,fallbackFocus:".t-fallback-focus",allowOutsideClick:!0,tabbableOptions:{getShadowRoot:!0}},children:f("div",{children:[e,f("span",{className:"t-fallback-focus",tabIndex:-1})]})}):e,E=f("div",{ref:h.setFloating,style:{...p,zIndex:1e3,visibility:(g=m.hide)!=null&&g.referenceHidden?"hidden":"visible"},...l,children:_});if(a){const S=(A=c||u)==null?void 0:A.closest("[t-menu-boundary='root']");return f(TT,{root:S,children:E})}return E}function uf(t){return typeof t=="string"?document.querySelector(t):t}function vu(t){const e=ae(),n=ho(),r=J(n.state$.suggestMentionQuery),i=uu(J(e.state$.currentConversationId),r?1e3:0),o=Z(()=>(i!=null?i:[]).map(E=>E.user),[i]),[s,a]=ee(0),l=Z(()=>Object.fromEntries(o.map(E=>[E.id,yv(E.name)])),[o]),u=Z(()=>{if(!r)return[];const E=df(r);return E===""?o:o.filter(g=>l[g.id].some(A=>(function(S,v){return ip(S.substring(0,v.length),v)})(A,E)))},[r,o,l]),c=X(void 0);z(()=>{if(c.current){const E=u.findIndex(g=>g.id===c.current);a(E===-1?0:E)}},[u]),z(()=>{var E;c.current=(E=u[s])==null?void 0:E.id},[s,u]);const d=q(E=>{var A;const g=(A=u[E])==null?void 0:A.id;return g&&"mention-button-"+g},[u]),{containerProps:h,itemProps:p}=J_({focused:s,setFocused:a,buttonId:d});if(z(()=>{if(u.length!==0)return n.listenKeydown("mention",E=>q_(E,{dir:"ttb",focused:s,setFocused:a,itemCount:u.length,onSpace(){if(r){const g=u[s];if(ip(g.name,df(r)))return n.selectMention(g),!0}return!1},onConfirm(){const g=u[s];n.selectMention(g)}})),()=>{n.listenKeydown("mention",void 0)}},[n,s,u,r]),So(()=>n.closeSuggester(),".t-mention-suggest-list",u.length>0),u.length===0)return null;const m=document.querySelector(".ProseMirror-suggestion");let _;if(m){let E=m.getBoundingClientRect();_={getBoundingClientRect(){const g=m.getBoundingClientRect();return g.width>0&&(E=g),E}}}return f(Og,{className:"t-mention-suggest-list",...h,anchorElement:_,children:u.map((E,g)=>f(PT,{user:E,isFocused:g===s,onSelect:()=>n.selectMention(E),...p(g)},E.id))})}const PT=ur(function(t){const{user:e,isFocused:n,onSelect:r,...i}=t;return f("button",{className:n?"focused":"",onClick:()=>r(e.id),...i,children:e.name})});function df(t){return re(t[0]==="@"),t.substring(1)}function hf(t,e,n){const r=Su(t),i=r.indexOf(e);return i===-1?null:r[i+n]||null}const xT=_t(function(t,e){const{children:n,triggerElement:r}=t,{closePopover:i}=jc(),o=X(null);Sn(e,()=>o.current),z(()=>{var a;(a=o.current)==null||a.focus()},[]);const s=q(a=>{(function(l,u,c,d){var E;const h=u.querySelectorAll("[t-menu-item]"),p=document.activeElement;if(!p||!p.hasAttribute("t-menu-item")&&!p.hasAttribute("t-menu"))return;const m=Array.from(h).indexOf(p);let _;switch(l.key){case"ArrowDown":_=Math.min(m+1,h.length-1);break;case"ArrowUp":_=Math.max(m-1,0),m===-1&&(_=h.length-1);break;case"Home":_=0;break;case"End":_=h.length-1;break;case"Tab":{const g=c.closest("t-chatbox,t-conversation-list,.t-chatbox,.t-conversation-list"),A=l.shiftKey?hf(g,c,-1):(function(S,v){return hf(S,v,1)})(g,c);return A==null||A.focus(),void d()}default:return}(E=h[_])==null||E.focus()})(a,o.current,r,i)},[i,r]);return f("div",{"t-menu":"",role:"menu",tabIndex:-1,ref:o,onKeyDown:s,children:n})});function oi(t){const{popoverComponent:e,popoverProps:n,children:r,type:i="popover",initialFocus:o,portal:s,...a}=t,[l,u]=ee(void 0),c=X(null),[d,h]=ee(!1);So(q(m=>{var _,E;m&&((_=c.current)!=null&&_.contains(m.target))||(h(!1),(E=c.current)==null||E.focus())},[]),"[t-popover-content]",d);const p=i==="menu"?f(xT,{triggerElement:c.current,children:f(e,{...n})}):f(e,{...n});return f(iS.Provider,{value:{closePopover:()=>h(!1)},children:[f(FT,{...a,"aria-haspopup":i==="menu"?"menu":"true","aria-expanded":d,onTrigger:()=>h(m=>!m),ref:m=>(_=>{var g;const E=(g=_==null?void 0:_.closest("[t-menu-boundary]"))!=null?g:void 0;c.current=_,u(E)})(m),children:r}),d&&f(Og,{portal:s,"t-popover-content":"",anchorElement:c.current,boundaryElement:l,preferredPlacement:"bottom-start",trapFocus:i==="popover",initialFocus:i==="menu"?"t-menu":o,role:i==="menu"?void 0:"dialog",children:p})]})}const FT=_t(function(t,e){const{onTrigger:n,...r}=t,i=q(o=>{o.key!=="Enter"&&o.key!==" "||n()},[n]);return f("button",{...r,ref:e,onClick:n,onKeyDown:i})});function Hn(t){const{onSelect:e,...n}=t,{closePopover:r}=jc(),i=q(o=>{o.key!=="Enter"&&o.key!==" "||(r(),e==null||e())},[e,r]);return f("div",{tabIndex:-1,role:"menuitem",onClick:q(()=>{r(),e==null||e()},[r,e]),onKeyDown:i,"t-menu-item":"",...n})}function dl(t){const e=X(t);return We(()=>{e.current=t},[t]),e}function ro(t){const e=ae(),n=li(),r=X(null),{value:i,onChange:o,onKeyDown:s,onKeyUp:a,...l}=t,u=dl(o),c=dl(s),d=dl(a);z(()=>()=>{wt(()=>{e.type==="ChatboxStore"&&(e.searchQuery$.set(""),e.highlightedStrings$.set([]),e.focusedMessage$.set(null))})},[e]);const h=q(()=>{r.current.blur(),n.jumpToHighlight("up")},[n]),p=q(g=>{var A;(A=c.current)==null||A.call(c,g),!g.defaultPrevented&&e.type==="ChatboxStore"&&e.state$.enterSendsMessage.peek()&&rp(g)&&g.preventDefault()},[c,e]),m=q(g=>{var A;(A=d.current)==null||A.call(d,g),!g.defaultPrevented&&e.type==="ChatboxStore"&&e.state$.enterSendsMessage.peek()&&rp(g)&&(g.preventDefault(),h())},[d,e,h]),_=q(g=>{var S;const A=g.target.value;e.type==="ChatboxStore"?e.setSearchQuery(A):e.setGlobalSearchQuery(A),(S=u.current)==null||S.call(u,g)},[e,u]),E=J(()=>e.type==="ChatboxStore"?e.searchQuery$.get():e.globalSearchState$.query.get());return f("input",{type:"search",enterKeyHint:"search",autoComplete:"off",value:i!=null?i:E,onChange:_,onKeyUp:m,onKeyDown:p,...l,ref:r})}const HT={barHeight:4,barRadius:2,barGap:2,barWidth:2,height:24},hl={state:null,duration:0,recordingUrl:void 0,uploadState:"done",fileToken:void 0},Dg=new WeakMap;function Ou({className:t,voiceRecorder:e}){const n=Dg.get(e);return n?f("div",{className:t,style:{shapeRendering:"crispEdges"},ref:n}):(Ce.warn("Can only use Waveform component if a voice recorder is active"),null)}function Tg(t,e){return t.map(r=>(function(i,o){if(i.type==="text")return(function(s,a){const l=du(a);return ts(s,l)})(i.children,o);if(i.type==="file"&&i.subtype==="video")return`🎥 ${Po(i.url)}`;if(i.type==="file"&&i.subtype==="image")return`📷 ${Po(i.url)}`;if(i.type==="file"&&i.subtype==="audio")return`🎧 ${Po(i.url)}`;if(i.type==="file"&&i.subtype==="voice"){const s=i.duration;return s===void 0?"🎙️":`🎙️ (${Math.floor(s/60)}:${Math.floor(s%60).toString().padStart(2,"0")})`}return i.type==="file"?(i.subtype,`📎 ${Po(i.url)}`):i.type==="location"?"📍":""})(r,e)).join(`
94
+ `,[e,n]}setOptions(e){if(this.options.container!==e.container){const n=this.parentFromOptionsContainer(e.container);n.appendChild(this.container),this.parent=n}e.dragToSeek!==!0&&typeof this.options.dragToSeek!="object"||this.initDrag(),this.options=e,this.reRender()}getWrapper(){return this.wrapper}getWidth(){return this.scrollContainer.clientWidth}getScroll(){return this.scrollContainer.scrollLeft}setScroll(e){this.scrollContainer.scrollLeft=e}setScrollPercentage(e){const{scrollWidth:n}=this.scrollContainer,r=n*e;this.setScroll(r)}destroy(){var e;this.subscriptions.forEach(n=>n()),this.container.remove(),this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),(e=this.unsubscribeOnScroll)===null||e===void 0||e.forEach(n=>n()),this.unsubscribeOnScroll=[],this.dragStream&&(this.dragStream.cleanup(),this.dragStream=null),this.scrollStream&&(this.scrollStream.cleanup(),this.scrollStream=null)}createDelay(e=10){let n,r;const i=()=>{n&&(clearTimeout(n),n=void 0),r&&(r(),r=void 0)};return this.timeouts.push(i),()=>new Promise((o,s)=>{i(),r=s,n=setTimeout(()=>{n=void 0,r=void 0,o()},e)})}getHeight(e,n){var r;const i=((r=this.audioData)===null||r===void 0?void 0:r.numberOfChannels)||1;return(function({optionsHeight:o,optionsSplitChannels:s,parentHeight:a,numberOfChannels:l,defaultHeight:u=128}){if(o==null)return u;const c=Number(o);if(!isNaN(c))return c;if(o==="auto"){const d=a||u;return s!=null&&s.every(h=>!h.overlay)?d/l:d}return u})({optionsHeight:e,optionsSplitChannels:n,parentHeight:this.parent.clientHeight,numberOfChannels:i,defaultHeight:128})}convertColorValues(e,n){return(function(r,i,o){if(!Array.isArray(r))return r||"";if(r.length===0)return"#999";if(r.length<2)return r[0]||"";const s=document.createElement("canvas"),a=s.getContext("2d"),l=o!=null?o:s.height*i,u=a.createLinearGradient(0,0,0,l||i),c=1/(r.length-1);return r.forEach((d,h)=>{u.addColorStop(h*c,d)}),u})(e,this.getPixelRatio(),n==null?void 0:n.canvas.height)}getPixelRatio(){return e=window.devicePixelRatio,Math.max(1,e||1);var e}renderBarWaveform(e,n,r,i){const{width:o,height:s}=r.canvas,{halfHeight:a,barWidth:l,barRadius:u,barIndexScale:c,barSpacing:d,barMinHeight:h}=(function({width:m,height:_,length:E,options:A,pixelRatio:g}){const S=_/2,O=A.barWidth?A.barWidth*g:1,D=A.barGap?A.barGap*g:A.barWidth?O/2:0,I=O+D||1;return{halfHeight:S,barWidth:O,barGap:D,barRadius:A.barRadius||0,barMinHeight:A.barMinHeight?A.barMinHeight*g:0,barIndexScale:E>0?m/I/E:0,barSpacing:I}})({width:o,height:s,length:(e[0]||[]).length,options:n,pixelRatio:this.getPixelRatio()}),p=(function({channelData:m,barIndexScale:_,barSpacing:E,barWidth:A,halfHeight:g,vScale:S,canvasHeight:O,barAlign:D,barMinHeight:I}){const R=m[0]||[],y=m[1]||R,v=R.length,T=[];let C=0,N=0,L=0;for(let b=0;b<=v;b++){const k=Math.round(b*_);if(k>C){const{topHeight:U,totalHeight:V}=w0({maxTop:N,maxBottom:L,halfHeight:g,vScale:S,barMinHeight:I,barAlign:D}),W=L0({barAlign:D,halfHeight:g,topHeight:U,totalHeight:V,canvasHeight:O});T.push({x:C*E,y:W,width:A,height:V}),C=k,N=0,L=0}const x=Math.abs(R[b]||0),M=Math.abs(y[b]||0);x>N&&(N=x),M>L&&(L=M)}return T})({channelData:e,barIndexScale:c,barSpacing:d,barWidth:l,halfHeight:a,vScale:i,canvasHeight:s,barAlign:n.barAlign,barMinHeight:h});r.beginPath();for(const m of p)u&&"roundRect"in r?r.roundRect(m.x,m.y,m.width,m.height,u):r.rect(m.x,m.y,m.width,m.height);r.fill(),r.closePath()}renderLineWaveform(e,n,r,i){const{width:o,height:s}=r.canvas,a=(function({channelData:l,width:u,height:c,vScale:d}){const h=c/2,p=l[0]||[];return[p,l[1]||p].map((m,_)=>{const E=m.length,A=E?u/E:0,g=h,S=_===0?-1:1,O=[{x:0,y:g}];let D=0,I=0;for(let R=0;R<=E;R++){const y=Math.round(R*A);if(y>D){const T=g+(Math.round(I*h*d)||1)*S;O.push({x:D,y:T}),D=y,I=0}const v=Math.abs(m[R]||0);v>I&&(I=v)}return O.push({x:D,y:g}),O})})({channelData:e,width:o,height:s,vScale:i});r.beginPath();for(const l of a)if(l.length){r.moveTo(l[0].x,l[0].y);for(let u=1;u<l.length;u++){const c=l[u];r.lineTo(c.x,c.y)}}r.fill(),r.closePath()}renderWaveform(e,n,r){if(r.fillStyle=this.convertColorValues(n.waveColor,r),n.renderFunction)return void n.renderFunction(e,r);const i=(function({channelData:o,barHeight:s,normalize:a,maxPeak:l}){var u;const c=s||1;if(!a)return c;const d=o[0];if(!d||d.length===0)return c;let h=l!=null?l:0;if(!l)for(let p=0;p<d.length;p++){const m=(u=d[p])!==null&&u!==void 0?u:0,_=Math.abs(m);_>h&&(h=_)}return h?c/h:c})({channelData:e,barHeight:n.barHeight,normalize:n.normalize,maxPeak:n.maxPeak});U_(n)?this.renderBarWaveform(e,n,r,i):this.renderLineWaveform(e,n,r,i)}renderSingleCanvas(e,n,r,i,o,s,a){const l=this.getPixelRatio(),u=document.createElement("canvas");u.width=Math.round(r*l),u.height=Math.round(i*l),u.style.width=`${r}px`,u.style.height=`${i}px`,u.style.left=`${Math.round(o)}px`,s.appendChild(u);const c=u.getContext("2d");if(n.renderFunction?(c.fillStyle=this.convertColorValues(n.waveColor,c),n.renderFunction(e,c)):this.renderWaveform(e,n,c),u.width>0&&u.height>0){const d=u.cloneNode(),h=d.getContext("2d");h.drawImage(u,0,0),h.globalCompositeOperation="source-in",h.fillStyle=this.convertColorValues(n.progressColor,h),h.fillRect(0,0,u.width,u.height),a.appendChild(d)}}renderMultiCanvas(e,n,r,i,o,s){const a=this.getPixelRatio(),{clientWidth:l}=this.scrollContainer,u=r/a,c=(function({clientWidth:m,totalWidth:_,options:E}){return Sp(Math.min(8e3,m,_),E)})({clientWidth:l,totalWidth:u,options:n});let d={};if(c===0)return;const h=m=>{if(m<0||m>=p||d[m])return;d[m]=!0;const _=m*c;let E=Math.min(u-_,c);if(E=Sp(E,n),E<=0)return;const A=(function({channelData:g,offset:S,clampedWidth:O,totalWidth:D}){return g.map(I=>{const R=Math.floor(S/D*I.length),y=Math.floor((S+O)/D*I.length);return I.slice(R,y)})})({channelData:e,offset:_,clampedWidth:E,totalWidth:u});this.renderSingleCanvas(A,n,E,i,_,o,s)},p=Math.ceil(u/c);if(this.isScrollable){if(Op({scrollLeft:this.scrollContainer.scrollLeft,totalWidth:u,numCanvases:p}).forEach(m=>h(m)),p>1){const m=this.on("scroll",()=>{const{scrollLeft:_}=this.scrollContainer;Object.keys(d).length>10&&(o.innerHTML="",s.innerHTML="",d={}),Op({scrollLeft:_,totalWidth:u,numCanvases:p}).forEach(E=>h(E))});this.unsubscribeOnScroll.push(m)}}else for(let m=0;m<p;m++)h(m)}renderChannel(e,n,r,i){var{overlay:o}=n,s=(function(c,d){var h={};for(var p in c)Object.prototype.hasOwnProperty.call(c,p)&&d.indexOf(p)<0&&(h[p]=c[p]);if(c!=null&&typeof Object.getOwnPropertySymbols=="function"){var m=0;for(p=Object.getOwnPropertySymbols(c);m<p.length;m++)d.indexOf(p[m])<0&&Object.prototype.propertyIsEnumerable.call(c,p[m])&&(h[p[m]]=c[p[m]])}return h})(n,["overlay"]);const a=document.createElement("div"),l=this.getHeight(s.height,s.splitChannels);a.style.height=`${l}px`,o&&i>0&&(a.style.marginTop=`-${l}px`),this.canvasWrapper.style.minHeight=`${l}px`,this.canvasWrapper.appendChild(a);const u=a.cloneNode();this.progressWrapper.appendChild(u),this.renderMultiCanvas(e,s,r,l,a,u)}render(e){return at(this,void 0,void 0,function*(){var n;this.timeouts.forEach(u=>u()),this.timeouts=[],this.canvasWrapper.innerHTML="",this.progressWrapper.innerHTML="",this.options.width!=null&&(this.scrollContainer.style.width=typeof this.options.width=="number"?`${this.options.width}px`:this.options.width);const r=this.getPixelRatio(),i=this.scrollContainer.clientWidth,{scrollWidth:o,isScrollable:s,useParentWidth:a,width:l}=(function({duration:u,minPxPerSec:c=0,parentWidth:d,fillParent:h,pixelRatio:p}){const m=Math.ceil(u*c),_=m>d,E=!!(h&&!_);return{scrollWidth:m,isScrollable:_,useParentWidth:E,width:(E?d:m)*p}})({duration:e.duration,minPxPerSec:this.options.minPxPerSec||0,parentWidth:i,fillParent:this.options.fillParent,pixelRatio:r});if(this.isScrollable=s,this.wrapper.style.width=a?"100%":`${o}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=e,this.emit("render"),this.options.splitChannels)for(let u=0;u<e.numberOfChannels;u++){const c=Object.assign(Object.assign({},this.options),(n=this.options.splitChannels)===null||n===void 0?void 0:n[u]);this.renderChannel([e.getChannelData(u)],c,l,u)}else{const u=[e.getChannelData(0)];e.numberOfChannels>1&&u.push(e.getChannelData(1)),this.renderChannel(u,this.options,l,0)}Promise.resolve().then(()=>this.emit("rendered"))})}reRender(){if(this.unsubscribeOnScroll.forEach(r=>r()),this.unsubscribeOnScroll=[],!this.audioData)return;const{scrollWidth:e}=this.scrollContainer,{right:n}=this.progressWrapper.getBoundingClientRect();if(this.render(this.audioData),this.isScrollable&&e!==this.scrollContainer.scrollWidth){const{right:r}=this.progressWrapper.getBoundingClientRect(),i=(function(o){const s=2*o;return(s<0?Math.floor(s):Math.ceil(s))/2})(r-n);this.scrollContainer.scrollLeft+=i}}zoom(e){this.options.minPxPerSec=e,this.reRender()}scrollIntoView(e,n=!1){const{scrollLeft:r,scrollWidth:i,clientWidth:o}=this.scrollContainer,s=e*i,a=r,l=r+o,u=o/2;if(this.isDragging)s+30>l?this.scrollContainer.scrollLeft+=30:s-30<a&&(this.scrollContainer.scrollLeft-=30);else{(s<a||s>l)&&(this.scrollContainer.scrollLeft=s-(this.options.autoCenter?u:0));const c=s-r-u;n&&this.options.autoCenter&&c>0&&(this.scrollContainer.scrollLeft+=c)}}renderProgress(e,n){if(isNaN(e))return;const r=100*e;this.canvasWrapper.style.clipPath=`polygon(${r}% 0%, 100% 0%, 100% 100%, ${r}% 100%)`,this.progressWrapper.style.width=`${r}%`,this.cursor.style.left=`${r}%`,this.cursor.style.transform=this.options.cursorWidth?`translateX(-${e*this.options.cursorWidth}px)`:"",this.isScrollable&&this.options.autoScroll&&this.audioData&&this.audioData.duration>0&&this.scrollIntoView(e,n)}exportImage(e,n,r){return at(this,void 0,void 0,function*(){const i=this.canvasWrapper.querySelectorAll("canvas");if(!i.length)throw new Error("No waveform data");if(r==="dataURL"){const o=Array.from(i).map(s=>s.toDataURL(e,n));return Promise.resolve(o)}return Promise.all(Array.from(i).map(o=>new Promise((s,a)=>{o.toBlob(l=>{l?s(l):a(new Error("Could not export image"))},e,n)})))})}}class M0 extends Ao{constructor(){super(...arguments),this.animationFrameId=null,this.isRunning=!1}start(){if(this.isRunning)return;this.isRunning=!0;const e=()=>{this.isRunning&&(this.emit("tick"),this.animationFrameId=requestAnimationFrame(e))};e()}stop(){this.isRunning=!1,this.animationFrameId!==null&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=null)}destroy(){this.stop()}}class tl extends Ao{constructor(e=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=e,this.gainNode=this.audioContext.createGain(),this.gainNode.connect(this.audioContext.destination)}load(){return at(this,void 0,void 0,function*(){})}get src(){return this.currentSrc}set src(e){if(this.currentSrc=e,this._duration=void 0,!e)return this.buffer=null,void this.emit("emptied");fetch(e).then(n=>{if(n.status>=400)throw new Error(`Failed to fetch ${e}: ${n.status} (${n.statusText})`);return n.arrayBuffer()}).then(n=>this.currentSrc!==e?null:this.audioContext.decodeAudioData(n)).then(n=>{this.currentSrc===e&&(this.buffer=n,this.emit("loadedmetadata"),this.emit("canplay"),this.autoplay&&this.play())}).catch(n=>{console.error("WebAudioPlayer load error:",n)})}_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 e=this.playedDuration*this._playbackRate;(e>=this.duration||e<0)&&(e=0,this.playedDuration=0),this.bufferNode.start(this.audioContext.currentTime,e),this.playStartTime=this.audioContext.currentTime,this.bufferNode.onended=()=>{this.currentTime>=this.duration&&(this.pause(),this.emit("ended"))}}_pause(){var e;this.paused=!0,(e=this.bufferNode)===null||e===void 0||e.stop(),this.playedDuration+=this.audioContext.currentTime-this.playStartTime}play(){return at(this,void 0,void 0,function*(){this.paused&&(this._play(),this.emit("play"))})}pause(){this.paused||(this._pause(),this.emit("pause"))}stopAt(e){const n=e-this.currentTime,r=this.bufferNode;r==null||r.stop(this.audioContext.currentTime+n),r==null||r.addEventListener("ended",()=>{r===this.bufferNode&&(this.bufferNode=null,this.pause())},{once:!0})}setSinkId(e){return at(this,void 0,void 0,function*(){return this.audioContext.setSinkId(e)})}get playbackRate(){return this._playbackRate}set playbackRate(e){this._playbackRate=e,this.bufferNode&&(this.bufferNode.playbackRate.value=e)}get currentTime(){return(this.paused?this.playedDuration:this.playedDuration+(this.audioContext.currentTime-this.playStartTime))*this._playbackRate}set currentTime(e){const n=!this.paused;n&&this._pause(),this.playedDuration=e/this._playbackRate,n&&this._play(),this.emit("seeking"),this.emit("timeupdate")}get duration(){var e,n;return(e=this._duration)!==null&&e!==void 0?e:((n=this.buffer)===null||n===void 0?void 0:n.duration)||0}set duration(e){this._duration=e}get volume(){return this.gainNode.gain.value}set volume(e){this.gainNode.gain.value=e,this.emit("volumechange")}get muted(){return this._muted}set muted(e){this._muted!==e&&(this._muted=e,this._muted?this.gainNode.disconnect():this.gainNode.connect(this.audioContext.destination))}canPlayType(e){return/^(audio|video)\//.test(e)}getGainNode(){return this.gainNode}getChannelData(){const e=[];if(!this.buffer)return e;const n=this.buffer.numberOfChannels;for(let r=0;r<n;r++)e.push(this.buffer.getChannelData(r));return e}removeAttribute(e){switch(e){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 P0={waveColor:"#999",progressColor:"#555",cursorWidth:1,minPxPerSec:0,fillParent:!0,interact:!0,dragToSeek:!1,autoScroll:!0,autoCenter:!0,sampleRate:8e3};class Qi extends b0{static create(e){return new Qi(e)}getState(){return this.wavesurferState}getRenderer(){return this.renderer}constructor(e){const n=e.media||(e.backend==="WebAudio"?new tl:void 0);super({media:n,mediaControls:e.mediaControls,autoplay:e.autoplay,playbackRate:e.audioRate}),this.plugins=[],this.decodedData=null,this.stopAtPosition=null,this.subscriptions=[],this.mediaSubscriptions=[],this.abortController=null,this.reactiveCleanups=[],this.options=Object.assign({},P0,e);const{state:r,actions:i}=(function(a){var l,u,c,d,h,p;const m=(l=a==null?void 0:a.currentTime)!==null&&l!==void 0?l:ye(0),_=(u=a==null?void 0:a.duration)!==null&&u!==void 0?u:ye(0),E=(c=a==null?void 0:a.isPlaying)!==null&&c!==void 0?c:ye(!1),A=(d=a==null?void 0:a.isSeeking)!==null&&d!==void 0?d:ye(!1),g=(h=a==null?void 0:a.volume)!==null&&h!==void 0?h:ye(1),S=(p=a==null?void 0:a.playbackRate)!==null&&p!==void 0?p:ye(1),O=ye(null),D=ye(null),I=ye(""),R=ye(0),y=ye(0),v=Qn(()=>!E.value,[E]),T=Qn(()=>O.value!==null,[O]),C=Qn(()=>T.value&&_.value>0,[T,_]),N=Qn(()=>m.value,[m]),L=Qn(()=>_.value>0?m.value/_.value:0,[m,_]);return{state:{currentTime:m,duration:_,isPlaying:E,isPaused:v,isSeeking:A,volume:g,playbackRate:S,audioBuffer:O,peaks:D,url:I,zoom:R,scrollPosition:y,canPlay:T,isReady:C,progress:N,progressPercent:L},actions:{setCurrentTime:b=>{const k=Math.max(0,Math.min(_.value||1/0,b));m.set(k)},setDuration:b=>{_.set(Math.max(0,b))},setPlaying:b=>{E.set(b)},setSeeking:b=>{A.set(b)},setVolume:b=>{const k=Math.max(0,Math.min(1,b));g.set(k)},setPlaybackRate:b=>{const k=Math.max(.1,Math.min(16,b));S.set(k)},setAudioBuffer:b=>{O.set(b),b&&_.set(b.duration)},setPeaks:b=>{D.set(b)},setUrl:b=>{I.set(b)},setZoom:b=>{R.set(Math.max(0,b))},setScrollPosition:b=>{y.set(Math.max(0,b))}}}})({isPlaying:this.isPlayingSignal,currentTime:this.currentTimeSignal,duration:this.durationSignal,volume:this.volumeSignal,playbackRate:this.playbackRateSignal,isSeeking:this.seekingSignal});this.wavesurferState=r,this.wavesurferActions=i,this.timer=new M0;const o=n?void 0:this.getMediaElement();this.renderer=new k0(this.options,o),this.initPlayerEvents(),this.initRendererEvents(),this.initTimerEvents(),this.initReactiveState(),this.initPlugins();const s=this.options.url||this.getSrc()||"";Promise.resolve().then(()=>{this.emit("init");const{peaks:a,duration:l}=this.options;(s||a&&l)&&this.load(s,a,l).catch(u=>{this.emit("error",u instanceof Error?u:new Error(String(u)))})})}updateProgress(e=this.getCurrentTime()){return this.renderer.renderProgress(e/this.getDuration(),this.isPlaying()),e}initTimerEvents(){this.subscriptions.push(this.timer.on("tick",()=>{if(!this.isSeeking()){const e=this.updateProgress();this.emit("timeupdate",e),this.emit("audioprocess",e),this.stopAtPosition!=null&&this.isPlaying()&&e>=this.stopAtPosition&&this.pause()}}))}initReactiveState(){this.reactiveCleanups.push((function(e,n){const r=[];r.push(In(()=>{const s=e.isPlaying.value;n.emit(s?"play":"pause")},[e.isPlaying])),r.push(In(()=>{const s=e.currentTime.value;n.emit("timeupdate",s),e.isPlaying.value&&n.emit("audioprocess",s)},[e.currentTime,e.isPlaying])),r.push(In(()=>{e.isSeeking.value&&n.emit("seeking",e.currentTime.value)},[e.isSeeking,e.currentTime]));let i=!1;r.push(In(()=>{e.isReady.value&&!i&&(i=!0,n.emit("ready",e.duration.value))},[e.isReady,e.duration]));let o=!1;return r.push(In(()=>{const s=e.isPlaying.value,a=e.currentTime.value,l=e.duration.value,u=l>0&&a>=l;o&&!s&&u&&n.emit("finish"),o=s&&u},[e.isPlaying,e.currentTime,e.duration])),r.push(In(()=>{const s=e.zoom.value;s>0&&n.emit("zoom",s)},[e.zoom])),()=>{r.forEach(s=>s())}})(this.wavesurferState,{emit:this.emit.bind(this)}))}initPlayerEvents(){this.isPlaying()&&(this.emit("play"),this.timer.start()),this.mediaSubscriptions.push(this.onMediaEvent("timeupdate",()=>{const e=this.updateProgress();this.emit("timeupdate",e)}),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 e;this.emit("error",(e=this.getMediaElement().error)!==null&&e!==void 0?e:new Error("Media error")),this.stopAtPosition=null}))}initRendererEvents(){this.subscriptions.push(this.renderer.on("click",(e,n)=>{this.options.interact&&(this.seekTo(e),this.emit("interaction",e*this.getDuration()),this.emit("click",e,n))}),this.renderer.on("dblclick",(e,n)=>{this.emit("dblclick",e,n)}),this.renderer.on("scroll",(e,n,r,i)=>{const o=this.getDuration();this.emit("scroll",e*o,n*o,r,i)}),this.renderer.on("render",()=>{this.emit("redraw")}),this.renderer.on("rendered",()=>{this.emit("redrawcomplete")}),this.renderer.on("dragstart",e=>{this.emit("dragstart",e)}),this.renderer.on("dragend",e=>{this.emit("dragend",e)}),this.renderer.on("resize",()=>{this.emit("resize")}));{let e;const n=this.renderer.on("drag",r=>{var i;if(!this.options.interact)return;this.renderer.renderProgress(r),clearTimeout(e);let o=0;const s=this.options.dragToSeek;this.isPlaying()?o=0:s===!0?o=200:s&&typeof s=="object"&&(o=(i=s.debounceTime)!==null&&i!==void 0?i:200),e=setTimeout(()=>{this.seekTo(r)},o),this.emit("interaction",r*this.getDuration()),this.emit("drag",r)});this.subscriptions.push(()=>{clearTimeout(e),n()})}}initPlugins(){var e;!((e=this.options.plugins)===null||e===void 0)&&e.length&&this.options.plugins.forEach(n=>{this.registerPlugin(n)})}unsubscribePlayerEvents(){this.mediaSubscriptions.forEach(e=>e()),this.mediaSubscriptions=[]}setOptions(e){this.options=Object.assign({},this.options,e),e.duration&&!e.peaks&&(this.decodedData=Fo.createBuffer(this.exportPeaks(),e.duration)),e.peaks&&e.duration&&(this.decodedData=Fo.createBuffer(e.peaks,e.duration)),this.renderer.setOptions(this.options),e.audioRate&&this.setPlaybackRate(e.audioRate),e.mediaControls!=null&&(this.getMediaElement().controls=e.mediaControls)}registerPlugin(e){if(this.plugins.includes(e))return e;e._init(this),this.plugins.push(e);const n=e.once("destroy",()=>{this.plugins=this.plugins.filter(r=>r!==e),this.subscriptions=this.subscriptions.filter(r=>r!==n)});return this.subscriptions.push(n),e}unregisterPlugin(e){this.plugins=this.plugins.filter(n=>n!==e),e.destroy()}getWrapper(){return this.renderer.getWrapper()}getWidth(){return this.renderer.getWidth()}getScroll(){return this.renderer.getScroll()}setScroll(e){return this.renderer.setScroll(e)}setScrollTime(e){const n=e/this.getDuration();this.renderer.setScrollPercentage(n)}getActivePlugins(){return this.plugins}loadAudio(e,n,r,i){return at(this,void 0,void 0,function*(){var o;if(this.emit("load",e),!this.options.media&&this.isPlaying()&&this.pause(),this.decodedData=null,this.stopAtPosition=null,(o=this.abortController)===null||o===void 0||o.abort(),this.abortController=null,!n&&!r){const a=this.options.fetchParams||{};window.AbortController&&!a.signal&&(this.abortController=new AbortController,a.signal=this.abortController.signal);const l=c=>this.emit("loading",c);n=yield N0.fetchBlob(e,l,a);const u=this.options.blobMimeType;u&&(n=new Blob([n],{type:u}))}this.setSrc(e,n);const s=yield new Promise(a=>{const l=i||this.getDuration();l?a(l):this.mediaSubscriptions.push(this.onMediaEvent("loadedmetadata",()=>a(this.getDuration()),{once:!0}))});if(!e&&!n){const a=this.getMediaElement();a instanceof tl&&(a.duration=s)}if(r)this.decodedData=Fo.createBuffer(r,s||0);else if(n){const a=yield n.arrayBuffer();this.decodedData=yield Fo.decode(a,this.options.sampleRate)}this.decodedData&&(this.emit("decode",this.getDuration()),this.renderer.render(this.decodedData)),this.emit("ready",this.getDuration())})}load(e,n,r){return at(this,void 0,void 0,function*(){try{return yield this.loadAudio(e,void 0,n,r)}catch(i){throw this.emit("error",i),i}})}loadBlob(e,n,r){return at(this,void 0,void 0,function*(){try{return yield this.loadAudio("",e,n,r)}catch(i){throw this.emit("error",i),i}})}zoom(e){if(!this.decodedData)throw new Error("No audio loaded");this.renderer.zoom(e),this.emit("zoom",e)}getDecodedData(){return this.decodedData}exportPeaks({channels:e=2,maxLength:n=8e3,precision:r=1e4}={}){if(!this.decodedData)throw new Error("The audio has not been decoded yet");const i=Math.min(e,this.decodedData.numberOfChannels),o=[];for(let s=0;s<i;s++){const a=this.decodedData.getChannelData(s),l=[],u=a.length/n;for(let c=0;c<n;c++){const d=a.slice(Math.floor(c*u),Math.ceil((c+1)*u));let h=0;for(let p=0;p<d.length;p++){const m=d[p];Math.abs(m)>Math.abs(h)&&(h=m)}l.push(Math.round(h*r)/r)}o.push(l)}return o}getDuration(){let e=super.getDuration()||0;return e!==0&&e!==1/0||!this.decodedData||(e=this.decodedData.duration),e}toggleInteraction(e){this.options.interact=e}setTime(e){this.stopAtPosition=null,super.setTime(e),this.updateProgress(e),this.emit("timeupdate",e)}seekTo(e){const n=this.getDuration()*e;this.setTime(n)}play(e,n){const r=Object.create(null,{play:{get:()=>super.play}});return at(this,void 0,void 0,function*(){e!=null&&this.setTime(e);const i=yield r.play.call(this);return n!=null&&(this.media instanceof tl?this.media.stopAt(n):this.stopAtPosition=n),i})}playPause(){return at(this,void 0,void 0,function*(){return this.isPlaying()?this.pause():this.play()})}stop(){this.pause(),this.setTime(0)}skip(e){this.setTime(this.getCurrentTime()+e)}empty(){this.load("",[[0]],.001)}setMediaElement(e){this.unsubscribePlayerEvents(),super.setMediaElement(e),this.initPlayerEvents()}exportImage(){return at(this,arguments,void 0,function*(e="image/png",n=1,r="dataURL"){return this.renderer.exportImage(e,n,r)})}destroy(){var e;this.emit("destroy"),(e=this.abortController)===null||e===void 0||e.abort(),this.plugins.forEach(n=>n.destroy()),this.subscriptions.forEach(n=>n()),this.unsubscribePlayerEvents(),this.reactiveCleanups.forEach(n=>n()),this.reactiveCleanups=[],this.timer.destroy(),this.renderer.destroy(),super.destroy()}}Qi.BasePlugin=class extends Ao{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}},Qi.dom=C0;var B_=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];s===3?r[0]=a:s===4?r[1]=Object.assign(r[1]||{},a):s===5?(r[1]=r[1]||{})[e[++o]]=a:s===6?r[1][e[++o]]+=a+"":s?(i=t.apply(a,B_(t,a,n,["",null])),r.push(i),a[0]?e[0]|=2:(e[o-2]=0,e[o]=i)):r.push(a)}return r},Dp=new Map;function x0(t){var e=Dp.get(this);return e||(e=new Map,Dp.set(this,e)),(e=B_(this,e.get(t)||(e.set(t,e=(function(n){for(var r,i,o=1,s="",a="",l=[0],u=function(h){o===1&&(h||(s=s.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?l.push(0,h,s):o===3&&(h||s)?(l.push(3,h,s),o=2):o===2&&s==="..."&&h?l.push(4,h,0):o===2&&s&&!h?l.push(5,0,!0,s):o>=5&&((s||!h&&o===5)&&(l.push(o,0,s,i),o=6),h&&(l.push(o,h,0,i),o=6)),s=""},c=0;c<n.length;c++){c&&(o===1&&u(),u(c));for(var d=0;d<n[c].length;d++)r=n[c][d],o===1?r==="<"?(u(),l=[l],o=3):s+=r:o===4?s==="--"&&r===">"?(o=1,s=""):s=r+s[0]:a?r===a?a="":s+=r:r==='"'||r==="'"?a=r:r===">"?(u(),o=1):o&&(r==="="?(o=5,i=s,s=""):r==="/"&&(o<5||n[c][d+1]===">")?(u(),o===3&&(l=l[0]),o=l,(l=l[0]).push(2,0,o),o=0):r===" "||r===" "||r===`
95
+ `||r==="\r"?(u(),o=2):s+=r),o===3&&s==="!--"&&(o=4,l=l[0])}return u(),l})(t)),e),arguments,[])).length>1?e:e[0]}const F0={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,TALK_GMK:"AIzaSyAsz0mHH8fOjpcBfWeCfDVOFPh-nWgsxbs"},H0=(function(t){return F0[t]})("TALK_GMK");function uu(t,e=10){const n=Sr(Bc),[r,i]=ee([]);return z(()=>{if(!t)return;const o=n.conversation(t).subscribeParticipants(s=>i(s!=null?s:[]));return e>10&&o.connected.then(async()=>{for(;o.state.type==="active"&&!o.state.loadedAll&&o.state.latestSnapshot!==null&&o.state.latestSnapshot.length<e;){const s=Math.min(e-o.state.latestSnapshot.length,50);await o.loadMore(s)}}),()=>{o.unsubscribe()}},[t,n,e]),r}const j_=/^\/.*[^\\]\/[im]*$/;function Tp(t){return j_.test(t)?!vs(t).test(""):!1}function vs(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 V_(t){const e=t.replace(/\./g,"\\.").replace(/\*/g,".*");return new RegExp("^"+e+"$","i")}function U0(t,e){const n=h_(e),r=V_(t);return n!==void 0&&r.test(n)}const B0=/^[]/g;function z_(t){return t.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}function nc(t,e){!t()&&!e&&(e=t.toString().replace(/^function\s*\(\)\s*\{\s*return\s*(.*);\s*\}\s*$/,"`$1`")+" was not true")}(t=>{function e(r){}function n(r,i){(function(o,s){switch(s){case"undefined":return o===void 0;case String:return typeof o=="string"||o instanceof String;case Boolean:return typeof o=="boolean"||o instanceof Boolean;case Number:return typeof o=="number"||o instanceof Number;default:return o instanceof s}})(r,i)||(i.name,String(r))}t.defined=e,t.has=function(r,i){r[i]},t.is=n,t.equals=function(r,i){},t.oneOf=function(r,i){i.includes(r)||JSON.stringify(i)},t.isArray=function(r,i){n(r,Array),r&&r.length>0&&n(r[0],i)},t.optional=function(r,i){r!==void 0&&n(r,i)},t.falsy=function(r){},t.never=function(r){}})(nc||(nc={}));const Yr=nc,j0=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"),V0=/\uFE0F/g,z0="‍";function $0(t){if(t===":arslan:")return"https://cdn.talkjs.com/__assets/5461191341cea882b3f227c085d5772c.gif";const e=(function(r){const i=[];let o=0,s=0,a=0;for(;a<r.length;)o=r.charCodeAt(a++),s?(i.push((65536+(s-55296<<10)+(o-56320)).toString(16)),s=0):55296<=o&&o<=56319?s=o:i.push(o.toString(16));return i.join("-")})((n=t).indexOf(z0)<0?n.replace(V0,""):n);var n;return`https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/svg/${e}.svg`}class $_{constructor({mode:e,allowedHostnames:n,allowedPhoneNrs:r,allowedMatches:i,forbiddenMatches:o,forbiddenWords:s,suppressLinks:a,suppressEmailAddresses:l,suppressPhoneNumbers:u,replacement:c}){if(Yr.oneOf(e,["all","otherOnly","off"]),this.mode=e,this.suppressLinks=a!==!1,this.suppressEmailAddresses=l!==!1,this.suppressPhoneNumbers=u!==!1,this.allowedHostnames=n||[],this.allowedPhoneNrs=(r||[]).filter(d=>d).map(d=>d.replace(/[^0-9]/g,"")),this.allowedMatches=(i||[]).filter(Tp).map(d=>vs(d)),this.forbiddenMatches=(o||[]).filter(Tp).map(d=>vs(d)),s){const d=s.split(`
96
+ `).map(h=>h.trim().toLowerCase()).filter(h=>h.length>0&&!h.startsWith("#")).map(h=>z_(h));d.length&&this.forbiddenMatches.push(new RegExp(`\\b(${d.join("|")})\\b`,"gi"))}Yr(()=>this.allowedMatches.every(d=>d.flags.includes("g")),"All regexes in `suppressContactInfo.allowedMatches` must be global. Check `allowedMatches`!"),Yr(()=>this.forbiddenMatches.every(d=>d.flags.includes("g")),"All regexes in `suppressContactInfo.forbiddenMatches` must be global. Check `forbiddenMatches`!"),c=c==null?void 0:c.trim(),this.replacement=c&&c.length>0?c:void 0}shouldSuppress({isContentBySender:e}){return this.mode==="all"||this.mode==="otherOnly"&&!e}}function du(t){var n,r,i,o,s,a,l,u,c,d,h,p,m,_;let e="";return t.t&&(e=`(${t.t("CONTACT_INFORMATION_HIDDEN")})`),{formattedLinks:(n=t.formattedLinks)!=null?n:"plaintext",markup:(r=t.markup)!=null?r:!1,useFallbackMentions:(i=t.useFallbackMentions)!=null?i:!1,sameTabLinkRules:(o=t.sameTabLinkRules)!=null?o:[],enableEmojiImageFallback:(s=t.enableEmojiImageFallback)!=null?s:!1,highlight:(a=t.highlight)!=null?a:[],highlightFromWordBeginnings:(l=t.highlightFromWordBeginnings)!=null?l:!1,contactInfo:(u=t.contactInfo)!=null?u:!1,suppression:(c=t.suppression)!=null?c:new $_({mode:"off"}),contactInfoHiddenText:(p=(h=t.contactInfoHiddenText)!=null?h:(d=t.suppression)==null?void 0:d.replacement)!=null?p:e,customEmojiUrls:(m=t.customEmojiUrls)!=null?m:{},enableActions:(_=t.enableActions)!=null?_:!0}}function Y0({id:t,text:e}){var i;const n=ae(),r=J(()=>{var a;if(n.type==="ConversationListStore")return;const o=n.state$.currentConversationId.get(),s=o&&n.state$.participants.child(o).get();return(a=s==null?void 0:s.find(l=>l.user.id===t))==null?void 0:a.user});return f("span",{className:"t-mention","t-is-current-user":J(n.extUserId$)===t?"":void 0,children:`@${(i=r==null?void 0:r.name)!=null?i:e}`})}function G0({message:t,type:e,action:n,params:r,children:i}){const o=li(),s=q(l=>{l.preventDefault(),o.triggerMessageAction(t,n,r)},[o,t,n,r]),a={"t-action":n,onClick:s};return e==="actionButton"?f("button",{...a,type:"button",children:i}):f("a",{...a,href:"#",children:i})}function Y_(t,e={},n){return mr(t,{...du(e),message:n})}function mr(t,e){const n=t.flatMap(r=>{if(typeof r=="string")return nl(r,e.highlight,e.highlightFromWordBeginnings);switch(r.type){case"bold":case"italic":case"strikethrough":case"blockquote":case"bulletpoint":case"bulletPoint":return W0(r,e);case"bulletlist":case"bulletList":return[me("ul",null,...mr(r.children,e))];case"autolink":case"autoLink":case"link":return K0(r,e);case"codeblock":case"codeBlock":return[f("code",{"data-language":r.language,children:nl(r.text,e.highlight,e.highlightFromWordBeginnings)})];case"codespan":case"codeSpan":return f("code",{children:nl((i=r.text,i.replace(/^\s*\n/m,"").replace(/\n\s*$/m,"")),e.highlight,e.highlightFromWordBeginnings)});case"mention":return Yr.falsy(e.useFallbackMentions),f(Y0,{id:r.id,text:r.text},r.id);case"suppressed":return[f("i",{children:e.contactInfoHiddenText})];case"emoji":return e.enableEmojiImageFallback?[f(X0,{unicode:r.text})]:[r.text];case"actionlink":case"actionLink":case"actionbutton":case"actionButton":return q0(r,e);case"customemoji":case"customEmoji":return r.text;default:Yr.never(r)}var i});return n.every(r=>typeof r=="string")?[n.join("")]:n}function Ho(t){return t.normalize("NFKC").normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase()}function nl(t,e,n=!1){if(!t||!e.length)return[t];const r=Ho(t),i=t.toLowerCase()!==r,o=e.map(l=>Ho(l).trim()).filter(l=>l.length),s=(function(l){const u=l.map(d=>d.trim()).filter(d=>d).sort((d,h)=>h.length-d.length);if(u.length===0)return B0;const c=u.map(z_).join("|");return new RegExp(c,"gi")})(o),a=Zs(r,n?new RegExp(`(?<=^|\\s)(${s.source})`,s.flags):s).map(l=>({offset:l.index,matchedText:l[0],index:l.index}));return ql(t,a,({index:l,matchedText:u})=>[f("mark",{className:"t-highlighted-text",children:i?(function(c,d,h){let p=0,m=0;for(;m<d&&p<c.length;)m+=Ho(c[p]).length,p+=1;let _=p;for(;m<d+h&&_<c.length;)m+=Ho(c[_]).length,_+=1;return c.substring(p,_)})(t,l,u.length):t.slice(l,l+u.length)})])}const W0=(t,e)=>[me({bold:"strong",italic:"em",strikethrough:"del",blockquote:"blockquote",bulletpoint:"li",bulletPoint:"li"}[t.type],null,...mr(t.children,e))];function X0({unicode:t}){const[e,n]=ee(()=>t!==":arslan:");return z(()=>{e&&!iE(t)&&n(!1)},[]),e?f("span",{className:"t-emoji",children:t}):f("img",{className:"t-emoji",src:$0(t),alt:t})}const K0=(t,e)=>{const n="children"in t?t.children:[t.text];switch(e.formattedLinks){case"link":return[me("a",{target:(function(r,i){for(const o of r)if(j_.test(o)){if(vs(o).test(i))return"_top"}else if(U0(o,i))return"_top";return"_blank"})(e.sameTabLinkRules,t.url),href:t.url,rel:"noreferrer"},...mr(n,e))];case"plaintext":return"children"in t&&t.children.every(r=>typeof r=="string")?[t.children.join("")]:[me(ie,null,...mr(n,e))];default:Yr.never(e.formattedLinks)}},q0=(t,e)=>e.enableActions?[me(G0,{type:t.type==="actionlink"?"actionLink":t.type==="actionbutton"?"actionButton":t.type,action:t.action,params:t.params,message:e.message},...mr(t.children,e))]:"children"in t&&t.children.every(n=>typeof n=="string")?[t.children.join("")]:[me(ie,null,...mr(t.children,e))];function J0(t,e){return Jo(t,du(e))}function Jo(t,e){return t.flatMap(n=>{if(typeof n=="string"){let r=[n];return r=rl(r,i=>(function(o,s){if(s.contactInfo!=="suppress")return[o];const{suppression:{forbiddenMatches:a,allowedMatches:l}}=s,u=eu(a,c=>Zs(o,c)).filter(([c])=>!l.some(d=>c.match(d)!==null)).map(c=>({offset:c.index,matchedText:c[0]}));return ql(o,u,()=>[{type:"suppressed",text:"CONTACT_INFORMATION_HIDDEN"}])})(i,e)),r=rl(r,i=>(function(o){return ql(o,(function(s){const a=[];let l;for(;l=j0.exec(s);){const u=l[0],c=l.index;a.push({offset:c,matchedText:u})}return a})(o),s=>[{type:"emoji",text:s.matchedText}])})(i)),r=rl(r,i=>(function(o,s){if(s.contactInfo!=="suppress")return[o];const a=[];if((s.suppression.suppressEmailAddresses||s.suppression.suppressLinks)&&a.push(b_),s.suppression.suppressPhoneNumbers&&a.push(N_),a.length===0)return[o];const l=k_(o,{multilineSteps:[],singlelineSteps:a}),u=l.map(c=>typeof c=="string"?c:Rp(c.url,s.suppression)?c.text:{type:"suppressed",text:"CONTACT_INFORMATION_HIDDEN"});return au(u)})(i,e)),r}switch(n.type){case"bold":case"italic":case"strikethrough":case"blockquote":case"bulletlist":case"bulletList":case"bulletpoint":case"bulletPoint":return{type:n.type,children:Jo(n.children,e)};case"codespan":case"codeSpan":case"codeblock":case"codeBlock":case"suppressed":case"emoji":case"customemoji":case"customEmoji":return n;case"mention":return{type:"mention",id:n.id,text:n.text};case"autolink":case"autoLink":return(function(r,i){return i.contactInfo==="link"?r:i.contactInfo==="suppress"?Rp(r.url,i.suppression)?r:{type:"suppressed",text:"CONTACT_INFORMATION_HIDDEN"}:r.text})(n,e);case"link":return{type:"link",url:n.url,children:Jo(n.children,e)};case"actionlink":case"actionLink":case"actionbutton":case"actionButton":return{type:n.type,action:n.action,params:n.params,children:Jo(n.children,e)}}})}function rl(t,e){return eu(t,n=>typeof n=="string"?e(n):[n])}function Rp(t,e){if(e.allowedMatches.some(n=>t.match(n)!==null))return!0;if(e.forbiddenMatches.some(n=>t.match(n)!==null))return!1;if(t.startsWith("mailto:")){const n=t.substring(7).replace(/^.*@/,"");return!e.suppressEmailAddresses||Ip(e.allowedHostnames,n)}if(t.startsWith("tel:")){const n=t.substring(4).replace(/[^0-9]/g,"");return!e.suppressPhoneNumbers||e.allowedPhoneNrs.some(r=>n.endsWith(r))}{const n=h_(t);return!e.suppressLinks||!n||Ip(e.allowedHostnames,n)}}function Ip(t,e){for(const n of t)if(V_(n).test(e))return!0;return!1}function go({block:t,nonInteractive:e,message:n,className:r=""}){const i=ae(),o=!e,s=J(i.highlightedStrings$),a=i.type==="ConversationListStore",{nodes:l,roleOptions:u}=(function(h,p){var I;const m=ae(),_=J(m.app$.role);re.defined(_);const E=p.type==="UserMessage",A=((I=p.sender)==null?void 0:I.id)===m.extUserId$.peek(),g=_.suppressContactInfo,S=E&&g.shouldSuppress({isContentBySender:A}),O=J0(h.children,{contactInfo:S?"suppress":"link",suppression:g}),D={sameTabLinkRules:_.sameTabLinkRules,contactInfoHiddenText:_.suppressContactInfo.replacement||`(${m.t$.peek().CONTACT_INFORMATION_HIDDEN})`};return{nodes:O,roleOptions:D}})(t,n),c=Y_(l,{enableEmojiImageFallback:!0,formattedLinks:o?"link":"plaintext",enableActions:o,highlight:s,highlightFromWordBeginnings:a,...u},n),d=(function(h){return h.every(m=>typeof m=="object"&&m.type==="emoji")?`t-emoji-only t-emoji-count-${h.length}`:""})(l);return me("span",{className:`t-text ${r} ${d}`},...c)}function gt({text:t,className:e=""}){const n=ae();return me("span",{className:`t-highlightable ${e}`},...Y_([t],{enableEmojiImageFallback:!0,formattedLinks:"plaintext",enableActions:!1,highlight:J(n.highlightedStrings$),highlightFromWordBeginnings:n.type==="ConversationListStore"},null))}function hu(t){const e=Qe(),n=ae(),{className:r="",...i}=t,o=J(()=>n.state$.messages.child(t.common.conversation.id).lookup.child(t.message.id).content.child(0).url.get());return f("div",{className:`t-message-content ${r}`,children:t.message.content.map(s=>{var a;return f(Z0,{block:s,theme:e,downloadUrl:o,...i},t.message.createdAt+((a=t.message.editedAt)!=null?a:0))})})}function Z0({common:t,block:e,message:n,theme:r,downloadUrl:i}){const o=(function(s,a){switch(a.type){case"text":return s.TextBlock;case"location":return s.LocationBlock;case"file":switch(a.subtype){case"image":return s.ImageBlock;case"video":return s.VideoBlock;case"voice":return s.VoiceBlock;case"audio":return s.AudioBlock;default:return s.FileBlock}default:re.never(a)}})(r,e);return f(o,{block:e,common:t,message:n,downloadUrl:i})}const Q0=27;function So(t,e,n=!0){const r=q(o=>{o.keyCode===Q0&&t()},[t]),i=q(o=>{o.target.closest(e)===null&&t(o)},[e,t]);z(()=>{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])}const eD=".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)}",tD={focusable:"false",preserveAspectRatio:"xMidYMid meet"};var yp,Cp,il,Np,bp,wp={exports:{}};function nD(){return Cp?yp:(Cp=1,yp="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}function rD(){if(Np)return il;Np=1;var t=nD();function e(){}function n(){}return n.resetWarningCache=e,il=function(){function r(s,a,l,u,c,d){if(d!==t){var h=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 h.name="Invariant Violation",h}}function i(){return r}r.isRequired=r;var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:e};return o.PropTypes=o,o},il}function iD(){return bp||(bp=1,wp.exports=rD()()),wp.exports}const Me=Ys(iD()),K=_t(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:c,height:d,viewBox:h=`0 0 ${c} ${d}`,...p}={}){const{tabindex:m,..._}=p,E={...tD,..._,width:c,height:d,viewBox:h};return E["aria-label"]||E["aria-labelledby"]?(E.role="img",m!=null&&(E.focusable="true",E.tabindex=m)):E["aria-hidden"]=!0,E})({...o,tabindex:n}),u=l;return t&&(u.className=t),a!=null&&(u.tabIndex=typeof a=="number"?a:Number(n)),s&&(u.ref=s),r&&(u.xmlns=r),i&&(u.preserveAspectRatio=i),F.createElement("svg",u,e)});K.displayName="Icon",K.propTypes={"aria-hidden":Me.oneOfType([Me.bool,Me.oneOf(["true","false"])]),"aria-label":Me.string,"aria-labelledby":Me.string,children:Me.node,className:Me.string,height:Me.oneOfType([Me.number,Me.string]),preserveAspectRatio:Me.string,tabIndex:Me.oneOfType([Me.number,Me.string]),viewBox:Me.string,width:Me.oneOfType([Me.number,Me.string]),xmlns:Me.string};const oD=F.forwardRef(function({children:t,size:e=16,...n},r){return e===20||e==="20"||e==="20px"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",...n},f("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"}),f("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):e===24||e==="24"||e==="24px"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...n},f("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):F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("path",{d:"M13 24 4 15 5.414 13.586 13 21.171 26.586 7.586 28 9 13 24z"}),t)}),sD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("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"}),f("path",{d:"M11.5,11A2.5,2.5,0,1,0,14,13.5,2.48,2.48,0,0,0,11.5,11Z"}),f("path",{d:"M20.5,11A2.5,2.5,0,1,0,23,13.5,2.48,2.48,0,0,0,20.5,11Z"}),f("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)}),aD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("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"}),f("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"}),f("path",{d:"M11.5,11A2.5,2.5,0,1,0,14,13.5,2.48,2.48,0,0,0,11.5,11Z"}),f("path",{d:"M20.5,11A2.5,2.5,0,1,0,23,13.5,2.48,2.48,0,0,0,20.5,11Z"}),f("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)}),lD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("circle",{cx:"8",cy:"16",r:"2"}),f("circle",{cx:"16",cy:"16",r:"2"}),f("circle",{cx:"24",cy:"16",r:"2"}),t)}),cD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("circle",{cx:"16",cy:"8",r:"2"}),f("circle",{cx:"16",cy:"16",r:"2"}),f("circle",{cx:"16",cy:"24",r:"2"}),t)}),uD=F.forwardRef(function({children:t,size:e=16,...n},r){return e==="glyph"||e==="glyph"||e==="glyphpx"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 6 10",fill:"currentColor",...n},f("path",{d:"M0 5 5 0 5.7.7 1.4 5 5.7 9.3 5 10z"}),t):e===16||e==="16"||e==="16px"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},f("path",{d:"M5 8 10 3 10.7 3.7 6.4 8 10.7 12.3 10 13z"}),t):F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("path",{d:"M10 16 20 6 21.4 7.4 12.8 16 21.4 24.6 20 26z"}),t)}),dD=F.forwardRef(function({children:t,size:e=16,...n},r){return e==="glyph"||e==="glyph"||e==="glyphpx"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 6 10",fill:"currentColor",...n},f("path",{d:"M6 5 1 10 .3 9.3 4.6 5 .3.7 1 0z"}),t):e===16||e==="16"||e==="16px"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},f("path",{d:"M11 8 6 13 5.3 12.3 9.6 8 5.3 3.7 6 3z"}),t):F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("path",{d:"M22 16 12 26 10.6 24.6 19.2 16 10.6 7.4 12 6z"}),t)}),hD=F.forwardRef(function({children:t,size:e=16,...n},r){return e==="glyph"||e==="glyph"||e==="glyphpx"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10 6",fill:"currentColor",...n},f("path",{d:"M5 0 10 5 9.3 5.7 5 1.4.7 5.7 0 5z"}),t):e===16||e==="16"||e==="16px"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},f("path",{d:"M8 5 13 10 12.3 10.7 8 6.4 3.7 10.7 3 10z"}),t):F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("path",{d:"M16 10 26 20 24.6 21.4 16 12.8 7.4 21.4 6 20z"}),t)}),pD=F.forwardRef(function({children:t,size:e=16,...n},r){return e==="glyph"||e==="glyph"||e==="glyphpx"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10 6",fill:"currentColor",...n},f("path",{d:"M5 6 0 1 .7.3 5 4.6 9.3.3 10 1z"}),t):e===16||e==="16"||e==="16px"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},f("path",{d:"M8 11 3 6 3.7 5.3 8 9.6 12.3 5.3 13 6z"}),t):F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("path",{d:"M16 22 6 12 7.4 10.6 16 19.2 24.6 10.6 26 12z"}),t)}),fD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("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)}),mD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("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)}),ED=F.forwardRef(function({children:t,size:e=16,...n},r){return e===16||e==="16"||e==="16px"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},f("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"}),f("path",{d:"M13,12v2H3v-2H2v2l0,0c0,0.6,0.4,1,1,1h10c0.6,0,1-0.4,1-1l0,0v-2H13z"}),t):F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("path",{d:"M26,24v4H6V24H4v4H4a2,2,0,0,0,2,2H26a2,2,0,0,0,2-2h0V24Z"}),f("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)}),_D=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("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)}),AD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("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"}),f("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)}),gD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("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)}),SD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("path",{d:"M2 26H30V28H2z"}),f("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)}),OD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("path",{d:"M12 12H14V24H12z"}),f("path",{d:"M18 12H20V24H18z"}),f("path",{d:"M4,6V8H6V28a2,2,0,0,0,2,2H24a2,2,0,0,0,2-2V8h2V6ZM8,28V8H24V28Z"}),f("path",{d:"M12 2H20V4H12z"}),t)}),vD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("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)}),DD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("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)}),TD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("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"}),f("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)}),RD=F.forwardRef(function({children:t,size:e=16,...n},r){return e===16||e==="16"||e==="16px"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},f("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"}),f("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"}),f("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):F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("path",{d:"M17 22 17 14 13 14 13 16 15 16 15 22 12 22 12 24 20 24 20 22 17 22z"}),f("path",{d:"M16,8a1.5,1.5,0,1,0,1.5,1.5A1.5,1.5,0,0,0,16,8Z"}),f("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)}),ID=F.forwardRef(function({children:t,size:e=16,...n},r){return e===16||e==="16"||e==="16px"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},f("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):F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("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)}),yD=F.forwardRef(function({children:t,size:e=16,...n},r){return e===16||e==="16"||e==="16px"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},f("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):F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("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)}),CD=F.forwardRef(function({children:t,size:e=16,...n},r){return e===16||e==="16"||e==="16px"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},f("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):e===20||e==="20"||e==="20px"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",...n},f("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):e===24||e==="24"||e==="24px"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...n},f("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):F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("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)}),ND=F.forwardRef(function({children:t,size:e=16,...n},r){return e===16||e==="16"||e==="16px"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},f("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):F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("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)}),bD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("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"}),f("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)}),wD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("path",{d:"M23,14v3A7,7,0,0,1,9,17V14H7v3a9,9,0,0,0,8,8.94V28H11v2H21V28H17V25.94A9,9,0,0,0,25,17V14Z"}),f("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)}),LD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("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)}),kD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("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"}),f("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)}),MD=F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("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)});function B(t){const{type:e,className:n,...r}=t;return f(PD[e],{className:`t-icon ${n||""}`,...r})}const PD={checkmark:oD,emoji:sD,addEmoji:aD,search:F.forwardRef(function({children:t,size:e=16,...n},r){return e===16||e==="16"||e==="16px"?F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},f("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):F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("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)}),plus:F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("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)}),email:F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("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)}),horizontalDots:lD,verticalDots:cD,chevronLeft:uD,chevronRight:dD,chevronUp:hD,chevronDown:pD,arrowsVertical:AD,arrowUp:ID,arrowLeft:yD,arrowRight:CD,arrowDown:ND,close:fD,inProgress:mD,download:ED,attachment:_D,reply:gD,edit:SD,trash:OD,pin:vD,play:t=>f(DD,{viewBox:"-1 0 31 32",...t}),pause:TD,info:RD,send:F.forwardRef(function({children:t,size:e=16,...n},r){return F.createElement(K,{width:e,height:e,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},f("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:bD,microphone:wD,stop:LD,spinner:function(t){const e=`t-spin ${t.className||""}`;return f("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:f("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:kD,movie:MD};function pu(){return f(B,{type:"spinner","aria-label":J(ae().t$).LOADING,className:"t-loading-icon"})}const G_={"emoji-picker-element":"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/+esm","mpegts.js":"https://cdn.jsdelivr.net/npm/mpegts.js@1.7.3","opus-media-recorder-wasm":"https://cdn.jsdelivr.net/npm/opus-media-recorder@0.8.0/WebMOpusEncoder.wasm"};async function xD(t,e){if(typeof window=="undefined"||window.document===void 0)return new Promise(()=>{});try{const n=t!=null?t:Vr.emojiPickerTranslationUrl,r=G_["emoji-picker-element"],[i,o]=await Promise.all([Lp(r),Lp(n)]),s=e!=null?e:Vr.emojiDataUrl,a={...i,i18n:o.default,dataSource:s};return await new a.Database({dataSource:s}).ready(),a}catch(n){return Ll.error("Failed to load emoji picker:",n),new Promise(()=>{})}}async function Lp(t){return import(t).catch(()=>new Function("url","return import(url)")(t)).catch(()=>{throw new Error("Cannot dynamically import module in this environment")})}function fu(){const t=ae(),[e,n]=ee();return Wm(()=>{const r=t.translationData$.get();t.app$.get()&&t.currentUser$.get()&&r&&(function(i,o){const s=JSON.stringify([i,o]);if(s in ol)return ol[s];const a=xD(i,o);return ol[s]=a,a})(r.emojiPickerTranslationUrl,r.emojiDataUrl).then(i=>n({value:i}))},[]),e}const ol={};function ta(t){const{onClose:e,onEmojiSelected:n}=rS(),r=X(null),i=ae(),o=J(i.t$),s=fu();return z(()=>{if(!s)return;re.defined(r.current);const a=r.current,l=a.shadowRoot;(function(d,h){const p=document.createElement("style");p.textContent=h,d.appendChild(p)})(l,eD);const u=d=>{var p;const h=(p=d.detail.unicode)!=null?p:d.detail.name;n(h)};function c(d){d.pointerType==="mouse"&&(l.querySelector("section").dataset.hasMouse="true")}return a.addEventListener("emoji-click",u),a.addEventListener("pointermove",c,{once:!0}),a.i18n=s.value.i18n,()=>{a.removeEventListener("emoji-click",u),a.removeEventListener("pointermove",c)}},[s,n]),z(()=>{var a;s&&r.current&&!i.device$.isMobile.peek()&&((a=r.current.shadowRoot.getElementById("search"))==null||a.focus())},[s,i]),So(()=>e(),".t-emoji-picker"),f("div",s?{className:"t-emoji-picker",children:f("emoji-picker",{locale:o.locale,ref:r,class:t.colorScheme,"data-source":s.value.dataSource})}:{className:"t-emoji-picker","t-loading":"",children:f(pu,{})})}function mu({messageId:t,colorScheme:e}){const{closePopover:n}=jc(),r=li();return f("div",{className:"t-reaction-picker",children:f(nE.Provider,{value:{onClose:n,onEmojiSelected:i=>{r.addReaction(t,i),n()}},children:f(ta,{colorScheme:e})})})}function rc(){return rc=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},rc.apply(null,arguments)}function W_(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function ic(t,e){return ic=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},ic(t,e)}function X_(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,ic(t,e)}var kp,Mp,sl,Pp,xp,Fp={exports:{}};function FD(){if(Pp)return sl;Pp=1;var t=Mp?kp:(Mp=1,kp="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");function e(){}function n(){}return n.resetWarningCache=e,sl=function(){function r(s,a,l,u,c,d){if(d!==t){var h=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 h.name="Invariant Violation",h}}function i(){return r}r.isRequired=r;var o={array:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:e};return o.PropTypes=o,o},sl}function Hp(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}xp||(xp=1,Fp.exports=FD()()),Fp.exports;const Up=!1,K_=F.createContext(null);var Ii="unmounted",Xn="exited",Kn="entering",Mr="entered",oc="exiting",cn=(function(t){function e(r,i){var o;o=t.call(this,r,i)||this;var s,a=i&&!i.isMounting?r.enter:r.appear;return o.appearStatus=null,r.in?a?(s=Xn,o.appearStatus=Kn):s=Mr:s=r.unmountOnExit||r.mountOnEnter?Ii:Xn,o.state={status:s},o.nextCallback=null,o}X_(e,t),e.getDerivedStateFromProps=function(r,i){return r.in&&i.status===Ii?{status:Xn}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(r){var i=null;if(r!==this.props){var o=this.state.status;this.props.in?o!==Kn&&o!==Mr&&(i=Kn):o!==Kn&&o!==Mr||(i=oc)}this.updateStatus(!1,i)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var r,i,o,s=this.props.timeout;return r=i=o=s,s!=null&&typeof s!="number"&&(r=s.exit,i=s.enter,o=s.appear!==void 0?s.appear:i),{exit:r,enter:i,appear:o}},n.updateStatus=function(r,i){r===void 0&&(r=!1),i!==null?(this.cancelNextCallback(),i===Kn?this.performEnter(r):this.performExit()):this.props.unmountOnExit&&this.state.status===Xn&&this.setState({status:Ii})},n.performEnter=function(r){var i=this,o=this.props.enter,s=this.context?this.context.isMounting:r,a=this.props.nodeRef?[s]:[F.findDOMNode(this),s],l=a[0],u=a[1],c=this.getTimeouts(),d=s?c.appear:c.enter;!r&&!o||Up?this.safeSetState({status:Mr},function(){i.props.onEntered(l)}):(this.props.onEnter(l,u),this.safeSetState({status:Kn},function(){i.props.onEntering(l,u),i.onTransitionEnd(d,function(){i.safeSetState({status:Mr},function(){i.props.onEntered(l,u)})})}))},n.performExit=function(){var r=this,i=this.props.exit,o=this.getTimeouts(),s=this.props.nodeRef?void 0:F.findDOMNode(this);i&&!Up?(this.props.onExit(s),this.safeSetState({status:oc},function(){r.props.onExiting(s),r.onTransitionEnd(o.exit,function(){r.safeSetState({status:Xn},function(){r.props.onExited(s)})})})):this.safeSetState({status:Xn},function(){r.props.onExited(s)})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(r,i){i=this.setNextCallback(i),this.setState(r,i)},n.setNextCallback=function(r){var i=this,o=!0;return this.nextCallback=function(s){o&&(o=!1,i.nextCallback=null,r(s))},this.nextCallback.cancel=function(){o=!1},this.nextCallback},n.onTransitionEnd=function(r,i){this.setNextCallback(i);var o=this.props.nodeRef?this.props.nodeRef.current:F.findDOMNode(this),s=r==null&&!this.props.addEndListener;if(o&&!s){if(this.props.addEndListener){var a=this.props.nodeRef?[this.nextCallback]:[o,this.nextCallback],l=a[0],u=a[1];this.props.addEndListener(l,u)}r!=null&&setTimeout(this.nextCallback,r)}else setTimeout(this.nextCallback,0)},n.render=function(){var r=this.state.status;if(r===Ii)return null;var i=this.props,o=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var s=W_(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return F.createElement(K_.Provider,{value:null},typeof o=="function"?o(r,s):F.cloneElement(F.Children.only(o),s))},e})(F.Component);function wr(){}cn.contextType=K_,cn.propTypes={},cn.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:wr,onEntering:wr,onEntered:wr,onExit:wr,onExiting:wr,onExited:wr},cn.UNMOUNTED=Ii,cn.EXITED=Xn,cn.ENTERING=Kn,cn.ENTERED=Mr,cn.EXITING=oc;var al=function(t,e){return t&&e&&e.split(" ").forEach(function(n){return i=n,void((r=t).classList?r.classList.remove(i):typeof r.className=="string"?r.className=Hp(r.className,i):r.setAttribute("class",Hp(r.className&&r.className.baseVal||"",i)));var r,i})},sc=(function(t){function e(){for(var r,i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return(r=t.call.apply(t,[this].concat(o))||this).appliedClasses={appear:{},enter:{},exit:{}},r.onEnter=function(a,l){var u=r.resolveArguments(a,l),c=u[0],d=u[1];r.removeClasses(c,"exit"),r.addClass(c,d?"appear":"enter","base"),r.props.onEnter&&r.props.onEnter(a,l)},r.onEntering=function(a,l){var u=r.resolveArguments(a,l),c=u[0],d=u[1]?"appear":"enter";r.addClass(c,d,"active"),r.props.onEntering&&r.props.onEntering(a,l)},r.onEntered=function(a,l){var u=r.resolveArguments(a,l),c=u[0],d=u[1]?"appear":"enter";r.removeClasses(c,d),r.addClass(c,d,"done"),r.props.onEntered&&r.props.onEntered(a,l)},r.onExit=function(a){var l=r.resolveArguments(a)[0];r.removeClasses(l,"appear"),r.removeClasses(l,"enter"),r.addClass(l,"exit","base"),r.props.onExit&&r.props.onExit(a)},r.onExiting=function(a){var l=r.resolveArguments(a)[0];r.addClass(l,"exit","active"),r.props.onExiting&&r.props.onExiting(a)},r.onExited=function(a){var l=r.resolveArguments(a)[0];r.removeClasses(l,"exit"),r.addClass(l,"exit","done"),r.props.onExited&&r.props.onExited(a)},r.resolveArguments=function(a,l){return r.props.nodeRef?[r.props.nodeRef.current,a]:[a,l]},r.getClassNames=function(a){var l=r.props.classNames,u=typeof l=="string",c=u?(u&&l?l+"-":"")+a:l[a];return{baseClassName:c,activeClassName:u?c+"-active":l[a+"Active"],doneClassName:u?c+"-done":l[a+"Done"]}},r}X_(e,t);var n=e.prototype;return n.addClass=function(r,i,o){var s=this.getClassNames(i)[o+"ClassName"],a=this.getClassNames("enter").doneClassName;i==="appear"&&o==="done"&&a&&(s+=" "+a),o==="active"&&r&&r.scrollTop,s&&(this.appliedClasses[i][o]=s,(function(l,u){l&&u&&u.split(" ").forEach(function(c){return h=c,void((d=l).classList?d.classList.add(h):(function(p,m){return p.classList?!!m&&p.classList.contains(m):(" "+(p.className.baseVal||p.className)+" ").indexOf(" "+m+" ")!==-1})(d,h)||(typeof d.className=="string"?d.className=d.className+" "+h:d.setAttribute("class",(d.className&&d.className.baseVal||"")+" "+h)));var d,h})})(r,s))},n.removeClasses=function(r,i){var o=this.appliedClasses[i],s=o.base,a=o.active,l=o.done;this.appliedClasses[i]={},s&&al(r,s),a&&al(r,a),l&&al(r,l)},n.render=function(){var r=this.props;r.classNames;var i=W_(r,["classNames"]);return F.createElement(cn,rc({},i,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},e})(F.Component);sc.defaultProps={classNames:""},sc.propTypes={};const HD={ltr:["ArrowLeft","ArrowRight"],rtl:["ArrowRight","ArrowLeft"],ttb:["ArrowUp","ArrowDown"]};function q_(t,{focused:e,setFocused:n,itemCount:r,dir:i,onConfirm:o,onSpace:s}){if(r===0)return!1;const a=c=>{c=Jl(0,c,r-1),n(c)},[l,u]=HD[i];switch(t){case l:return a(e-1),!0;case u:return a(e+1),!0;case" ":return!!s&&s();case"Enter":case"Tab":return o(),!0}return!1}function J_({focused:t,setFocused:e,buttonId:n}){We(()=>{var a;const s=n(t);s&&((a=document.getElementById(s))==null||a.scrollIntoView({block:"nearest"}))},[t,n]);const r=q(s=>{const a=s.currentTarget.dataset.index;e(+a)},[e]),i=Z(()=>({role:"menu","aria-activedescendant":n(t)}),[t,n]),o=q(s=>({onMouseMove:r,id:n(s),"data-index":s}),[r,n]);return{containerProps:i,itemProps:o}}function Eu(t){const[e,n]=ee([]),[r,i]=ee([]),[o,s]=ee(0),[a,l]=ee(0),u=fu(),c=Z(()=>(u==null?void 0:u.value)&&new u.value.Database({dataSource:u.value.dataSource}),[u]),d=ho(),h=J(d.state$.suggestEmojiQuery);z(()=>{c&&(h?(async function(){const g=await c.getPreferredSkinTone();l(g);let S=await c.getEmojiBySearchQuery(h);if(S=S.filter(O=>O.url||(function(D){return D.version<=oE&&!BD.includes(D.unicode)})(O)),(function(O,D){D.sort((I,R)=>{var T,C;const y=(T=I.shortcodes)==null?void 0:T.find(N=>N.startsWith(O)),v=(C=R.shortcodes)==null?void 0:C.find(N=>N.startsWith(O));return y&&!v?-1:!y&&v?1:y&&v?y.length-v.length:0})})(h.substring(1),S),s(0),n(S),S.length>0&&i(S),h.endsWith(":")){const O=h.slice(1,-1),D=S.find(I=>{var R;return(R=I.shortcodes)==null?void 0:R.includes(O)});D&&d.selectEmoji(yi(D,g))}})():n([]))},[h,d,c]);const p=q(g=>{const S=e[g];return S&&"emoji-button-"+yi(S,a)},[e,a]),{containerProps:m,itemProps:_}=J_({focused:o,setFocused:s,buttonId:p}),E=e.length>0;So(()=>d.closeSuggester(),".t-emoji-suggest-bar",E),z(()=>{if(E)return d.listenKeydown("emoji",g=>q_(g,{dir:"ltr",focused:o,setFocused:s,itemCount:e.length,onConfirm(){const S=e[o];re.defined(S),d.selectEmoji(yi(S,a))}})),()=>{d.listenKeydown("emoji",void 0)};d.listenKeydown("emoji",void 0)},[d,e,o,E,a]);const A=X(null);return f(sc,{in:E,timeout:100,classNames:"slide",mountOnEnter:!0,unmountOnExit:!0,nodeRef:A,children:f("div",{className:"t-emoji-suggest-bar",ref:A,...m,children:r.map((g,S)=>f(UD,{emoji:g,skinTone:a,focused:S===o,onSelect:O=>d.selectEmoji(O),..._(S)},yi(g,a)))})})}function yi(t,e){return ac(t)?Z_(t,e):t.name}function ac(t){return!!t.unicode}function UD(t){var l;const{emoji:e,focused:n,skinTone:r,onSelect:i,...o}=t,s=((l=e.shortcodes)!=null?l:[]).join(", "),a=ac(e)?[e.unicode,s].join(", "):s;return f("button",{"t-focused":n?"":void 0,title:s,"aria-label":a,onClick:()=>i(yi(e,r)),...o,children:ac(e)?Z_(e,r):null})}function Z_(t,e){var r,i;const n=(r=t.skins)==null?void 0:r.find(o=>o.tone===e);return(i=n==null?void 0:n.unicode)!=null?i:t.unicode}const BD=["🏻","🏼","🏽","🏾","🏿"],jD=["top","right","bottom","left"],Ds=Math.min,cr=Math.max,Ts=Math.round,Uo=Math.floor,Zt=t=>({x:t,y:t}),VD={left:"right",right:"left",bottom:"top",top:"bottom"},zD={start:"end",end:"start"};function Bp(t,e,n){return cr(t,Ds(e,n))}function Oo(t,e){return typeof t=="function"?t(e):t}function Er(t){return t.split("-")[0]}function na(t){return t.split("-")[1]}function Q_(t){return t==="x"?"y":"x"}function eA(t){return t==="y"?"height":"width"}const $D=new Set(["top","bottom"]);function Ln(t){return $D.has(Er(t))?"y":"x"}function tA(t){return Q_(Ln(t))}function lc(t){return t.replace(/start|end/g,e=>zD[e])}const jp=["left","right"],Vp=["right","left"],YD=["top","bottom"],GD=["bottom","top"];function WD(t,e,n,r){const i=na(t);let o=(function(s,a,l){switch(s){case"top":case"bottom":return l?a?Vp:jp:a?jp:Vp;case"left":case"right":return a?YD:GD;default:return[]}})(Er(t),n==="start",r);return i&&(o=o.map(s=>s+"-"+i),e&&(o=o.concat(o.map(lc)))),o}function Bo(t){return t.replace(/left|right|bottom|top/g,e=>VD[e])}function Rs(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 zp(t,e,n){let{reference:r,floating:i}=t;const o=Ln(e),s=tA(e),a=eA(s),l=Er(e),u=o==="y",c=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,h=r[a]/2-i[a]/2;let p;switch(l){case"top":p={x:c,y:r.y-i.height};break;case"bottom":p={x:c,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(na(e)){case"start":p[s]-=h*(n&&u?-1:1);break;case"end":p[s]+=h*(n&&u?-1:1)}return p}async function Is(t,e){var n;e===void 0&&(e={});const{x:r,y:i,platform:o,rects:s,elements:a,strategy:l}=t,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:h=!1,padding:p=0}=Oo(e,t),m=(function(D){return typeof D!="number"?(function(I){return{top:0,right:0,bottom:0,left:0,...I}})(D):{top:D,right:D,bottom:D,left:D}})(p),_=a[h?d==="floating"?"reference":"floating":d],E=Rs(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(_)))==null||n?_:_.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),A=d==="floating"?{x:r,y:i,width:s.floating.width,height:s.floating.height}:s.reference,g=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),S=await(o.isElement==null?void 0:o.isElement(g))&&await(o.getScale==null?void 0:o.getScale(g))||{x:1,y:1},O=Rs(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:A,offsetParent:g,strategy:l}):A);return{top:(E.top-O.top+m.top)/S.y,bottom:(O.bottom-E.bottom+m.bottom)/S.y,left:(E.left-O.left+m.left)/S.x,right:(O.right-E.right+m.right)/S.x}}function $p(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Yp(t){return jD.some(e=>t[e]>=0)}const XD=new Set(["left","top"]);function ra(){return typeof window!="undefined"}function ii(t){return _u(t)?(t.nodeName||"").toLowerCase():"#document"}function Tt(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Qt(t){var e;return(e=(_u(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function _u(t){return!!ra()&&(t instanceof Node||t instanceof Tt(t).Node)}function Ht(t){return!!ra()&&(t instanceof Element||t instanceof Tt(t).Element)}function tn(t){return!!ra()&&(t instanceof HTMLElement||t instanceof Tt(t).HTMLElement)}function cc(t){return!(!ra()||typeof ShadowRoot=="undefined")&&(t instanceof ShadowRoot||t instanceof Tt(t).ShadowRoot)}const KD=new Set(["inline","contents"]);function eo(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=Ut(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!KD.has(i)}const qD=new Set(["table","td","th"]);function JD(t){return qD.has(ii(t))}const ZD=[":popover-open",":modal"];function ys(t){return ZD.some(e=>{try{return t.matches(e)}catch(n){return!1}})}const QD=["transform","translate","scale","rotate","perspective"],eT=["transform","translate","scale","rotate","perspective","filter"],tT=["paint","layout","strict","content"];function uc(t){const e=Au(),n=Ht(t)?Ut(t):t;return QD.some(r=>!!n[r]&&n[r]!=="none")||!!n.containerType&&n.containerType!=="normal"||!e&&!!n.backdropFilter&&n.backdropFilter!=="none"||!e&&!!n.filter&&n.filter!=="none"||eT.some(r=>(n.willChange||"").includes(r))||tT.some(r=>(n.contain||"").includes(r))}function Au(){return!(typeof CSS=="undefined"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const nT=new Set(["html","body","#document"]);function Gr(t){return nT.has(ii(t))}function Ut(t){return Tt(t).getComputedStyle(t)}function ia(t){return Ht(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function kn(t){if(ii(t)==="html")return t;const e=t.assignedSlot||t.parentNode||cc(t)&&t.host||Qt(t);return cc(e)?e.host:e}function nA(t){const e=kn(t);return Gr(e)?t.ownerDocument?t.ownerDocument.body:t.body:tn(e)&&eo(e)?e:nA(e)}function to(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=nA(t),o=i===((r=t.ownerDocument)==null?void 0:r.body),s=Tt(i);if(o){const a=dc(s);return e.concat(s,s.visualViewport||[],eo(i)?i:[],a&&n?to(a):[])}return e.concat(i,to(i,[],n))}function dc(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function rA(t){const e=Ut(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=tn(t),o=i?t.offsetWidth:n,s=i?t.offsetHeight:r,a=Ts(n)!==o||Ts(r)!==s;return a&&(n=o,r=s),{width:n,height:r,$:a}}function gu(t){return Ht(t)?t:t.contextElement}function Wr(t){const e=gu(t);if(!tn(e))return Zt(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:o}=rA(e);let s=(o?Ts(n.width):n.width)/r,a=(o?Ts(n.height):n.height)/i;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const rT=Zt(0);function iA(t){const e=Tt(t);return Au()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:rT}function _r(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),o=gu(t);let s=Zt(1);e&&(r?Ht(r)&&(s=Wr(r)):s=Wr(t));const a=(function(h,p,m){return p===void 0&&(p=!1),!(!m||p&&m!==Tt(h))&&p})(o,n,r)?iA(o):Zt(0);let l=(i.left+a.x)/s.x,u=(i.top+a.y)/s.y,c=i.width/s.x,d=i.height/s.y;if(o){const h=Tt(o),p=r&&Ht(r)?Tt(r):r;let m=h,_=dc(m);for(;_&&r&&p!==m;){const E=Wr(_),A=_.getBoundingClientRect(),g=Ut(_),S=A.left+(_.clientLeft+parseFloat(g.paddingLeft))*E.x,O=A.top+(_.clientTop+parseFloat(g.paddingTop))*E.y;l*=E.x,u*=E.y,c*=E.x,d*=E.y,l+=S,u+=O,m=Tt(_),_=dc(m)}}return Rs({width:c,height:d,x:l,y:u})}function Cs(t,e){const n=ia(t).scrollLeft;return e?e.left+n:_r(Qt(t)).left+n}function oA(t,e){const n=t.getBoundingClientRect();return{x:n.left+e.scrollLeft-Cs(t,n),y:n.top+e.scrollTop}}const iT=new Set(["absolute","fixed"]);function Gp(t,e,n){let r;if(e==="viewport")r=(function(i,o){const s=Tt(i),a=Qt(i),l=s.visualViewport;let u=a.clientWidth,c=a.clientHeight,d=0,h=0;if(l){u=l.width,c=l.height;const m=Au();(!m||m&&o==="fixed")&&(d=l.offsetLeft,h=l.offsetTop)}const p=Cs(a);if(p<=0){const m=a.ownerDocument,_=m.body,E=getComputedStyle(_),A=m.compatMode==="CSS1Compat"&&parseFloat(E.marginLeft)+parseFloat(E.marginRight)||0,g=Math.abs(a.clientWidth-_.clientWidth-A);g<=25&&(u-=g)}else p<=25&&(u+=p);return{width:u,height:c,x:d,y:h}})(t,n);else if(e==="document")r=(function(i){const o=Qt(i),s=ia(i),a=i.ownerDocument.body,l=cr(o.scrollWidth,o.clientWidth,a.scrollWidth,a.clientWidth),u=cr(o.scrollHeight,o.clientHeight,a.scrollHeight,a.clientHeight);let c=-s.scrollLeft+Cs(i);const d=-s.scrollTop;return Ut(a).direction==="rtl"&&(c+=cr(o.clientWidth,a.clientWidth)-l),{width:l,height:u,x:c,y:d}})(Qt(t));else if(Ht(e))r=(function(i,o){const s=_r(i,!0,o==="fixed"),a=s.top+i.clientTop,l=s.left+i.clientLeft,u=tn(i)?Wr(i):Zt(1);return{width:i.clientWidth*u.x,height:i.clientHeight*u.y,x:l*u.x,y:a*u.y}})(e,n);else{const i=iA(t);r={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return Rs(r)}function sA(t,e){const n=kn(t);return!(n===e||!Ht(n)||Gr(n))&&(Ut(n).position==="fixed"||sA(n,e))}function oT(t,e,n){const r=tn(e),i=Qt(e),o=n==="fixed",s=_r(t,!0,o,e);let a={scrollLeft:0,scrollTop:0};const l=Zt(0);function u(){l.x=Cs(i)}if(r||!r&&!o)if((ii(e)!=="body"||eo(i))&&(a=ia(e)),r){const d=_r(e,!0,o,e);l.x=d.x+e.clientLeft,l.y=d.y+e.clientTop}else i&&u();o&&!r&&i&&u();const c=!i||r||o?Zt(0):oA(i,a);return{x:s.left+a.scrollLeft-l.x-c.x,y:s.top+a.scrollTop-l.y-c.y,width:s.width,height:s.height}}function ll(t){return Ut(t).position==="static"}function Wp(t,e){if(!tn(t)||Ut(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return Qt(t)===n&&(n=n.ownerDocument.body),n}function Xp(t,e){const n=Tt(t);if(ys(t))return n;if(!tn(t)){let i=kn(t);for(;i&&!Gr(i);){if(Ht(i)&&!ll(i))return i;i=kn(i)}return n}let r=Wp(t,e);for(;r&&JD(r)&&ll(r);)r=Wp(r,e);return r&&Gr(r)&&ll(r)&&!uc(r)?n:r||(function(i){let o=kn(i);for(;tn(o)&&!Gr(o);){if(uc(o))return o;if(ys(o))return null;o=kn(o)}return null})(t)||n}const sT={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:r,strategy:i}=t;const o=i==="fixed",s=Qt(r),a=!!e&&ys(e.floating);if(r===s||a&&o)return n;let l={scrollLeft:0,scrollTop:0},u=Zt(1);const c=Zt(0),d=tn(r);if((d||!d&&!o)&&((ii(r)!=="body"||eo(s))&&(l=ia(r)),tn(r))){const p=_r(r);u=Wr(r),c.x=p.x+r.clientLeft,c.y=p.y+r.clientTop}const h=!s||d||o?Zt(0):oA(s,l);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x+h.x,y:n.y*u.y-l.scrollTop*u.y+c.y+h.y}},getDocumentElement:Qt,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:r,strategy:i}=t;const o=n==="clippingAncestors"?ys(e)?[]:(function(u,c){const d=c.get(u);if(d)return d;let h=to(u,[],!1).filter(E=>Ht(E)&&ii(E)!=="body"),p=null;const m=Ut(u).position==="fixed";let _=m?kn(u):u;for(;Ht(_)&&!Gr(_);){const E=Ut(_),A=uc(_);A||E.position!=="fixed"||(p=null),(m?!A&&!p:!A&&E.position==="static"&&p&&iT.has(p.position)||eo(_)&&!A&&sA(u,_))?h=h.filter(g=>g!==_):p=E,_=kn(_)}return c.set(u,h),h})(e,this._c):[].concat(n),s=[...o,r],a=s[0],l=s.reduce((u,c)=>{const d=Gp(e,c,i);return u.top=cr(d.top,u.top),u.right=Ds(d.right,u.right),u.bottom=Ds(d.bottom,u.bottom),u.left=cr(d.left,u.left),u},Gp(e,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:Xp,getElementRects:async function(t){const e=this.getOffsetParent||Xp,n=this.getDimensions,r=await n(t.floating);return{reference:oT(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}=rA(t);return{width:e,height:n}},getScale:Wr,isElement:Ht,isRTL:function(t){return Ut(t).direction==="rtl"}};function Kp(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function aA(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=gu(t),c=i||o?[...u?to(u):[],...to(e)]:[];c.forEach(E=>{i&&E.addEventListener("scroll",n,{passive:!0}),o&&E.addEventListener("resize",n)});const d=u&&a?(function(E,A){let g,S=null;const O=Qt(E);function D(){var I;clearTimeout(g),(I=S)==null||I.disconnect(),S=null}return(function I(R,y){R===void 0&&(R=!1),y===void 0&&(y=1),D();const v=E.getBoundingClientRect(),{left:T,top:C,width:N,height:L}=v;if(R||A(),!N||!L)return;const b={rootMargin:-Uo(C)+"px "+-Uo(O.clientWidth-(T+N))+"px "+-Uo(O.clientHeight-(C+L))+"px "+-Uo(T)+"px",threshold:cr(0,Ds(1,y))||1};let k=!0;function x(M){const U=M[0].intersectionRatio;if(U!==y){if(!k)return I();U?I(!1,U):g=setTimeout(()=>{I(!1,1e-7)},1e3)}U!==1||Kp(v,E.getBoundingClientRect())||I(),k=!1}try{S=new IntersectionObserver(x,{...b,root:O.ownerDocument})}catch(M){S=new IntersectionObserver(x,b)}S.observe(E)})(!0),D})(u,n):null;let h,p=-1,m=null;s&&(m=new ResizeObserver(E=>{let[A]=E;A&&A.target===u&&m&&(m.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var g;(g=m)==null||g.observe(e)})),n()}),u&&!l&&m.observe(u),m.observe(e));let _=l?_r(t):null;return l&&(function E(){const A=_r(t);_&&!Kp(_,A)&&n(),_=A,h=requestAnimationFrame(E)})(),n(),()=>{var E;c.forEach(A=>{i&&A.removeEventListener("scroll",n),o&&A.removeEventListener("resize",n)}),d==null||d(),(E=m)==null||E.disconnect(),m=null,l&&cancelAnimationFrame(h)}}const aT=function(t){return t===void 0&&(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(u,c){const{placement:d,platform:h,elements:p}=u,m=await(h.isRTL==null?void 0:h.isRTL(p.floating)),_=Er(d),E=na(d),A=Ln(d)==="y",g=XD.has(_)?-1:1,S=m&&A?-1:1,O=Oo(c,u);let{mainAxis:D,crossAxis:I,alignmentAxis:R}=typeof O=="number"?{mainAxis:O,crossAxis:0,alignmentAxis:null}:{mainAxis:O.mainAxis||0,crossAxis:O.crossAxis||0,alignmentAxis:O.alignmentAxis};return E&&typeof R=="number"&&(I=E==="end"?-1*R:R),A?{x:I*S,y:D*g}:{x:D*g,y:I*S}})(e,t);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:s}}}}},lT=function(t){return t===void 0&&(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:E=>{let{x:A,y:g}=E;return{x:A,y:g}}},...l}=Oo(t,e),u={x:n,y:r},c=await Is(e,l),d=Ln(Er(i)),h=Q_(d);let p=u[h],m=u[d];if(o){const E=h==="y"?"bottom":"right";p=Bp(p+c[h==="y"?"top":"left"],p,p-c[E])}if(s){const E=d==="y"?"bottom":"right";m=Bp(m+c[d==="y"?"top":"left"],m,m-c[E])}const _=a.fn({...e,[h]:p,[d]:m});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[h]:o,[d]:s}}}}}},cT=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:i,middlewareData:o,rects:s,initialPlacement:a,platform:l,elements:u}=e,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:_=!0,...E}=Oo(t,e);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const A=Er(i),g=Ln(a),S=Er(a)===a,O=await(l.isRTL==null?void 0:l.isRTL(u.floating)),D=h||(S||!_?[Bo(a)]:(function(b){const k=Bo(b);return[lc(b),k,lc(k)]})(a)),I=m!=="none";!h&&I&&D.push(...WD(a,_,m,O));const R=[a,...D],y=await Is(e,E),v=[];let T=((r=o.flip)==null?void 0:r.overflows)||[];if(c&&v.push(y[A]),d){const b=(function(k,x,M){M===void 0&&(M=!1);const U=na(k),V=tA(k),W=eA(V);let $=V==="x"?U===(M?"end":"start")?"right":"left":U==="start"?"bottom":"top";return x.reference[W]>x.floating[W]&&($=Bo($)),[$,Bo($)]})(i,s,O);v.push(y[b[0]],y[b[1]])}if(T=[...T,{placement:i,overflows:v}],!v.every(b=>b<=0)){var C,N;const b=(((C=o.flip)==null?void 0:C.index)||0)+1,k=R[b];if(k&&(!(d==="alignment"&&g!==Ln(k))||T.every(M=>Ln(M.placement)!==g||M.overflows[0]>0)))return{data:{index:b,overflows:T},reset:{placement:k}};let x=(N=T.filter(M=>M.overflows[0]<=0).sort((M,U)=>M.overflows[1]-U.overflows[1])[0])==null?void 0:N.placement;if(!x)switch(p){case"bestFit":{var L;const M=(L=T.filter(U=>{if(I){const V=Ln(U.placement);return V===g||V==="y"}return!0}).map(U=>[U.placement,U.overflows.filter(V=>V>0).reduce((V,W)=>V+W,0)]).sort((U,V)=>U[1]-V[1])[0])==null?void 0:L[0];M&&(x=M);break}case"initialPlacement":x=a}if(i!==x)return{reset:{placement:x}}}return{}}}},uT=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:r="referenceHidden",...i}=Oo(t,e);switch(r){case"referenceHidden":{const o=$p(await Is(e,{...i,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Yp(o)}}}case"escaped":{const o=$p(await Is(e,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:o,escaped:Yp(o)}}}default:return{}}}}},dT=(t,e,n)=>{const r=new Map,i={platform:sT,...n},o={...i.platform,_c:r};return(async(s,a,l)=>{const{placement:u="bottom",strategy:c="absolute",middleware:d=[],platform:h}=l,p=d.filter(Boolean),m=await(h.isRTL==null?void 0:h.isRTL(a));let _=await h.getElementRects({reference:s,floating:a,strategy:c}),{x:E,y:A}=zp(_,u,m),g=u,S={},O=0;for(let D=0;D<p.length;D++){const{name:I,fn:R}=p[D],{x:y,y:v,data:T,reset:C}=await R({x:E,y:A,initialPlacement:u,placement:g,strategy:c,middlewareData:S,rects:_,platform:h,elements:{reference:s,floating:a}});E=y!=null?y:E,A=v!=null?v:A,S={...S,[I]:{...S[I],...T}},C&&O<=50&&(O++,typeof C=="object"&&(C.placement&&(g=C.placement),C.rects&&(_=C.rects===!0?await h.getElementRects({reference:s,floating:a,strategy:c}):C.rects),{x:E,y:A}=zp(_,g,m)),D=-1)}return{x:E,y:A,placement:g,strategy:c,middlewareData:S}})(t,e,{...i,platform:o})};var Zo=typeof document!="undefined"?We:function(){};function Ns(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!Ns(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;r--!==0;)if(!{}.hasOwnProperty.call(e,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if((o!=="_owner"||!t.$$typeof)&&!Ns(t[o],e[o]))return!1}return!0}return t!=t&&e!=e}function lA(t){return typeof window=="undefined"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function qp(t,e){const n=lA(t);return Math.round(e*n)/n}function cl(t){const e=X(t);return Zo(()=>{e.current=t}),e}function cA(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:s}={},transform:a=!0,whileElementsMounted:l,open:u}=t,[c,d]=ee({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[h,p]=ee(r);Ns(h,r)||p(r);const[m,_]=ee(null),[E,A]=ee(null),g=q(U=>{U!==I.current&&(I.current=U,_(U))},[]),S=q(U=>{U!==R.current&&(R.current=U,A(U))},[]),O=o||m,D=s||E,I=X(null),R=X(null),y=X(c),v=l!=null,T=cl(l),C=cl(i),N=cl(u),L=q(()=>{if(!I.current||!R.current)return;const U={placement:e,strategy:n,middleware:h};C.current&&(U.platform=C.current),dT(I.current,R.current,U).then(V=>{const W={...V,isPositioned:N.current!==!1};b.current&&!Ns(y.current,W)&&(y.current=W,Fs(()=>{d(W)}))})},[h,e,n,C,N]);Zo(()=>{u===!1&&y.current.isPositioned&&(y.current.isPositioned=!1,d(U=>({...U,isPositioned:!1})))},[u]);const b=X(!1);Zo(()=>(b.current=!0,()=>{b.current=!1}),[]),Zo(()=>{if(O&&(I.current=O),D&&(R.current=D),O&&D){if(T.current)return T.current(O,D,L);L()}},[O,D,L,T,v]);const k=Z(()=>({reference:I,floating:R,setReference:g,setFloating:S}),[g,S]),x=Z(()=>({reference:O,floating:D}),[O,D]),M=Z(()=>{const U={position:n,left:0,top:0};if(!x.floating)return U;const V=qp(x.floating,c.x),W=qp(x.floating,c.y);return a?{...U,transform:"translate("+V+"px, "+W+"px)",...lA(x.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:V,top:W}},[n,a,x.floating,c.x,c.y]);return Z(()=>({...c,update:L,refs:k,elements:x,floatingStyles:M}),[c,L,k,x,M])}const hT=(t,e)=>({...lT(t),options:[t,e]}),uA=(t,e)=>({...cT(t),options:[t,e]}),pT=(t,e)=>({...uT(t),options:[t,e]});var dA=["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])"],bs=dA.join(","),hA=typeof Element=="undefined",Ar=hA?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Qo=!hA&&Element.prototype.getRootNode?function(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}:function(t){return t==null?void 0:t.ownerDocument},no=function(t,e){var n;e===void 0&&(e=!0);var r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"inert");return r===""||r==="true"||e&&t&&no(t.parentNode)},pA=function(t,e,n){if(no(t))return[];var r=Array.prototype.slice.apply(t.querySelectorAll(bs));return e&&Ar.call(t,bs)&&r.unshift(t),r=r.filter(n)},ws=function(t,e,n){for(var r=[],i=Array.from(t);i.length;){var o=i.shift();if(!no(o,!1))if(o.tagName==="SLOT"){var s=o.assignedElements(),a=s.length?s:o.children,l=ws(a,!0,n);n.flatten?r.push.apply(r,l):r.push({scopeParent:o,candidates:l})}else{Ar.call(o,bs)&&n.filter(o)&&(e||!t.includes(o))&&r.push(o);var u=o.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(o),c=!no(u,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(o));if(u&&c){var d=ws(u===!0?o.children:u.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},fA=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Cn=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||(function(e){var n,r=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"contenteditable");return r===""||r==="true"})(t))&&!fA(t)?0:t.tabIndex},fT=function(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex},mA=function(t){return t.tagName==="INPUT"},mT=function(t){return(function(e){return mA(e)&&e.type==="radio"})(t)&&!(function(e){if(!e.name)return!0;var n,r=e.form||Qo(e),i=function(s){return r.querySelectorAll('input[type="radio"][name="'+s+'"]')};if(typeof window!="undefined"&&window.CSS!==void 0&&typeof window.CSS.escape=="function")n=i(window.CSS.escape(e.name));else try{n=i(e.name)}catch(s){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",s.message),!1}var o=(function(s,a){for(var l=0;l<s.length;l++)if(s[l].checked&&s[l].form===a)return s[l]})(n,e.form);return!o||o===e})(t)},Jp=function(t){var e=t.getBoundingClientRect(),n=e.width,r=e.height;return n===0&&r===0},ET=function(t,e){var n=e.displayCheck,r=e.getShadowRoot;if(n==="full-native"&&"checkVisibility"in t)return!t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if(getComputedStyle(t).visibility==="hidden")return!0;var i=Ar.call(t,"details>summary:first-of-type")?t.parentElement:t;if(Ar.call(i,"details:not([open]) *"))return!0;if(n&&n!=="full"&&n!=="full-native"&&n!=="legacy-full"){if(n==="non-zero-area")return Jp(t)}else{if(typeof r=="function"){for(var o=t;t;){var s=t.parentElement,a=Qo(t);if(s&&!s.shadowRoot&&r(s)===!0)return Jp(t);t=t.assignedSlot?t.assignedSlot:s||a===t.ownerDocument?s:a.host}t=o}if((function(l){var u,c,d,h,p=l&&Qo(l),m=(u=p)===null||u===void 0?void 0:u.host,_=!1;if(p&&p!==l)for(_=!!((c=m)!==null&&c!==void 0&&(d=c.ownerDocument)!==null&&d!==void 0&&d.contains(m)||l!=null&&(h=l.ownerDocument)!==null&&h!==void 0&&h.contains(l));!_&&m;){var E,A,g;_=!((A=m=(E=p=Qo(m))===null||E===void 0?void 0:E.host)===null||A===void 0||(g=A.ownerDocument)===null||g===void 0||!g.contains(m))}return _})(t))return!t.getClientRects().length;if(n!=="legacy-full")return!0}return!1},Ls=function(t,e){return!(e.disabled||no(e)||(function(n){return mA(n)&&n.type==="hidden"})(e)||ET(e,t)||(function(n){return n.tagName==="DETAILS"&&Array.prototype.slice.apply(n.children).some(function(r){return r.tagName==="SUMMARY"})})(e)||(function(n){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(n.tagName))for(var r=n.parentElement;r;){if(r.tagName==="FIELDSET"&&r.disabled){for(var i=0;i<r.children.length;i++){var o=r.children.item(i);if(o.tagName==="LEGEND")return!!Ar.call(r,"fieldset[disabled] *")||!o.contains(n)}return!0}r=r.parentElement}return!1})(e))},hc=function(t,e){return!(mT(e)||Cn(e)<0||!Ls(t,e))},_T=function(t){var e=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(e)||e>=0)},EA=function(t){var e=[],n=[];return t.forEach(function(r,i){var o=!!r.scopeParent,s=o?r.scopeParent:r,a=(function(u,c){var d=Cn(u);return d<0&&c&&!fA(u)?0:d})(s,o),l=o?EA(r.candidates):s;a===0?o?e.push.apply(e,l):e.push(s):n.push({documentOrder:i,tabIndex:a,item:r,isScope:o,content:l})}),n.sort(fT).reduce(function(r,i){return i.isScope?r.push.apply(r,i.content):r.push(i.content),r},[]).concat(e)},oa=function(t,e){var n;return n=(e=e||{}).getShadowRoot?ws([t],e.includeContainer,{filter:hc.bind(null,e),flatten:!1,getShadowRoot:e.getShadowRoot,shadowRootFilter:_T}):pA(t,e.includeContainer,hc.bind(null,e)),EA(n)},Su=function(t,e){return(e=e||{}).getShadowRoot?ws([t],e.includeContainer,{filter:Ls.bind(null,e),flatten:!0,getShadowRoot:e.getShadowRoot}):pA(t,e.includeContainer,Ls.bind(null,e))},qn=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return Ar.call(t,bs)!==!1&&hc(e,t)},AT=dA.concat("iframe").join(","),es=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return Ar.call(t,AT)!==!1&&Ls(e,t)};const gT=Object.freeze(Object.defineProperty({__proto__:null,focusable:Su,getTabIndex:Cn,isFocusable:es,isTabbable:qn,tabbable:oa},Symbol.toStringTag,{value:"Module"}));function pc(t){return(t==null?void 0:t.ownerDocument)||document}var xi=typeof document!="undefined"?We:function(){};const _A=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Zp(t,e){const n=oa(t,_A()),r=n.length;if(r===0)return;const i=(function(s){let a=s.activeElement;for(;((l=a)==null||(l=l.shadowRoot)==null?void 0:l.activeElement)!=null;){var l;a=a.shadowRoot.activeElement}return a})(pc(t)),o=n.indexOf(i);return n[o===-1?e===1?0:r-1:o+e]}function ul(t,e){const n=e||t.currentTarget,r=t.relatedTarget;return!r||!(function(i,o){if(!i||!o)return!1;const s=o.getRootNode==null?void 0:o.getRootNode();if(i.contains(o))return!0;if(s&&cc(s)){let a=o;for(;a;){if(i===a)return!0;a=a.parentNode||a.host}}return!1})(n,r)}function ST(t){oa(t,_A()).forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")})}function Qp(t){t.querySelectorAll("[data-tabindex]").forEach(e=>{const n=e.dataset.tabindex;delete e.dataset.tabindex,n?e.setAttribute("tabindex",n):e.removeAttribute("tabindex")})}const OT={...bc};let ef=!1,vT=0;const tf=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+vT++,DT=OT.useId||function(){const[t,e]=ee(()=>ef?tf():void 0);return xi(()=>{t==null&&e(tf())},[]),z(()=>{ef=!0},[]),t};function AA(t){return"data-floating-ui-"+t}const gA={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},nf=_t(function(t,e){const[n,r]=ee();return xi(()=>{/apple/i.test(navigator.vendor)&&r("button")},[]),f("span",{...t,ref:e,tabIndex:0,role:n,"aria-hidden":!n||void 0,[AA("focus-guard")]:"",style:gA})}),SA=si(null),rf=AA("portal");function TT(t){const{children:e,id:n,root:r,preserveTabOrder:i=!0}=t,o=(function(_){_===void 0&&(_={});const{id:E,root:A}=_,g=DT(),S=RT(),[O,D]=ee(null),I=X(null);return xi(()=>()=>{O==null||O.remove(),queueMicrotask(()=>{I.current=null})},[O]),xi(()=>{if(!g||I.current)return;const R=E?document.getElementById(E):null;if(!R)return;const y=document.createElement("div");y.id=g,y.setAttribute(rf,""),R.appendChild(y),I.current=y,D(y)},[E,g]),xi(()=>{if(A===null||!g||I.current)return;let R=A||(S==null?void 0:S.portalNode);R&&!_u(R)&&(R=R.current),R=R||document.body;let y=null;E&&(y=document.createElement("div"),y.id=E,R.appendChild(y));const v=document.createElement("div");v.id=g,v.setAttribute(rf,""),R=y||R,R.appendChild(v),I.current=v,D(v)},[E,A,g,S]),O})({id:n,root:r}),[s,a]=ee(null),l=X(null),u=X(null),c=X(null),d=X(null),h=s==null?void 0:s.modal,p=s==null?void 0:s.open,m=!!s&&!s.modal&&s.open&&i&&!(!r&&!o);return z(()=>{if(o&&i&&!h)return o.addEventListener("focusin",_,!0),o.addEventListener("focusout",_,!0),()=>{o.removeEventListener("focusin",_,!0),o.removeEventListener("focusout",_,!0)};function _(E){o&&ul(E)&&(E.type==="focusin"?Qp:ST)(o)}},[o,i,h]),z(()=>{o&&(p||Qp(o))},[p,o]),f(SA.Provider,{value:Z(()=>({preserveTabOrder:i,beforeOutsideRef:l,afterOutsideRef:u,beforeInsideRef:c,afterInsideRef:d,portalNode:o,setFocusManagerState:a}),[i,o]),children:[m&&o&&f(nf,{"data-type":"outside",ref:l,onFocus:_=>{if(ul(_,o)){var E;(E=c.current)==null||E.focus()}else{const g=s?s.domReference:null,S=Zp(pc(A=g).body,-1)||A;S==null||S.focus()}var A}}),m&&o&&f("span",{"aria-owns":o.id,style:gA}),o&&Ic(e,o),m&&o&&f(nf,{"data-type":"outside",ref:u,onFocus:_=>{if(ul(_,o)){var E;(E=d.current)==null||E.focus()}else{const g=s?s.domReference:null,S=Zp(pc(A=g).body,1)||A;S==null||S.focus(),s!=null&&s.closeOnFocusOut&&(s==null||s.onOpenChange(!1,_.nativeEvent,"focus-out"))}var A}})]})}const RT=()=>Sr(SA);var jo={exports:{}};function fc(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function of(t,e){var n=typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=OA(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(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
97
+ In 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 l=n.next();return s=l.done,l},e:function(l){a=!0,o=l},f:function(){try{s||n.return==null||n.return()}finally{if(a)throw o}}}}function IT(t,e,n){return(e=(function(r){var i=(function(o,s){if(typeof o!="object"||!o)return o;var a=o[Symbol.toPrimitive];if(a!==void 0){var l=a.call(o,s);if(typeof l!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(s==="string"?String:Number)(o)})(r,"string");return typeof i=="symbol"?i:i+""})(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function sf(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function af(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?sf(Object(n),!0).forEach(function(r){IT(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):sf(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function yT(t){return(function(e){if(Array.isArray(e))return fc(e)})(t)||(function(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)})(t)||OA(t)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
98
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function OA(t,e){if(t){if(typeof t=="string")return fc(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?fc(t,e):void 0}}var hn={getActiveTrap:function(t){return(t==null?void 0:t.length)>0?t[t.length-1]:null},activateTrap:function(t,e){e!==hn.getActiveTrap(t)&&hn.pauseTrap(t);var n=t.indexOf(e);n===-1||t.splice(n,1),t.push(e)},deactivateTrap:function(t,e){var n=t.indexOf(e);n!==-1&&t.splice(n,1),hn.unpauseTrap(t)},pauseTrap:function(t){var e=hn.getActiveTrap(t);e==null||e._setPausedState(!0)},unpauseTrap:function(t){var e=hn.getActiveTrap(t);e&&!e._isManuallyPaused()&&e._setPausedState(!1)}},Fi=function(t){return(t==null?void 0:t.key)==="Tab"||(t==null?void 0:t.keyCode)===9},CT=function(t){return Fi(t)&&!t.shiftKey},NT=function(t){return Fi(t)&&t.shiftKey},lf=function(t){return setTimeout(t,0)},Si=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 typeof t=="function"?t.apply(void 0,n):t},Vo=function(t){return t.target.shadowRoot&&typeof t.composedPath=="function"?t.composedPath()[0]:t.target},bT=[];const wT=Object.freeze(Object.defineProperty({__proto__:null,createFocusTrap:function(t,e){var n,r=(e==null?void 0:e.document)||document,i=(e==null?void 0:e.trapStack)||bT,o=af({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isolateSubtrees:!1,isKeyForward:CT,isKeyBackward:NT},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(v,T,C){return v&&v[T]!==void 0?v[T]:o[C||T]},l=function(v,T){var C=typeof(T==null?void 0:T.composedPath)=="function"?T.composedPath():void 0;return s.containerGroups.findIndex(function(N){var L=N.container,b=N.tabbableNodes;return L.contains(v)||(C==null?void 0:C.includes(L))||b.find(function(k){return k===v})})},u=function(v){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},C=T.hasFallback,N=C!==void 0&&C,L=T.params,b=L===void 0?[]:L,k=o[v];if(typeof k=="function"&&(k=k.apply(void 0,yT(b))),k===!0&&(k=void 0),!k){if(k===void 0||k===!1)return k;throw new Error("`".concat(v,"` was specified but was not a node, or did not return a node"))}var x=k;if(typeof k=="string"){try{x=r.querySelector(k)}catch(M){throw new Error("`".concat(v,'` appears to be an invalid selector; error="').concat(M.message,'"'))}if(!x&&!N)throw new Error("`".concat(v,"` as selector refers to no known node"))}return x},c=function(){var v=u("initialFocus",{hasFallback:!0});if(v===!1)return!1;if(v===void 0||v&&!es(v,o.tabbableOptions))if(l(r.activeElement)>=0)v=r.activeElement;else{var T=s.tabbableGroups[0];v=T&&T.firstTabbableNode||u("fallbackFocus")}else v===null&&(v=u("fallbackFocus"));if(!v)throw new Error("Your focus-trap needs to have at least one focusable element");return v},d=function(){if(s.containerGroups=s.containers.map(function(v){var T=oa(v,o.tabbableOptions),C=Su(v,o.tabbableOptions),N=T.length>0?T[0]:void 0,L=T.length>0?T[T.length-1]:void 0,b=C.find(function(M){return qn(M)}),k=C.slice().reverse().find(function(M){return qn(M)}),x=!!T.find(function(M){return Cn(M)>0});return{container:v,tabbableNodes:T,focusableNodes:C,posTabIndexesFound:x,firstTabbableNode:N,lastTabbableNode:L,firstDomTabbableNode:b,lastDomTabbableNode:k,nextTabbableNode:function(M){var U=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],V=T.indexOf(M);return V<0?U?C.slice(C.indexOf(M)+1).find(function(W){return qn(W)}):C.slice(0,C.indexOf(M)).reverse().find(function(W){return qn(W)}):T[V+(U?1:-1)]}}}),s.tabbableGroups=s.containerGroups.filter(function(v){return v.tabbableNodes.length>0}),s.tabbableGroups.length<=0&&!u("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(v){return v.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.")},h=function(v){var T=v.activeElement;if(T)return T.shadowRoot&&T.shadowRoot.activeElement!==null?h(T.shadowRoot):T},p=function(v){v!==!1&&v!==h(document)&&(v&&v.focus?(v.focus({preventScroll:!!o.preventScroll}),s.mostRecentlyFocusedNode=v,(function(T){return T.tagName&&T.tagName.toLowerCase()==="input"&&typeof T.select=="function"})(v)&&v.select()):p(c()))},m=function(v){var T=u("setReturnFocus",{params:[v]});return T||T!==!1&&v},_=function(v){var T=v.target,C=v.event,N=v.isBackward,L=N!==void 0&&N;T=T||Vo(C),d();var b=null;if(s.tabbableGroups.length>0){var k=l(T,C),x=k>=0?s.containerGroups[k]:void 0;if(k<0)b=L?s.tabbableGroups[s.tabbableGroups.length-1].lastTabbableNode:s.tabbableGroups[0].firstTabbableNode;else if(L){var M=s.tabbableGroups.findIndex(function(le){var ce=le.firstTabbableNode;return T===ce});if(M<0&&(x.container===T||es(T,o.tabbableOptions)&&!qn(T,o.tabbableOptions)&&!x.nextTabbableNode(T,!1))&&(M=k),M>=0){var U=M===0?s.tabbableGroups.length-1:M-1,V=s.tabbableGroups[U];b=Cn(T)>=0?V.lastTabbableNode:V.lastDomTabbableNode}else Fi(C)||(b=x.nextTabbableNode(T,!1))}else{var W=s.tabbableGroups.findIndex(function(le){var ce=le.lastTabbableNode;return T===ce});if(W<0&&(x.container===T||es(T,o.tabbableOptions)&&!qn(T,o.tabbableOptions)&&!x.nextTabbableNode(T))&&(W=k),W>=0){var $=W===s.tabbableGroups.length-1?0:W+1,oe=s.tabbableGroups[$];b=Cn(T)>=0?oe.firstTabbableNode:oe.firstDomTabbableNode}else Fi(C)||(b=x.nextTabbableNode(T))}}else b=u("fallbackFocus");return b},E=function(v){var T=Vo(v);l(T,v)>=0||(Si(o.clickOutsideDeactivates,v)?n.deactivate({returnFocus:o.returnFocusOnDeactivate}):Si(o.allowOutsideClick,v)||v.preventDefault())},A=function(v){var T=Vo(v),C=l(T,v)>=0;if(C||T instanceof Document)C&&(s.mostRecentlyFocusedNode=T);else{var N;v.stopImmediatePropagation();var L=!0;if(s.mostRecentlyFocusedNode)if(Cn(s.mostRecentlyFocusedNode)>0){var b=l(s.mostRecentlyFocusedNode),k=s.containerGroups[b].tabbableNodes;if(k.length>0){var x=k.findIndex(function(M){return M===s.mostRecentlyFocusedNode});x>=0&&(o.isKeyForward(s.recentNavEvent)?x+1<k.length&&(N=k[x+1],L=!1):x-1>=0&&(N=k[x-1],L=!1))}}else s.containerGroups.some(function(M){return M.tabbableNodes.some(function(U){return Cn(U)>0})})||(L=!1);else L=!1;L&&(N=_({target:s.mostRecentlyFocusedNode,isBackward:o.isKeyBackward(s.recentNavEvent)})),p(N||s.mostRecentlyFocusedNode||c())}s.recentNavEvent=void 0},g=function(v){(o.isKeyForward(v)||o.isKeyBackward(v))&&(function(T){var C=arguments.length>1&&arguments[1]!==void 0&&arguments[1];s.recentNavEvent=T;var N=_({event:T,isBackward:C});N&&(Fi(T)&&T.preventDefault(),p(N))})(v,o.isKeyBackward(v))},S=function(v){(function(T){return(T==null?void 0:T.key)==="Escape"||(T==null?void 0:T.key)==="Esc"||(T==null?void 0:T.keyCode)===27})(v)&&Si(o.escapeDeactivates,v)!==!1&&(v.preventDefault(),n.deactivate())},O=function(v){var T=Vo(v);l(T,v)>=0||Si(o.clickOutsideDeactivates,v)||Si(o.allowOutsideClick,v)||(v.preventDefault(),v.stopImmediatePropagation())},D=function(){if(s.active)return hn.activateTrap(i,n),s.delayInitialFocusTimer=o.delayInitialFocus?lf(function(){p(c())}):p(c()),r.addEventListener("focusin",A,!0),r.addEventListener("mousedown",E,{capture:!0,passive:!1}),r.addEventListener("touchstart",E,{capture:!0,passive:!1}),r.addEventListener("click",O,{capture:!0,passive:!1}),r.addEventListener("keydown",g,{capture:!0,passive:!1}),r.addEventListener("keydown",S),n},I=function(){if(s.active)return r.removeEventListener("focusin",A,!0),r.removeEventListener("mousedown",E,!0),r.removeEventListener("touchstart",E,!0),r.removeEventListener("click",O,!0),r.removeEventListener("keydown",g,!0),r.removeEventListener("keydown",S),n},R=typeof window!="undefined"&&"MutationObserver"in window?new MutationObserver(function(v){v.some(function(T){return Array.from(T.removedNodes).some(function(C){return C===s.mostRecentlyFocusedNode})})&&p(c())}):void 0,y=function(){R&&(R.disconnect(),s.active&&!s.paused&&s.containers.map(function(v){R.observe(v,{subtree:!0,childList:!0})}))};return n={get active(){return s.active},get paused(){return s.paused},activate:function(v){if(s.active)return this;var T=a(v,"onActivate"),C=a(v,"onPostActivate"),N=a(v,"checkCanFocusTrap"),L=hn.getActiveTrap(i),b=!1;L&&!L.paused&&(L._setSubtreeIsolation(!1),b=!0);try{N||d(),s.active=!0,s.paused=!1,s.nodeFocusedBeforeActivation=h(r),T==null||T();var k=function(){N&&d(),D(),y(),o.isolateSubtrees&&n._setSubtreeIsolation(!0),C==null||C()};if(N)return N(s.containers.concat()).then(k,k),this;k()}catch(x){throw L===hn.getActiveTrap(i)&&b&&L._setSubtreeIsolation(!0),x}return this},deactivate:function(v){if(!s.active)return this;var T=af({onDeactivate:o.onDeactivate,onPostDeactivate:o.onPostDeactivate,checkCanReturnFocus:o.checkCanReturnFocus},v);clearTimeout(s.delayInitialFocusTimer),s.delayInitialFocusTimer=void 0,s.paused||n._setSubtreeIsolation(!1),s.alreadyInert.clear(),I(),s.active=!1,s.paused=!1,y(),hn.deactivateTrap(i,n);var C=a(T,"onDeactivate"),N=a(T,"onPostDeactivate"),L=a(T,"checkCanReturnFocus"),b=a(T,"returnFocus","returnFocusOnDeactivate");C==null||C();var k=function(){lf(function(){b&&p(m(s.nodeFocusedBeforeActivation)),N==null||N()})};return b&&L?(L(m(s.nodeFocusedBeforeActivation)).then(k,k),this):(k(),this)},pause:function(v){return s.active?(s.manuallyPaused=!0,this._setPausedState(!0,v)):this},unpause:function(v){return s.active?(s.manuallyPaused=!1,i[i.length-1]!==this?this:this._setPausedState(!1,v)):this},updateContainerElements:function(v){var T=[].concat(v).filter(Boolean);return s.containers=T.map(function(C){return typeof C=="string"?r.querySelector(C):C}),o.isolateSubtrees&&(function(C){s.active&&!s.paused&&n._setSubtreeIsolation(!1),s.adjacentElements.clear(),s.alreadyInert.clear();var N,L=new Set,b=new Set,k=of(C);try{for(k.s();!(N=k.n()).done;){var x=N.value;L.add(x);for(var M=typeof ShadowRoot!="undefined"&&x.getRootNode()instanceof ShadowRoot,U=x;U;){L.add(U);var V=U.parentElement,W=[];V?W=V.children:!V&&M&&(W=U.getRootNode().children,V=U.getRootNode().host,M=typeof ShadowRoot!="undefined"&&V.getRootNode()instanceof ShadowRoot);var $,oe=of(W);try{for(oe.s();!($=oe.n()).done;){var le=$.value;b.add(le)}}catch(ce){oe.e(ce)}finally{oe.f()}U=V}}}catch(ce){k.e(ce)}finally{k.f()}L.forEach(function(ce){b.delete(ce)}),s.adjacentElements=b})(s.containers),s.active&&(d(),o.isolateSubtrees&&!s.paused&&n._setSubtreeIsolation(!0)),y(),this}},Object.defineProperties(n,{_isManuallyPaused:{value:function(){return s.manuallyPaused}},_setPausedState:{value:function(v,T){if(s.paused===v)return this;if(s.paused=v,v){var C=a(T,"onPause"),N=a(T,"onPostPause");C==null||C(),I(),y(),n._setSubtreeIsolation(!1),N==null||N()}else{var L=a(T,"onUnpause"),b=a(T,"onPostUnpause");L==null||L(),n._setSubtreeIsolation(!0),d(),D(),y(),b==null||b()}return this}},_setSubtreeIsolation:{value:function(v){o.isolateSubtrees&&s.adjacentElements.forEach(function(T){v?((T.inert||T.hasAttribute("inert"))&&s.alreadyInert.add(T),T.inert=!0):s.alreadyInert.has(T)||(T.inert=!1)})}}}),n.updateContainerElements(t),n}},Symbol.toStringTag,{value:"Module"})),LT=Uc(wT),kT=Uc(gT);var cf,MT=(function(){if(cf)return jo.exports;function t(m){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(_){return typeof _}:function(_){return _&&typeof Symbol=="function"&&_.constructor===Symbol&&_!==Symbol.prototype?"symbol":typeof _},t(m)}var e,n;function r(m,_,E){return _&&(function(A,g){for(var S=0;S<g.length;S++){var O=g[S];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(A,l(O.key),O)}})(m.prototype,_),Object.defineProperty(m,"prototype",{writable:!1}),m}function i(m,_,E){return _=s(_),(function(A,g){if(g&&(t(g)=="object"||typeof g=="function"))return g;if(g!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(S){if(S===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return S})(A)})(m,o()?Reflect.construct(_,E||[],s(m).constructor):_.apply(m,E))}function o(){try{var m=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(_){}return(o=function(){return!!m})()}function s(m){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(_){return _.__proto__||Object.getPrototypeOf(_)},s(m)}function a(m,_){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(E,A){return E.__proto__=A,E},a(m,_)}function l(m){var _=(function(E,A){if(t(E)!="object"||!E)return E;var g=E[Symbol.toPrimitive];if(g!==void 0){var S=g.call(E,A);if(t(S)!="object")return S;throw new TypeError("@@toPrimitive must return a primitive value.")}return(A==="string"?String:Number)(E)})(m,"string");return t(_)=="symbol"?_:_+""}cf=1;var u=zm,c=LT.createFocusTrap,d=kT.isFocusable,h=parseInt((e=(n=/^(\d+)\./.exec(u.version))===null||n===void 0?void 0:n[1])!==null&&e!==void 0?e:0,10),p=(function(m){function _(E){var A;(function(O,D){if(!(O instanceof D))throw new TypeError("Cannot call a class as a function")})(this,_),(function(O,D,I){(D=l(D))in O?Object.defineProperty(O,D,{value:I,enumerable:!0,configurable:!0,writable:!0}):O[D]=I})(A=i(this,_,[E]),"getNodeForOption",function(O){var D,I=(D=this.internalOptions[O])!==null&&D!==void 0?D:this.originalOptions[O];if(typeof I=="function"){for(var R=arguments.length,y=new Array(R>1?R-1:0),v=1;v<R;v++)y[v-1]=arguments[v];I=I.apply(void 0,y)}if(I===!0&&(I=void 0),!I){if(I===void 0||I===!1)return I;throw new Error("`".concat(O,"` was specified but was not a node, or did not return a node"))}var T,C=I;if(typeof I=="string"&&!(C=(T=this.getDocument())===null||T===void 0?void 0:T.querySelector(I)))throw new Error("`".concat(O,"` as selector refers to no known node"));return C}),A.handleDeactivate=A.handleDeactivate.bind(A),A.handlePostDeactivate=A.handlePostDeactivate.bind(A),A.handleClickOutsideDeactivates=A.handleClickOutsideDeactivates.bind(A),A.internalOptions={returnFocusOnDeactivate:!1,checkCanReturnFocus:null,onDeactivate:A.handleDeactivate,onPostDeactivate:A.handlePostDeactivate,clickOutsideDeactivates:A.handleClickOutsideDeactivates},A.originalOptions={returnFocusOnDeactivate:!0,onDeactivate:null,onPostDeactivate:null,checkCanReturnFocus:null,clickOutsideDeactivates:!1};var g=E.focusTrapOptions;for(var S in g)Object.prototype.hasOwnProperty.call(g,S)&&(S!=="returnFocusOnDeactivate"&&S!=="onDeactivate"&&S!=="onPostDeactivate"&&S!=="checkCanReturnFocus"&&S!=="clickOutsideDeactivates"?A.internalOptions[S]=g[S]:A.originalOptions[S]=g[S]);return A.outsideClick=null,A.focusTrapElements=E.containerElements||[],A.updatePreviousElement(),A}return(function(E,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function");E.prototype=Object.create(A&&A.prototype,{constructor:{value:E,writable:!0,configurable:!0}}),Object.defineProperty(E,"prototype",{writable:!1}),A&&a(E,A)})(_,m),r(_,[{key:"getDocument",value:function(){return this.props.focusTrapOptions.document||(typeof document!="undefined"?document:void 0)}},{key:"getReturnFocusNode",value:function(){var E=this.getNodeForOption("setReturnFocus",this.previouslyFocusedElement);return E||E!==!1&&this.previouslyFocusedElement}},{key:"updatePreviousElement",value:function(){var E=this.getDocument();E&&(this.previouslyFocusedElement=E.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(E){var A=typeof this.originalOptions.clickOutsideDeactivates=="function"?this.originalOptions.clickOutsideDeactivates.call(null,E):this.originalOptions.clickOutsideDeactivates;return A&&(this.outsideClick={target:E.target,allowDeactivation:A}),A}},{key:"handleDeactivate",value:function(){this.originalOptions.onDeactivate&&this.originalOptions.onDeactivate.call(null),this.deactivateTrap()}},{key:"handlePostDeactivate",value:function(){var E=this,A=function(){var g=E.getReturnFocusNode(),S=!(!E.originalOptions.returnFocusOnDeactivate||g==null||!g.focus||E.outsideClick&&(!E.outsideClick.allowDeactivation||d(E.outsideClick.target,E.internalOptions.tabbableOptions))),O=E.internalOptions.preventScroll,D=O!==void 0&&O;S&&g.focus({preventScroll:D}),E.originalOptions.onPostDeactivate&&E.originalOptions.onPostDeactivate.call(null),E.outsideClick=null};this.originalOptions.checkCanReturnFocus?this.originalOptions.checkCanReturnFocus.call(null,this.getReturnFocusNode()).then(A,A):A()}},{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(E){if(this.focusTrap){E.containerElements!==this.props.containerElements&&this.focusTrap.updateContainerElements(this.props.containerElements);var A=!E.active&&this.props.active,g=E.active&&!this.props.active,S=!E.paused&&this.props.paused,O=E.paused&&!this.props.paused;if(A&&(this.updatePreviousElement(),this.focusTrap.activate()),g)return void this.deactivateTrap();S&&this.focusTrap.pause(),O&&this.focusTrap.unpause()}else E.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 E=this,A=this.props.children?u.Children.only(this.props.children):void 0;if(A){if(A.type&&A.type===u.Fragment)throw new Error("A focus-trap cannot use a Fragment as its child container. Try replacing it with a <div> element.");return u.cloneElement(A,{ref:function(g){var S=E.props.containerElements;A&&(h>=19?typeof A.props.ref=="function"?A.props.ref(g):A.props.ref&&(A.props.ref.current=g):typeof A.ref=="function"?A.ref(g):A.ref&&(A.ref.current=g)),E.focusTrapElements=S||[g]}})}return null}}])})(u.Component);return p.defaultProps={active:!0,paused:!1,focusTrapOptions:{},_createFocusTrap:c},jo.exports=p,jo.exports.FocusTrap=p,jo.exports})();function vA(t){var A,g;const{children:e,preferredPlacement:n="top-start",anchorElement:r,boundaryElement:i,trapFocus:o=!1,initialFocus:s,portal:a,...l}=t,{anchor:u,boundary:c}=Z(()=>({anchor:uf(r),boundary:i?uf(i):void 0}),[r,i]);let d=[];c&&(d=[uA({boundary:c,fallbackPlacements:["top-start","top-end","bottom-start","bottom-end","top","bottom"]}),hT({boundary:c,padding:8}),pT({boundary:c})]);const{refs:h,floatingStyles:p,middlewareData:m}=cA({placement:n,middleware:d,whileElementsMounted:aA});We(()=>{u&&h.setReference(u)},[h,u]);const _=o?f(MT.FocusTrap,{focusTrapOptions:{initialFocus:s,fallbackFocus:".t-fallback-focus",allowOutsideClick:!0,tabbableOptions:{getShadowRoot:!0}},children:f("div",{children:[e,f("span",{className:"t-fallback-focus",tabIndex:-1})]})}):e,E=f("div",{ref:h.setFloating,style:{...p,zIndex:1e3,visibility:(A=m.hide)!=null&&A.referenceHidden?"hidden":"visible"},...l,children:_});if(a){const S=(g=c||u)==null?void 0:g.closest("[t-menu-boundary='root']");return f(TT,{root:S,children:E})}return E}function uf(t){return typeof t=="string"?document.querySelector(t):t}function Ou(t){const e=ae(),n=ho(),r=J(n.state$.suggestMentionQuery),i=uu(J(e.state$.currentConversationId),r?1e3:0),o=Z(()=>(i!=null?i:[]).map(E=>E.user),[i]),[s,a]=ee(0),l=Z(()=>Object.fromEntries(o.map(E=>[E.id,IO(E.name)])),[o]),u=Z(()=>{if(!r)return[];const E=df(r);return E===""?o:o.filter(A=>l[A.id].some(g=>(function(S,O){return ip(S.substring(0,O.length),O)})(g,E)))},[r,o,l]),c=X(void 0);z(()=>{if(c.current){const E=u.findIndex(A=>A.id===c.current);a(E===-1?0:E)}},[u]),z(()=>{var E;c.current=(E=u[s])==null?void 0:E.id},[s,u]);const d=q(E=>{var g;const A=(g=u[E])==null?void 0:g.id;return A&&"mention-button-"+A},[u]),{containerProps:h,itemProps:p}=J_({focused:s,setFocused:a,buttonId:d});if(z(()=>{if(u.length!==0)return n.listenKeydown("mention",E=>q_(E,{dir:"ttb",focused:s,setFocused:a,itemCount:u.length,onSpace(){if(r){const A=u[s];if(ip(A.name,df(r)))return n.selectMention(A),!0}return!1},onConfirm(){const A=u[s];n.selectMention(A)}})),()=>{n.listenKeydown("mention",void 0)}},[n,s,u,r]),So(()=>n.closeSuggester(),".t-mention-suggest-list",u.length>0),u.length===0)return null;const m=document.querySelector(".ProseMirror-suggestion");let _;if(m){let E=m.getBoundingClientRect();_={getBoundingClientRect(){const A=m.getBoundingClientRect();return A.width>0&&(E=A),E}}}return f(vA,{className:"t-mention-suggest-list",...h,anchorElement:_,children:u.map((E,A)=>f(PT,{user:E,isFocused:A===s,onSelect:()=>n.selectMention(E),...p(A)},E.id))})}const PT=ur(function(t){const{user:e,isFocused:n,onSelect:r,...i}=t;return f("button",{className:n?"focused":"",onClick:()=>r(e.id),...i,children:e.name})});function df(t){return re(t[0]==="@"),t.substring(1)}function hf(t,e,n){const r=Su(t),i=r.indexOf(e);return i===-1?null:r[i+n]||null}const xT=_t(function(t,e){const{children:n,triggerElement:r}=t,{closePopover:i}=jc(),o=X(null);Sn(e,()=>o.current),z(()=>{var a;(a=o.current)==null||a.focus()},[]);const s=q(a=>{(function(l,u,c,d){var E;const h=u.querySelectorAll("[t-menu-item]"),p=document.activeElement;if(!p||!p.hasAttribute("t-menu-item")&&!p.hasAttribute("t-menu"))return;const m=Array.from(h).indexOf(p);let _;switch(l.key){case"ArrowDown":_=Math.min(m+1,h.length-1);break;case"ArrowUp":_=Math.max(m-1,0),m===-1&&(_=h.length-1);break;case"Home":_=0;break;case"End":_=h.length-1;break;case"Tab":{const A=c.closest("t-chatbox,t-conversation-list,.t-chatbox,.t-conversation-list"),g=l.shiftKey?hf(A,c,-1):(function(S,O){return hf(S,O,1)})(A,c);return g==null||g.focus(),void d()}default:return}(E=h[_])==null||E.focus()})(a,o.current,r,i)},[i,r]);return f("div",{"t-menu":"",role:"menu",tabIndex:-1,ref:o,onKeyDown:s,children:n})});function oi(t){const{popoverComponent:e,popoverProps:n,children:r,type:i="popover",initialFocus:o,portal:s,...a}=t,[l,u]=ee(void 0),c=X(null),[d,h]=ee(!1);So(q(m=>{var _,E;m&&((_=c.current)!=null&&_.contains(m.target))||(h(!1),(E=c.current)==null||E.focus())},[]),"[t-popover-content]",d);const p=i==="menu"?f(xT,{triggerElement:c.current,children:f(e,{...n})}):f(e,{...n});return f(iS.Provider,{value:{closePopover:()=>h(!1)},children:[f(FT,{...a,"aria-haspopup":i==="menu"?"menu":"true","aria-expanded":d,onTrigger:()=>h(m=>!m),ref:m=>(_=>{var A;const E=(A=_==null?void 0:_.closest("[t-menu-boundary]"))!=null?A:void 0;c.current=_,u(E)})(m),children:r}),d&&f(vA,{portal:s,"t-popover-content":"",anchorElement:c.current,boundaryElement:l,preferredPlacement:"bottom-start",trapFocus:i==="popover",initialFocus:i==="menu"?"t-menu":o,role:i==="menu"?void 0:"dialog",children:p})]})}const FT=_t(function(t,e){const{onTrigger:n,...r}=t,i=q(o=>{o.key!=="Enter"&&o.key!==" "||n()},[n]);return f("button",{...r,ref:e,onClick:n,onKeyDown:i})});function Hn(t){const{onSelect:e,...n}=t,{closePopover:r}=jc(),i=q(o=>{o.key!=="Enter"&&o.key!==" "||(r(),e==null||e())},[e,r]);return f("div",{tabIndex:-1,role:"menuitem",onClick:q(()=>{r(),e==null||e()},[r,e]),onKeyDown:i,"t-menu-item":"",...n})}function dl(t){const e=X(t);return We(()=>{e.current=t},[t]),e}function ro(t){const e=ae(),n=li(),r=X(null),{value:i,onChange:o,onKeyDown:s,onKeyUp:a,...l}=t,u=dl(o),c=dl(s),d=dl(a);z(()=>()=>{wt(()=>{e.type==="ChatboxStore"&&(e.searchQuery$.set(""),e.highlightedStrings$.set([]),e.focusedMessage$.set(null))})},[e]);const h=q(()=>{r.current.blur(),n.jumpToHighlight("up")},[n]),p=q(A=>{var g;(g=c.current)==null||g.call(c,A),!A.defaultPrevented&&e.type==="ChatboxStore"&&e.state$.enterSendsMessage.peek()&&rp(A)&&A.preventDefault()},[c,e]),m=q(A=>{var g;(g=d.current)==null||g.call(d,A),!A.defaultPrevented&&e.type==="ChatboxStore"&&e.state$.enterSendsMessage.peek()&&rp(A)&&(A.preventDefault(),h())},[d,e,h]),_=q(A=>{var S;const g=A.target.value;e.type==="ChatboxStore"?e.setSearchQuery(g):e.setGlobalSearchQuery(g),(S=u.current)==null||S.call(u,A)},[e,u]),E=J(()=>e.type==="ChatboxStore"?e.searchQuery$.get():e.globalSearchState$.query.get());return f("input",{type:"search",enterKeyHint:"search",autoComplete:"off",value:i!=null?i:E,onChange:_,onKeyUp:m,onKeyDown:p,...l,ref:r})}const HT={barHeight:4,barRadius:2,barGap:2,barWidth:2,height:24},hl={state:null,duration:0,recordingUrl:void 0,uploadState:"done",fileToken:void 0},DA=new WeakMap;function vu({className:t,voiceRecorder:e}){const n=DA.get(e);return n?f("div",{className:t,style:{shapeRendering:"crispEdges"},ref:n}):(Ce.warn("Can only use Waveform component if a voice recorder is active"),null)}function TA(t,e){return t.map(r=>(function(i,o){if(i.type==="text")return(function(s,a){const l=du(a);return ts(s,l)})(i.children,o);if(i.type==="file"&&i.subtype==="video")return`🎥 ${Po(i.url)}`;if(i.type==="file"&&i.subtype==="image")return`📷 ${Po(i.url)}`;if(i.type==="file"&&i.subtype==="audio")return`🎧 ${Po(i.url)}`;if(i.type==="file"&&i.subtype==="voice"){const s=i.duration;return s===void 0?"🎙️":`🎙️ (${Math.floor(s/60)}:${Math.floor(s%60).toString().padStart(2,"0")})`}return i.type==="file"?(i.subtype,`📎 ${Po(i.url)}`):i.type==="location"?"📍":""})(r,e)).join(`
99
99
 
100
100
  `)}function ts(t,e){return t.flatMap(n=>{if(typeof n=="string")return n;switch(n.type){case"blockquote":case"bold":case"italic":case"strikethrough":case"link":case"actionlink":case"actionLink":case"actionbutton":case"actionButton":return ts(n.children,e);case"bulletlist":case"bulletList":return`
101
101
  `+ts(n.children,e);case"bulletpoint":case"bulletPoint":return"- "+ts(n.children,e)+`
102
- `;case"autolink":case"autoLink":case"codeblock":case"codeBlock":case"codespan":case"codeSpan":case"emoji":case"customemoji":case"customEmoji":return n.text;case"suppressed":return e.contactInfoHiddenText;case"mention":return`@${n.text}`}}).join("")}function Du(t){var d,h,p;const{sender:e}=t,n=po(),r=on(),i=Qe(),[o,s]=ee(e&&typeof e=="object"?e:null);z(()=>{typeof e=="string"&&n.user(e).get().then(s)},[n,e]);const a="virtual-message-"+xs(),[l,u]=Z(()=>{var _,E;const m=(E=t.content)!=null?E:[{type:"text",children:k_((_=t.text)!=null?_:"")}];return[m,Tg(m,{})]},[t.content,t.text]);if(e&&!o)return null;const c={id:a,type:o?"UserMessage":"SystemMessage",sender:o,custom:(d=t.custom)!=null?d:{},createdAt:(h=t.createdAt)!=null?h:-1,editedAt:null,referencedMessage:null,origin:"web",plaintext:u,content:l,reactions:[]};return f(i.Message,{common:r,message:c,messageStatus:(p=t.status)!=null?p:"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 Tu(t){return d_(t)}function Ct(t){var e;return(e=t.photoUrl)!=null?e:u_(t.id,Tv(t.name))}function Rg(t,e){return u_(t,e)}function fn(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 sa({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=${H0}`,linkUrl:`https://maps.google.com/maps?q=${n}&z=15`}}function Ru(t,e){const[n,r]=ee({long:"",short:""});return We(()=>{let i,o=!0;const s=()=>{const l=Date.now(),u=(function(c,d,h){const p=c-d;let m,_,E;const g=new Date(d),A={month:"short",day:"numeric"};if(p<ff)return{changeTimeout:5e3,short:h.JUST_NOW,long:h.JUST_NOW};if(p<mf)m=ff,_="MINUTES",E=h.MINUTES;else if(p<Ef)m=mf,_="HOURS",E=h.HOURS;else{if(!(p<UT)){if(g.getFullYear()===new Date(c).getFullYear()){const v=g.toLocaleDateString(h.locale,A);return{changeTimeout:void 0,short:v,long:v}}{const v=g.toLocaleDateString(h.locale,{...A,year:"numeric"});return{changeTimeout:void 0,short:v,long:v}}}m=Ef,_="DAYS",E=h.DAYS}const S=Math.floor(p/m);return{changeTimeout:m,short:S+E,long:BT(S,_.toLowerCase(),h.locale)}})(l,t>l?l-2e3:t,e);return r(u),u},a=()=>{const l=s();o&&l.changeTimeout&&(i=window.setTimeout(a,l.changeTimeout))};return s(),i=window.setTimeout(a,100),()=>{o=!1,clearTimeout(i)}},[e,t]),n}function di(t){t=Math.floor(t);const e=Math.floor(t/3600);t%=3600;const n=Math.floor(t/60);t%=60;const r=o=>o.toString().padStart(2,"0");let i=`${r(n)}:${r(t)}`;return e>0&&(i=`${r(e)}:${i}`),i}const pf=864e5;function yu(t,e){const n=Date.now(),r=(i=t,o=n,Math.floor((o-i)/pf));var i,o;if(r<0||r===0)return e.TODAY;if(r===1)return e.YESTERDAY;const s={weekday:"long"},a=new Date(t);if(r<7)return a.toLocaleDateString(e.locale,s);const l=new Date(n);return(function(c,d){return Math.floor((d-c)/(365*pf))})(l.setFullYear(l.getFullYear()-1),t)===0?a.toLocaleDateString(e.locale,{...s,month:"long",day:"numeric"}):a.toLocaleDateString(e.locale,{...s,year:"numeric",month:"long",day:"numeric"})}const ff=6e4,mf=36e5,Ef=864e5,UT=6048e5;function BT(t,e,n){return new Intl.RelativeTimeFormat(n).format(-t,e)}function Ft(t,e=10){return uu(t,Math.min(e,100))}function Iu(t,e,n){const r=po(),i=ct([]),o=ct(!1);Wm(a=>{if(o.get()){const l=r.conversation(t).message(e).reactions(n).subscribe(u=>{u!=null||(u=[]),u=u.slice(0,10),i.set(u)});a.onCleanup=()=>{l.unsubscribe()}}});const s=q(()=>o.set(!0),[o]);return[J(i),s]}function yg(t){var i,o,s,a,l,u,c,d;if(!t.container)return;const e=getComputedStyle(t.container),n=(i=io.parse(e.color))!=null?i:new io(255,255,255,1),r=n.withAlpha(n.alpha/2);return Qi.create({...t,barGap:(o=t.barGap)!=null?o:2,barRadius:(s=t.barRadius)!=null?s:0,barWidth:(a=t.barWidth)!=null?a:2,barHeight:t.barHeight,hideScrollbar:!0,cursorWidth:(l=t.cursorWidth)!=null?l:0,cursorColor:t.cursorColor,height:(u=t.height)!=null?u:24,progressColor:(c=t.progressColor)!=null?c:r.toRgbaString(),waveColor:(d=t.waveColor)!=null?d:r.toRgbaString()})}function Un({src:t,onError:e,filename:n,className:r=""}){const i=X(null),o=X(),s=X(),[a,l]=ee(!1),[u,c]=ee(0),[d,h]=ee(1),p=X(),[m,_]=ee(!1),E=J(ae().t$),{audioUrl:g,audioName:A,height:S,isRecordingPreviewBlob:v}=Z(()=>{const O=new URL(t),T=O.protocol==="blob:"&&O.searchParams.has("name");let C=n!=null?n:"";return T&&(C=O.searchParams.get("name"),O.searchParams.delete("name")),{audioUrl:O,audioName:C,height:T?24:50,isRecordingPreviewBlob:T}},[t,n]),[D,y]=ee(v);z(()=>{let O;const T=i.current.closest("t-message-list"),C=new IntersectionObserver(function([N]){N.isIntersecting?O=setTimeout(()=>y(!0),500):clearTimeout(O)},{root:T});return C.observe(i.current),()=>{C.disconnect()}},[]),z(()=>{if(!D)return;o.current=new Audio;const O={normalize:!0,height:S,container:i.current};function T(){const k=o.current;if(!k)return;const b=k.error;(b.message!=="Media failed to load"||k.paused)&&(b.message==="PIPELINE_ERROR_READ: FFmpegDemuxer: demuxer seek failed"?(k.load(),l(!1)):(_(!0),l(!1),e==null||e()))}const C=A.slice(A.lastIndexOf(".")+1);if((function(k){return/(?:^|\/)talkjs_audio_message_[0-9]+_([0-9]+)[.](?:mp3|webm)$/.test(k)})(A)&&C==="webm"&&!o.current.canPlayType("audio/webm;codecs=opus"))O.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 k=o.current;k.addEventListener("error",T),k.preservesPitch=!0,O.url=g.toString(),O.media=k}p.current=yg(O);const N=p.current;return N.on("finish",()=>{o.current.loop=!0,l(!1)}),N.on("ready",k=>c(Math.trunc(k))),N.on("timeupdate",k=>c(Math.trunc(k))),O.backend==="WebAudio"&&N.load(g.toString()).catch(()=>{_(!0),l(!1),e==null||e()}),()=>{var k,b;(k=o.current)==null||k.pause(),(b=o.current)==null||b.removeEventListener("error",T),o.current=void 0,N.destroy(),p.current=void 0}},[g,A,e,D,S]);const R=q(()=>{var O;if(p.current.options.backend==="WebAudio")p.current.isPlaying()||s.current.play(),p.current.playPause(),l((O=p.current.isPlaying())!=null?O:!1);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)}},[]),I=q(O=>{p.current.setPlaybackRate(O),h(O)},[]);return f("div",m?{}:{className:`t-audio-player ${r}`,children:[f("button",{onClick:R,children:f("div",{className:"t-play-pause-wrapper",children:f(B,{className:"t-play-pause-icon",size:"30px",type:a?"pause":"play","aria-label":a?E.ARIA_PAUSE_AUDIO:E.ARIA_PLAY_AUDIO})})}),f("div",{className:"t-waveform",ref:i,style:{height:S}}),f("div",{className:"t-duration",children:di(u)}),f(oi,{type:"menu",portal:!0,popoverComponent:VT,popoverProps:{playbackSpeed:d,selectPlaybackSpeed:I},className:"t-playback-speed","aria-label":E.ARIA_SET_PLAYBACK_SPEED,children:[d,"x",f(B,{type:"chevronDown",size:"1em",className:"t-up-down-icon","aria-hidden":!0})]})]})}const jT=[.25,.5,.75,1,1.25,1.5,2];function VT({playbackSpeed:t,selectPlaybackSpeed:e}){return f("div",{className:"t-playback-speed-menu",children:[f("div",{className:"t-heading",children:"Playback Speed"}),jT.map(n=>f(Hn,{className:"t-menu-item",onSelect:()=>e(n),children:[f("span",{className:"t-playback-checkmark",children:t===n?"✓ ":""}),n,"x"]},n))]})}const zT=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/,$T=/^rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)$/;class io{constructor(e,n,r,i){this.red=e,this.green=n,this.blue=r,this.alpha=i}static parse(e){var r;const n=(r=e.match(zT))!=null?r:e.match($T);if(n){const[i,o,s,a,l="1"]=n;return new io(Number(o),Number(s),Number(a),Number(l))}return null}withAlpha(e){return new io(this.red,this.green,this.blue,e)}toRgbaString(){const{red:e,green:n,blue:r,alpha:i}=this;return i!==1?`rgba(${e}, ${n}, ${r}, ${i})`:`rgb(${e}, ${n}, ${r})`}}function pl(t,e,n,r){return new(n||(n=Promise))(function(i,o){function s(u){try{l(r.next(u))}catch(c){o(c)}}function a(u){try{l(r.throw(u))}catch(c){o(c)}}function l(u){var c;u.done?i(u.value):(c=u.value,c instanceof n?c:new n(function(d){d(c)})).then(s,a)}l((r=r.apply(t,[])).next())})}class Ig{constructor(){this.listeners={}}on(e,n,r){if(this.listeners[e]||(this.listeners[e]=new Set),r==null?void 0:r.once){const i=(...o)=>{this.un(e,i),n(...o)};return this.listeners[e].add(i),()=>this.un(e,i)}return this.listeners[e].add(n),()=>this.un(e,n)}un(e,n){var r;(r=this.listeners[e])===null||r===void 0||r.delete(n)}once(e,n){return this.on(e,n,{once:!0})}unAll(){this.listeners={}}emit(e,...n){this.listeners[e]&&this.listeners[e].forEach(r=>r(...n))}}class YT extends Ig{constructor(e){super(),this.subscriptions=[],this.isDestroyed=!1,this.options=e}onInit(){}_init(e){this.isDestroyed&&(this.subscriptions=[],this.isDestroyed=!1),this.wavesurfer=e,this.onInit()}destroy(){this.emit("destroy"),this.subscriptions.forEach(e=>e()),this.subscriptions=[],this.isDestroyed=!0,this.wavesurfer=void 0}}class GT extends Ig{constructor(){super(...arguments),this.animationFrameId=null,this.isRunning=!1}start(){if(this.isRunning)return;this.isRunning=!0;const e=()=>{this.isRunning&&(this.emit("tick"),this.animationFrameId=requestAnimationFrame(e))};e()}stop(){this.isRunning=!1,this.animationFrameId!==null&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=null)}destroy(){this.stop()}}const WT=["audio/webm","audio/wav","audio/mpeg","audio/mp4","audio/mp3"];class Cu extends YT{constructor(e){var n,r,i,o,s,a;super(Object.assign(Object.assign({},e),{audioBitsPerSecond:(n=e.audioBitsPerSecond)!==null&&n!==void 0?n:128e3,scrollingWaveform:(r=e.scrollingWaveform)!==null&&r!==void 0&&r,scrollingWaveformWindow:(i=e.scrollingWaveformWindow)!==null&&i!==void 0?i:5,continuousWaveform:(o=e.continuousWaveform)!==null&&o!==void 0&&o,renderRecordedAudio:(s=e.renderRecordedAudio)===null||s===void 0||s,mediaRecorderTimeslice:(a=e.mediaRecorderTimeslice)!==null&&a!==void 0?a: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 GT,this.subscriptions.push(this.timer.on("tick",()=>{const l=performance.now()-this.lastStartTime;this.duration=this.isPaused()?this.duration:this.lastDuration+l,this.emit("record-progress",this.duration)}))}static create(e){return new Cu(e||{})}renderMicStream(e){var n;const r=new AudioContext,i=r.createMediaStreamSource(e),o=r.createAnalyser();i.connect(o),(this.options.continuousWaveform||this.options.scrollingWaveform)&&(o.fftSize=32);const s=o.frequencyBinCount,a=new Float32Array(s);let l=0;this.wavesurfer&&((n=this.originalOptions)!==null&&n!==void 0||(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 u=setInterval(()=>{var c,d,h,p;if(!this.isWaveformPaused){if(o.getFloatTimeDomainData(a),this.options.scrollingWaveform){const m=Math.floor(100*(this.options.scrollingWaveformWindow||0));let _=0;for(let g=0;g<s;g++){const A=Math.abs(a[g]);A>_&&(_=A)}this.dataWindow||(this.dataWindow=new Float32Array(m));const E=new Float32Array(m);if(this.dataWindow&&this.dataWindow.length>0){const g=m-1,A=this.dataWindow.slice(-g);E.set(A,0)}E[m-1]=_,this.dataWindow=E}else if(this.options.continuousWaveform){if(!this.dataWindow){const _=this.options.continuousWaveformDuration?Math.round(100*this.options.continuousWaveformDuration):((d=(c=this.wavesurfer)===null||c===void 0?void 0:c.getWidth())!==null&&d!==void 0?d:0)*window.devicePixelRatio;this.dataWindow=new Float32Array(_)}let m=0;for(let _=0;_<s;_++){const E=Math.abs(a[_]);E>m&&(m=E)}if(l+1>this.dataWindow.length){const _=new Float32Array(2*this.dataWindow.length);_.set(this.dataWindow,0),this.dataWindow=_}this.dataWindow[l]=m,l++}else this.dataWindow=a;if(this.wavesurfer){const m=((p=(h=this.dataWindow)===null||h===void 0?void 0:h.length)!==null&&p!==void 0?p:0)/100;this.wavesurfer.load("",[this.dataWindow],this.options.scrollingWaveform?this.options.scrollingWaveformWindow:m).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(_=>{console.error("Error rendering real-time recording data:",_)})}}},10);return{onDestroy:()=>{clearInterval(u),i==null||i.disconnect(),r==null||r.close()},onEnd:()=>{this.isWaveformPaused=!0,this.stopMic()}}}startMic(e){return pl(this,0,void 0,function*(){let n;this.micStream&&this.stopMic();try{n=yield navigator.mediaDevices.getUserMedia({audio:e==null||e})}catch(i){throw new Error("Error accessing the microphone: "+i.message)}const r=this.renderMicStream(n);return this.micStream=r,this.unsubscribeDestroy=this.once("destroy",r.onDestroy),this.unsubscribeRecordEnd=this.once("record-end",r.onEnd),this.stream=n,n})}stopMic(){var e,n,r;(e=this.micStream)===null||e===void 0||e.onDestroy(),(n=this.unsubscribeDestroy)===null||n===void 0||n.call(this),(r=this.unsubscribeRecordEnd)===null||r===void 0||r.call(this),this.micStream=null,this.unsubscribeDestroy=void 0,this.unsubscribeRecordEnd=void 0,this.stream&&(this.stream.getTracks().forEach(i=>i.stop()),this.stream=null,this.mediaRecorder=null)}startRecording(e){return pl(this,0,void 0,function*(){const n=this.stream||(yield this.startMic(e));this.dataWindow=null;const r=this.mediaRecorder||new MediaRecorder(n,{mimeType:this.options.mimeType||WT.find(s=>MediaRecorder.isTypeSupported(s)),audioBitsPerSecond:this.options.audioBitsPerSecond});this.mediaRecorder=r,this.stopRecording();const i=[];r.ondataavailable=s=>{s.data.size>0&&i.push(s.data),this.emit("record-data-available",s.data)};const o=s=>{var a;const l=new Blob(i,{type:r.mimeType});this.emit(s,l),this.options.renderRecordedAudio&&(this.applyOriginalOptionsIfNeeded(),this.recordedBlobUrl&&URL.revokeObjectURL(this.recordedBlobUrl),this.recordedBlobUrl=URL.createObjectURL(l),(a=this.wavesurfer)===null||a===void 0||a.load(this.recordedBlobUrl))};r.onpause=()=>o("record-pause"),r.onstop=()=>o("record-end"),r.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 e;return((e=this.mediaRecorder)===null||e===void 0?void 0:e.state)==="recording"}isPaused(){var e;return((e=this.mediaRecorder)===null||e===void 0?void 0:e.state)==="paused"}isActive(){var e;return((e=this.mediaRecorder)===null||e===void 0?void 0:e.state)!=="inactive"}stopRecording(){var e;this.isActive()&&((e=this.mediaRecorder)===null||e===void 0||e.stop(),this.timer.stop())}pauseRecording(){var e,n;this.isRecording()&&(this.isWaveformPaused=!0,(e=this.mediaRecorder)===null||e===void 0||e.requestData(),(n=this.mediaRecorder)===null||n===void 0||n.pause(),this.timer.stop(),this.lastDuration=this.duration)}resumeRecording(){var e;this.isPaused()&&(this.isWaveformPaused=!1,(e=this.mediaRecorder)===null||e===void 0||e.resume(),this.timer.start(),this.lastStartTime=performance.now(),this.emit("record-resume"))}static getAvailableAudioDevices(){return pl(this,0,void 0,function*(){return navigator.mediaDevices.enumerateDevices().then(e=>e.filter(n=>n.kind==="audioinput"))})}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)}}var _f,gf={exports:{}},XT=(_f||(_f=1,gf.exports=(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(r,i,o){n.o(r,i)||Object.defineProperty(r,i,{enumerable:!0,get:o})},n.r=function(r){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},n.t=function(r,i){if(1&i&&(r=n(r)),8&i||4&i&&typeof r=="object"&&r&&r.__esModule)return r;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:r}),2&i&&typeof r!="string")for(var s in r)n.d(o,s,function(a){return r[a]}.bind(null,s));return o},n.n=function(r){var i=r&&r.__esModule?function(){return r.default}:function(){return r};return n.d(i,"a",i),i},n.o=function(r,i){return Object.prototype.hasOwnProperty.call(r,i)},n.p="",n(n.s=0)})([function(t,e,n){(function(r){function i(v){return(i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(D){return typeof D}:function(D){return D&&typeof Symbol=="function"&&D.constructor===Symbol&&D!==Symbol.prototype?"symbol":typeof D})(v)}function o(v,D){return(function(y){if(Array.isArray(y))return y})(v)||(function(y,R){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(y)){var I=[],O=!0,T=!1,C=void 0;try{for(var N,k=y[Symbol.iterator]();!(O=(N=k.next()).done)&&(I.push(N.value),!R||I.length!==R);O=!0);}catch(b){T=!0,C=b}finally{try{O||k.return==null||k.return()}finally{if(T)throw C}}return I}})(v,D)||(function(y,R){if(y){if(typeof y=="string")return s(y,R);var I=Object.prototype.toString.call(y).slice(8,-1);return I==="Object"&&y.constructor&&(I=y.constructor.name),I==="Map"||I==="Set"?Array.from(y):I==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(I)?s(y,R):void 0}})(v,D)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
103
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function s(v,D){(D==null||D>v.length)&&(D=v.length);for(var y=0,R=new Array(D);y<D;y++)R[y]=v[y];return R}function a(v,D){if(!(v instanceof D))throw new TypeError("Cannot call a class as a function")}function l(v,D){for(var y=0;y<D.length;y++){var R=D[y];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(v,R.key,R)}}function u(v,D){return(u=Object.setPrototypeOf||function(y,R){return y.__proto__=R,y})(v,D)}function c(v){var D=(function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(y){return!1}})();return function(){var y,R=h(v);if(D){var I=h(this).constructor;y=Reflect.construct(R,arguments,I)}else y=R.apply(this,arguments);return d(this,y)}}function d(v,D){return!D||i(D)!=="object"&&typeof D!="function"?(function(y){if(y===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y})(v):D}function h(v){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(D){return D.__proto__||Object.getPrototypeOf(D)})(v)}var p,m=n(2),_=m.EventTarget,E=m.defineEventAttribute,g=(0,n(3).detect)(),A=r.AudioContext||r.webkitAudioContext,S=(function(v){(function(T,C){if(typeof C!="function"&&C!==null)throw new TypeError("Super expression must either be null or a function");T.prototype=Object.create(C&&C.prototype,{constructor:{value:T,writable:!0,configurable:!0}}),C&&u(T,C)})(O,v);var D,y,R,I=c(O);function O(T){var C,N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},k=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};a(this,O);var b=N.mimeType,L=N.audioBitsPerSecond,x=(N.videoBitsPerSecond,N.bitsPerSecond),M=k.encoderWorkerFactory,U=k.OggOpusEncoderWasmPath,V=k.WebMOpusEncoderWasmPath;if((C=I.call(this))._stream=T,C._state="inactive",C._mimeType=b||"",C._audioBitsPerSecond=L||x,C.workerState="inactive",!O.isTypeSupported(C._mimeType))throw new TypeError("invalid arguments, a MIME Type is not supported");switch(O._parseType(C._mimeType).subtype){case"wave":case"wav":C._mimeType="audio/wave";break;case"webm":C._mimeType="audio/webm";break;case"ogg":C._mimeType="audio/ogg";break;default:switch(g&&g.name){case"chrome":case"edge":default:C._mimeType="audio/webm";break;case"firefox":C._mimeType="audio/ogg";break;case"ios":case"safari":C._mimeType="audio/wave"}}switch(C._mimeType){case"audio/wave":C._wasmPath="";break;case"audio/webm":C._wasmPath=V||"";break;case"audio/ogg":C._wasmPath=U||"";break;default:throw new Error("Internal Error: Unexpected MIME Type: ".concat(C._mimeType))}var W="";return document.currentScript?W=document.currentScript.src:self.location&&(W=self.location.href),W=W.substr(0,W.lastIndexOf("/"))+"/encoderWorker.umd.js",typeof O.encoderWorker=="function"&&(W=URL.createObjectURL(new Blob(["(".concat(O.encoderWorker,")()")]))),C._workerFactory=typeof M=="function"?M:function($){return new Worker(W)},C._spawnWorker(),C}return D=O,R=[{key:"isTypeSupported",value:function(T){if(typeof T=="string"&&!T)return!0;try{var C=O._parseType(T),N=C.type,k=C.subtype,b=C.codec}catch(L){return!1}if(N!=="audio"||k!=="ogg"&&k!=="webm"&&k!=="wave"&&k!=="wav")return!1;switch(k){case"ogg":case"webm":if(b!=="opus"&&b)return!1;break;case"wave":case"wav":if(b)return!1}return!0}},{key:"_parseType",value:function(T){try{var C=o(T.match(/^(\w+)\/(\w+)(;\s*codecs=(\w+))?$/),5),N=C[1],k=C[2],b=C[4]}catch(L){return typeof T!="string"||T?null:{type:"",subtype:"",codec:""}}return{type:N,subtype:k,codec:b}}}],(y=[{key:"_spawnWorker",value:function(){var T=this;this.worker=this._workerFactory(),this.worker.onmessage=function(C){return T._onmessageFromWorker(C)},this.worker.onerror=function(C){return T._onerrorFromWorker(C)},this._postMessageToWorker("loadEncoder",{mimeType:this._mimeType,wasmPath:this._wasmPath})}},{key:"_postMessageToWorker",value:function(T){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};switch(T){case"loadEncoder":var N=C.mimeType,k=C.wasmPath;this.worker.postMessage({command:T,mimeType:N,wasmPath:k});break;case"init":var b=C.sampleRate,L=C.channelCount,x=C.bitsPerSecond;this.worker.postMessage({command:T,sampleRate:b,channelCount:L,bitsPerSecond:x}),this.workerState="encoding",this.source.connect(this.processor),this.processor.connect(this.context.destination);var M=new r.Event("start");this.dispatchEvent(M);break;case"pushInputData":var U=C.channelBuffers,V=C.length,W=C.duration;this.worker.postMessage({command:T,channelBuffers:U,length:V,duration:W});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 C,N=T.data,k=N.command,b=N.buffers;switch(k){case"readyToInit":var L=this.sampleRate,x=this.channelCount;this.workerState="readyToInit",this.state==="recording"&&this._postMessageToWorker("init",{sampleRate:L,channelCount:x,bitsPerSecond:this.audioBitsPerSecond});break;case"encodedData":case"lastEncodedData":var M=new Blob(b,{type:this._mimeType});(C=new r.Event("dataavailable")).data=M,this.dispatchEvent(C),k==="lastEncodedData"&&(C=new r.Event("stop"),this.dispatchEvent(C),this.workerState="closed")}}},{key:"_onerrorFromWorker",value:function(T){this.source.disconnect(),this.processor.disconnect(),this.worker.terminate(),this.workerState="closed";var C=["FileName: "+T.filename,"LineNumber: "+T.lineno,"Message: "+T.message].join(" - "),N=new r.Event("error");N.name="UnknownError",N.message=C,this.dispatchEvent(N)}},{key:"_enableAudioProcessCallback",value:function(T){var C=this,N=0;this.processor.onaudioprocess=function(k){for(var b=k.inputBuffer,L=(k.playbackTime,b.sampleRate,b.length),x=b.duration,M=b.numberOfChannels,U=new Array(M),V=0;V<M;V++)U[V]=b.getChannelData(V);var W={channelBuffers:U,length:L,duration:x};C._postMessageToWorker("pushInputData",W),(N+=x)>=T&&(C._postMessageToWorker("getEncodedData"),N=0)}}},{key:"start",value:function(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Number.MAX_SAFE_INTEGER;if(this.state!=="inactive")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,this.workerState==="closed"&&this._spawnWorker(),this.context=new A;var C=this.stream.getAudioTracks();if(!C[0])throw new Error("DOMException: UnkownError, media track not found.");if(this.channelCount=C[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),this.workerState==="readyToInit"){var N=this.sampleRate,k=this.channelCount;this._postMessageToWorker("init",{sampleRate:N,channelCount:k,bitsPerSecond:this.audioBitsPerSecond})}}},{key:"stop",value:function(){if(this.state==="inactive")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(this.state==="inactive")throw new Error("DOMException: INVALID_STATE_ERR, state must NOT be inactive.");this.source.disconnect(),this.processor.disconnect();var T=new r.Event("pause");this.dispatchEvent(T),this._state="paused"}},{key:"resume",value:function(){if(this.state==="inactive")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 r.Event("resume");this.dispatchEvent(T),this._state="recording"}},{key:"requestData",value:function(){if(this.state==="inactive")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}}])&&l(D.prototype,y),R&&l(D,R),O})(_);["start","stop","dataavailable","pause","resume","error"].forEach(function(v){return E(S.prototype,v)}),g&&g.name==="edge"&&(p=Worker.prototype.postMessage,Worker.prototype.postMessage=function(v){p.apply(this,[v])}),t.exports=S}).call(this,n(1))},function(t,e){var n;n=(function(){return this})();try{n=n||new Function("return this")()}catch(r){typeof window=="object"&&(n=window)}t.exports=n},function(t,e,n){n.r(e),n.d(e,"defineEventAttribute",function(){return _}),n.d(e,"EventTarget",function(){return g});const r=new WeakMap,i=new WeakMap;function o(A){const S=r.get(A);return console.assert(S!=null,"'this' is expected an Event object, but got",A),S}function s(A,S){r.set(this,{eventTarget:A,event:S,eventPhase:2,currentTarget:A,canceled:!1,stopped:!1,passiveListener:null,timeStamp:S.timeStamp||Date.now()}),Object.defineProperty(this,"isTrusted",{value:!1,enumerable:!0});const v=Object.keys(S);for(let D=0;D<v.length;++D){const y=v[D];y in this||Object.defineProperty(this,y,a(y))}}function a(A){return{get(){return o(this).event[A]},set(S){o(this).event[A]=S},configurable:!0,enumerable:!0}}function l(A){return{value(){const S=o(this).event;return S[A].apply(S,arguments)},configurable:!0,enumerable:!0}}function u(A){if(A==null||A===Object.prototype)return s;let S=i.get(A);return S==null&&(S=(function(v,D){const y=Object.keys(D);if(y.length===0)return v;function R(I,O){v.call(this,I,O)}R.prototype=Object.create(v.prototype,{constructor:{value:R,configurable:!0,writable:!0}});for(let I=0;I<y.length;++I){const O=y[I];if(!(O in v.prototype)){const T=typeof Object.getOwnPropertyDescriptor(D,O).value=="function";Object.defineProperty(R.prototype,O,T?l(O):a(O))}}return R})(u(Object.getPrototypeOf(A)),A),i.set(A,S)),S}function c(A){return o(A).stopped}function d(A,S){o(A).passiveListener=S}s.prototype={get type(){return o(this).event.type},get target(){return o(this).eventTarget},get currentTarget(){return o(this).currentTarget},composedPath(){const A=o(this).currentTarget;return A==null?[]:[A]},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 A=o(this);typeof A.event.stopPropagation=="function"&&A.event.stopPropagation()},stopImmediatePropagation(){const A=o(this);A.stopped=!0,typeof A.event.stopImmediatePropagation=="function"&&A.event.stopImmediatePropagation()},get bubbles(){return!!o(this).event.bubbles},get cancelable(){return!!o(this).event.cancelable},preventDefault(){const A=o(this);A.passiveListener==null?A.event.cancelable&&(A.canceled=!0,typeof A.event.preventDefault=="function"&&A.event.preventDefault()):console.warn("Event#preventDefault() was called from a passive listener:",A.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}),typeof window!="undefined"&&window.Event!==void 0&&(Object.setPrototypeOf(s.prototype,window.Event.prototype),i.set(window.Event.prototype,s));const h=new WeakMap;function p(A){return A!==null&&typeof A=="object"}function m(A){const S=h.get(A);if(S==null)throw new TypeError("'this' is expected an EventTarget object, but got another value.");return S}function _(A,S){Object.defineProperty(A,"on"+S,(function(v){return{get(){let D=m(this).get(v);for(;D!=null;){if(D.listenerType===3)return D.listener;D=D.next}return null},set(D){typeof D=="function"||p(D)||(D=null);const y=m(this);let R=null,I=y.get(v);for(;I!=null;)I.listenerType===3?R!==null?R.next=I.next:I.next!==null?y.set(v,I.next):y.delete(v):R=I,I=I.next;if(D!==null){const O={listener:D,listenerType:3,passive:!1,once:!1,next:null};R===null?y.set(v,O):R.next=O}},configurable:!0,enumerable:!0}})(S))}function E(A){function S(){g.call(this)}S.prototype=Object.create(g.prototype,{constructor:{value:S,configurable:!0,writable:!0}});for(let v=0;v<A.length;++v)_(S.prototype,A[v]);return S}function g(){if(!(this instanceof g)){if(arguments.length===1&&Array.isArray(arguments[0]))return E(arguments[0]);if(arguments.length>0){const A=new Array(arguments.length);for(let S=0;S<arguments.length;++S)A[S]=arguments[S];return E(A)}throw new TypeError("Cannot call a class as a function")}h.set(this,new Map)}g.prototype={addEventListener(A,S,v){if(S==null)return!1;if(typeof S!="function"&&!p(S))throw new TypeError("'listener' should be a function or an object.");const D=m(this),y=p(v),R=(y?v.capture:v)?1:2,I={listener:S,listenerType:R,passive:y&&!!v.passive,once:y&&!!v.once,next:null};let O=D.get(A);if(O===void 0)return D.set(A,I),!0;let T=null;for(;O!=null;){if(O.listener===S&&O.listenerType===R)return!1;T=O,O=O.next}return T.next=I,!0},removeEventListener(A,S,v){if(S==null)return!1;const D=m(this),y=(p(v)?v.capture:v)?1:2;let R=null,I=D.get(A);for(;I!=null;){if(I.listener===S&&I.listenerType===y)return R!==null?R.next=I.next:I.next!==null?D.set(A,I.next):D.delete(A),!0;R=I,I=I.next}return!1},dispatchEvent(A){if(A==null||typeof A.type!="string")throw new TypeError('"event.type" should be a string.');const S=m(this),v=A.type;let D=S.get(v);if(D==null)return!0;const y=(function(I,O){return new(u(Object.getPrototypeOf(O)))(I,O)})(this,A);let R=null;for(;D!=null;){if(D.once?R!==null?R.next=D.next:D.next!==null?S.set(v,D.next):S.delete(v):R=D,d(y,D.passive?D.listener:null),typeof D.listener=="function")try{D.listener.call(this,y)}catch(I){typeof console!="undefined"&&typeof console.error=="function"&&console.error(I)}else D.listenerType!==3&&typeof D.listener.handleEvent=="function"&&D.listener.handleEvent(y);if(c(y))break;D=D.next}return d(y,null),(function(I,O){o(I).eventPhase=O})(y,0),(function(I,O){o(I).currentTarget=O})(y,null),!y.defaultPrevented}},Object.defineProperty(g.prototype,"constructor",{value:g,configurable:!0,writable:!0}),typeof window!="undefined"&&window.EventTarget!==void 0&&Object.setPrototypeOf(g.prototype,window.EventTarget.prototype),e.default=g},function(t,e,n){(function(r){var i=this&&this.__spreadArrays||function(){for(var p=0,m=0,_=arguments.length;m<_;m++)p+=arguments[m].length;var E=Array(p),g=0;for(m=0;m<_;m++)for(var A=arguments[m],S=0,v=A.length;S<v;S++,g++)E[g]=A[S];return E};Object.defineProperty(e,"__esModule",{value:!0});var o=function(p,m,_){this.name=p,this.version=m,this.os=_};e.BrowserInfo=o;var s=function(p){this.version=p,this.name="node",this.os=r.platform};e.NodeInfo=s;var a=function(){this.bot=!0,this.name="bot",this.version=null,this.os=null};e.BotInfo=a;var l=[["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/]],u=[["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 c(p){var m=p!==""&&l.reduce(function(A,S){var v=S[0],D=S[1];if(A)return A;var y=D.exec(p);return!!y&&[v,y]},!1);if(!m)return null;var _=m[0],E=m[1];if(_==="searchbot")return new a;var g=E[1]&&E[1].split(/[._]/).slice(0,3);return g?g.length<3&&(g=i(g,(function(A){for(var S=[],v=0;v<A;v++)S.push("0");return S})(3-g.length))):g=[],new o(_,g.join("."),d(p))}function d(p){for(var m=0,_=u.length;m<_;m++){var E=u[m],g=E[0];if(E[1].test(p))return g}return null}function h(){return r!==void 0&&r.version?new s(r.version.slice(1)):null}e.detect=function(p){return p?c(p):typeof navigator!="undefined"?c(navigator.userAgent):h()},e.parseUserAgent=c,e.detectOS=d,e.getNodeVersion=h}).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(E){if(n===setTimeout)return setTimeout(E,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(E,0);try{return n(E,0)}catch(g){try{return n.call(null,E,0)}catch(A){return n.call(this,E,0)}}}(function(){try{n=typeof setTimeout=="function"?setTimeout:o}catch(E){n=o}try{r=typeof clearTimeout=="function"?clearTimeout:s}catch(E){r=s}})();var l,u=[],c=!1,d=-1;function h(){c&&l&&(c=!1,l.length?u=l.concat(u):d=-1,u.length&&p())}function p(){if(!c){var E=a(h);c=!0;for(var g=u.length;g;){for(l=u,u=[];++d<g;)l&&l[d].run();d=-1,g=u.length}l=null,c=!1,(function(A){if(r===clearTimeout)return clearTimeout(A);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(A);try{r(A)}catch(S){try{return r.call(null,A)}catch(v){return r.call(this,A)}}})(E)}}function m(E,g){this.fun=E,this.array=g}function _(){}i.nextTick=function(E){var g=new Array(arguments.length-1);if(arguments.length>1)for(var A=1;A<arguments.length;A++)g[A-1]=arguments[A];u.push(new m(E,g)),u.length!==1||c||a(p)},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=_,i.addListener=_,i.once=_,i.off=_,i.removeListener=_,i.removeAllListeners=_,i.emit=_,i.prependListener=_,i.prependOnceListener=_,i.listeners=function(E){return[]},i.binding=function(E){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(E){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}}])),gf.exports);const KT=Ys(XT),Cg=`"use client";
102
+ `;case"autolink":case"autoLink":case"codeblock":case"codeBlock":case"codespan":case"codeSpan":case"emoji":case"customemoji":case"customEmoji":return n.text;case"suppressed":return e.contactInfoHiddenText;case"mention":return`@${n.text}`}}).join("")}function Du(t){var d,h,p;const{sender:e}=t,n=po(),r=on(),i=Qe(),[o,s]=ee(e&&typeof e=="object"?e:null);z(()=>{typeof e=="string"&&n.user(e).get().then(s)},[n,e]);const a="virtual-message-"+xs(),[l,u]=Z(()=>{var _,E;const m=(E=t.content)!=null?E:[{type:"text",children:L_((_=t.text)!=null?_:"")}];return[m,TA(m,{})]},[t.content,t.text]);if(e&&!o)return null;const c={id:a,type:o?"UserMessage":"SystemMessage",sender:o,custom:(d=t.custom)!=null?d:{},createdAt:(h=t.createdAt)!=null?h:-1,editedAt:null,referencedMessage:null,origin:"web",plaintext:u,content:l,reactions:[]};return f(i.Message,{common:r,message:c,messageStatus:(p=t.status)!=null?p:"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 Tu(t){return d_(t)}function Ct(t){var e;return(e=t.photoUrl)!=null?e:u_(t.id,TO(t.name))}function RA(t,e){return u_(t,e)}function fn(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 sa({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=${H0}`,linkUrl:`https://maps.google.com/maps?q=${n}&z=15`}}function Ru(t,e){const[n,r]=ee({long:"",short:""});return We(()=>{let i,o=!0;const s=()=>{const l=Date.now(),u=(function(c,d,h){const p=c-d;let m,_,E;const A=new Date(d),g={month:"short",day:"numeric"};if(p<ff)return{changeTimeout:5e3,short:h.JUST_NOW,long:h.JUST_NOW};if(p<mf)m=ff,_="MINUTES",E=h.MINUTES;else if(p<Ef)m=mf,_="HOURS",E=h.HOURS;else{if(!(p<UT)){if(A.getFullYear()===new Date(c).getFullYear()){const O=A.toLocaleDateString(h.locale,g);return{changeTimeout:void 0,short:O,long:O}}{const O=A.toLocaleDateString(h.locale,{...g,year:"numeric"});return{changeTimeout:void 0,short:O,long:O}}}m=Ef,_="DAYS",E=h.DAYS}const S=Math.floor(p/m);return{changeTimeout:m,short:S+E,long:BT(S,_.toLowerCase(),h.locale)}})(l,t>l?l-2e3:t,e);return r(u),u},a=()=>{const l=s();o&&l.changeTimeout&&(i=window.setTimeout(a,l.changeTimeout))};return s(),i=window.setTimeout(a,100),()=>{o=!1,clearTimeout(i)}},[e,t]),n}function di(t){t=Math.floor(t);const e=Math.floor(t/3600);t%=3600;const n=Math.floor(t/60);t%=60;const r=o=>o.toString().padStart(2,"0");let i=`${r(n)}:${r(t)}`;return e>0&&(i=`${r(e)}:${i}`),i}const pf=864e5;function Iu(t,e){const n=Date.now(),r=(i=t,o=n,Math.floor((o-i)/pf));var i,o;if(r<0||r===0)return e.TODAY;if(r===1)return e.YESTERDAY;const s={weekday:"long"},a=new Date(t);if(r<7)return a.toLocaleDateString(e.locale,s);const l=new Date(n);return(function(c,d){return Math.floor((d-c)/(365*pf))})(l.setFullYear(l.getFullYear()-1),t)===0?a.toLocaleDateString(e.locale,{...s,month:"long",day:"numeric"}):a.toLocaleDateString(e.locale,{...s,year:"numeric",month:"long",day:"numeric"})}const ff=6e4,mf=36e5,Ef=864e5,UT=6048e5;function BT(t,e,n){return new Intl.RelativeTimeFormat(n).format(-t,e)}function Ft(t,e=10){return uu(t,Math.min(e,100))}function yu(t,e,n){const r=po(),i=ct([]),o=ct(!1);Wm(a=>{if(o.get()){const l=r.conversation(t).message(e).reactions(n).subscribe(u=>{u!=null||(u=[]),u=u.slice(0,10),i.set(u)});a.onCleanup=()=>{l.unsubscribe()}}});const s=q(()=>o.set(!0),[o]);return[J(i),s]}function IA(t){var i,o,s,a,l,u,c,d;if(!t.container)return;const e=getComputedStyle(t.container),n=(i=io.parse(e.color))!=null?i:new io(255,255,255,1),r=n.withAlpha(n.alpha/2);return Qi.create({...t,barGap:(o=t.barGap)!=null?o:2,barRadius:(s=t.barRadius)!=null?s:0,barWidth:(a=t.barWidth)!=null?a:2,barHeight:t.barHeight,hideScrollbar:!0,cursorWidth:(l=t.cursorWidth)!=null?l:0,cursorColor:t.cursorColor,height:(u=t.height)!=null?u:24,progressColor:(c=t.progressColor)!=null?c:r.toRgbaString(),waveColor:(d=t.waveColor)!=null?d:r.toRgbaString()})}function Un({src:t,onError:e,filename:n,className:r=""}){const i=X(null),o=X(),s=X(),[a,l]=ee(!1),[u,c]=ee(0),[d,h]=ee(1),p=X(),[m,_]=ee(!1),E=J(ae().t$),{audioUrl:A,audioName:g,height:S,isRecordingPreviewBlob:O}=Z(()=>{const v=new URL(t),T=v.protocol==="blob:"&&v.searchParams.has("name");let C=n!=null?n:"";return T&&(C=v.searchParams.get("name"),v.searchParams.delete("name")),{audioUrl:v,audioName:C,height:T?24:50,isRecordingPreviewBlob:T}},[t,n]),[D,I]=ee(O);z(()=>{let v;const T=i.current.closest("t-message-list"),C=new IntersectionObserver(function([N]){N.isIntersecting?v=setTimeout(()=>I(!0),500):clearTimeout(v)},{root:T});return C.observe(i.current),()=>{C.disconnect()}},[]),z(()=>{if(!D)return;o.current=new Audio;const v={normalize:!0,height:S,container:i.current};function T(){const L=o.current;if(!L)return;const b=L.error;(b.message!=="Media failed to load"||L.paused)&&(b.message==="PIPELINE_ERROR_READ: FFmpegDemuxer: demuxer seek failed"?(L.load(),l(!1)):(_(!0),l(!1),e==null||e()))}const C=g.slice(g.lastIndexOf(".")+1);if((function(L){return/(?:^|\/)talkjs_audio_message_[0-9]+_([0-9]+)[.](?:mp3|webm)$/.test(L)})(g)&&C==="webm"&&!o.current.canPlayType("audio/webm;codecs=opus"))v.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 L=o.current;L.addEventListener("error",T),L.preservesPitch=!0,v.url=A.toString(),v.media=L}p.current=IA(v);const N=p.current;return N.on("finish",()=>{o.current.loop=!0,l(!1)}),N.on("ready",L=>c(Math.trunc(L))),N.on("timeupdate",L=>c(Math.trunc(L))),v.backend==="WebAudio"&&N.load(A.toString()).catch(()=>{_(!0),l(!1),e==null||e()}),()=>{var L,b;(L=o.current)==null||L.pause(),(b=o.current)==null||b.removeEventListener("error",T),o.current=void 0,N.destroy(),p.current=void 0}},[A,g,e,D,S]);const R=q(()=>{var v;if(p.current.options.backend==="WebAudio")p.current.isPlaying()||s.current.play(),p.current.playPause(),l((v=p.current.isPlaying())!=null?v:!1);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)}},[]),y=q(v=>{p.current.setPlaybackRate(v),h(v)},[]);return f("div",m?{}:{className:`t-audio-player ${r}`,children:[f("button",{onClick:R,children:f("div",{className:"t-play-pause-wrapper",children:f(B,{className:"t-play-pause-icon",size:"30px",type:a?"pause":"play","aria-label":a?E.ARIA_PAUSE_AUDIO:E.ARIA_PLAY_AUDIO})})}),f("div",{className:"t-waveform",ref:i,style:{height:S}}),f("div",{className:"t-duration",children:di(u)}),f(oi,{type:"menu",portal:!0,popoverComponent:VT,popoverProps:{playbackSpeed:d,selectPlaybackSpeed:y},className:"t-playback-speed","aria-label":E.ARIA_SET_PLAYBACK_SPEED,children:[d,"x",f(B,{type:"chevronDown",size:"1em",className:"t-up-down-icon","aria-hidden":!0})]})]})}const jT=[.25,.5,.75,1,1.25,1.5,2];function VT({playbackSpeed:t,selectPlaybackSpeed:e}){return f("div",{className:"t-playback-speed-menu",children:[f("div",{className:"t-heading",children:"Playback Speed"}),jT.map(n=>f(Hn,{className:"t-menu-item",onSelect:()=>e(n),children:[f("span",{className:"t-playback-checkmark",children:t===n?"✓ ":""}),n,"x"]},n))]})}const zT=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/,$T=/^rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)$/;class io{constructor(e,n,r,i){this.red=e,this.green=n,this.blue=r,this.alpha=i}static parse(e){var r;const n=(r=e.match(zT))!=null?r:e.match($T);if(n){const[i,o,s,a,l="1"]=n;return new io(Number(o),Number(s),Number(a),Number(l))}return null}withAlpha(e){return new io(this.red,this.green,this.blue,e)}toRgbaString(){const{red:e,green:n,blue:r,alpha:i}=this;return i!==1?`rgba(${e}, ${n}, ${r}, ${i})`:`rgb(${e}, ${n}, ${r})`}}function pl(t,e,n,r){return new(n||(n=Promise))(function(i,o){function s(u){try{l(r.next(u))}catch(c){o(c)}}function a(u){try{l(r.throw(u))}catch(c){o(c)}}function l(u){var c;u.done?i(u.value):(c=u.value,c instanceof n?c:new n(function(d){d(c)})).then(s,a)}l((r=r.apply(t,[])).next())})}class yA{constructor(){this.listeners={}}on(e,n,r){if(this.listeners[e]||(this.listeners[e]=new Set),r==null?void 0:r.once){const i=(...o)=>{this.un(e,i),n(...o)};return this.listeners[e].add(i),()=>this.un(e,i)}return this.listeners[e].add(n),()=>this.un(e,n)}un(e,n){var r;(r=this.listeners[e])===null||r===void 0||r.delete(n)}once(e,n){return this.on(e,n,{once:!0})}unAll(){this.listeners={}}emit(e,...n){this.listeners[e]&&this.listeners[e].forEach(r=>r(...n))}}class YT extends yA{constructor(e){super(),this.subscriptions=[],this.isDestroyed=!1,this.options=e}onInit(){}_init(e){this.isDestroyed&&(this.subscriptions=[],this.isDestroyed=!1),this.wavesurfer=e,this.onInit()}destroy(){this.emit("destroy"),this.subscriptions.forEach(e=>e()),this.subscriptions=[],this.isDestroyed=!0,this.wavesurfer=void 0}}class GT extends yA{constructor(){super(...arguments),this.animationFrameId=null,this.isRunning=!1}start(){if(this.isRunning)return;this.isRunning=!0;const e=()=>{this.isRunning&&(this.emit("tick"),this.animationFrameId=requestAnimationFrame(e))};e()}stop(){this.isRunning=!1,this.animationFrameId!==null&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=null)}destroy(){this.stop()}}const WT=["audio/webm","audio/wav","audio/mpeg","audio/mp4","audio/mp3"];class Cu extends YT{constructor(e){var n,r,i,o,s,a;super(Object.assign(Object.assign({},e),{audioBitsPerSecond:(n=e.audioBitsPerSecond)!==null&&n!==void 0?n:128e3,scrollingWaveform:(r=e.scrollingWaveform)!==null&&r!==void 0&&r,scrollingWaveformWindow:(i=e.scrollingWaveformWindow)!==null&&i!==void 0?i:5,continuousWaveform:(o=e.continuousWaveform)!==null&&o!==void 0&&o,renderRecordedAudio:(s=e.renderRecordedAudio)===null||s===void 0||s,mediaRecorderTimeslice:(a=e.mediaRecorderTimeslice)!==null&&a!==void 0?a: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 GT,this.subscriptions.push(this.timer.on("tick",()=>{const l=performance.now()-this.lastStartTime;this.duration=this.isPaused()?this.duration:this.lastDuration+l,this.emit("record-progress",this.duration)}))}static create(e){return new Cu(e||{})}renderMicStream(e){var n;const r=new AudioContext,i=r.createMediaStreamSource(e),o=r.createAnalyser();i.connect(o),(this.options.continuousWaveform||this.options.scrollingWaveform)&&(o.fftSize=32);const s=o.frequencyBinCount,a=new Float32Array(s);let l=0;this.wavesurfer&&((n=this.originalOptions)!==null&&n!==void 0||(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 u=setInterval(()=>{var c,d,h,p;if(!this.isWaveformPaused){if(o.getFloatTimeDomainData(a),this.options.scrollingWaveform){const m=Math.floor(100*(this.options.scrollingWaveformWindow||0));let _=0;for(let A=0;A<s;A++){const g=Math.abs(a[A]);g>_&&(_=g)}this.dataWindow||(this.dataWindow=new Float32Array(m));const E=new Float32Array(m);if(this.dataWindow&&this.dataWindow.length>0){const A=m-1,g=this.dataWindow.slice(-A);E.set(g,0)}E[m-1]=_,this.dataWindow=E}else if(this.options.continuousWaveform){if(!this.dataWindow){const _=this.options.continuousWaveformDuration?Math.round(100*this.options.continuousWaveformDuration):((d=(c=this.wavesurfer)===null||c===void 0?void 0:c.getWidth())!==null&&d!==void 0?d:0)*window.devicePixelRatio;this.dataWindow=new Float32Array(_)}let m=0;for(let _=0;_<s;_++){const E=Math.abs(a[_]);E>m&&(m=E)}if(l+1>this.dataWindow.length){const _=new Float32Array(2*this.dataWindow.length);_.set(this.dataWindow,0),this.dataWindow=_}this.dataWindow[l]=m,l++}else this.dataWindow=a;if(this.wavesurfer){const m=((p=(h=this.dataWindow)===null||h===void 0?void 0:h.length)!==null&&p!==void 0?p:0)/100;this.wavesurfer.load("",[this.dataWindow],this.options.scrollingWaveform?this.options.scrollingWaveformWindow:m).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(_=>{console.error("Error rendering real-time recording data:",_)})}}},10);return{onDestroy:()=>{clearInterval(u),i==null||i.disconnect(),r==null||r.close()},onEnd:()=>{this.isWaveformPaused=!0,this.stopMic()}}}startMic(e){return pl(this,0,void 0,function*(){let n;this.micStream&&this.stopMic();try{n=yield navigator.mediaDevices.getUserMedia({audio:e==null||e})}catch(i){throw new Error("Error accessing the microphone: "+i.message)}const r=this.renderMicStream(n);return this.micStream=r,this.unsubscribeDestroy=this.once("destroy",r.onDestroy),this.unsubscribeRecordEnd=this.once("record-end",r.onEnd),this.stream=n,n})}stopMic(){var e,n,r;(e=this.micStream)===null||e===void 0||e.onDestroy(),(n=this.unsubscribeDestroy)===null||n===void 0||n.call(this),(r=this.unsubscribeRecordEnd)===null||r===void 0||r.call(this),this.micStream=null,this.unsubscribeDestroy=void 0,this.unsubscribeRecordEnd=void 0,this.stream&&(this.stream.getTracks().forEach(i=>i.stop()),this.stream=null,this.mediaRecorder=null)}startRecording(e){return pl(this,0,void 0,function*(){const n=this.stream||(yield this.startMic(e));this.dataWindow=null;const r=this.mediaRecorder||new MediaRecorder(n,{mimeType:this.options.mimeType||WT.find(s=>MediaRecorder.isTypeSupported(s)),audioBitsPerSecond:this.options.audioBitsPerSecond});this.mediaRecorder=r,this.stopRecording();const i=[];r.ondataavailable=s=>{s.data.size>0&&i.push(s.data),this.emit("record-data-available",s.data)};const o=s=>{var a;const l=new Blob(i,{type:r.mimeType});this.emit(s,l),this.options.renderRecordedAudio&&(this.applyOriginalOptionsIfNeeded(),this.recordedBlobUrl&&URL.revokeObjectURL(this.recordedBlobUrl),this.recordedBlobUrl=URL.createObjectURL(l),(a=this.wavesurfer)===null||a===void 0||a.load(this.recordedBlobUrl))};r.onpause=()=>o("record-pause"),r.onstop=()=>o("record-end"),r.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 e;return((e=this.mediaRecorder)===null||e===void 0?void 0:e.state)==="recording"}isPaused(){var e;return((e=this.mediaRecorder)===null||e===void 0?void 0:e.state)==="paused"}isActive(){var e;return((e=this.mediaRecorder)===null||e===void 0?void 0:e.state)!=="inactive"}stopRecording(){var e;this.isActive()&&((e=this.mediaRecorder)===null||e===void 0||e.stop(),this.timer.stop())}pauseRecording(){var e,n;this.isRecording()&&(this.isWaveformPaused=!0,(e=this.mediaRecorder)===null||e===void 0||e.requestData(),(n=this.mediaRecorder)===null||n===void 0||n.pause(),this.timer.stop(),this.lastDuration=this.duration)}resumeRecording(){var e;this.isPaused()&&(this.isWaveformPaused=!1,(e=this.mediaRecorder)===null||e===void 0||e.resume(),this.timer.start(),this.lastStartTime=performance.now(),this.emit("record-resume"))}static getAvailableAudioDevices(){return pl(this,0,void 0,function*(){return navigator.mediaDevices.enumerateDevices().then(e=>e.filter(n=>n.kind==="audioinput"))})}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)}}var _f,Af={exports:{}},XT=(_f||(_f=1,Af.exports=(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(r,i,o){n.o(r,i)||Object.defineProperty(r,i,{enumerable:!0,get:o})},n.r=function(r){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},n.t=function(r,i){if(1&i&&(r=n(r)),8&i||4&i&&typeof r=="object"&&r&&r.__esModule)return r;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:r}),2&i&&typeof r!="string")for(var s in r)n.d(o,s,function(a){return r[a]}.bind(null,s));return o},n.n=function(r){var i=r&&r.__esModule?function(){return r.default}:function(){return r};return n.d(i,"a",i),i},n.o=function(r,i){return Object.prototype.hasOwnProperty.call(r,i)},n.p="",n(n.s=0)})([function(t,e,n){(function(r){function i(O){return(i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(D){return typeof D}:function(D){return D&&typeof Symbol=="function"&&D.constructor===Symbol&&D!==Symbol.prototype?"symbol":typeof D})(O)}function o(O,D){return(function(I){if(Array.isArray(I))return I})(O)||(function(I,R){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(I)){var y=[],v=!0,T=!1,C=void 0;try{for(var N,L=I[Symbol.iterator]();!(v=(N=L.next()).done)&&(y.push(N.value),!R||y.length!==R);v=!0);}catch(b){T=!0,C=b}finally{try{v||L.return==null||L.return()}finally{if(T)throw C}}return y}})(O,D)||(function(I,R){if(I){if(typeof I=="string")return s(I,R);var y=Object.prototype.toString.call(I).slice(8,-1);return y==="Object"&&I.constructor&&(y=I.constructor.name),y==="Map"||y==="Set"?Array.from(I):y==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(y)?s(I,R):void 0}})(O,D)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
103
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function s(O,D){(D==null||D>O.length)&&(D=O.length);for(var I=0,R=new Array(D);I<D;I++)R[I]=O[I];return R}function a(O,D){if(!(O instanceof D))throw new TypeError("Cannot call a class as a function")}function l(O,D){for(var I=0;I<D.length;I++){var R=D[I];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(O,R.key,R)}}function u(O,D){return(u=Object.setPrototypeOf||function(I,R){return I.__proto__=R,I})(O,D)}function c(O){var D=(function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(I){return!1}})();return function(){var I,R=h(O);if(D){var y=h(this).constructor;I=Reflect.construct(R,arguments,y)}else I=R.apply(this,arguments);return d(this,I)}}function d(O,D){return!D||i(D)!=="object"&&typeof D!="function"?(function(I){if(I===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return I})(O):D}function h(O){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(D){return D.__proto__||Object.getPrototypeOf(D)})(O)}var p,m=n(2),_=m.EventTarget,E=m.defineEventAttribute,A=(0,n(3).detect)(),g=r.AudioContext||r.webkitAudioContext,S=(function(O){(function(T,C){if(typeof C!="function"&&C!==null)throw new TypeError("Super expression must either be null or a function");T.prototype=Object.create(C&&C.prototype,{constructor:{value:T,writable:!0,configurable:!0}}),C&&u(T,C)})(v,O);var D,I,R,y=c(v);function v(T){var C,N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},L=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};a(this,v);var b=N.mimeType,k=N.audioBitsPerSecond,x=(N.videoBitsPerSecond,N.bitsPerSecond),M=L.encoderWorkerFactory,U=L.OggOpusEncoderWasmPath,V=L.WebMOpusEncoderWasmPath;if((C=y.call(this))._stream=T,C._state="inactive",C._mimeType=b||"",C._audioBitsPerSecond=k||x,C.workerState="inactive",!v.isTypeSupported(C._mimeType))throw new TypeError("invalid arguments, a MIME Type is not supported");switch(v._parseType(C._mimeType).subtype){case"wave":case"wav":C._mimeType="audio/wave";break;case"webm":C._mimeType="audio/webm";break;case"ogg":C._mimeType="audio/ogg";break;default:switch(A&&A.name){case"chrome":case"edge":default:C._mimeType="audio/webm";break;case"firefox":C._mimeType="audio/ogg";break;case"ios":case"safari":C._mimeType="audio/wave"}}switch(C._mimeType){case"audio/wave":C._wasmPath="";break;case"audio/webm":C._wasmPath=V||"";break;case"audio/ogg":C._wasmPath=U||"";break;default:throw new Error("Internal Error: Unexpected MIME Type: ".concat(C._mimeType))}var W="";return document.currentScript?W=document.currentScript.src:self.location&&(W=self.location.href),W=W.substr(0,W.lastIndexOf("/"))+"/encoderWorker.umd.js",typeof v.encoderWorker=="function"&&(W=URL.createObjectURL(new Blob(["(".concat(v.encoderWorker,")()")]))),C._workerFactory=typeof M=="function"?M:function($){return new Worker(W)},C._spawnWorker(),C}return D=v,R=[{key:"isTypeSupported",value:function(T){if(typeof T=="string"&&!T)return!0;try{var C=v._parseType(T),N=C.type,L=C.subtype,b=C.codec}catch(k){return!1}if(N!=="audio"||L!=="ogg"&&L!=="webm"&&L!=="wave"&&L!=="wav")return!1;switch(L){case"ogg":case"webm":if(b!=="opus"&&b)return!1;break;case"wave":case"wav":if(b)return!1}return!0}},{key:"_parseType",value:function(T){try{var C=o(T.match(/^(\w+)\/(\w+)(;\s*codecs=(\w+))?$/),5),N=C[1],L=C[2],b=C[4]}catch(k){return typeof T!="string"||T?null:{type:"",subtype:"",codec:""}}return{type:N,subtype:L,codec:b}}}],(I=[{key:"_spawnWorker",value:function(){var T=this;this.worker=this._workerFactory(),this.worker.onmessage=function(C){return T._onmessageFromWorker(C)},this.worker.onerror=function(C){return T._onerrorFromWorker(C)},this._postMessageToWorker("loadEncoder",{mimeType:this._mimeType,wasmPath:this._wasmPath})}},{key:"_postMessageToWorker",value:function(T){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};switch(T){case"loadEncoder":var N=C.mimeType,L=C.wasmPath;this.worker.postMessage({command:T,mimeType:N,wasmPath:L});break;case"init":var b=C.sampleRate,k=C.channelCount,x=C.bitsPerSecond;this.worker.postMessage({command:T,sampleRate:b,channelCount:k,bitsPerSecond:x}),this.workerState="encoding",this.source.connect(this.processor),this.processor.connect(this.context.destination);var M=new r.Event("start");this.dispatchEvent(M);break;case"pushInputData":var U=C.channelBuffers,V=C.length,W=C.duration;this.worker.postMessage({command:T,channelBuffers:U,length:V,duration:W});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 C,N=T.data,L=N.command,b=N.buffers;switch(L){case"readyToInit":var k=this.sampleRate,x=this.channelCount;this.workerState="readyToInit",this.state==="recording"&&this._postMessageToWorker("init",{sampleRate:k,channelCount:x,bitsPerSecond:this.audioBitsPerSecond});break;case"encodedData":case"lastEncodedData":var M=new Blob(b,{type:this._mimeType});(C=new r.Event("dataavailable")).data=M,this.dispatchEvent(C),L==="lastEncodedData"&&(C=new r.Event("stop"),this.dispatchEvent(C),this.workerState="closed")}}},{key:"_onerrorFromWorker",value:function(T){this.source.disconnect(),this.processor.disconnect(),this.worker.terminate(),this.workerState="closed";var C=["FileName: "+T.filename,"LineNumber: "+T.lineno,"Message: "+T.message].join(" - "),N=new r.Event("error");N.name="UnknownError",N.message=C,this.dispatchEvent(N)}},{key:"_enableAudioProcessCallback",value:function(T){var C=this,N=0;this.processor.onaudioprocess=function(L){for(var b=L.inputBuffer,k=(L.playbackTime,b.sampleRate,b.length),x=b.duration,M=b.numberOfChannels,U=new Array(M),V=0;V<M;V++)U[V]=b.getChannelData(V);var W={channelBuffers:U,length:k,duration:x};C._postMessageToWorker("pushInputData",W),(N+=x)>=T&&(C._postMessageToWorker("getEncodedData"),N=0)}}},{key:"start",value:function(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Number.MAX_SAFE_INTEGER;if(this.state!=="inactive")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,this.workerState==="closed"&&this._spawnWorker(),this.context=new g;var C=this.stream.getAudioTracks();if(!C[0])throw new Error("DOMException: UnkownError, media track not found.");if(this.channelCount=C[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),this.workerState==="readyToInit"){var N=this.sampleRate,L=this.channelCount;this._postMessageToWorker("init",{sampleRate:N,channelCount:L,bitsPerSecond:this.audioBitsPerSecond})}}},{key:"stop",value:function(){if(this.state==="inactive")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(this.state==="inactive")throw new Error("DOMException: INVALID_STATE_ERR, state must NOT be inactive.");this.source.disconnect(),this.processor.disconnect();var T=new r.Event("pause");this.dispatchEvent(T),this._state="paused"}},{key:"resume",value:function(){if(this.state==="inactive")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 r.Event("resume");this.dispatchEvent(T),this._state="recording"}},{key:"requestData",value:function(){if(this.state==="inactive")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}}])&&l(D.prototype,I),R&&l(D,R),v})(_);["start","stop","dataavailable","pause","resume","error"].forEach(function(O){return E(S.prototype,O)}),A&&A.name==="edge"&&(p=Worker.prototype.postMessage,Worker.prototype.postMessage=function(O){p.apply(this,[O])}),t.exports=S}).call(this,n(1))},function(t,e){var n;n=(function(){return this})();try{n=n||new Function("return this")()}catch(r){typeof window=="object"&&(n=window)}t.exports=n},function(t,e,n){n.r(e),n.d(e,"defineEventAttribute",function(){return _}),n.d(e,"EventTarget",function(){return A});const r=new WeakMap,i=new WeakMap;function o(g){const S=r.get(g);return console.assert(S!=null,"'this' is expected an Event object, but got",g),S}function s(g,S){r.set(this,{eventTarget:g,event:S,eventPhase:2,currentTarget:g,canceled:!1,stopped:!1,passiveListener:null,timeStamp:S.timeStamp||Date.now()}),Object.defineProperty(this,"isTrusted",{value:!1,enumerable:!0});const O=Object.keys(S);for(let D=0;D<O.length;++D){const I=O[D];I in this||Object.defineProperty(this,I,a(I))}}function a(g){return{get(){return o(this).event[g]},set(S){o(this).event[g]=S},configurable:!0,enumerable:!0}}function l(g){return{value(){const S=o(this).event;return S[g].apply(S,arguments)},configurable:!0,enumerable:!0}}function u(g){if(g==null||g===Object.prototype)return s;let S=i.get(g);return S==null&&(S=(function(O,D){const I=Object.keys(D);if(I.length===0)return O;function R(y,v){O.call(this,y,v)}R.prototype=Object.create(O.prototype,{constructor:{value:R,configurable:!0,writable:!0}});for(let y=0;y<I.length;++y){const v=I[y];if(!(v in O.prototype)){const T=typeof Object.getOwnPropertyDescriptor(D,v).value=="function";Object.defineProperty(R.prototype,v,T?l(v):a(v))}}return R})(u(Object.getPrototypeOf(g)),g),i.set(g,S)),S}function c(g){return o(g).stopped}function d(g,S){o(g).passiveListener=S}s.prototype={get type(){return o(this).event.type},get target(){return o(this).eventTarget},get currentTarget(){return o(this).currentTarget},composedPath(){const g=o(this).currentTarget;return g==null?[]:[g]},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 g=o(this);typeof g.event.stopPropagation=="function"&&g.event.stopPropagation()},stopImmediatePropagation(){const g=o(this);g.stopped=!0,typeof g.event.stopImmediatePropagation=="function"&&g.event.stopImmediatePropagation()},get bubbles(){return!!o(this).event.bubbles},get cancelable(){return!!o(this).event.cancelable},preventDefault(){const g=o(this);g.passiveListener==null?g.event.cancelable&&(g.canceled=!0,typeof g.event.preventDefault=="function"&&g.event.preventDefault()):console.warn("Event#preventDefault() was called from a passive listener:",g.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}),typeof window!="undefined"&&window.Event!==void 0&&(Object.setPrototypeOf(s.prototype,window.Event.prototype),i.set(window.Event.prototype,s));const h=new WeakMap;function p(g){return g!==null&&typeof g=="object"}function m(g){const S=h.get(g);if(S==null)throw new TypeError("'this' is expected an EventTarget object, but got another value.");return S}function _(g,S){Object.defineProperty(g,"on"+S,(function(O){return{get(){let D=m(this).get(O);for(;D!=null;){if(D.listenerType===3)return D.listener;D=D.next}return null},set(D){typeof D=="function"||p(D)||(D=null);const I=m(this);let R=null,y=I.get(O);for(;y!=null;)y.listenerType===3?R!==null?R.next=y.next:y.next!==null?I.set(O,y.next):I.delete(O):R=y,y=y.next;if(D!==null){const v={listener:D,listenerType:3,passive:!1,once:!1,next:null};R===null?I.set(O,v):R.next=v}},configurable:!0,enumerable:!0}})(S))}function E(g){function S(){A.call(this)}S.prototype=Object.create(A.prototype,{constructor:{value:S,configurable:!0,writable:!0}});for(let O=0;O<g.length;++O)_(S.prototype,g[O]);return S}function A(){if(!(this instanceof A)){if(arguments.length===1&&Array.isArray(arguments[0]))return E(arguments[0]);if(arguments.length>0){const g=new Array(arguments.length);for(let S=0;S<arguments.length;++S)g[S]=arguments[S];return E(g)}throw new TypeError("Cannot call a class as a function")}h.set(this,new Map)}A.prototype={addEventListener(g,S,O){if(S==null)return!1;if(typeof S!="function"&&!p(S))throw new TypeError("'listener' should be a function or an object.");const D=m(this),I=p(O),R=(I?O.capture:O)?1:2,y={listener:S,listenerType:R,passive:I&&!!O.passive,once:I&&!!O.once,next:null};let v=D.get(g);if(v===void 0)return D.set(g,y),!0;let T=null;for(;v!=null;){if(v.listener===S&&v.listenerType===R)return!1;T=v,v=v.next}return T.next=y,!0},removeEventListener(g,S,O){if(S==null)return!1;const D=m(this),I=(p(O)?O.capture:O)?1:2;let R=null,y=D.get(g);for(;y!=null;){if(y.listener===S&&y.listenerType===I)return R!==null?R.next=y.next:y.next!==null?D.set(g,y.next):D.delete(g),!0;R=y,y=y.next}return!1},dispatchEvent(g){if(g==null||typeof g.type!="string")throw new TypeError('"event.type" should be a string.');const S=m(this),O=g.type;let D=S.get(O);if(D==null)return!0;const I=(function(y,v){return new(u(Object.getPrototypeOf(v)))(y,v)})(this,g);let R=null;for(;D!=null;){if(D.once?R!==null?R.next=D.next:D.next!==null?S.set(O,D.next):S.delete(O):R=D,d(I,D.passive?D.listener:null),typeof D.listener=="function")try{D.listener.call(this,I)}catch(y){typeof console!="undefined"&&typeof console.error=="function"&&console.error(y)}else D.listenerType!==3&&typeof D.listener.handleEvent=="function"&&D.listener.handleEvent(I);if(c(I))break;D=D.next}return d(I,null),(function(y,v){o(y).eventPhase=v})(I,0),(function(y,v){o(y).currentTarget=v})(I,null),!I.defaultPrevented}},Object.defineProperty(A.prototype,"constructor",{value:A,configurable:!0,writable:!0}),typeof window!="undefined"&&window.EventTarget!==void 0&&Object.setPrototypeOf(A.prototype,window.EventTarget.prototype),e.default=A},function(t,e,n){(function(r){var i=this&&this.__spreadArrays||function(){for(var p=0,m=0,_=arguments.length;m<_;m++)p+=arguments[m].length;var E=Array(p),A=0;for(m=0;m<_;m++)for(var g=arguments[m],S=0,O=g.length;S<O;S++,A++)E[A]=g[S];return E};Object.defineProperty(e,"__esModule",{value:!0});var o=function(p,m,_){this.name=p,this.version=m,this.os=_};e.BrowserInfo=o;var s=function(p){this.version=p,this.name="node",this.os=r.platform};e.NodeInfo=s;var a=function(){this.bot=!0,this.name="bot",this.version=null,this.os=null};e.BotInfo=a;var l=[["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/]],u=[["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 c(p){var m=p!==""&&l.reduce(function(g,S){var O=S[0],D=S[1];if(g)return g;var I=D.exec(p);return!!I&&[O,I]},!1);if(!m)return null;var _=m[0],E=m[1];if(_==="searchbot")return new a;var A=E[1]&&E[1].split(/[._]/).slice(0,3);return A?A.length<3&&(A=i(A,(function(g){for(var S=[],O=0;O<g;O++)S.push("0");return S})(3-A.length))):A=[],new o(_,A.join("."),d(p))}function d(p){for(var m=0,_=u.length;m<_;m++){var E=u[m],A=E[0];if(E[1].test(p))return A}return null}function h(){return r!==void 0&&r.version?new s(r.version.slice(1)):null}e.detect=function(p){return p?c(p):typeof navigator!="undefined"?c(navigator.userAgent):h()},e.parseUserAgent=c,e.detectOS=d,e.getNodeVersion=h}).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(E){if(n===setTimeout)return setTimeout(E,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(E,0);try{return n(E,0)}catch(A){try{return n.call(null,E,0)}catch(g){return n.call(this,E,0)}}}(function(){try{n=typeof setTimeout=="function"?setTimeout:o}catch(E){n=o}try{r=typeof clearTimeout=="function"?clearTimeout:s}catch(E){r=s}})();var l,u=[],c=!1,d=-1;function h(){c&&l&&(c=!1,l.length?u=l.concat(u):d=-1,u.length&&p())}function p(){if(!c){var E=a(h);c=!0;for(var A=u.length;A;){for(l=u,u=[];++d<A;)l&&l[d].run();d=-1,A=u.length}l=null,c=!1,(function(g){if(r===clearTimeout)return clearTimeout(g);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(g);try{r(g)}catch(S){try{return r.call(null,g)}catch(O){return r.call(this,g)}}})(E)}}function m(E,A){this.fun=E,this.array=A}function _(){}i.nextTick=function(E){var A=new Array(arguments.length-1);if(arguments.length>1)for(var g=1;g<arguments.length;g++)A[g-1]=arguments[g];u.push(new m(E,A)),u.length!==1||c||a(p)},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=_,i.addListener=_,i.once=_,i.off=_,i.removeListener=_,i.removeAllListeners=_,i.emit=_,i.prependListener=_,i.prependOnceListener=_,i.listeners=function(E){return[]},i.binding=function(E){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(E){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}}])),Af.exports);const KT=Ys(XT),CA=`"use client";
104
104
  var Bt, It, Rt, Ot = { exports: {} };
105
105
  Bt || (Bt = 1, It = Ot, typeof OpusMediaRecorder != "undefined" && OpusMediaRecorder, Rt = function() {
106
106
  return function() {
@@ -1331,7 +1331,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1331
1331
  }]);
1332
1332
  };
1333
1333
  }, typeof WorkerGlobalScope != "undefined" && self instanceof WorkerGlobalScope ? Rt()() : It.exports = Rt());
1334
- `,Af=typeof self!="undefined"&&self.Blob&&new Blob(["URL.revokeObjectURL(import.meta.url);",Cg],{type:"text/javascript;charset=utf-8"});function qT(t){let e;try{if(e=Af&&(self.URL||self.webkitURL).createObjectURL(Af),!e)throw"";const n=new Worker(e,{type:"module",name:t==null?void 0:t.name});return n.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e)}),n}catch(n){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(Cg),{type:"module",name:t==null?void 0:t.name})}}const fl="audio/webm;codecs=opus",JT=typeof MediaRecorder!="undefined"&&typeof MediaRecorder.isTypeSupported=="function";function ZT(t){const e=X(),n=X(),r=X(),i=X(!1),o=t.mediaRecorder;z(()=>{t.recordingState==="recording"?s():o.current&&t.recordingState===null&&(i.current=!0,o.current.stop())},[t.recordingState]);const s=async()=>{var l;n.current=Cu.create({scrollingWaveform:!0,scrollingWaveformWindow:10}),e.current=yg({...t.wavesurferOptions,interact:!1,barHeight:(l=t.wavesurferOptions.barHeight)!=null?l:4,plugins:[n.current],container:t.wavesurferContainer.current});const a=await n.current.startMic();a.getAudioTracks().forEach(u=>{u.onmute=()=>t.onStopRecording()}),JT&&MediaRecorder.isTypeSupported(fl)?o.current=new MediaRecorder(a,{mimeType:fl}):o.current=new KT(a,{mimeType:fl},{encoderWorkerFactory:()=>new qT,WebMOpusEncoderWasmPath:G_["opus-media-recorder-wasm"]}),o.current.onerror=u=>{Ce.error("[TalkJS] Unexpected error while recording audio: ",u)},o.current.onstart=()=>r.current=Date.now(),o.current.ondataavailable=u=>{var c;if(!i.current){const d=Date.now(),h=Math.floor((d-r.current)/1e3),p=new File([u.data],`talkjs_audio_message_${d}_${h}.webm`,{type:"audio/webm"});t.onSendRecording(p,h)}i.current=!1,o.current=void 0,(c=n.current)==null||c.stopMic(),e.current=void 0,n.current=void 0},o.current.start()};return null}function Ng(t){const e=Qe(),n=ae(),r=on(),i=J(n.referencedMessage$),o=J(n.state$.userPermissions),s=ho(),{sendMessage:a}=tS(),{voiceRecorder:l,recordVoiceMessage:u,voiceRecorderControlsProps:c}=(function(){const p=ae(),m=li(),_=QA(),E=ct({...hl}),{state:g,duration:A,recordingUrl:S,uploadState:v,fileToken:D}=J(E),y=X(void 0),R=X(null),I=X(),O=q(()=>_.runWithPermissionCheck("microphone",async b=>{const L=p.state$.currentConversation.peek();if(L&&L.access!=="Read"){try{(await navigator.mediaDevices.getUserMedia({audio:!0})).getTracks().forEach(x=>x.stop()),b("granted")}catch(x){throw b("denied"),x}E.assign({state:"recording",duration:0}),I.current=setInterval(()=>{E.duration.set(x=>x+1)},1e3)}}),[E,p,_]),T=q(()=>{var b;I.current&&(clearInterval(I.current),I.current=void 0),(b=y.current)==null||b.stop()},[]),C=q(()=>{I.current&&(clearInterval(I.current),I.current=void 0),E.assign(hl)},[E]),N=q((b,L)=>{const x=URL.createObjectURL(new Blob([b])),M=b.size+","+b.name;p.state$.localFileBlobUrls.child(p.state$.currentConversationId.peek()).child(M).set({url:x,fetching:!1});const U={duration:L,filename:b.name};E.assign({state:"previewing",uploadState:"pending",recordingUrl:x+"?name="+b.name}),m.uploadVoice(b,U).then(V=>{p.fileUploads[V]={type:"voice",file:b,metadata:U,temporaryBlobUrl:x,state:"uploaded"},E.assign({uploadState:"done",fileToken:V})})},[m,E,p]),k=q(()=>{D&&m.sendFileMessage({fileToken:D}),E.assign(hl)},[m,D,E]);return{voiceRecorder:Z(()=>{if(!g)return;const b={state:g,duration:A,recordingUrl:S,uploadState:v,stop:T,cancel:C,send:k};return Dg.set(b,R),b},[g,A,S,v,T,C,k]),recordVoiceMessage:O,voiceRecorderControlsProps:Z(()=>({onStopRecording:T,onSendRecording:N,recordingState:g,mediaRecorder:y,wavesurferOptions:HT,wavesurferContainer:R}),[T,N,g])}})(),d=J(ct(()=>{const p=s.state$.get();return t.editMessageId===void 0?new jd(p,a,t.attachFile,t.shareLocation,s.toggleEmojiPicker,u):new jd(p,t.onEditMessage,()=>{},()=>{},()=>{},()=>{})},[s.state$,s.toggleEmojiPicker,t.attachFile,t.editMessageId,t.onEditMessage,t.shareLocation,a])),h=q(p=>s.setText(p),[s]);return(function({appId:p,conversationId:m,meId:_,setText:E,enabled:g}){const A=Z(()=>F_(m,_,p),[p,m,_]);z(()=>{var v;if(!A||!g)return;const S=(v=JSON.parse(st.getItem(tc)||"{}")[A])!=null?v:"";E(S)},[A,g,E])})({appId:r.app.id,conversationId:r.conversation.id,meId:r.currentUser.id,setText:h,enabled:!t.editMessageId}),f(nE.Provider,{value:{onClose:()=>s.toggleEmojiPicker(!1),onEmojiSelected:p=>s.selectEmoji(p)},children:[f(ZT,{...c}),f(e.MessageField,{common:r,referencedMessage:i,permissions:o,editor:d,voiceRecorder:l,editMessageId:t.editMessageId})]})}function QT({message:t}){const e=ae(),n=li(),r=J(e.state$.editingMessageId),i=Z(()=>$t(t.content[0].children),[t]),o=ct({isEmpty:i.length===0,atTextLimit:!1,characterCount:i.length,showEmojiPicker:!1,suggestEmojiQuery:void 0,suggestMentionQuery:void 0}),s=Z(()=>new x_(o,e.device$,e.state$.userPermissions),[o,e]),a=q(async()=>{const l=s.state$;if(l.isEmpty.peek()||l.atTextLimit.peek())return;const u=s.getText();u&&await n.editMessage(t.id,{text:u}),e.state$.editingMessageId.set(null)},[e,n,s,t.id]);return z(()=>{s.onEnter=a},[s,a]),z(()=>{s.focus(),s.setText($t(t.content[0].children,!0))},[s,t]),f(qm.Provider,{value:s,children:f(Ng,{editMessageId:r,onEditMessage:a})})}function eR(t){const e=Qe(),n=on();return f(e.MessageDivider,{common:n,...t})}function tR({message:t}){const e=Qe(),n=ae(),r=J(()=>n.messagePermissions$(t)),i=on(),[o,s]=ee("sent");return Yi(a=>{if(t.id.startsWith("ephemeral-"))return s("sending");const l=n.state$.currentConversation.everyoneReadUntil.get();return l!==void 0?t.createdAt<=l?s("everyoneRead"):s("sent"):void 0}),f(e.Message,{common:i,message:t,messageStatus:o,permissions:r})}function nR(){const t=Qe(),e=on();return f(t.BeforeMessages,{common:e})}function rR(){const t=Qe(),e=on();return f(t.AfterMessages,{common:e})}function iR(t){const e=ae(),n=po();z(()=>(function(r,i,o){const s=r.state$.currentConversation;let a=!1;function l(){if(!a){const E=r.state$.currentConversationId.peek();re.defined(E),i.conversation(E).markAsRead()}}function u(){r.newMessageMarker$.peek()||r.newMessageMarker$.set(s.readUntil.peek())}function c(){s.isUnread.get()&&s.unreadMessageCount.peek()===0&&(a=!0,u())}let d=null;function h(){var v;const E=r.state$.currentConversation.lastMessage.id.get(),g=r.state$.currentConversationId.peek(),A=g!==d;if(d=g,A&&(p.stop(),a=!1,r.newMessageMarker$.set(void 0)),!E||!g)return;s.isUnread.peek()&&(o()?(A&&u(),l()):(u(),p.start())),((v=s.lastMessage.sender)==null?void 0:v.id.peek())===r.extUserId$.peek()&&(r.newMessageMarker$.set(void 0),a=!1)}const p={handle:void 0,start(){this.handle||(this.handle=setInterval(()=>this.tick(),2e3))},tick(){o()&&(l(),this.stop())},stop(){clearInterval(this.handle),this.handle=void 0}};window.__talkjsE2E&&(window.__talkjsE2E.foregroundCheck=()=>{re.defined(p.handle),p.tick()});const m=mt(c),_=mt(h);return()=>{r.newMessageMarker$.set(void 0),m(),_(),p.stop()}})(e,n,t),[e,n,t])}function oR({conversationId:t}){const e=ae(),n=li(),r=X(!0),i=X(null),o=J(()=>!!e.state$.messages.child(t).loadedAll.get());z(()=>n.setScrollableDiv(i),[n]),iR(q(()=>{if(!i.current)return!1;const a=!document.hidden,l=(function(d){if(d.checkVisibility)return d.checkVisibility({contentVisibilityAuto:!0,opacityProperty:!0,visibilityProperty:!0,checkOpacity:!0,checkVisibilityCSS:!0});{const h=window.getComputedStyle(d),p=h.visibility,m=h.opacity;return!(d.getClientRects().length===0||p==="hidden"||m==="0")}})(i.current),u=i.current.getBoundingClientRect(),c=u.top<window.innerHeight&&u.bottom>0&&u.left<window.innerWidth&&u.right>0;return a&&l&&c},[])),We(()=>{r.current=i.current.scrollTop>-30}),z(()=>{r.current&&(i.current.scrollTop=0)});const s=q(a=>{const l=a.currentTarget,u=l.scrollHeight-l.clientHeight+l.scrollTop,c=e.messageSubscriptions[t];if(u<90&&c){const d=c.state;(d.type==="pending"||d.type==="active"&&!d.loadedAll)&&c.loadMore(10)}},[e.messageSubscriptions,t]);return f("div",{className:"t-message-list",ref:i,"t-menu-boundary":"",onScroll:s,children:[f(rR,{}),f($i,{each:e.chatItems$,children:a=>f("div",{className:"t-message-group","t-group-type":a.type.get(),children:f($i,{each:a.items,item:sR,itemProps:{controller:n,conversationId:t}})},a.id.get())}),o&&f(nR,{})]})}function sR({item$:t}){const e=ae(),n=J(t),r=J(e.state$.editingMessageId);return n instanceof Wn?f(eR,{timestamp:n.timestamp,isReadMarker:n.isReadMarker,isDayMarker:n.isDayMarker}):r===n.id?f(QT,{message:n}):f(tR,{message:n})}const aR=new Set(["ByV39eoc","B1FxElnd","aW4c49tW","qGfuGtx","SbERe5ee","ilaVEa15","FOlWOSaH","dao5gGmT","DLUgAhzL","fqXFumr6","FtiWHMYT","66iWOyWt","1375amYi","mWbJgzpt","jO7GqAvL","SkFIKxo5","2z4ILc3y","aDr8oPL1","Hku1c4Pt"]);function aa({appId:t,chatboxState:e}){const n=t.charAt(0)==="t"||aR.has(t);return z(()=>{switch(e.type){case"auth-failed":Ce.error("Could not authenticate user. Check if you are authenticating correctly.");break;case"unknown-user":Ce.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":Ce.error(e.error);break;case"wrong-app-id":Ce.error(`Could not find given appId: "${e.appId}". You can find your appId on https://talkjs.com/dashboard.`);break;case"server-error":break;default:re.never(e)}},[e]),f("div",{className:"t-panel t-error-panel",children:[f("span",{className:"t-heading",children:"Something went wrong"}),f("p",{children:"Please reload the page and try again."}),n?f(ie,{children:[f("p",{children:"Developer note: check your browser's developer tools console for messages that may help solve the problem."}),f("p",{children:"This message only shows up in test mode."})]}):f("p",{children:"If things keep not working, do not hesitate to get in touch with us."})]})}function lR(){return f("div",{className:"t-panel t-error-panel",children:f("span",{className:"t-heading",children:J(ae().t$).CHAT_NOT_FOUND})})}function bg(){return f("div",{className:"t-panel t-loading-panel",children:f(pu,{})})}function wg(){const t=J(ae().t$);return f("div",{className:"t-panel t-error-panel",children:[f("span",{className:"t-heading",children:t.AUTH_EXPIRED_OVERLAY_TITLE}),f("p",{children:t.AUTH_EXPIRED_OVERLAY_DESCRIPTION})]})}function kg({children:t,className:e,...n}){return f("div",{className:"t-attach-overlay "+e,...n,children:t})}function cR(){const t=Qm();So(()=>t.cancelUpload(),".t-upload-preview");const e=J(t.uploads$),n=e.every(E=>E.state==="uploaded"),r=X(null);z(()=>{n&&r.current.focus()},[n]);const i=J(ae().t$),[o,s]=ee(0),a=X(null),[l,u]=ee({left:!1,right:!1}),c=q(()=>{const E=a.current;if(!E)return;const g=E.scrollWidth-E.clientWidth,A={left:E.scrollLeft>1,right:E.scrollLeft<g-1};u(S=>S.left===A.left&&S.right===A.right?S:A)},[]);z(()=>{const E=a.current;if(!E)return;c();const g=new ResizeObserver(c);return g.observe(E),E.addEventListener("scroll",c),()=>{g.disconnect(),E.removeEventListener("scroll",c)}},[e.length,c]);const d=q(E=>{const g=a.current;if(!g||g.scrollWidth<=g.clientWidth)return;const A=E.getBoundingClientRect(),S=g.getBoundingClientRect(),v=A.left+A.width/2,D=S.left+S.width/2,y=g.scrollWidth-g.clientWidth,R=Jl(g.scrollLeft+v-D,0,y),I=window.matchMedia("(prefers-reduced-motion: reduce)").matches;g.scrollTo({left:R,behavior:I?"auto":"smooth"}),c()},[c]),h=q(E=>{var A;let g;if(typeof E=="number"){g=E;const S=(A=a.current)==null?void 0:A.querySelector(`button[data-index="${g}"]`);S&&d(S)}else g=+E.currentTarget.dataset.index,d(E.currentTarget);s(g)},[d]),p=q(E=>{const g={ArrowLeft:-1,ArrowRight:1}[E.key];if(g){const A=e.length-1;h(Jl(o+g,0,A))}},[e.length,h,o]);z(()=>(window.addEventListener("keydown",p,!0),()=>{window.removeEventListener("keydown",p,!0)}),[p]);const m=e[o],_=m.state==="error";return f(kg,{className:"t-upload-preview",children:f("div",{className:"t-preview",children:[!_&&f(uR,{upload:m},o),_&&f(ie,{children:[f("div",{className:"t-error-row",children:i.UPLOAD_ERROR}),m.type!=="location"&&f(Lg,{upload:m})]}),f("div",{className:"t-send-row",children:[e.length>1&&f("div",{className:"t-thumbnails-wrap","t-overflow-left":l.left?"":void 0,"t-overflow-right":l.right?"":void 0,children:f("div",{className:"t-thumbnails",ref:a,children:e.map((E,g)=>f("button",{className:"t-thumbnail","data-index":g,onClick:h,"t-selected":o===g?"":void 0,"t-error":E.state==="error"?"":void 0,children:f(mR,{upload:E})},g))})}),f("div",{className:"t-actions",children:[f("button",{className:"t-cancel",onClick:t.cancelUpload,children:i.CANCEL}),n&&f("button",{className:"t-confirm-send",onClick:t.confirmUpload,ref:r,children:i.SEND_BUTTON_TEXT})]})]})]})})}function uR({upload:t}){return t.type!=="location"?f(ie,{children:[f(hR,{upload:t}),f(Lg,{upload:t})]}):t.state==="uploaded"?f(dR,{location:t.location}):f("div",{className:"t-loading",children:f(pu,{})})}function dR({location:t}){const{imageUrl:e,linkUrl:n}=sa(t);return f("a",{href:n,target:"_blank",rel:"noreferrer",className:"t-location-upload-preview",style:{background:`url(${JSON.stringify(e)}) center center / cover no-repeat`}})}function hR({upload:t}){const[e,n]=(function(r){const i=r.file;switch(r.type){case"video":{const o=/[.]ts/i.test(i.name)?"mpegts":"native";return[f(pR,{src:r.temporaryBlobUrl,videoType:o,playsInline:!0,controls:!0,preload:"auto"}),Sf(r.metadata)]}case"image":return[f("img",{src:r.temporaryBlobUrl}),Sf(r.metadata)];case"audio":return[f(Un,{src:r.temporaryBlobUrl,filename:i.name})];case"file":return[f("img",{src:Mg(r.file.name,r.state==="error")})];case"voice":re.unreachable()}})(t);return f("div",{className:"t-preview-container",style:n,children:e})}function Sf(t){return{"--img-w":t.width,"--img-h":t.height}}function Lg({upload:t}){const e=J(ae().t$),n=(()=>{switch(t.state){case"uploaded":case"error":return t.metadata.filename;case"uploading":return e.UPLOAD_IN_PROGRESS;default:re.unreachable()}})();let r="",i="";return t.type==="file"&&(r="is-file",t.state==="uploaded"&&(i="file-block")),f("div",{className:`t-filename-row ${r}`,children:f("div",{className:i,children:n})})}function pR(t){const{videoType:e,...n}=t;return f("video",{...n})}const fR="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==";function mR({upload:t}){var o;const e=t.state==="error",n=Z(()=>t.type==="video"?fR:t.type==="image"?t.temporaryBlobUrl:Mg(t.metadata.filename,e),[t,e]),[r,i]=ee(null);return z(()=>{let s=!0;return t.type==="video"&&(async function(a){return new Promise((l,u)=>{const c=document.createElement("video");c.preload="metadata",c.muted=!0,c.playsInline=!0,c.src=a,c.onloadeddata=async()=>{c.currentTime=.1},c.onseeked=()=>{const d=document.createElement("canvas");d.width=c.videoWidth,d.height=c.videoHeight,d.getContext("2d").drawImage(c,0,0,d.width,d.height);const h=d.toDataURL("image/png");c.pause(),c.src="",c.load(),l(h)},c.onerror=()=>u("Error loading video")})})(t.temporaryBlobUrl).then(a=>{s&&i(a)}),()=>{s=!1}},[t]),f("img",{src:(o=r!=null?r:n)!=null?o:void 0})}function Mg(t,e){const n=t.match(/\.([-_a-zA-Z0-9]+)$/),r=(n?n[1].toUpperCase():"?").slice(0,6),i=`
1334
+ `,gf=typeof self!="undefined"&&self.Blob&&new Blob(["URL.revokeObjectURL(import.meta.url);",CA],{type:"text/javascript;charset=utf-8"});function qT(t){let e;try{if(e=gf&&(self.URL||self.webkitURL).createObjectURL(gf),!e)throw"";const n=new Worker(e,{type:"module",name:t==null?void 0:t.name});return n.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e)}),n}catch(n){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(CA),{type:"module",name:t==null?void 0:t.name})}}const fl="audio/webm;codecs=opus",JT=typeof MediaRecorder!="undefined"&&typeof MediaRecorder.isTypeSupported=="function";function ZT(t){const e=X(),n=X(),r=X(),i=X(!1),o=t.mediaRecorder;z(()=>{t.recordingState==="recording"?s():o.current&&t.recordingState===null&&(i.current=!0,o.current.stop())},[t.recordingState]);const s=async()=>{var l;n.current=Cu.create({scrollingWaveform:!0,scrollingWaveformWindow:10}),e.current=IA({...t.wavesurferOptions,interact:!1,barHeight:(l=t.wavesurferOptions.barHeight)!=null?l:4,plugins:[n.current],container:t.wavesurferContainer.current});const a=await n.current.startMic();a.getAudioTracks().forEach(u=>{u.onmute=()=>t.onStopRecording()}),JT&&MediaRecorder.isTypeSupported(fl)?o.current=new MediaRecorder(a,{mimeType:fl}):o.current=new KT(a,{mimeType:fl},{encoderWorkerFactory:()=>new qT,WebMOpusEncoderWasmPath:G_["opus-media-recorder-wasm"]}),o.current.onerror=u=>{Ce.error("[TalkJS] Unexpected error while recording audio: ",u)},o.current.onstart=()=>r.current=Date.now(),o.current.ondataavailable=u=>{var c;if(!i.current){const d=Date.now(),h=Math.floor((d-r.current)/1e3),p=new File([u.data],`talkjs_audio_message_${d}_${h}.webm`,{type:"audio/webm"});t.onSendRecording(p,h)}i.current=!1,o.current=void 0,(c=n.current)==null||c.stopMic(),e.current=void 0,n.current=void 0},o.current.start()};return null}function NA(t){const e=Qe(),n=ae(),r=on(),i=J(n.referencedMessage$),o=J(n.state$.userPermissions),s=ho(),{sendMessage:a}=tS(),{voiceRecorder:l,recordVoiceMessage:u,voiceRecorderControlsProps:c}=(function(){const p=ae(),m=li(),_=Qg(),E=ct({...hl}),{state:A,duration:g,recordingUrl:S,uploadState:O,fileToken:D}=J(E),I=X(void 0),R=X(null),y=X(),v=q(()=>_.runWithPermissionCheck("microphone",async b=>{const k=p.state$.currentConversation.peek();if(k&&k.access!=="Read"){try{(await navigator.mediaDevices.getUserMedia({audio:!0})).getTracks().forEach(x=>x.stop()),b("granted")}catch(x){throw b("denied"),x}E.assign({state:"recording",duration:0}),y.current=setInterval(()=>{E.duration.set(x=>x+1)},1e3)}}),[E,p,_]),T=q(()=>{var b;y.current&&(clearInterval(y.current),y.current=void 0),(b=I.current)==null||b.stop()},[]),C=q(()=>{y.current&&(clearInterval(y.current),y.current=void 0),E.assign(hl)},[E]),N=q((b,k)=>{const x=URL.createObjectURL(new Blob([b])),M=b.size+","+b.name;p.state$.localFileBlobUrls.child(p.state$.currentConversationId.peek()).child(M).set({url:x,fetching:!1});const U={duration:k,filename:b.name};E.assign({state:"previewing",uploadState:"pending",recordingUrl:x+"?name="+b.name}),m.uploadVoice(b,U).then(V=>{p.fileUploads[V]={type:"voice",file:b,metadata:U,temporaryBlobUrl:x,state:"uploaded"},E.assign({uploadState:"done",fileToken:V})})},[m,E,p]),L=q(()=>{D&&m.sendFileMessage({fileToken:D}),E.assign(hl)},[m,D,E]);return{voiceRecorder:Z(()=>{if(!A)return;const b={state:A,duration:g,recordingUrl:S,uploadState:O,stop:T,cancel:C,send:L};return DA.set(b,R),b},[A,g,S,O,T,C,L]),recordVoiceMessage:v,voiceRecorderControlsProps:Z(()=>({onStopRecording:T,onSendRecording:N,recordingState:A,mediaRecorder:I,wavesurferOptions:HT,wavesurferContainer:R}),[T,N,A])}})(),d=J(ct(()=>{const p=s.state$.get();return t.editMessageId===void 0?new jd(p,a,t.attachFile,t.shareLocation,s.toggleEmojiPicker,u):new jd(p,t.onEditMessage,()=>{},()=>{},()=>{},()=>{})},[s.state$,s.toggleEmojiPicker,t.attachFile,t.editMessageId,t.onEditMessage,t.shareLocation,a])),h=q(p=>s.setText(p),[s]);return(function({appId:p,conversationId:m,meId:_,setText:E,enabled:A}){const g=Z(()=>F_(m,_,p),[p,m,_]);z(()=>{var O;if(!g||!A)return;const S=(O=JSON.parse(st.getItem(tc)||"{}")[g])!=null?O:"";E(S)},[g,A,E])})({appId:r.app.id,conversationId:r.conversation.id,meId:r.currentUser.id,setText:h,enabled:!t.editMessageId}),f(nE.Provider,{value:{onClose:()=>s.toggleEmojiPicker(!1),onEmojiSelected:p=>s.selectEmoji(p)},children:[f(ZT,{...c}),f(e.MessageField,{common:r,referencedMessage:i,permissions:o,editor:d,voiceRecorder:l,editMessageId:t.editMessageId})]})}function QT({message:t}){const e=ae(),n=li(),r=J(e.state$.editingMessageId),i=Z(()=>$t(t.content[0].children),[t]),o=ct({isEmpty:i.length===0,atTextLimit:!1,characterCount:i.length,showEmojiPicker:!1,suggestEmojiQuery:void 0,suggestMentionQuery:void 0}),s=Z(()=>new x_(o,e.device$,e.state$.userPermissions),[o,e]),a=q(async()=>{const l=s.state$;if(l.isEmpty.peek()||l.atTextLimit.peek())return;const u=s.getText();u&&await n.editMessage(t.id,{text:u}),e.state$.editingMessageId.set(null)},[e,n,s,t.id]);return z(()=>{s.onEnter=a},[s,a]),z(()=>{s.focus(),s.setText($t(t.content[0].children,!0))},[s,t]),f(qm.Provider,{value:s,children:f(NA,{editMessageId:r,onEditMessage:a})})}function eR(t){const e=Qe(),n=on();return f(e.MessageDivider,{common:n,...t})}function tR({message:t}){const e=Qe(),n=ae(),r=J(()=>n.messagePermissions$(t)),i=on(),[o,s]=ee("sent");return Yi(a=>{if(t.id.startsWith("ephemeral-"))return s("sending");const l=n.state$.currentConversation.everyoneReadUntil.get();return l!==void 0?t.createdAt<=l?s("everyoneRead"):s("sent"):void 0}),f(e.Message,{common:i,message:t,messageStatus:o,permissions:r})}function nR(){const t=Qe(),e=on();return f(t.BeforeMessages,{common:e})}function rR(){const t=Qe(),e=on();return f(t.AfterMessages,{common:e})}function iR(t){const e=ae(),n=po();z(()=>(function(r,i,o){const s=r.state$.currentConversation;let a=!1;function l(){if(!a){const E=r.state$.currentConversationId.peek();re.defined(E),i.conversation(E).markAsRead()}}function u(){r.newMessageMarker$.peek()||r.newMessageMarker$.set(s.readUntil.peek())}function c(){s.isUnread.get()&&s.unreadMessageCount.peek()===0&&(a=!0,u())}let d=null;function h(){var O;const E=r.state$.currentConversation.lastMessage.id.get(),A=r.state$.currentConversationId.peek(),g=A!==d;if(d=A,g&&(p.stop(),a=!1,r.newMessageMarker$.set(void 0)),!E||!A)return;s.isUnread.peek()&&(o()?(g&&u(),l()):(u(),p.start())),((O=s.lastMessage.sender)==null?void 0:O.id.peek())===r.extUserId$.peek()&&(r.newMessageMarker$.set(void 0),a=!1)}const p={handle:void 0,start(){this.handle||(this.handle=setInterval(()=>this.tick(),2e3))},tick(){o()&&(l(),this.stop())},stop(){clearInterval(this.handle),this.handle=void 0}};window.__talkjsE2E&&(window.__talkjsE2E.foregroundCheck=()=>{re.defined(p.handle),p.tick()});const m=mt(c),_=mt(h);return()=>{r.newMessageMarker$.set(void 0),m(),_(),p.stop()}})(e,n,t),[e,n,t])}function oR({conversationId:t}){const e=ae(),n=li(),r=X(!0),i=X(null),o=J(()=>!!e.state$.messages.child(t).loadedAll.get());z(()=>n.setScrollableDiv(i),[n]),iR(q(()=>{if(!i.current)return!1;const a=!document.hidden,l=(function(d){if(d.checkVisibility)return d.checkVisibility({contentVisibilityAuto:!0,opacityProperty:!0,visibilityProperty:!0,checkOpacity:!0,checkVisibilityCSS:!0});{const h=window.getComputedStyle(d),p=h.visibility,m=h.opacity;return!(d.getClientRects().length===0||p==="hidden"||m==="0")}})(i.current),u=i.current.getBoundingClientRect(),c=u.top<window.innerHeight&&u.bottom>0&&u.left<window.innerWidth&&u.right>0;return a&&l&&c},[])),We(()=>{r.current=i.current.scrollTop>-30}),z(()=>{r.current&&(i.current.scrollTop=0)});const s=q(a=>{const l=a.currentTarget,u=l.scrollHeight-l.clientHeight+l.scrollTop,c=e.messageSubscriptions[t];if(u<90&&c){const d=c.state;(d.type==="pending"||d.type==="active"&&!d.loadedAll)&&c.loadMore(10)}},[e.messageSubscriptions,t]);return f("div",{className:"t-message-list",ref:i,"t-menu-boundary":"",onScroll:s,children:[f(rR,{}),f($i,{each:e.chatItems$,children:a=>f("div",{className:"t-message-group","t-group-type":a.type.get(),children:f($i,{each:a.items,item:sR,itemProps:{controller:n,conversationId:t}})},a.id.get())}),o&&f(nR,{})]})}function sR({item$:t}){const e=ae(),n=J(t),r=J(e.state$.editingMessageId);return n instanceof Wn?f(eR,{timestamp:n.timestamp,isReadMarker:n.isReadMarker,isDayMarker:n.isDayMarker}):r===n.id?f(QT,{message:n}):f(tR,{message:n})}const aR=new Set(["ByV39eoc","B1FxElnd","aW4c49tW","qGfuGtx","SbERe5ee","ilaVEa15","FOlWOSaH","dao5gGmT","DLUgAhzL","fqXFumr6","FtiWHMYT","66iWOyWt","1375amYi","mWbJgzpt","jO7GqAvL","SkFIKxo5","2z4ILc3y","aDr8oPL1","Hku1c4Pt"]);function aa({appId:t,chatboxState:e}){const n=t.charAt(0)==="t"||aR.has(t);return z(()=>{switch(e.type){case"auth-failed":Ce.error("Could not authenticate user. Check if you are authenticating correctly.");break;case"unknown-user":Ce.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":Ce.error(e.error);break;case"wrong-app-id":Ce.error(`Could not find given appId: "${e.appId}". You can find your appId on https://talkjs.com/dashboard.`);break;case"server-error":break;default:re.never(e)}},[e]),f("div",{className:"t-panel t-error-panel",children:[f("span",{className:"t-heading",children:"Something went wrong"}),f("p",{children:"Please reload the page and try again."}),n?f(ie,{children:[f("p",{children:"Developer note: check your browser's developer tools console for messages that may help solve the problem."}),f("p",{children:"This message only shows up in test mode."})]}):f("p",{children:"If things keep not working, do not hesitate to get in touch with us."})]})}function lR(){return f("div",{className:"t-panel t-error-panel",children:f("span",{className:"t-heading",children:J(ae().t$).CHAT_NOT_FOUND})})}function bA(){return f("div",{className:"t-panel t-loading-panel",children:f(pu,{})})}function wA(){const t=J(ae().t$);return f("div",{className:"t-panel t-error-panel",children:[f("span",{className:"t-heading",children:t.AUTH_EXPIRED_OVERLAY_TITLE}),f("p",{children:t.AUTH_EXPIRED_OVERLAY_DESCRIPTION})]})}function LA({children:t,className:e,...n}){return f("div",{className:"t-attach-overlay "+e,...n,children:t})}function cR(){const t=Qm();So(()=>t.cancelUpload(),".t-upload-preview");const e=J(t.uploads$),n=e.every(E=>E.state==="uploaded"),r=X(null);z(()=>{n&&r.current.focus()},[n]);const i=J(ae().t$),[o,s]=ee(0),a=X(null),[l,u]=ee({left:!1,right:!1}),c=q(()=>{const E=a.current;if(!E)return;const A=E.scrollWidth-E.clientWidth,g={left:E.scrollLeft>1,right:E.scrollLeft<A-1};u(S=>S.left===g.left&&S.right===g.right?S:g)},[]);z(()=>{const E=a.current;if(!E)return;c();const A=new ResizeObserver(c);return A.observe(E),E.addEventListener("scroll",c),()=>{A.disconnect(),E.removeEventListener("scroll",c)}},[e.length,c]);const d=q(E=>{const A=a.current;if(!A||A.scrollWidth<=A.clientWidth)return;const g=E.getBoundingClientRect(),S=A.getBoundingClientRect(),O=g.left+g.width/2,D=S.left+S.width/2,I=A.scrollWidth-A.clientWidth,R=Jl(A.scrollLeft+O-D,0,I),y=window.matchMedia("(prefers-reduced-motion: reduce)").matches;A.scrollTo({left:R,behavior:y?"auto":"smooth"}),c()},[c]),h=q(E=>{var g;let A;if(typeof E=="number"){A=E;const S=(g=a.current)==null?void 0:g.querySelector(`button[data-index="${A}"]`);S&&d(S)}else A=+E.currentTarget.dataset.index,d(E.currentTarget);s(A)},[d]),p=q(E=>{const A={ArrowLeft:-1,ArrowRight:1}[E.key];if(A){const g=e.length-1;h(Jl(o+A,0,g))}},[e.length,h,o]);z(()=>(window.addEventListener("keydown",p,!0),()=>{window.removeEventListener("keydown",p,!0)}),[p]);const m=e[o],_=m.state==="error";return f(LA,{className:"t-upload-preview",children:f("div",{className:"t-preview",children:[!_&&f(uR,{upload:m},o),_&&f(ie,{children:[f("div",{className:"t-error-row",children:i.UPLOAD_ERROR}),m.type!=="location"&&f(kA,{upload:m})]}),f("div",{className:"t-send-row",children:[e.length>1&&f("div",{className:"t-thumbnails-wrap","t-overflow-left":l.left?"":void 0,"t-overflow-right":l.right?"":void 0,children:f("div",{className:"t-thumbnails",ref:a,children:e.map((E,A)=>f("button",{className:"t-thumbnail","data-index":A,onClick:h,"t-selected":o===A?"":void 0,"t-error":E.state==="error"?"":void 0,children:f(mR,{upload:E})},A))})}),f("div",{className:"t-actions",children:[f("button",{className:"t-cancel",onClick:t.cancelUpload,children:i.CANCEL}),n&&f("button",{className:"t-confirm-send",onClick:t.confirmUpload,ref:r,children:i.SEND_BUTTON_TEXT})]})]})]})})}function uR({upload:t}){return t.type!=="location"?f(ie,{children:[f(hR,{upload:t}),f(kA,{upload:t})]}):t.state==="uploaded"?f(dR,{location:t.location}):f("div",{className:"t-loading",children:f(pu,{})})}function dR({location:t}){const{imageUrl:e,linkUrl:n}=sa(t);return f("a",{href:n,target:"_blank",rel:"noreferrer",className:"t-location-upload-preview",style:{background:`url(${JSON.stringify(e)}) center center / cover no-repeat`}})}function hR({upload:t}){const[e,n]=(function(r){const i=r.file;switch(r.type){case"video":{const o=/[.]ts/i.test(i.name)?"mpegts":"native";return[f(pR,{src:r.temporaryBlobUrl,videoType:o,playsInline:!0,controls:!0,preload:"auto"}),Sf(r.metadata)]}case"image":return[f("img",{src:r.temporaryBlobUrl}),Sf(r.metadata)];case"audio":return[f(Un,{src:r.temporaryBlobUrl,filename:i.name})];case"file":return[f("img",{src:MA(r.file.name,r.state==="error")})];case"voice":re.unreachable()}})(t);return f("div",{className:"t-preview-container",style:n,children:e})}function Sf(t){return{"--img-w":t.width,"--img-h":t.height}}function kA({upload:t}){const e=J(ae().t$),n=(()=>{switch(t.state){case"uploaded":case"error":return t.metadata.filename;case"uploading":return e.UPLOAD_IN_PROGRESS;default:re.unreachable()}})();let r="",i="";return t.type==="file"&&(r="is-file",t.state==="uploaded"&&(i="file-block")),f("div",{className:`t-filename-row ${r}`,children:f("div",{className:i,children:n})})}function pR(t){const{videoType:e,...n}=t;return f("video",{...n})}const fR="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==";function mR({upload:t}){var o;const e=t.state==="error",n=Z(()=>t.type==="video"?fR:t.type==="image"?t.temporaryBlobUrl:MA(t.metadata.filename,e),[t,e]),[r,i]=ee(null);return z(()=>{let s=!0;return t.type==="video"&&(async function(a){return new Promise((l,u)=>{const c=document.createElement("video");c.preload="metadata",c.muted=!0,c.playsInline=!0,c.src=a,c.onloadeddata=async()=>{c.currentTime=.1},c.onseeked=()=>{const d=document.createElement("canvas");d.width=c.videoWidth,d.height=c.videoHeight,d.getContext("2d").drawImage(c,0,0,d.width,d.height);const h=d.toDataURL("image/png");c.pause(),c.src="",c.load(),l(h)},c.onerror=()=>u("Error loading video")})})(t.temporaryBlobUrl).then(a=>{s&&i(a)}),()=>{s=!1}},[t]),f("img",{src:(o=r!=null?r:n)!=null?o:void 0})}function MA(t,e){const n=t.match(/\.([-_a-zA-Z0-9]+)$/),r=(n?n[1].toUpperCase():"?").slice(0,6),i=`
1335
1335
  <svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 64 64">
1336
1336
  <rect width="100%" height="100%" rx="10" fill="${e?"#ffdbdb":"#ececec"}"/>
1337
1337
  <text
@@ -1347,8 +1347,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1347
1347
  dominant-baseline="middle"
1348
1348
  >${r}</text>
1349
1349
  </svg>
1350
- `.replace(/\s+/g," ");return`data:image/svg+xml;utf8,${encodeURIComponent(i)}`}function ER(){var s;const t=Qe(),e=ae(),n=on(),r=(s=J(()=>e.state$.isUserConnected.child(e.state$.currentConversationId.get())))!=null?s:{},i=J(e.state$.userPermissions),o=J(e.searchQuery$);return f(t.ChatHeader,{common:n,isUserConnected:r,permissions:i,searchQuery:o})}function _R(){const t=Qe(),e=on();return f(t.MessageListHeader,{common:e})}function gR(){const t=Qe(),e=on();return f(t.MessageListFooter,{common:e})}function AR(){const t=Qe(),e=on();return f(t.NoConversationSelected,{common:e})}function Pg({containerRef:t}){const[e,n]=ee(null),[r,i]=ee(null),[o,s]=ee(!1);z(()=>{const d=t.current;let h=null;const p=m=>{if(m.pointerType!=="mouse")return;h&&(clearTimeout(h),h=null);const _=m.target.closest("[t-tooltip-text]");_&&(h=setTimeout(()=>{h=null,n(_),s(!1)},500))};return d==null||d.addEventListener("pointerover",p),()=>{d==null||d.removeEventListener("pointerover",p)}},[t]),z(()=>{const d=t.current;let h,p=!1;function m(g){p=!1,g.pointerType!=="mouse"&&(h=setTimeout(()=>{const A=g.target.closest("[t-tooltip-text]");A&&(p=!0,n(A),s(!0))},300))}function _(){clearTimeout(h)}function E(g){p&&(g.stopPropagation(),g.preventDefault())}return d.addEventListener("pointerdown",m),d.addEventListener("pointerup",_),d.addEventListener("pointerleave",_),d.addEventListener("click",E,!0),d.addEventListener("contextmenu",E,!0),()=>{d.removeEventListener("pointerdown",m),d.removeEventListener("pointerup",_),d.removeEventListener("pointerleave",_),d.removeEventListener("click",E,!0),d.removeEventListener("contextmenu",E,!0)}},[t]);const{refs:a,floatingStyles:l}=cg({placement:"top",middleware:[ug(),o&&(u=10,{...aT(u),options:[u,c]})],whileElementsMounted:ag});var u,c;return z(()=>{if(e){a.setReference(e);const d=()=>{const m=e.getAttribute("t-tooltip-text");m===null?p():i(m.trim())},h=new MutationObserver(d);h.observe(e,{attributes:!0}),d();const p=()=>{o?setTimeout(()=>n(null),1e3):n(null)};return e.addEventListener("pointerleave",p),()=>{e.removeEventListener("pointerleave",p),h.disconnect(),a.setReference(null),i(null)}}},[e,o,a]),r?f("div",{className:"t-tooltip",role:"tooltip",style:l,ref:a.setFloating,children:r}):null}function SR({appId:t,chatHeaderVisible:e,messageFieldVisible:n}){const r=ho(),i=(function(){const E=ae(),g=ct(()=>{const v=E.errors$.get(),D=E.authTokenState$.get(),y=E.state$.loadingConversationId.get(),R=E.state$.currentConversationId.get();return v.serverError?"server-error":v.wrongAppId?"wrong-app-id":D==="loading"||D==="idle"?"loading-token":D==="invalid"?"invalid-token":D==="expired"?"expired-token":D==="valid"?v.unknownUser?"unknown-user":y&&E.state$.unknownConversations.child(y).get()?"loading-conv-failed":E.canRenderUi(y)||R!==y&&E.canRenderUi(R)?"loaded":"loading-data":void re.unreachable()}),A=ct({type:"loading"});Yi(v=>{const D=g.get(),y=E.state$.currentConversationId.get(),R=E.extUserId$.get(),I=E.appId$.get();function O(T){A.set({type:"loading"});const C=setTimeout(()=>{A.set(T)},5e3);return()=>clearTimeout(C)}switch(D){case"invalid-token":A.set({type:"auth-failed"});break;case"expired-token":A.set({type:"expired-token"});break;case"wrong-app-id":A.set({type:"wrong-app-id",appId:I});break;case"server-error":A.set({type:"server-error"});break;case"loading-data":case"loading-token":A.set({type:"loading"});break;case"loaded":A.set({type:"loaded",conversationId:y,userId:R});break;case"loading-conv-failed":v.onCleanup=O({type:"inaccessible-conversation",userId:R,conversationId:y});break;case"unknown-user":v.onCleanup=O({type:"unknown-user",userId:R});break;default:re.never(D)}});const S=ct({type:"loading"});return Yi(v=>{if(A.type.get()==="loading"){S.set({type:"invisible-loading"});const D=setTimeout(()=>{S.set({type:"loading"})},1e3);v.onCleanup=()=>{clearTimeout(D)}}else S.set(A.get())}),J(S)})(),o=Qm();z(()=>{r.uploadFile=o.startFileUpload,o.onClose=()=>{r.focus()}},[r,o]);const[s,a]=ee(!1),l=ae(),u=J(()=>!!l.app$.get()&&l.state$.userPermissions.canShareFile.get()),c=J(()=>o.uploads$.get().length>0),d=u&&!c;z(()=>{i.type==="loaded"?l.renderedConversationId$.set(i.conversationId):l.renderedConversationId$.set(void 0)},[i,l]);const h=q(E=>{o.startFileUpload([...E.dataTransfer.files]),E.preventDefault(),a(!1)},[o]),p=q(E=>{E.preventDefault(),E.dataTransfer.types.includes("Files")&&a(!0)},[]),m=q(E=>{E.preventDefault(),a(!1)},[]),_=X(null);return fu(),i.type==="invisible-loading"?f(ie,{}):i.type==="loading"?f(bg,{}):i.type==="inaccessible-conversation"?f(lR,{}):i.type==="unknown-user"||i.type==="auth-failed"||i.type==="wrong-app-id"||i.type==="server-error"||i.type==="unexpected-error"?f(aa,{appId:t,chatboxState:i}):i.type=="expired-token"?f(wg,{}):i.type==="loaded"?i.conversationId===null?f(AR,{}):f("div",{className:"t-chatbox-content",onDragOver:d?p:void 0,onDragLeave:d?m:void 0,onDrop:d?h:void 0,"t-menu-boundary":"root",ref:_,children:[e&&f(ER,{}),f(_R,{}),f(oR,{conversationId:i.conversationId}),f(gR,{}),n&&f(Ng,{attachFile:o.startFileUpload,shareLocation:o.startLocationUpload}),c&&f(cR,{}),s&&f(kg,{className:"t-drop-overlay",children:f(B,{type:"attachment"})}),f(Pg,{containerRef:_})]}):f(ie,{})}const vR=()=>!0;async function Nu(t,e,{initialDelay:n,maxDelay:r,log:i,shouldRetry:o=vR}){return e().catch(async s=>{if(i&&i(`[TalkJS] Retries left: ${t}. Error: ${JSON.stringify(s)}.`),t===0||!await o(s))throw s;const a=1e3*n*1.2,l=Math.min(1e3*r,a),u=l*(1-(c=.05)+2*Math.random()*c);var c,d;return(d=u,d<=0?Promise.resolve():new Promise(h=>setTimeout(h,d))).then(()=>Nu(t-1,e,{initialDelay:u/1e3,maxDelay:r,log:i,shouldRetry:o}))})}function mc(){const t={},e=new Promise(function(n,r){t.resolve=n,t.reject=r});return t.promise=e,t}const zo=new Uint8Array(31);function xg(){if(globalThis.crypto!==void 0)crypto.getRandomValues(zo);else for(let e=0;e<zo.length;e++)zo[e]=Math.floor(256*Math.random());let t=0;return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,e=>(+e^zo[t++]&15>>+e/4).toString(16))}class OR{constructor(e,n,r,i,o,s,a,l){this.store=e,this.talkSession=n,this.editorInternals=r,this.onSendMessage=i,this.onDeleteMessage=o,this.onMessageAction=s,this.onFocusMessage=a,this.onBackButtonClick=l,this.loadMoreUntil=async u=>{const c=this.store.state$.currentConversationId.peek(),d=this.store.state$.messages.child(c).loadedAll;let h;do{const p=this.store.messageSubscriptions[c];p&&!d.peek()&&await p.loadMore(30),h=u()}while(!d.peek()&&!h);return h}}setScrollableDiv(e){this.scrollable=e}toggleSearchBox(e){if(this.store.state$.userPermissions.canSearch.peek())if(e!==void 0)this.store.chatSearchState$.set(e?"visible":"hidden");else{const n=this.store.chatSearchState$.peek();this.store.chatSearchState$.set(n==="hidden"?"visible":"hidden")}else Ce.error("In-conversation message search is only available to customers on Growth plan and above.")}async deleteMessage(e){const n=this.store.state$.currentConversation.peek();if(!n||n.access==="Read")return;const r=n.id,i=this.store.state$.messages.child(r).lookup.child(e).peek(),o=this.talkSession.conversation(r).message(e),[s]=await Promise.all([i!=null?i:o.get(),o.delete()]);if(s){const a={currentUser:this.store.currentUser$.peek(),conversation:this.store.state$.currentConversation.peek(),message:i};this.onDeleteMessage(a)}}setEditing(e){const n=this.store.state$.currentConversation.peek();n&&n.access!=="Read"&&this.store.state$.editingMessageId.set(e)}async editMessage(e,n){const r=this.store.state$.currentConversation.peek();if(!r||r.access==="Read")return;const i=r.id;await this.talkSession.conversation(i).message(e).edit(n)}setReferencedMessage(e){const n=this.store.state$.currentConversation.peek();n&&n.access!=="Read"&&(this.store.state$.referencedMessageId.set(e),setTimeout(()=>this.editorInternals.focus({skipProseMirrorStuff:!0}),100))}async focusMessage(e,n=!0){var a;if(e==null)return this.store.focusedMessage$.set(null),null;if(await js(()=>this.store.state$.loadingConversationId.get()===this.store.renderedConversationId$.get()),this.store.state$.currentConversationId.peek()===null)return Ce.error("Cannot focus message because current conversation is `null`."),null;const r=()=>{const l=this.store.state$.currentConversationId.peek();return this.store.state$.messages.child(l).lookup.child(e).peek()||null};let i=r();if(i||(i=await this.loadMoreUntil(r)),!i)return Ce.error(`Message with id: \`${e}\` could not be found in this conversation`),i;const o=(a=this.scrollable)==null?void 0:a.current;re.defined(o);const s=o.querySelector(`[t-message-id="${e}"]`);return s?this.scrollToAndHighlight(s,i,n):Ce.error(`Could not find HTMLElement with attribute: t-message-id="${e}"`),i}async jumpToHighlight(e){if(!this.store.state$.userPermissions.canSearch.peek())return Ce.error("In-conversation message search is only available to customers on Growth plan and above."),null;if(this.store.highlightedStrings$.peek().length===0||this.store.chatSearchState$.peek()==="searching")return null;let n=this.findHighlight(e);return n||e!=="up"||(this.store.chatSearchState$.set("searching"),n=await this.loadMoreUntil(()=>this.findHighlight("up"))),n}findHighlight(e){var u;const n=(u=this.scrollable)==null?void 0:u.current;re.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(i.length===0&&s.length!==0)return Ce.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(c=>{const d=i.findIndex(m=>m.contains(c));if(d===-1)return;const h=i.splice(d,1)[0],p=h.getAttribute("t-message-id");r.push([p,h])}),e==="up"){const c=n.getBoundingClientRect().top;a=r.find(([d,h])=>h.getBoundingClientRect().top-c<-5)}else{const c=.05*n.getBoundingClientRect().height,d=n.getBoundingClientRect().bottom;for(let h=r.length-1;h>=0;h--){const p=r[h],[m,_]=p;if(d-_.getBoundingClientRect().top<=c){a=p;break}}}const l=this.store.chatSearchState$;if(a){const[c,d]=a,h=this.store.state$.messages.child(o).lookup.child(c).peek();return this.scrollToAndHighlight(d,h),l.set("visible"),h}return r.length===0?l.set("noResults"):l.set("noMoreResults"),null}scrollToAndHighlight(e,n,r=!0){const i=this.scrollable.current.getBoundingClientRect(),o=e.getBoundingClientRect();let s="start";Math.sign(i.top-o.top)===-1&&o.height<i.height&&(s="end"),e instanceof HTMLElement&&(e.style.scrollSnapAlign=s),e.scrollIntoView({behavior:"instant"}),e instanceof HTMLElement&&(e.style.scrollSnapAlign="none"),this.store.focusedMessage$.set(n),r&&this.onFocusMessage({message:n})}setHighlightedStrings(e){this.store.state$.userPermissions.canSearch.peek()?this.store.highlightedStrings$.set(e):Ce.error("In-conversation message search and by extension highlighting of strings are only available to customers on Growth plan and above.")}setSearchQuery(e){this.store.setSearchQuery(e)}async sendMessage(e){const n=this.store.state$.currentConversationId.peek();if(!n)return;const r=await(async function(s,a){var _,E,g,A,S;const l=s.state$.currentConversationId.peek(),u=s.state$.messages.child(l),c=typeof a.referencedMessage=="string"?u.lookup.child(a.referencedMessage).peek():await((E=(_=a.referencedMessage)==null?void 0:_.get())!=null?E:null),d=c&&{...c,type:"UserMessage",sender:c.sender,referencedMessageId:(A=(g=c.referencedMessage)==null?void 0:g.id)!=null?A:null};d&&delete d.referencedMessage;const h="content"in a?[Of(s,a.content[0])]:[DR(a.text)],p="text"in a?a.text:Tg(a.content.map(v=>Of(s,v)),{}),m=Math.max(Date.now(),vf+1);return vf=m,{id:"ephemeral-"+xg(),type:"UserMessage",sender:s.currentUser$.peek(),createdAt:m,editedAt:null,custom:(S=a.custom)!=null?S:{},origin:"web",referencedMessage:d,reactions:[],content:h,plaintext:p}})(this.store,e);this.store.state$.ephemeralMessages.child(n).child(r.id).set(r);const i=mc();this.store.readyForNewMessagesPromise=i.promise;const o=await this.talkSession.conversation(n).send(e);this.store.state$.ephemeralMessageIdMapping.child(n).child(o.id).set(r.id),i.resolve(),this.onSendMessage({message:await o.get(),currentUser:this.store.currentUser$.peek(),conversation:this.store.state$.currentConversation.peek()})}sendFileMessage(e){const n={type:"file",fileToken:e.fileToken};return this.sendMessage({content:[n],custom:e.custom})}async uploadVoice(e,n){return await this.talkSession.uploadVoice(e,n)}sendLocationMessage(e){const n={type:"location",latitude:e.location.latitude,longitude:e.location.longitude};return this.sendMessage({content:[n],custom:e.custom})}markAsTyping(){const e=this.store.state$.currentConversationId.peek();e&&this.talkSession.conversation(e).markAsTyping()}async toggleReaction(e,n,r){typeof n!="string"&&(n=n.emoji);const i=this.store.state$.currentConversationId.peek();if(!i)return;const o=this.store.state$.messages.child(i).lookup.child(e).peek().reactions.find(a=>a.emoji===n),s=this._getReactionRef(e,n);o!=null&&o.currentUserReacted&&r!==!0?await s.remove():r!==!1&&await s.add()}async addReaction(e,n){this.store.state$.currentConversationId.peek()&&await this._getReactionRef(e,n).add()}triggerMessageAction(e,n,r){const i=this.store.state$.currentConversation.peek();i&&(typeof e=="string"&&(e=this.store.state$.messages.child(i.id).lookup.child(e).peek()),this.onMessageAction({action:n,params:r,message:e,conversation:i}))}clickBackButton(){const e=this.store.currentUser$.peek();re.defined(e),this.onBackButtonClick({currentUser:e})}storeDraft(e){const n=this.store.state$.currentConversationId.peek(),r=this.store.currentUser$.peek(),i=this.store.appId$.peek();n&&r&&i&&I0(n,r.id,i,e)}_getReactionRef(e,n){const r=this.store.state$.currentConversationId.peek();return this.talkSession.conversation(r).message(e).reaction(n)}}let vf=0;const DR=t=>({type:"text",children:k_(t)});function Of(t,e){switch(e.type){case"text":case"location":return e;case"file":return(function(n,r){const i=n.fileUploads[r.fileToken];return re.defined(i),{type:"file",subtype:i.type==="file"?void 0:i.type,...i.metadata,size:i.file.size,filename:i.file.name,fileToken:r.fileToken,url:i.temporaryBlobUrl}})(t,e)}}class ml extends Error{constructor(e,n){const r=(function(i){if(typeof i=="string")return i;if(Array.isArray(i))return i.join(`
1351
- `);try{return JSON.stringify(i)}catch(o){return String(i)}})(e);super(r),this.userMessage=n!=null?n:r,Object.setPrototypeOf&&Object.setPrototypeOf(this,new.target.prototype)}}const oo=console;class TR{constructor(e,n,r,i){this.apiUrls=e,this.appId=n,this.sessionId=r,this.authProvider=i,this._lastPutPromise=Promise.resolve()}async get(e,n={}){const r=this.endpointUrl(e,n),i=await vi(()=>this.fetchWithReauth(r),{retries:11});return await this.handleResponse(i,r)}async queuedPut(e,n){await this._lastPutPromise;const r=vi(()=>this._doPut(e,n));return this._lastPutPromise=r,r}put(e,n,r){const i=()=>this._doPut(e,n);return r?Df(i,r):vi(i,{retries:5})}post(e,n,r){const i=()=>this._doPost(e,n);return r?Df(i,r):vi(i,{retries:5})}delete(e,n={}){return vi(()=>this._doDelete(e,n),{retries:11})}endpointUrl(e,n={}){const r=new URL(this.apiUrls.internalHttpApiUrl);r.pathname+=`/${this.appId}/${e}`,r.searchParams.set("sessionId",this.sessionId);for(const[i,o]of Object.entries(n))r.searchParams.set(i,o);return r}async _doPut(e,n){const r=this.endpointUrl(e),i=await this.fetchWithReauth(r,{method:"PUT",body:JSON.stringify(n)});return await this.handleResponse(i,r)}async _doPost(e,n){const r=this.endpointUrl(e),i=await this.fetchWithReauth(r,{method:"POST",body:JSON.stringify(n)});return await this.handleResponse(i,r)}async _doDelete(e,n){const r=this.endpointUrl(e,n),i=await this.fetchWithReauth(r,{method:"DELETE"});return await this.handleResponse(i,r)}async handleResponse(e,n){if(e.status>=300){if(e.status===404)throw kl.error(`[${this.appId}][BackendRestClient] Couldn't find resource.`),new ml("Could not find app.",`Could not find given appId: "${this.appId}". You can find your appId on https://talkjs.com/dashboard.`);if(e.status===401){const r=await this.authProvider.getToken();throw kl.error(`[${this.appId}][BackendRestClient] Couldn't authenticate ${n} with token ${r}.`),new ml("User not authenticated.","Could not authenticate user. Check if your signature is calculated correctly.")}if(e.status>=300&&e.status<500){const{error:r}=await e.json();throw new ml(r)}{const r=await e.text();throw new Error(`Got non-success response (${r}) from the server for url: ${n}.`)}}return await e.json()}async fetchWithReauth(e,n){function r(s){const a={Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${s}`};return fetch(e,{...n,headers:a})}const i=await this.authProvider.getToken(),o=await r(i);return o.status!==401?o:(oo.error(`401 error from ${n==null?void 0:n.method} ${e}, ${i}`),this.authProvider.refreshToken(),r(await this.authProvider.getToken()))}}function Fg(t){return!t.userMessage}function vi(t,{retries:e=30}={}){return Nu(e,t,{shouldRetry:Fg,log:oo.warn.bind(oo),maxDelay:30,initialDelay:.2})}async function Df(t,e){try{return await t()}catch(r){if(!Fg(r))throw r}let n=!1;return e.then(()=>{n=!0}),Nu(1e3,t,{initialDelay:.2,maxDelay:30,shouldRetry:()=>!n,log:oo.warn.bind(oo)})}var Tf,El={exports:{}},RR=(Tf||(Tf=1,(function(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*)$/,u={};u["[object Float32Array]"]=u["[object Float64Array]"]=u["[object Int8Array]"]=u["[object Int16Array]"]=u["[object Int32Array]"]=u["[object Uint8Array]"]=u["[object Uint8ClampedArray]"]=u["[object Uint16Array]"]=u["[object Uint32Array]"]=!0,u[i]=u["[object Array]"]=u["[object ArrayBuffer]"]=u["[object Boolean]"]=u["[object DataView]"]=u["[object Date]"]=u["[object Error]"]=u[o]=u["[object Map]"]=u["[object Number]"]=u[s]=u["[object RegExp]"]=u["[object Set]"]=u["[object String]"]=u["[object WeakMap]"]=!1;var c,d=typeof wo=="object"&&wo&&wo.Object===Object&&wo,h=typeof self=="object"&&self&&self.Object===Object&&self,p=d||h||Function("return this")(),m=e&&!e.nodeType&&e,_=m&&t&&!t.nodeType&&t,E=_&&_.exports===m,g=E&&d.process,A=(function(){try{var w=_&&_.require&&_.require("util").types;return w||g&&g.binding&&g.binding("util")}catch(P){}})(),S=A&&A.isTypedArray,v=Array.prototype,D=Function.prototype,y=Object.prototype,R=p["__core-js_shared__"],I=D.toString,O=y.hasOwnProperty,T=(c=/[^.]+$/.exec(R&&R.keys&&R.keys.IE_PROTO||""))?"Symbol(src)_1."+c:"",C=y.toString,N=I.call(Object),k=RegExp("^"+I.call(O).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),b=E?p.Buffer:void 0,L=p.Symbol,x=p.Uint8Array;b&&b.allocUnsafe;var M,U,V=(M=Object.getPrototypeOf,U=Object,function(w){return M(U(w))}),W=Object.create,$=y.propertyIsEnumerable,oe=v.splice,le=L?L.toStringTag:void 0,ce=(function(){try{var w=ua(Object,"defineProperty");return w({},"",{}),w}catch(P){}})(),he=b?b.isBuffer:void 0,tt=Math.max,Vt=Date.now,nt=ua(p,"Map"),Oe=ua(Object,"create"),Te=(function(){function w(){}return function(P){if(!Yn(P))return{};if(W)return W(P);w.prototype=P;var H=new w;return w.prototype=void 0,H}})();function $n(w){var P=-1,H=w==null?0:w.length;for(this.clear();++P<H;){var Y=w[P];this.set(Y[0],Y[1])}}function sn(w){var P=-1,H=w==null?0:w.length;for(this.clear();++P<H;){var Y=w[P];this.set(Y[0],Y[1])}}function Rr(w){var P=-1,H=w==null?0:w.length;for(this.clear();++P<H;){var Y=w[P];this.set(Y[0],Y[1])}}function yr(w){var P=this.__data__=new sn(w);this.size=P.size}function Yg(w,P){var H=pa(w),Y=!H&&ha(w),ue=!H&&!Y&&xu(w),Re=!H&&!Y&&!ue&&Hu(w),Ae=H||Y||ue||Re,rt=Ae?(function(je,an){for(var ht=-1,Ir=Array(je);++ht<je;)Ir[ht]=an(ht);return Ir})(w.length,String):[],dt=rt.length;for(var ye in w)Ae&&(ye=="length"||ue&&(ye=="offset"||ye=="parent")||Re&&(ye=="buffer"||ye=="byteLength"||ye=="byteOffset")||Mu(ye,dt))||rt.push(ye);return rt}function la(w,P,H){(H!==void 0&&!Ro(w[P],H)||H===void 0&&!(P in w))&&ca(w,P,H)}function Gg(w,P,H){var Y=w[P];O.call(w,P)&&Ro(Y,H)&&(H!==void 0||P in w)||ca(w,P,H)}function Oo(w,P){for(var H=w.length;H--;)if(Ro(w[H][0],P))return H;return-1}function ca(w,P,H){P=="__proto__"&&ce?ce(w,P,{configurable:!0,enumerable:!0,value:H,writable:!0}):w[P]=H}$n.prototype.clear=function(){this.__data__=Oe?Oe(null):{},this.size=0},$n.prototype.delete=function(w){var P=this.has(w)&&delete this.__data__[w];return this.size-=P?1:0,P},$n.prototype.get=function(w){var P=this.__data__;if(Oe){var H=P[w];return H===n?void 0:H}return O.call(P,w)?P[w]:void 0},$n.prototype.has=function(w){var P=this.__data__;return Oe?P[w]!==void 0:O.call(P,w)},$n.prototype.set=function(w,P){var H=this.__data__;return this.size+=this.has(w)?0:1,H[w]=Oe&&P===void 0?n:P,this},sn.prototype.clear=function(){this.__data__=[],this.size=0},sn.prototype.delete=function(w){var P=this.__data__,H=Oo(P,w);return!(H<0||(H==P.length-1?P.pop():oe.call(P,H,1),--this.size,0))},sn.prototype.get=function(w){var P=this.__data__,H=Oo(P,w);return H<0?void 0:P[H][1]},sn.prototype.has=function(w){return Oo(this.__data__,w)>-1},sn.prototype.set=function(w,P){var H=this.__data__,Y=Oo(H,w);return Y<0?(++this.size,H.push([w,P])):H[Y][1]=P,this},Rr.prototype.clear=function(){this.size=0,this.__data__={hash:new $n,map:new(nt||sn),string:new $n}},Rr.prototype.delete=function(w){var P=To(this,w).delete(w);return this.size-=P?1:0,P},Rr.prototype.get=function(w){return To(this,w).get(w)},Rr.prototype.has=function(w){return To(this,w).has(w)},Rr.prototype.set=function(w,P){var H=To(this,w),Y=H.size;return H.set(w,P),this.size+=H.size==Y?0:1,this},yr.prototype.clear=function(){this.__data__=new sn,this.size=0},yr.prototype.delete=function(w){var P=this.__data__,H=P.delete(w);return this.size=P.size,H},yr.prototype.get=function(w){return this.__data__.get(w)},yr.prototype.has=function(w){return this.__data__.has(w)},yr.prototype.set=function(w,P){var H=this.__data__;if(H instanceof sn){var Y=H.__data__;if(!nt||Y.length<199)return Y.push([w,P]),this.size=++H.size,this;H=this.__data__=new Rr(Y)}return H.set(w,P),this.size=H.size,this};var Wg=function(w,P,H){for(var Y=-1,ue=Object(w),Re=H(w),Ae=Re.length;Ae--;){var rt=Re[++Y];if(P(ue[rt],rt,ue)===!1)break}return w};function Do(w){return w==null?w===void 0?"[object Undefined]":"[object Null]":le&&le in Object(w)?(function(P){var H=O.call(P,le),Y=P[le];try{P[le]=void 0;var ue=!0}catch(Ae){}var Re=C.call(P);return ue&&(H?P[le]=Y:delete P[le]),Re})(w):(function(P){return C.call(P)})(w)}function ku(w){return hi(w)&&Do(w)==i}function Xg(w){return!(!Yn(w)||(function(P){return!!T&&T in P})(w))&&(ma(w)?k:a).test((function(P){if(P!=null){try{return I.call(P)}catch(H){}try{return P+""}catch(H){}}return""})(w))}function Kg(w){if(!Yn(w))return(function(ue){var Re=[];if(ue!=null)for(var Ae in Object(ue))Re.push(Ae);return Re})(w);var P=Pu(w),H=[];for(var Y in w)(Y!="constructor"||!P&&O.call(w,Y))&&H.push(Y);return H}function Lu(w,P,H,Y,ue){w!==P&&Wg(P,function(Re,Ae){if(ue||(ue=new yr),Yn(Re))(function(dt,ye,je,an,ht,Ir,pi){var zt=da(dt,je),pt=da(ye,je),ju=pi.get(pt);if(ju)la(dt,je,ju);else{var Vu,gt=Ir?Ir(zt,pt,je+"",dt,ye,pi):void 0,fi=gt===void 0;if(fi){var _a=pa(pt),ga=!_a&&xu(pt),zu=!_a&&!ga&&Hu(pt);gt=pt,_a||ga||zu?pa(zt)?gt=zt:hi(Vu=zt)&&fa(Vu)?gt=(function(Fe,it){var ot=-1,Pt=Fe.length;for(it||(it=Array(Pt));++ot<Pt;)it[ot]=Fe[ot];return it})(zt):ga?(fi=!1,gt=pt.slice()):zu?(fi=!1,gt=(function(Fe){var it,ot,Pt=(it=Fe.buffer,ot=new it.constructor(it.byteLength),new x(ot).set(new x(it)),ot);return new Fe.constructor(Pt,Fe.byteOffset,Fe.length)})(pt)):gt=[]:(function(Fe){if(!hi(Fe)||Do(Fe)!=s)return!1;var it=V(Fe);if(it===null)return!0;var ot=O.call(it,"constructor")&&it.constructor;return typeof ot=="function"&&ot instanceof ot&&I.call(ot)==N})(pt)||ha(pt)?(gt=zt,ha(zt)?gt=(function(Fe){return(function(it,ot,Pt){var eA=!Pt;Pt||(Pt={});for(var $u=-1,tA=ot.length;++$u<tA;){var Aa=ot[$u],yo=void 0;yo===void 0&&(yo=it[Aa]),eA?ca(Pt,Aa,yo):Gg(Pt,Aa,yo)}return Pt})(Fe,Uu(Fe))})(zt):Yn(zt)&&!ma(zt)||(gt=(function(Fe){return typeof Fe.constructor!="function"||Pu(Fe)?{}:Te(V(Fe))})(pt))):fi=!1}fi&&(pi.set(pt,gt),ht(gt,pt,an,Ir,pi),pi.delete(pt)),la(dt,je,gt)}})(w,P,Ae,H,Lu,Y,ue);else{var rt=Y?Y(da(w,Ae),Re,Ae+"",w,P,ue):void 0;rt===void 0&&(rt=Re),la(w,Ae,rt)}},Uu)}function qg(w,P){return Zg((function(H,Y,ue){return Y=tt(Y===void 0?H.length-1:Y,0),function(){for(var Re=arguments,Ae=-1,rt=tt(Re.length-Y,0),dt=Array(rt);++Ae<rt;)dt[Ae]=Re[Y+Ae];Ae=-1;for(var ye=Array(Y+1);++Ae<Y;)ye[Ae]=Re[Ae];return ye[Y]=ue(dt),(function(je,an,ht){switch(ht.length){case 0:return je.call(an);case 1:return je.call(an,ht[0]);case 2:return je.call(an,ht[0],ht[1]);case 3:return je.call(an,ht[0],ht[1],ht[2])}return je.apply(an,ht)})(H,this,ye)}})(w,P,Bu),w+"")}var Jg=ce?function(w,P){return ce(w,"toString",{configurable:!0,enumerable:!1,value:(H=P,function(){return H}),writable:!0});var H}:Bu;function To(w,P){var H,Y,ue=w.__data__;return((Y=typeof(H=P))=="string"||Y=="number"||Y=="symbol"||Y=="boolean"?H!=="__proto__":H===null)?ue[typeof P=="string"?"string":"hash"]:ue.map}function ua(w,P){var H=(function(Y,ue){return Y==null?void 0:Y[ue]})(w,P);return Xg(H)?H:void 0}function Mu(w,P){var H=typeof w;return!!(P=P==null?r:P)&&(H=="number"||H!="symbol"&&l.test(w))&&w>-1&&w%1==0&&w<P}function Pu(w){var P=w&&w.constructor;return w===(typeof P=="function"&&P.prototype||y)}function da(w,P){if((P!=="constructor"||typeof w[P]!="function")&&P!="__proto__")return w[P]}var Zg=(function(w){var P=0,H=0;return function(){var Y=Vt(),ue=16-(Y-H);if(H=Y,ue>0){if(++P>=800)return arguments[0]}else P=0;return w.apply(void 0,arguments)}})(Jg);function Ro(w,P){return w===P||w!=w&&P!=P}var ha=ku((function(){return arguments})())?ku:function(w){return hi(w)&&O.call(w,"callee")&&!$.call(w,"callee")},pa=Array.isArray;function fa(w){return w!=null&&Fu(w.length)&&!ma(w)}var xu=he||function(){return!1};function ma(w){if(!Yn(w))return!1;var P=Do(w);return P==o||P=="[object GeneratorFunction]"||P=="[object AsyncFunction]"||P=="[object Proxy]"}function Fu(w){return typeof w=="number"&&w>-1&&w%1==0&&w<=r}function Yn(w){var P=typeof w;return w!=null&&(P=="object"||P=="function")}function hi(w){return w!=null&&typeof w=="object"}var Hu=S?(function(w){return function(P){return w(P)}})(S):function(w){return hi(w)&&Fu(w.length)&&!!u[Do(w)]};function Uu(w){return fa(w)?Yg(w):Kg(w)}var Ea,Qg=(Ea=function(w,P,H){Lu(w,P,H)},qg(function(w,P){var H=-1,Y=P.length,ue=Y>1?P[Y-1]:void 0,Re=Y>2?P[2]:void 0;for(ue=Ea.length>3&&typeof ue=="function"?(Y--,ue):void 0,Re&&(function(rt,dt,ye){if(!Yn(ye))return!1;var je=typeof dt;return!!(je=="number"?fa(ye)&&Mu(dt,ye.length):je=="string"&&dt in ye)&&Ro(ye[dt],rt)})(P[0],P[1],Re)&&(ue=Y<3?void 0:ue,Y=1),w=Object(w);++H<Y;){var Ae=P[H];Ae&&Ea(w,Ae,H,ue)}return w}));function Bu(w){return w}t.exports=Qg})(El,El.exports)),El.exports);const yR=Ys(RR);class IR{constructor(e,n,r,i){this.backendRestClient=new TR(e,n,r,i)}async getApp(e){return(function(n){const r=(function(s,a){const l={general:{enableFileTransfers:a.includes("file_sharing"),enableLocation:a.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}},
1350
+ `.replace(/\s+/g," ");return`data:image/svg+xml;utf8,${encodeURIComponent(i)}`}function ER(){var s;const t=Qe(),e=ae(),n=on(),r=(s=J(()=>e.state$.isUserConnected.child(e.state$.currentConversationId.get())))!=null?s:{},i=J(e.state$.userPermissions),o=J(e.searchQuery$);return f(t.ChatHeader,{common:n,isUserConnected:r,permissions:i,searchQuery:o})}function _R(){const t=Qe(),e=on();return f(t.MessageListHeader,{common:e})}function AR(){const t=Qe(),e=on();return f(t.MessageListFooter,{common:e})}function gR(){const t=Qe(),e=on();return f(t.NoConversationSelected,{common:e})}function PA({containerRef:t}){const[e,n]=ee(null),[r,i]=ee(null),[o,s]=ee(!1);z(()=>{const d=t.current;let h=null;const p=m=>{if(m.pointerType!=="mouse")return;h&&(clearTimeout(h),h=null);const _=m.target.closest("[t-tooltip-text]");_&&(h=setTimeout(()=>{h=null,n(_),s(!1)},500))};return d==null||d.addEventListener("pointerover",p),()=>{d==null||d.removeEventListener("pointerover",p)}},[t]),z(()=>{const d=t.current;let h,p=!1;function m(A){p=!1,A.pointerType!=="mouse"&&(h=setTimeout(()=>{const g=A.target.closest("[t-tooltip-text]");g&&(p=!0,n(g),s(!0))},300))}function _(){clearTimeout(h)}function E(A){p&&(A.stopPropagation(),A.preventDefault())}return d.addEventListener("pointerdown",m),d.addEventListener("pointerup",_),d.addEventListener("pointerleave",_),d.addEventListener("click",E,!0),d.addEventListener("contextmenu",E,!0),()=>{d.removeEventListener("pointerdown",m),d.removeEventListener("pointerup",_),d.removeEventListener("pointerleave",_),d.removeEventListener("click",E,!0),d.removeEventListener("contextmenu",E,!0)}},[t]);const{refs:a,floatingStyles:l}=cA({placement:"top",middleware:[uA(),o&&(u=10,{...aT(u),options:[u,c]})],whileElementsMounted:aA});var u,c;return z(()=>{if(e){a.setReference(e);const d=()=>{const m=e.getAttribute("t-tooltip-text");m===null?p():i(m.trim())},h=new MutationObserver(d);h.observe(e,{attributes:!0}),d();const p=()=>{o?setTimeout(()=>n(null),1e3):n(null)};return e.addEventListener("pointerleave",p),()=>{e.removeEventListener("pointerleave",p),h.disconnect(),a.setReference(null),i(null)}}},[e,o,a]),r?f("div",{className:"t-tooltip",role:"tooltip",style:l,ref:a.setFloating,children:r}):null}function SR({appId:t,chatHeaderVisible:e,messageFieldVisible:n}){const r=ho(),i=(function(){const E=ae(),A=ct(()=>{const O=E.errors$.get(),D=E.authTokenState$.get(),I=E.state$.loadingConversationId.get(),R=E.state$.currentConversationId.get();return O.serverError?"server-error":O.wrongAppId?"wrong-app-id":D==="loading"||D==="idle"?"loading-token":D==="invalid"?"invalid-token":D==="expired"?"expired-token":D==="valid"?O.unknownUser?"unknown-user":I&&E.state$.unknownConversations.child(I).get()?"loading-conv-failed":E.canRenderUi(I)||R!==I&&E.canRenderUi(R)?"loaded":"loading-data":void re.unreachable()}),g=ct({type:"loading"});Yi(O=>{const D=A.get(),I=E.state$.currentConversationId.get(),R=E.extUserId$.get(),y=E.appId$.get();function v(T){g.set({type:"loading"});const C=setTimeout(()=>{g.set(T)},5e3);return()=>clearTimeout(C)}switch(D){case"invalid-token":g.set({type:"auth-failed"});break;case"expired-token":g.set({type:"expired-token"});break;case"wrong-app-id":g.set({type:"wrong-app-id",appId:y});break;case"server-error":g.set({type:"server-error"});break;case"loading-data":case"loading-token":g.set({type:"loading"});break;case"loaded":g.set({type:"loaded",conversationId:I,userId:R});break;case"loading-conv-failed":O.onCleanup=v({type:"inaccessible-conversation",userId:R,conversationId:I});break;case"unknown-user":O.onCleanup=v({type:"unknown-user",userId:R});break;default:re.never(D)}});const S=ct({type:"loading"});return Yi(O=>{if(g.type.get()==="loading"){S.set({type:"invisible-loading"});const D=setTimeout(()=>{S.set({type:"loading"})},1e3);O.onCleanup=()=>{clearTimeout(D)}}else S.set(g.get())}),J(S)})(),o=Qm();z(()=>{r.uploadFile=o.startFileUpload,o.onClose=()=>{r.focus()}},[r,o]);const[s,a]=ee(!1),l=ae(),u=J(()=>!!l.app$.get()&&l.state$.userPermissions.canShareFile.get()),c=J(()=>o.uploads$.get().length>0),d=u&&!c;z(()=>{i.type==="loaded"?l.renderedConversationId$.set(i.conversationId):l.renderedConversationId$.set(void 0)},[i,l]);const h=q(E=>{o.startFileUpload([...E.dataTransfer.files]),E.preventDefault(),a(!1)},[o]),p=q(E=>{E.preventDefault(),E.dataTransfer.types.includes("Files")&&a(!0)},[]),m=q(E=>{E.preventDefault(),a(!1)},[]),_=X(null);return fu(),i.type==="invisible-loading"?f(ie,{}):i.type==="loading"?f(bA,{}):i.type==="inaccessible-conversation"?f(lR,{}):i.type==="unknown-user"||i.type==="auth-failed"||i.type==="wrong-app-id"||i.type==="server-error"||i.type==="unexpected-error"?f(aa,{appId:t,chatboxState:i}):i.type=="expired-token"?f(wA,{}):i.type==="loaded"?i.conversationId===null?f(gR,{}):f("div",{className:"t-chatbox-content",onDragOver:d?p:void 0,onDragLeave:d?m:void 0,onDrop:d?h:void 0,"t-menu-boundary":"root",ref:_,children:[e&&f(ER,{}),f(_R,{}),f(oR,{conversationId:i.conversationId}),f(AR,{}),n&&f(NA,{attachFile:o.startFileUpload,shareLocation:o.startLocationUpload}),c&&f(cR,{}),s&&f(LA,{className:"t-drop-overlay",children:f(B,{type:"attachment"})}),f(PA,{containerRef:_})]}):f(ie,{})}const OR=()=>!0;async function Nu(t,e,{initialDelay:n,maxDelay:r,log:i,shouldRetry:o=OR}){return e().catch(async s=>{if(i&&i(`[TalkJS] Retries left: ${t}. Error: ${JSON.stringify(s)}.`),t===0||!await o(s))throw s;const a=1e3*n*1.2,l=Math.min(1e3*r,a),u=l*(1-(c=.05)+2*Math.random()*c);var c,d;return(d=u,d<=0?Promise.resolve():new Promise(h=>setTimeout(h,d))).then(()=>Nu(t-1,e,{initialDelay:u/1e3,maxDelay:r,log:i,shouldRetry:o}))})}function mc(){const t={},e=new Promise(function(n,r){t.resolve=n,t.reject=r});return t.promise=e,t}const zo=new Uint8Array(31);function xA(){if(globalThis.crypto!==void 0)crypto.getRandomValues(zo);else for(let e=0;e<zo.length;e++)zo[e]=Math.floor(256*Math.random());let t=0;return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,e=>(+e^zo[t++]&15>>+e/4).toString(16))}class vR{constructor(e,n,r,i,o,s,a,l){this.store=e,this.talkSession=n,this.editorInternals=r,this.onSendMessage=i,this.onDeleteMessage=o,this.onMessageAction=s,this.onFocusMessage=a,this.onBackButtonClick=l,this.loadMoreUntil=async u=>{const c=this.store.state$.currentConversationId.peek(),d=this.store.state$.messages.child(c).loadedAll;let h;do{const p=this.store.messageSubscriptions[c];p&&!d.peek()&&await p.loadMore(30),h=u()}while(!d.peek()&&!h);return h}}setScrollableDiv(e){this.scrollable=e}toggleSearchBox(e){if(this.store.state$.userPermissions.canSearch.peek())if(e!==void 0)this.store.chatSearchState$.set(e?"visible":"hidden");else{const n=this.store.chatSearchState$.peek();this.store.chatSearchState$.set(n==="hidden"?"visible":"hidden")}else Ce.error("In-conversation message search is only available to customers on Growth plan and above.")}async deleteMessage(e){const n=this.store.state$.currentConversation.peek();if(!n||n.access==="Read")return;const r=n.id,i=this.store.state$.messages.child(r).lookup.child(e).peek(),o=this.talkSession.conversation(r).message(e),[s]=await Promise.all([i!=null?i:o.get(),o.delete()]);if(s){const a={currentUser:this.store.currentUser$.peek(),conversation:this.store.state$.currentConversation.peek(),message:i};this.onDeleteMessage(a)}}setEditing(e){const n=this.store.state$.currentConversation.peek();n&&n.access!=="Read"&&this.store.state$.editingMessageId.set(e)}async editMessage(e,n){const r=this.store.state$.currentConversation.peek();if(!r||r.access==="Read")return;const i=r.id;await this.talkSession.conversation(i).message(e).edit(n)}setReferencedMessage(e){const n=this.store.state$.currentConversation.peek();n&&n.access!=="Read"&&(this.store.state$.referencedMessageId.set(e),setTimeout(()=>this.editorInternals.focus({skipProseMirrorStuff:!0}),100))}async focusMessage(e,n=!0){var a;if(e==null)return this.store.focusedMessage$.set(null),null;if(await js(()=>this.store.state$.loadingConversationId.get()===this.store.renderedConversationId$.get()),this.store.state$.currentConversationId.peek()===null)return Ce.error("Cannot focus message because current conversation is `null`."),null;const r=()=>{const l=this.store.state$.currentConversationId.peek();return this.store.state$.messages.child(l).lookup.child(e).peek()||null};let i=r();if(i||(i=await this.loadMoreUntil(r)),!i)return Ce.error(`Message with id: \`${e}\` could not be found in this conversation`),i;const o=(a=this.scrollable)==null?void 0:a.current;re.defined(o);const s=o.querySelector(`[t-message-id="${e}"]`);return s?this.scrollToAndHighlight(s,i,n):Ce.error(`Could not find HTMLElement with attribute: t-message-id="${e}"`),i}async jumpToHighlight(e){if(!this.store.state$.userPermissions.canSearch.peek())return Ce.error("In-conversation message search is only available to customers on Growth plan and above."),null;if(this.store.highlightedStrings$.peek().length===0||this.store.chatSearchState$.peek()==="searching")return null;let n=this.findHighlight(e);return n||e!=="up"||(this.store.chatSearchState$.set("searching"),n=await this.loadMoreUntil(()=>this.findHighlight("up"))),n}findHighlight(e){var u;const n=(u=this.scrollable)==null?void 0:u.current;re.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(i.length===0&&s.length!==0)return Ce.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(c=>{const d=i.findIndex(m=>m.contains(c));if(d===-1)return;const h=i.splice(d,1)[0],p=h.getAttribute("t-message-id");r.push([p,h])}),e==="up"){const c=n.getBoundingClientRect().top;a=r.find(([d,h])=>h.getBoundingClientRect().top-c<-5)}else{const c=.05*n.getBoundingClientRect().height,d=n.getBoundingClientRect().bottom;for(let h=r.length-1;h>=0;h--){const p=r[h],[m,_]=p;if(d-_.getBoundingClientRect().top<=c){a=p;break}}}const l=this.store.chatSearchState$;if(a){const[c,d]=a,h=this.store.state$.messages.child(o).lookup.child(c).peek();return this.scrollToAndHighlight(d,h),l.set("visible"),h}return r.length===0?l.set("noResults"):l.set("noMoreResults"),null}scrollToAndHighlight(e,n,r=!0){const i=this.scrollable.current.getBoundingClientRect(),o=e.getBoundingClientRect();let s="start";Math.sign(i.top-o.top)===-1&&o.height<i.height&&(s="end"),e instanceof HTMLElement&&(e.style.scrollSnapAlign=s),e.scrollIntoView({behavior:"instant"}),e instanceof HTMLElement&&(e.style.scrollSnapAlign="none"),this.store.focusedMessage$.set(n),r&&this.onFocusMessage({message:n})}setHighlightedStrings(e){this.store.state$.userPermissions.canSearch.peek()?this.store.highlightedStrings$.set(e):Ce.error("In-conversation message search and by extension highlighting of strings are only available to customers on Growth plan and above.")}setSearchQuery(e){this.store.setSearchQuery(e)}async sendMessage(e){const n=this.store.state$.currentConversationId.peek();if(!n)return;const r=await(async function(s,a){var _,E,A,g,S;const l=s.state$.currentConversationId.peek(),u=s.state$.messages.child(l),c=typeof a.referencedMessage=="string"?u.lookup.child(a.referencedMessage).peek():await((E=(_=a.referencedMessage)==null?void 0:_.get())!=null?E:null),d=c&&{...c,type:"UserMessage",sender:c.sender,referencedMessageId:(g=(A=c.referencedMessage)==null?void 0:A.id)!=null?g:null};d&&delete d.referencedMessage;const h="content"in a?[vf(s,a.content[0])]:[DR(a.text)],p="text"in a?a.text:TA(a.content.map(O=>vf(s,O)),{}),m=Math.max(Date.now(),Of+1);return Of=m,{id:"ephemeral-"+xA(),type:"UserMessage",sender:s.currentUser$.peek(),createdAt:m,editedAt:null,custom:(S=a.custom)!=null?S:{},origin:"web",referencedMessage:d,reactions:[],content:h,plaintext:p}})(this.store,e);this.store.state$.ephemeralMessages.child(n).child(r.id).set(r);const i=mc();this.store.readyForNewMessagesPromise=i.promise;const o=await this.talkSession.conversation(n).send(e);this.store.state$.ephemeralMessageIdMapping.child(n).child(o.id).set(r.id),i.resolve(),this.onSendMessage({message:await o.get(),currentUser:this.store.currentUser$.peek(),conversation:this.store.state$.currentConversation.peek()})}sendFileMessage(e){const n={type:"file",fileToken:e.fileToken};return this.sendMessage({content:[n],custom:e.custom})}async uploadVoice(e,n){return await this.talkSession.uploadVoice(e,n)}sendLocationMessage(e){const n={type:"location",latitude:e.location.latitude,longitude:e.location.longitude};return this.sendMessage({content:[n],custom:e.custom})}markAsTyping(){const e=this.store.state$.currentConversationId.peek();e&&this.talkSession.conversation(e).markAsTyping()}async toggleReaction(e,n,r){typeof n!="string"&&(n=n.emoji);const i=this.store.state$.currentConversationId.peek();if(!i)return;const o=this.store.state$.messages.child(i).lookup.child(e).peek().reactions.find(a=>a.emoji===n),s=this._getReactionRef(e,n);o!=null&&o.currentUserReacted&&r!==!0?await s.remove():r!==!1&&await s.add()}async addReaction(e,n){this.store.state$.currentConversationId.peek()&&await this._getReactionRef(e,n).add()}triggerMessageAction(e,n,r){const i=this.store.state$.currentConversation.peek();i&&(typeof e=="string"&&(e=this.store.state$.messages.child(i.id).lookup.child(e).peek()),this.onMessageAction({action:n,params:r,message:e,conversation:i}))}clickBackButton(){const e=this.store.currentUser$.peek();re.defined(e),this.onBackButtonClick({currentUser:e})}storeDraft(e){const n=this.store.state$.currentConversationId.peek(),r=this.store.currentUser$.peek(),i=this.store.appId$.peek();n&&r&&i&&y0(n,r.id,i,e)}_getReactionRef(e,n){const r=this.store.state$.currentConversationId.peek();return this.talkSession.conversation(r).message(e).reaction(n)}}let Of=0;const DR=t=>({type:"text",children:L_(t)});function vf(t,e){switch(e.type){case"text":case"location":return e;case"file":return(function(n,r){const i=n.fileUploads[r.fileToken];return re.defined(i),{type:"file",subtype:i.type==="file"?void 0:i.type,...i.metadata,size:i.file.size,filename:i.file.name,fileToken:r.fileToken,url:i.temporaryBlobUrl}})(t,e)}}class ml extends Error{constructor(e,n){const r=(function(i){if(typeof i=="string")return i;if(Array.isArray(i))return i.join(`
1351
+ `);try{return JSON.stringify(i)}catch(o){return String(i)}})(e);super(r),this.userMessage=n!=null?n:r,Object.setPrototypeOf&&Object.setPrototypeOf(this,new.target.prototype)}}const oo=console;class TR{constructor(e,n,r,i){this.apiUrls=e,this.appId=n,this.sessionId=r,this.authProvider=i,this._lastPutPromise=Promise.resolve()}async get(e,n={}){const r=this.endpointUrl(e,n),i=await Oi(()=>this.fetchWithReauth(r),{retries:11});return await this.handleResponse(i,r)}async queuedPut(e,n){await this._lastPutPromise;const r=Oi(()=>this._doPut(e,n));return this._lastPutPromise=r,r}put(e,n,r){const i=()=>this._doPut(e,n);return r?Df(i,r):Oi(i,{retries:5})}post(e,n,r){const i=()=>this._doPost(e,n);return r?Df(i,r):Oi(i,{retries:5})}delete(e,n={}){return Oi(()=>this._doDelete(e,n),{retries:11})}endpointUrl(e,n={}){const r=new URL(this.apiUrls.internalHttpApiUrl);r.pathname+=`/${this.appId}/${e}`,r.searchParams.set("sessionId",this.sessionId);for(const[i,o]of Object.entries(n))r.searchParams.set(i,o);return r}async _doPut(e,n){const r=this.endpointUrl(e),i=await this.fetchWithReauth(r,{method:"PUT",body:JSON.stringify(n)});return await this.handleResponse(i,r)}async _doPost(e,n){const r=this.endpointUrl(e),i=await this.fetchWithReauth(r,{method:"POST",body:JSON.stringify(n)});return await this.handleResponse(i,r)}async _doDelete(e,n){const r=this.endpointUrl(e,n),i=await this.fetchWithReauth(r,{method:"DELETE"});return await this.handleResponse(i,r)}async handleResponse(e,n){if(e.status>=300){if(e.status===404)throw Ll.error(`[${this.appId}][BackendRestClient] Couldn't find resource.`),new ml("Could not find app.",`Could not find given appId: "${this.appId}". You can find your appId on https://talkjs.com/dashboard.`);if(e.status===401){const r=await this.authProvider.getToken();throw Ll.error(`[${this.appId}][BackendRestClient] Couldn't authenticate ${n} with token ${r}.`),new ml("User not authenticated.","Could not authenticate user. Check if your signature is calculated correctly.")}if(e.status>=300&&e.status<500){const{error:r}=await e.json();throw new ml(r)}{const r=await e.text();throw new Error(`Got non-success response (${r}) from the server for url: ${n}.`)}}return await e.json()}async fetchWithReauth(e,n){function r(s){const a={Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${s}`};return fetch(e,{...n,headers:a})}const i=await this.authProvider.getToken(),o=await r(i);return o.status!==401?o:(oo.error(`401 error from ${n==null?void 0:n.method} ${e}, ${i}`),this.authProvider.refreshToken(),r(await this.authProvider.getToken()))}}function FA(t){return!t.userMessage}function Oi(t,{retries:e=30}={}){return Nu(e,t,{shouldRetry:FA,log:oo.warn.bind(oo),maxDelay:30,initialDelay:.2})}async function Df(t,e){try{return await t()}catch(r){if(!FA(r))throw r}let n=!1;return e.then(()=>{n=!0}),Nu(1e3,t,{initialDelay:.2,maxDelay:30,shouldRetry:()=>!n,log:oo.warn.bind(oo)})}var Tf,El={exports:{}},RR=(Tf||(Tf=1,(function(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*)$/,u={};u["[object Float32Array]"]=u["[object Float64Array]"]=u["[object Int8Array]"]=u["[object Int16Array]"]=u["[object Int32Array]"]=u["[object Uint8Array]"]=u["[object Uint8ClampedArray]"]=u["[object Uint16Array]"]=u["[object Uint32Array]"]=!0,u[i]=u["[object Array]"]=u["[object ArrayBuffer]"]=u["[object Boolean]"]=u["[object DataView]"]=u["[object Date]"]=u["[object Error]"]=u[o]=u["[object Map]"]=u["[object Number]"]=u[s]=u["[object RegExp]"]=u["[object Set]"]=u["[object String]"]=u["[object WeakMap]"]=!1;var c,d=typeof wo=="object"&&wo&&wo.Object===Object&&wo,h=typeof self=="object"&&self&&self.Object===Object&&self,p=d||h||Function("return this")(),m=e&&!e.nodeType&&e,_=m&&t&&!t.nodeType&&t,E=_&&_.exports===m,A=E&&d.process,g=(function(){try{var w=_&&_.require&&_.require("util").types;return w||A&&A.binding&&A.binding("util")}catch(P){}})(),S=g&&g.isTypedArray,O=Array.prototype,D=Function.prototype,I=Object.prototype,R=p["__core-js_shared__"],y=D.toString,v=I.hasOwnProperty,T=(c=/[^.]+$/.exec(R&&R.keys&&R.keys.IE_PROTO||""))?"Symbol(src)_1."+c:"",C=I.toString,N=y.call(Object),L=RegExp("^"+y.call(v).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),b=E?p.Buffer:void 0,k=p.Symbol,x=p.Uint8Array;b&&b.allocUnsafe;var M,U,V=(M=Object.getPrototypeOf,U=Object,function(w){return M(U(w))}),W=Object.create,$=I.propertyIsEnumerable,oe=O.splice,le=k?k.toStringTag:void 0,ce=(function(){try{var w=ua(Object,"defineProperty");return w({},"",{}),w}catch(P){}})(),he=b?b.isBuffer:void 0,tt=Math.max,Vt=Date.now,nt=ua(p,"Map"),ve=ua(Object,"create"),Te=(function(){function w(){}return function(P){if(!Yn(P))return{};if(W)return W(P);w.prototype=P;var H=new w;return w.prototype=void 0,H}})();function $n(w){var P=-1,H=w==null?0:w.length;for(this.clear();++P<H;){var Y=w[P];this.set(Y[0],Y[1])}}function sn(w){var P=-1,H=w==null?0:w.length;for(this.clear();++P<H;){var Y=w[P];this.set(Y[0],Y[1])}}function Rr(w){var P=-1,H=w==null?0:w.length;for(this.clear();++P<H;){var Y=w[P];this.set(Y[0],Y[1])}}function Ir(w){var P=this.__data__=new sn(w);this.size=P.size}function YA(w,P){var H=pa(w),Y=!H&&ha(w),ue=!H&&!Y&&xu(w),Re=!H&&!Y&&!ue&&Hu(w),ge=H||Y||ue||Re,rt=ge?(function(je,an){for(var ht=-1,yr=Array(je);++ht<je;)yr[ht]=an(ht);return yr})(w.length,String):[],dt=rt.length;for(var Ie in w)ge&&(Ie=="length"||ue&&(Ie=="offset"||Ie=="parent")||Re&&(Ie=="buffer"||Ie=="byteLength"||Ie=="byteOffset")||Mu(Ie,dt))||rt.push(Ie);return rt}function la(w,P,H){(H!==void 0&&!Ro(w[P],H)||H===void 0&&!(P in w))&&ca(w,P,H)}function GA(w,P,H){var Y=w[P];v.call(w,P)&&Ro(Y,H)&&(H!==void 0||P in w)||ca(w,P,H)}function vo(w,P){for(var H=w.length;H--;)if(Ro(w[H][0],P))return H;return-1}function ca(w,P,H){P=="__proto__"&&ce?ce(w,P,{configurable:!0,enumerable:!0,value:H,writable:!0}):w[P]=H}$n.prototype.clear=function(){this.__data__=ve?ve(null):{},this.size=0},$n.prototype.delete=function(w){var P=this.has(w)&&delete this.__data__[w];return this.size-=P?1:0,P},$n.prototype.get=function(w){var P=this.__data__;if(ve){var H=P[w];return H===n?void 0:H}return v.call(P,w)?P[w]:void 0},$n.prototype.has=function(w){var P=this.__data__;return ve?P[w]!==void 0:v.call(P,w)},$n.prototype.set=function(w,P){var H=this.__data__;return this.size+=this.has(w)?0:1,H[w]=ve&&P===void 0?n:P,this},sn.prototype.clear=function(){this.__data__=[],this.size=0},sn.prototype.delete=function(w){var P=this.__data__,H=vo(P,w);return!(H<0||(H==P.length-1?P.pop():oe.call(P,H,1),--this.size,0))},sn.prototype.get=function(w){var P=this.__data__,H=vo(P,w);return H<0?void 0:P[H][1]},sn.prototype.has=function(w){return vo(this.__data__,w)>-1},sn.prototype.set=function(w,P){var H=this.__data__,Y=vo(H,w);return Y<0?(++this.size,H.push([w,P])):H[Y][1]=P,this},Rr.prototype.clear=function(){this.size=0,this.__data__={hash:new $n,map:new(nt||sn),string:new $n}},Rr.prototype.delete=function(w){var P=To(this,w).delete(w);return this.size-=P?1:0,P},Rr.prototype.get=function(w){return To(this,w).get(w)},Rr.prototype.has=function(w){return To(this,w).has(w)},Rr.prototype.set=function(w,P){var H=To(this,w),Y=H.size;return H.set(w,P),this.size+=H.size==Y?0:1,this},Ir.prototype.clear=function(){this.__data__=new sn,this.size=0},Ir.prototype.delete=function(w){var P=this.__data__,H=P.delete(w);return this.size=P.size,H},Ir.prototype.get=function(w){return this.__data__.get(w)},Ir.prototype.has=function(w){return this.__data__.has(w)},Ir.prototype.set=function(w,P){var H=this.__data__;if(H instanceof sn){var Y=H.__data__;if(!nt||Y.length<199)return Y.push([w,P]),this.size=++H.size,this;H=this.__data__=new Rr(Y)}return H.set(w,P),this.size=H.size,this};var WA=function(w,P,H){for(var Y=-1,ue=Object(w),Re=H(w),ge=Re.length;ge--;){var rt=Re[++Y];if(P(ue[rt],rt,ue)===!1)break}return w};function Do(w){return w==null?w===void 0?"[object Undefined]":"[object Null]":le&&le in Object(w)?(function(P){var H=v.call(P,le),Y=P[le];try{P[le]=void 0;var ue=!0}catch(ge){}var Re=C.call(P);return ue&&(H?P[le]=Y:delete P[le]),Re})(w):(function(P){return C.call(P)})(w)}function Lu(w){return hi(w)&&Do(w)==i}function XA(w){return!(!Yn(w)||(function(P){return!!T&&T in P})(w))&&(ma(w)?L:a).test((function(P){if(P!=null){try{return y.call(P)}catch(H){}try{return P+""}catch(H){}}return""})(w))}function KA(w){if(!Yn(w))return(function(ue){var Re=[];if(ue!=null)for(var ge in Object(ue))Re.push(ge);return Re})(w);var P=Pu(w),H=[];for(var Y in w)(Y!="constructor"||!P&&v.call(w,Y))&&H.push(Y);return H}function ku(w,P,H,Y,ue){w!==P&&WA(P,function(Re,ge){if(ue||(ue=new Ir),Yn(Re))(function(dt,Ie,je,an,ht,yr,pi){var zt=da(dt,je),pt=da(Ie,je),ju=pi.get(pt);if(ju)la(dt,je,ju);else{var Vu,At=yr?yr(zt,pt,je+"",dt,Ie,pi):void 0,fi=At===void 0;if(fi){var _a=pa(pt),Aa=!_a&&xu(pt),zu=!_a&&!Aa&&Hu(pt);At=pt,_a||Aa||zu?pa(zt)?At=zt:hi(Vu=zt)&&fa(Vu)?At=(function(Fe,it){var ot=-1,Pt=Fe.length;for(it||(it=Array(Pt));++ot<Pt;)it[ot]=Fe[ot];return it})(zt):Aa?(fi=!1,At=pt.slice()):zu?(fi=!1,At=(function(Fe){var it,ot,Pt=(it=Fe.buffer,ot=new it.constructor(it.byteLength),new x(ot).set(new x(it)),ot);return new Fe.constructor(Pt,Fe.byteOffset,Fe.length)})(pt)):At=[]:(function(Fe){if(!hi(Fe)||Do(Fe)!=s)return!1;var it=V(Fe);if(it===null)return!0;var ot=v.call(it,"constructor")&&it.constructor;return typeof ot=="function"&&ot instanceof ot&&y.call(ot)==N})(pt)||ha(pt)?(At=zt,ha(zt)?At=(function(Fe){return(function(it,ot,Pt){var eg=!Pt;Pt||(Pt={});for(var $u=-1,tg=ot.length;++$u<tg;){var ga=ot[$u],Io=void 0;Io===void 0&&(Io=it[ga]),eg?ca(Pt,ga,Io):GA(Pt,ga,Io)}return Pt})(Fe,Uu(Fe))})(zt):Yn(zt)&&!ma(zt)||(At=(function(Fe){return typeof Fe.constructor!="function"||Pu(Fe)?{}:Te(V(Fe))})(pt))):fi=!1}fi&&(pi.set(pt,At),ht(At,pt,an,yr,pi),pi.delete(pt)),la(dt,je,At)}})(w,P,ge,H,ku,Y,ue);else{var rt=Y?Y(da(w,ge),Re,ge+"",w,P,ue):void 0;rt===void 0&&(rt=Re),la(w,ge,rt)}},Uu)}function qA(w,P){return ZA((function(H,Y,ue){return Y=tt(Y===void 0?H.length-1:Y,0),function(){for(var Re=arguments,ge=-1,rt=tt(Re.length-Y,0),dt=Array(rt);++ge<rt;)dt[ge]=Re[Y+ge];ge=-1;for(var Ie=Array(Y+1);++ge<Y;)Ie[ge]=Re[ge];return Ie[Y]=ue(dt),(function(je,an,ht){switch(ht.length){case 0:return je.call(an);case 1:return je.call(an,ht[0]);case 2:return je.call(an,ht[0],ht[1]);case 3:return je.call(an,ht[0],ht[1],ht[2])}return je.apply(an,ht)})(H,this,Ie)}})(w,P,Bu),w+"")}var JA=ce?function(w,P){return ce(w,"toString",{configurable:!0,enumerable:!1,value:(H=P,function(){return H}),writable:!0});var H}:Bu;function To(w,P){var H,Y,ue=w.__data__;return((Y=typeof(H=P))=="string"||Y=="number"||Y=="symbol"||Y=="boolean"?H!=="__proto__":H===null)?ue[typeof P=="string"?"string":"hash"]:ue.map}function ua(w,P){var H=(function(Y,ue){return Y==null?void 0:Y[ue]})(w,P);return XA(H)?H:void 0}function Mu(w,P){var H=typeof w;return!!(P=P==null?r:P)&&(H=="number"||H!="symbol"&&l.test(w))&&w>-1&&w%1==0&&w<P}function Pu(w){var P=w&&w.constructor;return w===(typeof P=="function"&&P.prototype||I)}function da(w,P){if((P!=="constructor"||typeof w[P]!="function")&&P!="__proto__")return w[P]}var ZA=(function(w){var P=0,H=0;return function(){var Y=Vt(),ue=16-(Y-H);if(H=Y,ue>0){if(++P>=800)return arguments[0]}else P=0;return w.apply(void 0,arguments)}})(JA);function Ro(w,P){return w===P||w!=w&&P!=P}var ha=Lu((function(){return arguments})())?Lu:function(w){return hi(w)&&v.call(w,"callee")&&!$.call(w,"callee")},pa=Array.isArray;function fa(w){return w!=null&&Fu(w.length)&&!ma(w)}var xu=he||function(){return!1};function ma(w){if(!Yn(w))return!1;var P=Do(w);return P==o||P=="[object GeneratorFunction]"||P=="[object AsyncFunction]"||P=="[object Proxy]"}function Fu(w){return typeof w=="number"&&w>-1&&w%1==0&&w<=r}function Yn(w){var P=typeof w;return w!=null&&(P=="object"||P=="function")}function hi(w){return w!=null&&typeof w=="object"}var Hu=S?(function(w){return function(P){return w(P)}})(S):function(w){return hi(w)&&Fu(w.length)&&!!u[Do(w)]};function Uu(w){return fa(w)?YA(w):KA(w)}var Ea,QA=(Ea=function(w,P,H){ku(w,P,H)},qA(function(w,P){var H=-1,Y=P.length,ue=Y>1?P[Y-1]:void 0,Re=Y>2?P[2]:void 0;for(ue=Ea.length>3&&typeof ue=="function"?(Y--,ue):void 0,Re&&(function(rt,dt,Ie){if(!Yn(Ie))return!1;var je=typeof dt;return!!(je=="number"?fa(Ie)&&Mu(dt,Ie.length):je=="string"&&dt in Ie)&&Ro(Ie[dt],rt)})(P[0],P[1],Re)&&(ue=Y<3?void 0:ue,Y=1),w=Object(w);++H<Y;){var ge=P[H];ge&&Ea(w,ge,H,ue)}return w}));function Bu(w){return w}t.exports=QA})(El,El.exports)),El.exports);const IR=Ys(RR);class yR{constructor(e,n,r,i){this.backendRestClient=new TR(e,n,r,i)}async getApp(e){return(function(n){const r=(function(s,a){const l={general:{enableFileTransfers:a.includes("file_sharing"),enableLocation:a.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}},
1352
1352
  {{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}},
1353
1353
  The {{app.name}} team`,enableReplyToEmail:a.includes("reply_via_email"),emailThemeType:a.includes("email_templates")?"custom":"standard",emailTheme:"default_email",emailAttachmentMode:"enabledExcludingImages",htmlTemplate:`<div>
1354
1354
  Hi {{recipient.name}}, <br/>
@@ -1372,10 +1372,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1372
1372
  {{app.custom.websiteUrl}} Join the chat
1373
1373
 
1374
1374
  On behalf of {{sender.name}},
1375
- The {{app.name}} team`},smsSettings:{enabled:a.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:[]};return yR(l,s)})(n.configuration,n.features),i=JSON.parse(r.suppressContactInfo),o={...r,suppressContactInfo:new $_(i)};return{appMetadata:{...n.appMetadata,id:n.appMetadata.id},features:n.features,role:o}})(await this.backendRestClient.get("/app",{role_name:e}))}async checkIfAppExists(){return this.backendRestClient.get("/app").then(()=>!0).catch(e=>{if(e.message==="Could not find app.")return!1;throw e})}}class Br{constructor(e,n,r){this.realtimeWsApiUrl=e,this.internalHttpApiUrl=n,this.restApiHttpUrl=r}getBokensUrl(e,n,r){return this.internalHttpApiUrl+`/${e}/bokens/${encodeURIComponent(n)}?signature=${encodeURIComponent(r!=null?r:"")}`}getRealtimeWsUrl(e,n,r,i,o){const s=encodeURIComponent(n);return this.realtimeWsApiUrl+`/${e}/realtime/${s}?talkjs-client-build=${o!=null?o:"standalone"}&talkjs-core=${r}&talkjs-client-id=${i}`}static fromHost(e){var r;const n=new Br("wss://realtime.talkjs.com/v1","https://app.talkjs.com/api/v0","https://api.talkjs.com/v1");if(!e)return n;if(e==="@currentHost"){if(typeof location=="undefined")throw new Error("You can only use @currentHost in a browser.");e=((r=window.top)!=null?r:window).location.host}if(e.endsWith("talkjs.com")){const i=e.match(/^(?:\w+-)?([^.]+)\.talkjs\.com$/);if(i){const o=i[1];return["app","cdn","api","realtime"].includes(o)?n:new Br(`wss://realtime-${o}.talkjs.com/v1`,`https://app-${o}.talkjs.com/api/v0`,`https://api-${o}.talkjs.com/v1`)}return n}return e.includes("localhost")||e.includes("localtest.me")||/^\d+\.\d+\.\d+\.\d+(:\d+)?$/.test(e)?new Br(`ws://${e}/public_api/v1`,`http://${e}/api/v0`,`http://${e}/public_api/v1`):new Br(`wss://${e}/public_api/v1`,`https://${e}/api/v0`,`https://${e}/public_api/v1`)}}function Rf(t){return Object.values(t)}class CR{constructor(e,n,r){this.subscribedConversations={},this.store=e,this.session=n,this.restApi=r}subscribeToConversationListBaseData(){const e=[this.listenForErrors(),this.listenForAuth(),this.listenForUserAndApp(),this.listenForConversationSearch(),this.listenForMessageSearch()];return()=>e.forEach(n=>n())}subscribeToConversationList(e){var o;const{store:n,session:r}=this;re(n.type==="ConversationListStore"),(o=n.conversationListSubscription)==null||o.unsubscribe(),n.conversationListSubscription=null,n.conversationFilter$.set(e);const i=r.subscribeConversations({filter:e},s=>{wt(()=>{n.conversationsArray$.set(s);const a={};for(const l of s)a[l.id]=l;n.conversationsMap$.set(a)})});return n.conversationListSubscription=i,()=>{n.conversationListSubscription===i&&(i.unsubscribe(),n.conversationListSubscription=null)}}subscribeToChatboxData(){const e=[this.listenForErrors(),this.listenForAuth(),this.listenForUserAndApp(),()=>this.unsubscribeAllConversations()];return()=>e.forEach(n=>n())}listenForErrors(){const{store:e,session:n}=this;e.errors$.assign({unknownUser:!1,wrongAppId:!1,serverError:!1});const r=n.onError(o=>{Ce.error(o.message),e.errors$.serverError.set(!0)}),i=n.currentUser.subscribe(o=>{e.errors$.unknownUser.set(o===null)});return()=>{r.unsubscribe(),i.unsubscribe()}}listenForAuth(){const{store:e,session:n}=this;return mt(r=>{let i=!0;const o=e.hasTokenFetcher$.get();e.authTokenState$.peek()!=="loading"&&e.authTokenState$.set("loading"),n._authProvider.getToken().then(()=>{i&&e.authTokenState$.set("valid")});const s=n._authProvider.onTokenRefreshFailed(()=>{i&&e.authTokenState$.set(o?"invalid":"expired")});r.onCleanup=()=>{i=!1,s()}})}listenForUserAndApp(){const{store:e,session:n,restApi:r}=this;return mt(i=>{let o=!0,s=null;const a=n.currentUser.subscribe(async l=>{if(o&&l&&(e.currentUser$.set(l),l.role!==s)){s=l.role;const u=await r.getApp(l.role);if(!o)return;e.app$.set(u)}});i.onCleanup=()=>{o=!1,a.unsubscribe()}})}subscribeTypingAndPresence(e){var r;if((r=this.unsubscribeTypingAndPresence)==null||r.call(this),!e)return;const n=[this.listenForTyping(e),this.listenForPresence(e)];this.unsubscribeTypingAndPresence=()=>{n.forEach(i=>i()),this.unsubscribeTypingAndPresence=void 0}}subscribeConversation(e){if(this.subscribedConversations[e])return void(this.subscribedConversations[e].touchedAt=Date.now());const n=[this.listenForConversation(e),this.listenForMessages(e),this.listenForParticipants(e)];this.subscribedConversations[e]={unsubscribe:()=>{n.forEach(i=>i()),delete this.subscribedConversations[e]},touchedAt:Date.now()};const r=Rf(this.subscribedConversations);r.length>10&&(function(o,s){return o.reduce((a,l)=>l[s]<a[s]?l:a,o[0])})(r,"touchedAt").unsubscribe()}unsubscribeAllConversations(){var e;for(const n of Rf(this.subscribedConversations))n.unsubscribe();(e=this.unsubscribeTypingAndPresence)==null||e.call(this),this.subscribedConversations={}}listenForMessages(e){const{store:n,session:r}=this;re(n.type==="ChatboxStore");const i=r.conversation(e).subscribeMessages(async(o,s)=>{o&&(await n.readyForNewMessagesPromise,n.storeMessages(e,o,s))});return n.messageSubscriptions[e]=i,()=>i==null?void 0:i.unsubscribe()}listenForParticipants(e){const{store:n,session:r}=this;re(n.type==="ChatboxStore");const i=r.conversation(e).subscribeParticipants(o=>{o&&n.state$.participants.child(e).set(o)});return()=>i==null?void 0:i.unsubscribe()}listenForConversation(e){const{store:n,session:r}=this;re(n.type==="ChatboxStore");const i=r.conversation(e).subscribe(async o=>{wt(()=>{o?(n.state$.unknownConversations.child(e).delete(),n.state$.conversations.child(e).set(o)):(n.state$.conversations.child(e).delete(),n.state$.unknownConversations.child(e).set(!0))})});return()=>i==null?void 0:i.unsubscribe()}listenForTyping(e){const{store:n,session:r}=this;re(n.type==="ChatboxStore");const i=r.conversation(e).subscribeTyping(o=>{o&&n.storeTyping(e,o)});return()=>i==null?void 0:i.unsubscribe()}listenForPresence(e){const{store:n,session:r}=this;re(n.type==="ChatboxStore");const i=n.state$.participants.child(e),o=n.state$.isUserConnected.child(e),s=mt(a=>{var c;const l=((c=i.get())!=null?c:[]).map(({user:d})=>d.id),u=l.map(d=>r.user(d).subscribeOnline(h=>{var p;o.child(d).set((p=h==null?void 0:h.isConnected)!=null?p:!1)}));wt(()=>{var m;const d=new Set(l),h=(p=(m=o.peek())!=null?m:{},Object.keys(p));var p;for(const _ of h)d.has(_)||o.child(_).delete()}),a.onCleanup=()=>{u.forEach(d=>d.unsubscribe())}});return()=>{s==null||s(),n.state$.isUserConnected.child(e).delete(),o.delete()}}listenForConversationSearch(){const{store:e,session:n}=this;re(e.type==="ConversationListStore");const r=n.searchConversations((s,a)=>{e.globalSearchState$.assign({conversationResults:s,conversationStatus:a})});e.conversationSearch=r;const i=_p((s,a)=>{const l={conversation:a},u=s.trim();u.length?u.length>=3&&r.setQuery(u,l):r.setQuery("",l)},500),o=mt(()=>{i(e.globalSearchState$.query.get(),e.conversationFilter$.get())});return()=>{e.conversationSearch=null,o()}}listenForMessageSearch(){const{store:e,session:n}=this;re(e.type==="ConversationListStore");const r=n.searchMessages((s,a)=>{e.globalSearchState$.assign({messageResults:s,messageStatus:a})});e.messageSearch=r;const i=_p((s,a)=>{const l={conversation:a},u=s.trim();u.length?u.length>=3&&r.setQuery(u,l):r.setQuery("",l)},500),o=mt(()=>{i(e.globalSearchState$.query.get(),e.conversationFilter$.get())});return()=>{e.messageSearch=null,o()}}}function Hg(t,e){const n=e.appId,r=e.userId,i=X(void 0),o=Z(()=>{const c=i.current,d=typeof c!=typeof e.tokenFetcher?e.tokenFetcher:c;return i.current=d,d},[e.tokenFetcher]);We(()=>{t.updateThemeCustom(e.themeCustom)},[t,e.themeCustom]);const s=Z(()=>xg(),[e.appId,e.userId,e.token,o]);z(()=>{t.hasTokenFetcher$.set(!!o)},[t,o]);const a=nA.getTalkSession({host:e.host,appId:n,userId:r,token:e.token,tokenFetcher:o}),l=Z(()=>{const c=Br.fromHost(e.host);return new IR(c,n,s,a._authProvider)},[n,s,a,e.host]),u=Z(()=>new CR(t,a,l),[t,a,l]);return{session:a,restApi:l,fetcher:u}}class NR{constructor(e,n,r,i){this.state={type:"idle"},this.latestTicketId=0,this.uploads$=se([]),this.onClose=null,this.startFileUpload=async o=>{const s=this.latestTicketId;let a;if(this.state={type:"uploading",ticketId:s,content:{kind:"file",uploads:[],fileTokens:[]}},a=o?Array.isArray(o)?o:[o]:await new Promise(c=>{const d=document.createElement("input");d.type="file",d.multiple=!0,d.addEventListener("change",()=>{c([...d.files])}),d.addEventListener("cancel",()=>{c([])}),d.click()}),!a[0])return void this.cancelUpload();if(a.sort((c,d)=>c.lastModified!==d.lastModified?c.lastModified-d.lastModified:c.name.localeCompare(d.name)),!this.isTicketValid(s))return;const l=await Promise.all(a.map(bR));if(!this.isTicketValid(s))return;this.state={type:"uploading",ticketId:s,content:{kind:"file",uploads:l,fileTokens:[]}},wt(()=>{this.uploads$.set(l);for(const c of l){const d=c.file.size+","+c.file.name;this.store.state$.localFileBlobUrls.child(this.store.state$.currentConversationId.peek()).child(d).set({url:c.temporaryBlobUrl,fetching:!1})}});const u=await Promise.all(l.map((c,d)=>(async function(h,p){switch(h.type){case"video":return p.uploadVideo(h.file,h.metadata);case"audio":return p.uploadAudio(h.file,h.metadata);case"image":return p.uploadImage(h.file,h.metadata);case"file":return p.uploadFile(h.file,h.metadata);case"voice":re.unreachable()}})(c,this.session).then(h=>(this.isTicketValid(s)&&this.uploads$.child(d).state.set("uploaded"),h)).catch(()=>(this.isTicketValid(s)&&this.uploads$.child(d).state.set("error"),null))));this.isTicketValid(s)&&(this.state={type:"waitingForConfirmation",ticketId:s,content:{kind:"file",uploads:l,fileTokens:u}})},this.startLocationUpload=async()=>{const o=this.latestTicketId;this.state={type:"uploading",ticketId:o,content:{kind:"location",upload:{type:"location",state:"uploading",location:null}}};const s=await this.browserPermissionController.runWithPermissionCheck("geolocation",async u=>{const{permissionResult:c,location:d}=await new Promise(h=>{navigator.geolocation.getCurrentPosition(p=>{const m={latitude:p.coords.latitude,longitude:p.coords.longitude};h({permissionResult:"granted",location:m})},p=>{p.code===GeolocationPositionError.PERMISSION_DENIED?h({permissionResult:"denied",location:null}):h({permissionResult:"granted",location:null})})});return u(c),{permissionResult:c,location:d}});if(!s||!this.isTicketValid(o))return;const{permissionResult:a,location:l}=s;this.state={type:"waitingForConfirmation",ticketId:o,content:{kind:"location",upload:{type:"location",state:a==="granted"&&l?"uploaded":"error",location:l}}}},this.confirmUpload=()=>{if(this.state.type==="waitingForConfirmation"&&this.isTicketValid(this.state.ticketId)){if(this.state.content.kind==="file"){const o=this.state.content.fileTokens.filter(s=>s!==null);this.state.content.fileTokens.length===o.length&&this.sendFileMessages(this.state.content.uploads,o)}else this.state.content.kind==="location"&&this.state.content.upload.location&&this.sendLocationMessage(this.state.content.upload.location);this.terminate()}},this.cancelUpload=()=>{this.terminate()},this.session=e,this.store=n,this.controller=r,this.browserPermissionController=i}isTicketValid(e){return e===this.latestTicketId}sendFileMessages(e,n){for(const[r,i]of(function(o,s){return re(o.length===s.length),o.map((a,l)=>[a,s[l]])})(n,e))this.controller.sendFileMessage({fileToken:r}),this.store.fileUploads[r]=i}sendLocationMessage(e){this.controller.sendLocationMessage({location:e})}terminate(){var n;const e=this.state.type==="idle";this.latestTicketId+=1,this.state={type:"idle"},this.uploads$.set([]),e||((n=this.onClose)==null||n.call(this))}}async function bR(t){const e=t.name;if((function(r){return/\.(mp4|ts|mov|webm|ogv)$/i.test(r)})(t.name)){const r=await _l("video",t,o=>({width:o.videoWidth,height:o.videoHeight,duration:o.duration,filename:e})),i=(function(o){switch(o.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:r,temporaryBlobUrl:URL.createObjectURL(new Blob([t],{type:i})),state:"uploading"}}const n=URL.createObjectURL(t);return(function(r){return/\.(mp3|m4a|ogg|oga|opus|flac|wav)$/i.test(r)})(t.name)?{type:"audio",file:t,metadata:await _l("audio",t,r=>({duration:r.duration,filename:e})),temporaryBlobUrl:n,state:"uploading"}:(function(r){return/(gif|png|jpg|jpeg|svg|bmp|webp)$/i.test(r)})(t.name)?{type:"image",file:t,metadata:await _l("img",t,r=>({width:r.naturalWidth,height:r.naturalHeight,filename:e})),temporaryBlobUrl:n,state:"uploading"}:{type:"file",file:t,metadata:{filename:e},temporaryBlobUrl:n,state:"uploading"}}async function _l(t,e,n){const r=document.createElement(t);try{return r.src=URL.createObjectURL(e),await new Promise((i,o)=>{const s=t==="img"?"load":"loadedmetadata";r.addEventListener(s,()=>{try{i(n(r))}catch(a){o(a)}},{once:!0})})}finally{URL.revokeObjectURL(r.src)}}class wR{constructor(e){this.init=e}async runWithPermissionCheck(e,n){const{beforeBrowserPermissionPrompt:r,onMissingBrowserPermission:i}=this.init;function o(c){c==="denied"&&i({type:e})}if(!r||!await(async function(c){if(!("permissions"in navigator))return!1;try{return(await navigator.permissions.query({name:c})).state==="prompt"}catch(d){return!1}})(e))return n(c=>{o(c)});const s=mc(),a=mc(),l={type:e,showPrompt:async()=>(a.resolve({cancelled:!1}),await s.promise),cancel:()=>{a.resolve({cancelled:!0})}};try{r(l)}catch(c){Ce.error("Your beforeBrowserPermissionPrompt callback threw an error: ",c),a.resolve({cancelled:!0})}const{cancelled:u}=await a.promise;return u?null:n(c=>{s.resolve(c),o(c)})}}function St(t,e,n){const r=X(t),i=X(n);return We(()=>{r.current=t,i.current=n}),q(o=>{r.current&&r.current(o),e&&(function(s,a,l){for(const u of l){const c=new Event(u);Object.assign(c,a),s.dispatchEvent(c)}})(e,o,i.current)},[e])}function Ug(t){z(()=>{const e=window,n=t.current;if(e.cordova&&n){const r=i=>{i.target instanceof HTMLAnchorElement&&(i.preventDefault(),(function(o){const s=window;s.cordova.InAppBrowser?s.cordova.InAppBrowser.open(o,"_system"):window.open(o,"_system","location=yes")})(i.target.href))};return n.addEventListener("click",r),()=>n.removeEventListener("click",r)}},[t])}function Bg(){const[t,e]=ee(!0);return z(()=>{e(!1)},[]),t}const kR=_t(function(t,e){var k,b;const{onSendMessage:n,onDeleteMessage:r,onMessageAction:i,onFocusMessage:o,onBackButtonClick:s,onMissingBrowserPermission:a,messageFieldPlaceholder:l,messageFieldSpellcheck:u,__hostElement:c}=t;z(()=>{var L;(L=t.__internalOnLoaded)==null||L.call(t)},[]);const d=Bg(),h=X(c!=null?c:null);Ug(h);const p=St(r,c,["deleteMessage","delete-message","deletemessage","DeleteMessage"]),m=St(n,c,["sendMessage","send-message","sendmessage","SendMessage"]),_=St(i,c,["messageAction","message-action","messageaction","MessageAction"]),E=St(o,c,["focusMessage","focus-message","focusmessage","FocusMessage"]),g=St(s,c,["backButtonClick","back-button-click","backbuttonclick","BackButtonClick"]),A=St(a,c,["browserPermissionDenied","browser-permission-denied","browserpermissiondenied","BrowserPermissionDenied"]),{store:S,controller:v,browserPermissionController:D,uploadController:y,editorInternals:R,session:I}=(function(L,x,M,U,V,W,$){const oe=Z(()=>new lS(L.appId,L.userId),[]),{session:le,fetcher:ce}=Hg(oe,L);z(()=>{const Oe=ce.subscribeToChatboxData();return()=>Oe()},[ce]);const he=Z(()=>new x_(oe.state$.editor,oe.device$,oe.state$.userPermissions),[oe]),tt=Z(()=>new OR(oe,le,he,x,M,U,V,W),[le,oe,he,x,M,V,U,W]);he.controller=tt;const Vt=Z(()=>new wR({beforeBrowserPermissionPrompt:L.beforeBrowserPermissionPrompt,onMissingBrowserPermission:$}),[L.beforeBrowserPermissionPrompt,$]),nt=Z(()=>new NR(le,oe,tt,Vt),[le,oe,tt,Vt]);return We(()=>{let Oe=!0;const Te=L.conversationId||null;return oe.state$.loadingConversationId.set(Te),Te&&ce.subscribeConversation(Te),ce.subscribeTypingAndPresence(Te),js(()=>oe.canRenderUi(Te)).then(()=>{Oe&&wt(()=>{oe.state$.currentConversationId.set(Te),oe.state$.referencedMessageId.set(null),oe.chatSearchState$.set("hidden")})}),()=>{Oe=!1}},[oe,ce,L.conversationId]),{store:oe,controller:tt,browserPermissionController:Vt,uploadController:nt,editorInternals:he,session:le}})(t,m,p,_,E,g,A),O=q(async()=>{const L=R.state$;if(L.isEmpty.peek()||L.atTextLimit.peek())return;const x=R.getText(),M=S.state$.referencedMessageId.peek();M&&v.setReferencedMessage(null),R.clearText(),S.state$.editor.showEmojiPicker.set(!1),await v.sendMessage({text:x,referencedMessage:M!=null?M:void 0})},[v,R,S]);z(()=>{var x;const L=(x=t.enterSendsMessage)!=null?x:!0;S.state$.enterSendsMessage.set(L),R.onEnter=L?O:void 0},[R,t.enterSendsMessage,O,S]);const T=X(void 0);z(()=>{var x;const L=(x=S.focusedMessage$.peek())==null?void 0:x.id;t.focusedMessageId!==T.current&&L!==t.focusedMessageId&&(T.current=t.focusedMessageId,v.focusMessage(t.focusedMessageId||null,!1))},[S,v,t.focusedMessageId]),z(()=>{const L=t.__hostElement;if(L)return S.focusedMessage$.onChange(({value:x})=>{var M;L.focusedMessageId=(M=x==null?void 0:x.id)!=null?M:null})},[S,t.__hostElement]),z(()=>{R.spellcheck$.set(u)},[R,u]),z(()=>{R.placeholder$.set(l)},[R,l]),Sn(e,()=>({controller:v,editorInternals:R}));const C=q(({error:L})=>f(aa,{appId:t.appId,chatboxState:{type:"unexpected-error",error:L}}),[t.appId]),N=d?null:f(Vm,{fallbackRender:C,children:f(qm.Provider,{value:R,children:f(Jm.Provider,{value:S,children:f(Km.Provider,{value:t.theme,children:f(ZA.Provider,{value:D,children:f(Zm.Provider,{value:v,children:f(nS.Provider,{value:y,children:f(Bc.Provider,{value:I,children:f(eS.Provider,{value:{sendMessage:O},children:f(SR,{appId:t.appId,chatHeaderVisible:(k=t.chatHeaderVisible)!=null?k:!0,messageFieldVisible:(b=t.messageFieldVisible)!=null?b:!0})})})})})})})})})});return c?N:f("div",{className:"t-chatbox"+(t.className?` ${t.className}`:""),style:t.style,ref:h,children:N})});(function(t="Twemoji Country Flags",e="https://cdn.jsdelivr.net/npm/country-flag-emoji-polyfill@0.1/dist/TwemojiCountryFlags.woff2"){if(typeof window<"u"&&yd("😊")&&!yd("🇨🇭")){const n=document.createElement("style");return n.textContent=`@font-face {
1375
+ The {{app.name}} team`},smsSettings:{enabled:a.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:[]};return IR(l,s)})(n.configuration,n.features),i=JSON.parse(r.suppressContactInfo),o={...r,suppressContactInfo:new $_(i)};return{appMetadata:{...n.appMetadata,id:n.appMetadata.id},features:n.features,role:o}})(await this.backendRestClient.get("/app",{role_name:e}))}async checkIfAppExists(){return this.backendRestClient.get("/app").then(()=>!0).catch(e=>{if(e.message==="Could not find app.")return!1;throw e})}}class Br{constructor(e,n,r){this.realtimeWsApiUrl=e,this.internalHttpApiUrl=n,this.restApiHttpUrl=r}getBokensUrl(e,n,r){return this.internalHttpApiUrl+`/${e}/bokens/${encodeURIComponent(n)}?signature=${encodeURIComponent(r!=null?r:"")}`}getRealtimeWsUrl(e,n,r,i,o){const s=encodeURIComponent(n);return this.realtimeWsApiUrl+`/${e}/realtime/${s}?talkjs-client-build=${o!=null?o:"standalone"}&talkjs-core=${r}&talkjs-client-id=${i}`}static fromHost(e){var r;const n=new Br("wss://realtime.talkjs.com/v1","https://app.talkjs.com/api/v0","https://api.talkjs.com/v1");if(!e)return n;if(e==="@currentHost"){if(typeof location=="undefined")throw new Error("You can only use @currentHost in a browser.");e=((r=window.top)!=null?r:window).location.host}if(e.endsWith("talkjs.com")){const i=e.match(/^(?:\w+-)?([^.]+)\.talkjs\.com$/);if(i){const o=i[1];return["app","cdn","api","realtime"].includes(o)?n:new Br(`wss://realtime-${o}.talkjs.com/v1`,`https://app-${o}.talkjs.com/api/v0`,`https://api-${o}.talkjs.com/v1`)}return n}return e.includes("localhost")||e.includes("localtest.me")||/^\d+\.\d+\.\d+\.\d+(:\d+)?$/.test(e)?new Br(`ws://${e}/public_api/v1`,`http://${e}/api/v0`,`http://${e}/public_api/v1`):new Br(`wss://${e}/public_api/v1`,`https://${e}/api/v0`,`https://${e}/public_api/v1`)}}function Rf(t){return Object.values(t)}class CR{constructor(e,n,r){this.subscribedConversations={},this.store=e,this.session=n,this.restApi=r}subscribeToConversationListBaseData(){const e=[this.listenForErrors(),this.listenForAuth(),this.listenForUserAndApp(),this.listenForConversationSearch(),this.listenForMessageSearch()];return()=>e.forEach(n=>n())}subscribeToConversationList(e){var o;const{store:n,session:r}=this;re(n.type==="ConversationListStore"),(o=n.conversationListSubscription)==null||o.unsubscribe(),n.conversationListSubscription=null,n.conversationFilter$.set(e);const i=r.subscribeConversations({filter:e},s=>{wt(()=>{n.conversationsArray$.set(s);const a={};for(const l of s)a[l.id]=l;n.conversationsMap$.set(a)})});return n.conversationListSubscription=i,()=>{n.conversationListSubscription===i&&(i.unsubscribe(),n.conversationListSubscription=null)}}subscribeToChatboxData(){const e=[this.listenForErrors(),this.listenForAuth(),this.listenForUserAndApp(),()=>this.unsubscribeAllConversations()];return()=>e.forEach(n=>n())}listenForErrors(){const{store:e,session:n}=this;e.errors$.assign({unknownUser:!1,wrongAppId:!1,serverError:!1});const r=n.onError(o=>{Ce.error(o.message),e.errors$.serverError.set(!0)}),i=n.currentUser.subscribe(o=>{e.errors$.unknownUser.set(o===null)});return()=>{r.unsubscribe(),i.unsubscribe()}}listenForAuth(){const{store:e,session:n}=this;return mt(r=>{let i=!0;const o=e.hasTokenFetcher$.get();e.authTokenState$.peek()!=="loading"&&e.authTokenState$.set("loading"),n._authProvider.getToken().then(()=>{i&&e.authTokenState$.set("valid")});const s=n._authProvider.onTokenRefreshFailed(()=>{i&&e.authTokenState$.set(o?"invalid":"expired")});r.onCleanup=()=>{i=!1,s()}})}listenForUserAndApp(){const{store:e,session:n,restApi:r}=this;return mt(i=>{let o=!0,s=null;const a=n.currentUser.subscribe(async l=>{if(o&&l&&(e.currentUser$.set(l),l.role!==s)){s=l.role;const u=await r.getApp(l.role);if(!o)return;e.app$.set(u)}});i.onCleanup=()=>{o=!1,a.unsubscribe()}})}subscribeTypingAndPresence(e){var r;if((r=this.unsubscribeTypingAndPresence)==null||r.call(this),!e)return;const n=[this.listenForTyping(e),this.listenForPresence(e)];this.unsubscribeTypingAndPresence=()=>{n.forEach(i=>i()),this.unsubscribeTypingAndPresence=void 0}}subscribeConversation(e){if(this.subscribedConversations[e])return void(this.subscribedConversations[e].touchedAt=Date.now());const n=[this.listenForConversation(e),this.listenForMessages(e),this.listenForParticipants(e)];this.subscribedConversations[e]={unsubscribe:()=>{n.forEach(i=>i()),delete this.subscribedConversations[e]},touchedAt:Date.now()};const r=Rf(this.subscribedConversations);r.length>10&&(function(o,s){return o.reduce((a,l)=>l[s]<a[s]?l:a,o[0])})(r,"touchedAt").unsubscribe()}unsubscribeAllConversations(){var e;for(const n of Rf(this.subscribedConversations))n.unsubscribe();(e=this.unsubscribeTypingAndPresence)==null||e.call(this),this.subscribedConversations={}}listenForMessages(e){const{store:n,session:r}=this;re(n.type==="ChatboxStore");const i=r.conversation(e).subscribeMessages(async(o,s)=>{o&&(await n.readyForNewMessagesPromise,n.storeMessages(e,o,s))});return n.messageSubscriptions[e]=i,()=>i==null?void 0:i.unsubscribe()}listenForParticipants(e){const{store:n,session:r}=this;re(n.type==="ChatboxStore");const i=r.conversation(e).subscribeParticipants(o=>{o&&n.state$.participants.child(e).set(o)});return()=>i==null?void 0:i.unsubscribe()}listenForConversation(e){const{store:n,session:r}=this;re(n.type==="ChatboxStore");const i=r.conversation(e).subscribe(async o=>{wt(()=>{o?(n.state$.unknownConversations.child(e).delete(),n.state$.conversations.child(e).set(o)):(n.state$.conversations.child(e).delete(),n.state$.unknownConversations.child(e).set(!0))})});return()=>i==null?void 0:i.unsubscribe()}listenForTyping(e){const{store:n,session:r}=this;re(n.type==="ChatboxStore");const i=r.conversation(e).subscribeTyping(o=>{o&&n.storeTyping(e,o)});return()=>i==null?void 0:i.unsubscribe()}listenForPresence(e){const{store:n,session:r}=this;re(n.type==="ChatboxStore");const i=n.state$.participants.child(e),o=n.state$.isUserConnected.child(e),s=mt(a=>{var c;const l=((c=i.get())!=null?c:[]).map(({user:d})=>d.id),u=l.map(d=>r.user(d).subscribeOnline(h=>{var p;o.child(d).set((p=h==null?void 0:h.isConnected)!=null?p:!1)}));wt(()=>{var m;const d=new Set(l),h=(p=(m=o.peek())!=null?m:{},Object.keys(p));var p;for(const _ of h)d.has(_)||o.child(_).delete()}),a.onCleanup=()=>{u.forEach(d=>d.unsubscribe())}});return()=>{s==null||s(),n.state$.isUserConnected.child(e).delete(),o.delete()}}listenForConversationSearch(){const{store:e,session:n}=this;re(e.type==="ConversationListStore");const r=n.searchConversations((s,a)=>{e.globalSearchState$.assign({conversationResults:s,conversationStatus:a})});e.conversationSearch=r;const i=_p((s,a)=>{const l={conversation:a},u=s.trim();u.length?u.length>=3&&r.setQuery(u,l):r.setQuery("",l)},500),o=mt(()=>{i(e.globalSearchState$.query.get(),e.conversationFilter$.get())});return()=>{e.conversationSearch=null,o()}}listenForMessageSearch(){const{store:e,session:n}=this;re(e.type==="ConversationListStore");const r=n.searchMessages((s,a)=>{e.globalSearchState$.assign({messageResults:s,messageStatus:a})});e.messageSearch=r;const i=_p((s,a)=>{const l={conversation:a},u=s.trim();u.length?u.length>=3&&r.setQuery(u,l):r.setQuery("",l)},500),o=mt(()=>{i(e.globalSearchState$.query.get(),e.conversationFilter$.get())});return()=>{e.messageSearch=null,o()}}}function HA(t,e){const n=e.appId,r=e.userId,i=X(void 0),o=Z(()=>{const c=i.current,d=typeof c!=typeof e.tokenFetcher?e.tokenFetcher:c;return i.current=d,d},[e.tokenFetcher]);We(()=>{t.updateThemeCustom(e.themeCustom)},[t,e.themeCustom]);const s=Z(()=>xA(),[e.appId,e.userId,e.token,o]);z(()=>{t.hasTokenFetcher$.set(!!o)},[t,o]);const a=ng.getTalkSession({host:e.host,appId:n,userId:r,token:e.token,tokenFetcher:o}),l=Z(()=>{const c=Br.fromHost(e.host);return new yR(c,n,s,a._authProvider)},[n,s,a,e.host]),u=Z(()=>new CR(t,a,l),[t,a,l]);return{session:a,restApi:l,fetcher:u}}class NR{constructor(e,n,r,i){this.state={type:"idle"},this.latestTicketId=0,this.uploads$=se([]),this.onClose=null,this.startFileUpload=async o=>{const s=this.latestTicketId;let a;if(this.state={type:"uploading",ticketId:s,content:{kind:"file",uploads:[],fileTokens:[]}},a=o?Array.isArray(o)?o:[o]:await new Promise(c=>{const d=document.createElement("input");d.type="file",d.multiple=!0,d.addEventListener("change",()=>{c([...d.files])}),d.addEventListener("cancel",()=>{c([])}),d.click()}),!a[0])return void this.cancelUpload();if(a.sort((c,d)=>c.lastModified!==d.lastModified?c.lastModified-d.lastModified:c.name.localeCompare(d.name)),!this.isTicketValid(s))return;const l=await Promise.all(a.map(bR));if(!this.isTicketValid(s))return;this.state={type:"uploading",ticketId:s,content:{kind:"file",uploads:l,fileTokens:[]}},wt(()=>{this.uploads$.set(l);for(const c of l){const d=c.file.size+","+c.file.name;this.store.state$.localFileBlobUrls.child(this.store.state$.currentConversationId.peek()).child(d).set({url:c.temporaryBlobUrl,fetching:!1})}});const u=await Promise.all(l.map((c,d)=>(async function(h,p){switch(h.type){case"video":return p.uploadVideo(h.file,h.metadata);case"audio":return p.uploadAudio(h.file,h.metadata);case"image":return p.uploadImage(h.file,h.metadata);case"file":return p.uploadFile(h.file,h.metadata);case"voice":re.unreachable()}})(c,this.session).then(h=>(this.isTicketValid(s)&&this.uploads$.child(d).state.set("uploaded"),h)).catch(()=>(this.isTicketValid(s)&&this.uploads$.child(d).state.set("error"),null))));this.isTicketValid(s)&&(this.state={type:"waitingForConfirmation",ticketId:s,content:{kind:"file",uploads:l,fileTokens:u}})},this.startLocationUpload=async()=>{const o=this.latestTicketId;this.state={type:"uploading",ticketId:o,content:{kind:"location",upload:{type:"location",state:"uploading",location:null}}};const s=await this.browserPermissionController.runWithPermissionCheck("geolocation",async u=>{const{permissionResult:c,location:d}=await new Promise(h=>{navigator.geolocation.getCurrentPosition(p=>{const m={latitude:p.coords.latitude,longitude:p.coords.longitude};h({permissionResult:"granted",location:m})},p=>{p.code===GeolocationPositionError.PERMISSION_DENIED?h({permissionResult:"denied",location:null}):h({permissionResult:"granted",location:null})})});return u(c),{permissionResult:c,location:d}});if(!s||!this.isTicketValid(o))return;const{permissionResult:a,location:l}=s;this.state={type:"waitingForConfirmation",ticketId:o,content:{kind:"location",upload:{type:"location",state:a==="granted"&&l?"uploaded":"error",location:l}}}},this.confirmUpload=()=>{if(this.state.type==="waitingForConfirmation"&&this.isTicketValid(this.state.ticketId)){if(this.state.content.kind==="file"){const o=this.state.content.fileTokens.filter(s=>s!==null);this.state.content.fileTokens.length===o.length&&this.sendFileMessages(this.state.content.uploads,o)}else this.state.content.kind==="location"&&this.state.content.upload.location&&this.sendLocationMessage(this.state.content.upload.location);this.terminate()}},this.cancelUpload=()=>{this.terminate()},this.session=e,this.store=n,this.controller=r,this.browserPermissionController=i}isTicketValid(e){return e===this.latestTicketId}sendFileMessages(e,n){for(const[r,i]of(function(o,s){return re(o.length===s.length),o.map((a,l)=>[a,s[l]])})(n,e))this.controller.sendFileMessage({fileToken:r}),this.store.fileUploads[r]=i}sendLocationMessage(e){this.controller.sendLocationMessage({location:e})}terminate(){var n;const e=this.state.type==="idle";this.latestTicketId+=1,this.state={type:"idle"},this.uploads$.set([]),e||((n=this.onClose)==null||n.call(this))}}async function bR(t){const e=t.name;if((function(r){return/\.(mp4|ts|mov|webm|ogv)$/i.test(r)})(t.name)){const r=await _l("video",t,o=>({width:o.videoWidth,height:o.videoHeight,duration:o.duration,filename:e})),i=(function(o){switch(o.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:r,temporaryBlobUrl:URL.createObjectURL(new Blob([t],{type:i})),state:"uploading"}}const n=URL.createObjectURL(t);return(function(r){return/\.(mp3|m4a|ogg|oga|opus|flac|wav)$/i.test(r)})(t.name)?{type:"audio",file:t,metadata:await _l("audio",t,r=>({duration:r.duration,filename:e})),temporaryBlobUrl:n,state:"uploading"}:(function(r){return/(gif|png|jpg|jpeg|svg|bmp|webp)$/i.test(r)})(t.name)?{type:"image",file:t,metadata:await _l("img",t,r=>({width:r.naturalWidth,height:r.naturalHeight,filename:e})),temporaryBlobUrl:n,state:"uploading"}:{type:"file",file:t,metadata:{filename:e},temporaryBlobUrl:n,state:"uploading"}}async function _l(t,e,n){const r=document.createElement(t);try{return r.src=URL.createObjectURL(e),await new Promise((i,o)=>{const s=t==="img"?"load":"loadedmetadata";r.addEventListener(s,()=>{try{i(n(r))}catch(a){o(a)}},{once:!0})})}finally{URL.revokeObjectURL(r.src)}}class wR{constructor(e){this.init=e}async runWithPermissionCheck(e,n){const{beforeBrowserPermissionPrompt:r,onMissingBrowserPermission:i}=this.init;function o(c){c==="denied"&&i({type:e})}if(!r||!await(async function(c){if(!("permissions"in navigator))return!1;try{return(await navigator.permissions.query({name:c})).state==="prompt"}catch(d){return!1}})(e))return n(c=>{o(c)});const s=mc(),a=mc(),l={type:e,showPrompt:async()=>(a.resolve({cancelled:!1}),await s.promise),cancel:()=>{a.resolve({cancelled:!0})}};try{r(l)}catch(c){Ce.error("Your beforeBrowserPermissionPrompt callback threw an error: ",c),a.resolve({cancelled:!0})}const{cancelled:u}=await a.promise;return u?null:n(c=>{s.resolve(c),o(c)})}}function St(t,e,n){const r=X(t),i=X(n);return We(()=>{r.current=t,i.current=n}),q(o=>{r.current&&r.current(o),e&&(function(s,a,l){for(const u of l){const c=new Event(u);Object.assign(c,a),s.dispatchEvent(c)}})(e,o,i.current)},[e])}function UA(t){z(()=>{const e=window,n=t.current;if(e.cordova&&n){const r=i=>{i.target instanceof HTMLAnchorElement&&(i.preventDefault(),(function(o){const s=window;s.cordova.InAppBrowser?s.cordova.InAppBrowser.open(o,"_system"):window.open(o,"_system","location=yes")})(i.target.href))};return n.addEventListener("click",r),()=>n.removeEventListener("click",r)}},[t])}function BA(){const[t,e]=ee(!0);return z(()=>{e(!1)},[]),t}const LR=_t(function(t,e){var L,b;const{onSendMessage:n,onDeleteMessage:r,onMessageAction:i,onFocusMessage:o,onBackButtonClick:s,onMissingBrowserPermission:a,messageFieldPlaceholder:l,messageFieldSpellcheck:u,__hostElement:c}=t;z(()=>{var k;(k=t.__internalOnLoaded)==null||k.call(t)},[]);const d=BA(),h=X(c!=null?c:null);UA(h);const p=St(r,c,["deleteMessage","delete-message","deletemessage","DeleteMessage"]),m=St(n,c,["sendMessage","send-message","sendmessage","SendMessage"]),_=St(i,c,["messageAction","message-action","messageaction","MessageAction"]),E=St(o,c,["focusMessage","focus-message","focusmessage","FocusMessage"]),A=St(s,c,["backButtonClick","back-button-click","backbuttonclick","BackButtonClick"]),g=St(a,c,["browserPermissionDenied","browser-permission-denied","browserpermissiondenied","BrowserPermissionDenied"]),{store:S,controller:O,browserPermissionController:D,uploadController:I,editorInternals:R,session:y}=(function(k,x,M,U,V,W,$){const oe=Z(()=>new lS(k.appId,k.userId),[]),{session:le,fetcher:ce}=HA(oe,k);z(()=>{const ve=ce.subscribeToChatboxData();return()=>ve()},[ce]);const he=Z(()=>new x_(oe.state$.editor,oe.device$,oe.state$.userPermissions),[oe]),tt=Z(()=>new vR(oe,le,he,x,M,U,V,W),[le,oe,he,x,M,V,U,W]);he.controller=tt;const Vt=Z(()=>new wR({beforeBrowserPermissionPrompt:k.beforeBrowserPermissionPrompt,onMissingBrowserPermission:$}),[k.beforeBrowserPermissionPrompt,$]),nt=Z(()=>new NR(le,oe,tt,Vt),[le,oe,tt,Vt]);return We(()=>{let ve=!0;const Te=k.conversationId||null;return oe.state$.loadingConversationId.set(Te),Te&&ce.subscribeConversation(Te),ce.subscribeTypingAndPresence(Te),js(()=>oe.canRenderUi(Te)).then(()=>{ve&&wt(()=>{oe.state$.currentConversationId.set(Te),oe.state$.referencedMessageId.set(null),oe.chatSearchState$.set("hidden")})}),()=>{ve=!1}},[oe,ce,k.conversationId]),{store:oe,controller:tt,browserPermissionController:Vt,uploadController:nt,editorInternals:he,session:le}})(t,m,p,_,E,A,g),v=q(async()=>{const k=R.state$;if(k.isEmpty.peek()||k.atTextLimit.peek())return;const x=R.getText(),M=S.state$.referencedMessageId.peek();M&&O.setReferencedMessage(null),R.clearText(),S.state$.editor.showEmojiPicker.set(!1),await O.sendMessage({text:x,referencedMessage:M!=null?M:void 0})},[O,R,S]);z(()=>{var x;const k=(x=t.enterSendsMessage)!=null?x:!0;S.state$.enterSendsMessage.set(k),R.onEnter=k?v:void 0},[R,t.enterSendsMessage,v,S]);const T=X(void 0);z(()=>{var x;const k=(x=S.focusedMessage$.peek())==null?void 0:x.id;t.focusedMessageId!==T.current&&k!==t.focusedMessageId&&(T.current=t.focusedMessageId,O.focusMessage(t.focusedMessageId||null,!1))},[S,O,t.focusedMessageId]),z(()=>{const k=t.__hostElement;if(k)return S.focusedMessage$.onChange(({value:x})=>{var M;k.focusedMessageId=(M=x==null?void 0:x.id)!=null?M:null})},[S,t.__hostElement]),z(()=>{R.spellcheck$.set(u)},[R,u]),z(()=>{R.placeholder$.set(l)},[R,l]),Sn(e,()=>({controller:O,editorInternals:R}));const C=q(({error:k})=>f(aa,{appId:t.appId,chatboxState:{type:"unexpected-error",error:k}}),[t.appId]),N=d?null:f(Vm,{fallbackRender:C,children:f(qm.Provider,{value:R,children:f(Jm.Provider,{value:S,children:f(Km.Provider,{value:t.theme,children:f(Zg.Provider,{value:D,children:f(Zm.Provider,{value:O,children:f(nS.Provider,{value:I,children:f(Bc.Provider,{value:y,children:f(eS.Provider,{value:{sendMessage:v},children:f(SR,{appId:t.appId,chatHeaderVisible:(L=t.chatHeaderVisible)!=null?L:!0,messageFieldVisible:(b=t.messageFieldVisible)!=null?b:!0})})})})})})})})})});return c?N:f("div",{className:"t-chatbox"+(t.className?` ${t.className}`:""),style:t.style,ref:h,children:N})});(function(t="Twemoji Country Flags",e="https://cdn.jsdelivr.net/npm/country-flag-emoji-polyfill@0.1/dist/TwemojiCountryFlags.woff2"){if(typeof window<"u"&&Id("😊")&&!Id("🇨🇭")){const n=document.createElement("style");return n.textContent=`@font-face {
1376
1376
  font-family: "${t}";
1377
1377
  unicode-range: U+1F1E6-1F1FF, U+1F3F4, U+E0062-E0063, U+E0065, U+E0067,
1378
1378
  U+E006C, U+E006E, U+E0073-E0074, U+E0077, U+E007F;
1379
1379
  src: url('${e}') format('woff2');
1380
1380
  font-display: swap;
1381
- }`,document.head.appendChild(n),!0}})(),(function({observableFunctions:t,observableProperties:e,jsonReplacer:n,jsonReviver:r}){if(t)for(const i in t){const o=t[i];jA.set(i,o),Td.prototype[i]=function(...s){return o.call(this,this._node,...s)}}if(e)for(const i in e){const o=e[i];BA.set(i,o),Object.defineProperty(Td.prototype,i,{configurable:!0,get(){return o.get.call(this,this._node)},set(s){return o.set.call(this,this._node,s)}})}n&&(Dd.replacer=n),r&&(Dd.reviver=r)})({observableFunctions:{child:(t,e)=>zs.getProxy(t,e)}}),Ce.registerHandler(({level:t,data:e})=>{console[t]("[TalkJS]",...e)});const jg=_t(function(t,e){const n=X(null),r=Z(()=>new LR(n),[]);Sn(e,()=>r,[r]);const{theme:i,baseTheme:o,...s}=t,a=Z(()=>Hc(o,i,"Chatbox"),[o,i]),l=`chatbox|${t.userId}|${t.appId}`;return f(eE.Provider,{value:r,children:me(kR,{...s,key:l,theme:a,ref:n})})});var Xr,De,Ke,ns;class LR{constructor(e){Cr(this,De);Cr(this,Xr);Io(this,Xr,e)}deleteMessage(e){return _e(this,De,Ke).deleteMessage(e)}setEditing(e){_e(this,De,Ke).setEditing(e)}editMessage(e,n){return _e(this,De,Ke).editMessage(e,n)}sendMessage(e){return _e(this,De,Ke).sendMessage(e)}sendFileMessage(e){return _e(this,De,Ke).sendFileMessage(e)}sendLocationMessage(e){return _e(this,De,Ke).sendLocationMessage(e)}setReferencedMessage(e){_e(this,De,Ke).setReferencedMessage(e)}toggleReaction(e,n,r){return _e(this,De,Ke).toggleReaction(e,n,r)}getMessageFieldText(){return _e(this,De,ns).getText()}setMessageFieldText(e){_e(this,De,ns).setText(e)}focusMessageField(){_e(this,De,ns).focus()}toggleSearchBox(e){_e(this,De,Ke).toggleSearchBox(e)}async focusMessage(e){return _e(this,De,Ke).focusMessage(e)}setHighlightedStrings(e){_e(this,De,Ke).setHighlightedStrings(e)}setSearchQuery(e){_e(this,De,Ke).setSearchQuery(e)}async jumpToPreviousHighlight(){return _e(this,De,Ke).jumpToHighlight("up")}async jumpToNextHighlight(){return _e(this,De,Ke).jumpToHighlight("down")}clickBackButton(){_e(this,De,Ke).clickBackButton()}}Xr=new WeakMap,De=new WeakSet,Ke=function(){return _e(this,Xr).current.controller},ns=function(){return _e(this,Xr).current.editorInternals};function MR({conversation:t}){const e=ae(),n=Qe(),r=cu(),i=J(e.currentConversationId$),o=uu(i);return f(n.ConversationListItem,{common:r,conversation:t,participants:o,isSelected:i===t.id})}function PR(){const t=ae(),e=X(null);z(()=>{let r=!0;const i=e.current;return(async function(){var s;let o=0;for(;r&&t.conversationListSubscription&&i.scrollHeight===i.clientHeight&&o<2;)await((s=t.conversationListSubscription)==null?void 0:s.loadMore(20)),o+=1})(),()=>{r=!1}},[t]);const n=q(r=>{const i=r.currentTarget;i.scrollHeight-i.clientHeight-i.scrollTop<15&&t.conversationListSubscription&&t.conversationListSubscription.loadMore(20)},[t]);return f("div",{className:"t-conversation-list-scrollable",ref:e,"t-menu-boundary":"",onScroll:n,children:f($i,{each:t.conversationsArray$,children:r=>f(MR,{conversation:r.get()})})})}function xR(){const t=ae(),e=Qe(),n=cu(),r=J(t.globalSearchState$.query),i=q(s=>{t.setGlobalSearchQuery(s)},[t]),o=q(()=>{t.cancelGlobalSearch()},[t]);return f(e.GlobalSearchBox,{common:n,query:r,setQuery:i,cancel:o})}function FR({appId:t}){const e=ae(),n=(function(){const s=ae(),a=ct(()=>{const c=s.currentUser$.get(),d=s.app$.get(),h=s.errors$.get(),p=s.authTokenState$.get();return h.serverError?"server-error":h.wrongAppId?"wrong-app-id":p==="loading"||p==="idle"?"loading-token":p==="invalid"?"invalid-token":p==="expired"?"expired-token":p==="valid"?h.unknownUser?"unknown-user":c&&d?"loaded":"loading-data":void re.unreachable()}),l=ct({type:"loading"});Yi(c=>{const d=a.get(),h=s.extUserId$.peek(),p=s.appId$.peek();switch(d){case"invalid-token":l.set({type:"auth-failed"});break;case"expired-token":l.set({type:"expired-token"});break;case"wrong-app-id":l.set({type:"wrong-app-id",appId:p});break;case"server-error":l.set({type:"server-error"});break;case"loading-data":case"loading-token":l.set({type:"loading"});break;case"loaded":l.set({type:"loaded",currentUser:s.currentUser$.peek()});break;case"unknown-user":c.onCleanup=(function(m){l.set({type:"loading"});const _=setTimeout(()=>{l.set(m)},5e3);return()=>clearTimeout(_)})({type:"unknown-user",userId:h});break;default:re.never(d)}});const u=ct({type:"loading"});return Yi(c=>{if(l.type.get()==="loading"){u.set({type:"invisible-loading"});const d=setTimeout(()=>{u.set({type:"loading"})},1e3);c.onCleanup=()=>{clearTimeout(d)}}else u.set(l.get())}),J(u)})(),r=J(e.globalSearchEnabled$),i=J(e.globalSearchActive$),o=X(null);return n.type==="invisible-loading"?f(ie,{}):n.type==="loading"?f(bg,{}):n.type==="unknown-user"||n.type==="auth-failed"||n.type==="wrong-app-id"||n.type==="server-error"||n.type==="unexpected-error"?f(aa,{appId:t,chatboxState:n}):n.type==="expired-token"?f(wg,{}):n.type==="loaded"?f("div",{className:"t-conversation-list-content","t-menu-boundary":"root",ref:o,children:[r&&f(xR,{}),f(i?HR:PR,{}),f(Pg,{containerRef:o})]}):f(ie,{})}function HR(){const t=ae(),e=Qe(),n=cu(),r=J(t.t$),i=J(t.globalSearchState$.messageStatus),o=J(t.globalSearchState$.conversationStatus),s=J(t.globalSearchStatus$);return f("div",s==="searching"?{className:"t-global-search-results","t-status":"loading",children:r.SEARCH_SEARCHING}:s==="noResults"?{className:"t-global-search-results","t-status":"empty",children:r.SEARCH_NO_RESULTS}:{className:"t-global-search-results","t-status":"loaded",children:[f(Fd,{if:()=>t.globalSearchState$.conversationResults.get().length,children:()=>f(ie,{children:[f(e.GlobalSearchResultHeader,{common:n,type:"conversations",canLoadMore:o==="canLoadMore",loadMore:()=>t.conversationSearch.loadMore()}),f($i,{each:t.globalSearchState$.conversationResults,children:a=>f(e.GlobalSearchResultItem,{common:n,conversation:a.get(),isSelected:a.id.get()===t.globalSearchState$.selectedResultId.get()})})]})}),f(Fd,{if:()=>t.globalSearchState$.messageResults.get().length,children:()=>f(ie,{children:[f(e.GlobalSearchResultHeader,{common:n,type:"messages",canLoadMore:i==="canLoadMore",loadMore:()=>t.messageSearch.loadMore()}),f($i,{each:t.globalSearchState$.messageResults,children:a=>f(e.GlobalSearchResultItem,{common:n,conversation:a.conversation.get(),message:a.message.get(),isSelected:a.message.id.get()===t.globalSearchState$.selectedResultId.get()})})]})})]})}class UR extends sE{constructor(){super(...arguments),this.type="ConversationListStore",this.conversationListSubscription=null,this.conversationFilter$=se(void 0),this.currentConversationId$=se(null),this.conversationsArray$=se([]),this.conversationsMap$=se({}),this.globalSearchState$=se({query:"",selectedResultId:null,conversationResults:[],conversationStatus:"idle",messageResults:[],messageStatus:"idle"}),this.globalSearchStatus$=(function(e,n){const r=se(e);return mt(i=>{const o=r.peek();let s=!0;const a=n(o);(function(l){return!!l&&typeof l=="object"&&typeof l.then=="function"})(a)?a.then(l=>{s&&r.set(l)}):r.set(a),i.onCleanup=()=>{s=!1}}),r})("idle",()=>{const e=this.globalSearchState$.conversationStatus.get(),n=this.globalSearchState$.messageStatus.get(),r=this.globalSearchState$.conversationResults.get(),i=this.globalSearchState$.messageResults.get(),o=r.length>0||i.length>0;return e==="searching"||n==="searching"?o?(s=1e3,new Promise(a=>setTimeout(a,s))).then(()=>"searching"):"searching":o||e!=="loadedAll"||n!=="loadedAll"?"idle":"noResults";var s}),this.globalSearchEnabled$=se(()=>{var n;const e=this.app$.features.get();return(n=e==null?void 0:e.includes("search_conv_and_messages"))!=null?n:!1}),this.globalSearchActive$=se(()=>{const e=this.globalSearchEnabled$.get(),n=this.globalSearchState$.query.get().trim();return e&&n.length>=3}),this.highlightedStrings$=se(()=>{const e=this.globalSearchActive$.get(),n=this.globalSearchState$.query.get();return e?n.split(/\s+/).map(r=>r.trim()).filter(r=>r.length):[]})}setGlobalSearchQuery(e){this.globalSearchEnabled$.peek()?wt(()=>{this.globalSearchState$.query.set(e),this.globalSearchActive$.peek()||this.globalSearchState$.selectedResultId.set(null)}):Ce.error('The "Search messages & conversations" feature is only available to customers on Growth plan and above.')}cancelGlobalSearch(){this.globalSearchEnabled$.peek()?this.setGlobalSearchQuery(""):Ce.error('The "Search messages & conversations" feature is only available to customers on Growth plan and above.')}}class BR{constructor(e,n,r){this.session=e,this.store=n,this.onSelectConversation=r}async selectConversation(e,n){var s;if(e===this.store.currentConversationId$.peek()&&!n)return;wt(()=>{if(this.store.globalSearchActive$.peek()){const a=n!=null?n:e;this.store.globalSearchState$.selectedResultId.set(a)}this.store.currentConversationId$.set(e)});const r=e&&n&&await this.session.conversation(e).message(n).get(),i=e&&((s=this.store.conversationsMap$.child(e).peek())!=null?s:await this.session.conversation(e).get()),o={currentUser:this.store.currentUser$.peek(),conversation:i,...r&&{focusedMessage:r}};this.onSelectConversation(o)}jumpToHighlight(e){}}var yf,If,jR=(If||(If=1,yf=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){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;i--!==0;)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;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;i--!==0;){var s=o[i];if(!(s==="_owner"&&e.$$typeof||t(e[s],n[s])))return!1}return!0}return e!=e&&n!=n}),yf);const VR=Ys(jR);function zR(t,e){z(t,(function(n){const r=X(void 0);return VR(n,r.current)||(r.current=n),r.current})(e))}const $R=_t(function(t,e){const{__hostElement:n,onSelectConversation:r}=t;z(()=>{var m;(m=t.__internalOnLoaded)==null||m.call(t)},[]);const i=Bg(),o=X(n!=null?n:null);Ug(o);const s=St(r,n,["selectConversation","select-conversation","selectconversation","SelectConversation"]),a=Z(()=>new UR(t.appId,t.userId),[]);z(()=>{wt(()=>{a.extUserId$.set(t.userId),a.appId$.set(t.appId)})},[a,t.appId,t.userId]);const{session:l,fetcher:u}=Hg(a,t);z(()=>{const m=u.subscribeToConversationListBaseData();return()=>m()},[u]),zR(()=>{const m=u.subscribeToConversationList(t.conversationFilter);return()=>m()},[u,t.conversationFilter]);const c=Z(()=>new BR(l,a,s),[l,a,s]),d=X(void 0);z(()=>{t.selectedConversationId!==d.current&&(d.current=t.selectedConversationId,a.currentConversationId$.set(t.selectedConversationId||null))},[a,t.selectedConversationId]),z(()=>{const m=t.__hostElement;if(m)return a.currentConversationId$.onChange(({value:_})=>{m.selectedConversationId=_})},[a,t.__hostElement]),Sn(e,()=>({controller:c}));const h=q(({error:m})=>f(aa,{appId:t.appId,chatboxState:{type:"unexpected-error",error:m}}),[t.appId]),p=i?null:f(Vm,{fallbackRender:h,children:f(Jm.Provider,{value:a,children:f(Km.Provider,{value:t.theme,children:f(Zm.Provider,{value:c,children:f(Bc.Provider,{value:l,children:f(FR,{appId:t.appId})})})})})});return n?p:f("div",{className:"t-conversation-list"+(t.className?` ${t.className}`:""),style:t.style,ref:o,children:p})});var so,Ms,Vg;class YR{constructor(e){Cr(this,Ms);Cr(this,so);Io(this,so,e)}selectConversation(e,n){return _e(this,Ms,Vg).selectConversation(e,n)}}so=new WeakMap,Ms=new WeakSet,Vg=function(){return _e(this,so).current.controller};const zg=_t(function(t,e){const n=X(null),r=Z(()=>new YR(n),[]);Sn(e,()=>r,[r]);const{theme:i,baseTheme:o,...s}=t,a=Z(()=>Hc(o,i,"ConversationList"),[o,i]),l=`conversation-list|${t.userId}|${t.appId}`;return f(eE.Provider,{value:r,children:me($R,{...s,key:l,theme:a,ref:n})})});function GR(t){const{selectedConversationId:e,focusedMessageId:n,chatboxProps:r,conversationListProps:i,style:o,__hostElement:s}=t,{onDeleteMessage:a,onSendMessage:l,onMessageAction:u,onFocusMessage:c,onMissingBrowserPermission:d,...h}=r,{onSelectConversation:p,...m}=i,[_,E]=ee(e||null),[g,A]=ee(t.focusedMessageId||null);z(()=>{E(e||null)},[e]),z(()=>{A(t.focusedMessageId||null)},[t.focusedMessageId]);const S=St(a,s,["deleteMessage","delete-message","deletemessage","DeleteMessage"]),v=St(l,s,["sendMessage","send-message","sendmessage","SendMessage"]),D=St(u,s,["messageAction","message-action","messageaction","MessageAction"]),y=St(c,s,["focusMessage","focus-message","focusmessage","FocusMessage"]),R=St(d,s,["browserPermissionDenied","browser-permission-denied","browserpermissiondenied","BrowserPermissionDenied"]),I=St(p,s,["selectConversation","select-conversation","selectconversation","SelectConversation"]),O=q(M=>{var U,V;E((V=(U=M.conversation)==null?void 0:U.id)!=null?V:null),I(M)},[I]),T=q(M=>{var U,V;A((V=(U=M.message)==null?void 0:U.id)!=null?V:null),y(M)},[y]);z(()=>{var M;(M=t.__internalOnLoaded)==null||M.call(t)},[]);const C=X(s!=null?s:null),[N,k]=ee(void 0);We(()=>{var V;const M=(V=t.mobileBreakPoint)!=null?V:700,U=new ResizeObserver(W=>{const $=W[0].contentRect.width;k($>=M)});return U.observe(C.current),()=>U.disconnect()},[t.mobileBreakPoint]);const b=q(M=>{E(null),I({conversation:null,currentUser:M.currentUser})},[I]),L=_?"chatbox":"conversation-list";z(()=>{s&&(N?s.removeAttribute("t-mobile-inbox"):s.setAttribute("t-mobile-inbox",L))},[N,s,L]);const x=N===void 0?null:f(ie,{children:[f(zg,{...m,onSelectConversation:O,selectedConversationId:_!=null?_:void 0}),f(jg,{...h,onDeleteMessage:S,onSendMessage:v,onMessageAction:D,onFocusMessage:T,onMissingBrowserPermission:R,onBackButtonClick:b,conversationId:_,focusedMessageId:g!=null?g:void 0})]});if(s)return x;{const M="t-inbox"+(t.className?` ${t.className}`:"");return f("div",{ref:C,style:o,className:M,"t-mobile-inbox":N?void 0:L,children:x})}}var ao;class WR{constructor(e){Cr(this,ao);Io(this,ao,e)}get chatbox(){return _e(this,ao).current}}ao=new WeakMap;const XR=_t(function(t,e){const n=X(null),r=X(null),i=Z(()=>new WR(n),[]);Sn(e,()=>i,[i]);const{theme:o,baseTheme:s,appId:a,userId:l,__hostElement:u,__internalOnLoaded:c,beforeBrowserPermissionPrompt:d,chatHeaderVisible:h,className:p,style:m,enterSendsMessage:_,messageFieldVisible:E,messageFieldSpellcheck:g,messageFieldPlaceholder:A,onDeleteMessage:S,onSendMessage:v,onMessageAction:D,onFocusMessage:y,onMissingBrowserPermission:R,onSelectConversation:I,themeCustom:O,host:T,focusedMessageId:C,selectedConversationId:N,conversationFilter:k,mobileBreakPoint:b}=t,L=Z(()=>Hc(s,o,"Inbox"),[s,o]);return f(GR,{style:m,className:p,selectedConversationId:N,focusedMessageId:C,chatboxProps:{appId:a,userId:l,theme:L,host:T,focusedMessageId:C,enterSendsMessage:_,chatHeaderVisible:h,messageFieldVisible:E,messageFieldSpellcheck:g,messageFieldPlaceholder:A,beforeBrowserPermissionPrompt:d,onDeleteMessage:S,onSendMessage:v,onMessageAction:D,onFocusMessage:y,onMissingBrowserPermission:R,themeCustom:O,ref:n},conversationListProps:{appId:a,userId:l,theme:L,host:T,onSelectConversation:I,conversationFilter:k,themeCustom:O,ref:r},mobileBreakPoint:b,__hostElement:u,__internalOnLoaded:c},`inbox|${t.userId}|${t.appId}`)});function KR(t){const{common:e}=t;return e.conversation.subject?f(ie,{children:[f("div",{className:"t-title",children:e.conversation.subject}),f("div",{className:"t-subtitle",children:f(Cf,{...t})})]}):f("div",{className:"t-title",children:f(Cf,{...t})})}function Cf(t){const{common:e,isUserConnected:n,permissions:r}=t,i=Ft(e.conversation.id,10),o=i.filter(({user:a})=>a.id!==e.currentUser.id),s=o.length===0?i:o;return r.showOnlineStatus?f("span",{className:"t-participants",children:s.map(({user:a})=>f("span",{className:"t-participant",children:[f("span",{children:a.name}),f("span",{className:"t-online-indicator","t-status":n[a.id]?"online":"offline"})]},a.id))}):f("span",{className:"t-participants",children:s.map(({user:a})=>a.name).join(", ")})}function qR(t){const{summary:e,message:n,common:r,permissions:i}=t,{t:o,chatbox:s,conversationId:a}=r,{emoji:l,count:u,currentUserReacted:c}=e,[d,h]=Iu(a,n.id,e.emoji),p=d.map(m=>m.user.name);return d.length&&d.length<e.count&&p.push("..."),f("button",{className:"t-reaction-button","t-active":c?"true":void 0,onClick:()=>s.toggleReaction(n.id,l),disabled:!i.canAddReaction,"aria-label":o.ARIA_REACTION_COUNT(u,l),"aria-pressed":c,onMouseOver:h,onTouchStart:h,"t-tooltip-text":p.join(", "),children:[f("span",{className:"t-emoji",children:l}),f("span",{className:"t-num-reactions",children:u})]})}function JR({messageStatus:t}){return t==="virtual"?null:t==="sending"?f("span",{className:"t-status-icon",children:f(B,{type:"spinner",className:"t-message-loading-spinner"})}):t==="sent"?f("span",{className:"t-status-icon",children:"✓"}):t==="everyoneRead"?f("span",{className:"t-status-icon",children:"✓✓"}):null}function ZR(t){if(t.many)return"Several people are typing";const{users:e}=t;return e.length===1?`${e[0].name} is typing`:e.length===2?`${e[0].name} and ${e[1].name} are typing`:`${e[0].name}, ${e[1].name}, and ${e.length-2} others are typing`}function QR({message:t,common:e}){var i;const n=t.content[0],{t:r}=e;if(n.type==="text")return f(Ao,{block:n,message:t,nonInteractive:!0});if(n.type==="location")return f(ie,{children:[f(B,{type:"location"})," ",r.LOCATION]});if(n.type==="file"){if(n.subtype==="image")return f(ie,{children:[f(B,{type:"image"})," ",n.filename]});if(n.subtype==="video")return f(ie,{children:[f(B,{type:"movie"})," ",n.filename]});if(n.subtype==="audio")return f(ie,{children:[f(B,{type:"attachment"})," ",n.filename]});if(n.subtype==="voice")return f(ie,{children:[f(B,{type:"microphone"})," ",r.VOICE_MESSAGE," (",di((i=n.duration)!=null?i:0),")"]});if(n.subtype===void 0)return f(ie,{children:[f(B,{type:"attachment"})," ",n.filename]})}return null}function ey({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=Ru(t,n);return f("span",{className:"t-theme-time-ago",children:f("span",{role:"time",title:r,"aria-description":i.long,children:i.short})})}function ty({conversation:t}){const{isUnread:e,unreadMessageCount:n}=t;return e?f("div",n===0?{className:"t-unread-generic-dot"}:n>999?{className:"t-unread-dot",children:f("span",{children:"999+"})}:{className:"t-unread-dot",children:f("span",{children:n})}):null}const $g=Object.freeze(Object.defineProperty({__proto__:null,AfterMessages:function({common:t}){const{typing:e,theme:n}=t,{Avatar:r}=n;if(!e.many&&e.users.length===0)return null;const i=e.many?f("div",{className:"t-theme-avatar",children:"5+"}):e.users.slice(0,2).map(o=>f(r,{photoUrl:Ct(o),common:t},o.id));return f("div",{className:"t-theme-after-messages","t-many":String(e.many),"aria-label":ZR(e),children:[f("div",{className:"t-typing-avatars","aria-hidden":"true",children:[i,!e.many&&e.users.length>2&&f("div",{className:"t-theme-avatar",children:["+",e.users.length-2]})]}),f("div",{className:"t-typing-bubble",children:f("div",{className:"t-typing-animation",children:[f("span",{}),f("span",{}),f("span",{})]})})]})},AudioBlock:function({block:t,downloadUrl:e}){return f("div",{className:"t-theme-audio-block",children:[f(Un,{src:t.url,filename:t.filename}),f("a",{className:"t-body-text",href:e,target:"_blank",rel:"noreferrer",children:[f(B,{type:"attachment",className:"t-attachment-icon"}),f(At,{text:t.filename}),f("span",{className:"t-filesize",children:[" (",fn(t.size),")"]})]})]})},Avatar:function({photoUrl:t}){return f("div",{className:"t-theme-avatar",style:{backgroundImage:`url(${t})`}})},BeforeMessages:function({common:t}){const e=t.conversation.welcomeMessages;if(e.length===0)return null;const n=e.map((r,i)=>f(Du,{text:r},i));return f("div",{className:"t-message-group",children:n.reverse()})},ChatHeader:function(t){const{conversation:e,theme:n,t:r,chatbox:i,chatSearchState:o}=t.common,{ConversationImage:s,ChatSearchBox:a}=n,l=Ft(e.id,10);return t.permissions.canSearch&&o!=="hidden"?f("div",{className:"t-theme-chat-header",children:f(a,{common:t.common,searchQuery:t.searchQuery})}):f("div",{className:"t-theme-chat-header",children:f("div",{className:"t-inner",children:[f("div",{className:"t-content",children:[f("button",{className:"t-back-button","aria-label":r.INBOX,title:r.INBOX,onClick:()=>i.clickBackButton(),children:f(B,{type:"chevronLeft"})}),f("div",{className:"t-image",children:f(s,{conversation:e,participants:l,common:t.common})}),f("div",{className:"t-info",children:f(KR,{...t})})]}),f("div",{className:"t-actions",children:f("button",{className:"t-action-button","aria-label":r.ARIA_SEARCH_INSIDE_CONVERSATION,title:r.ARIA_SEARCH_INSIDE_CONVERSATION,onClick:()=>i.toggleSearchBox(),children:f(B,{type:"search",size:"20px"})})})]})})},ChatSearchBox:function(t){const{t:e,chatbox:n,chatSearchState:r}=t.common;let i;return r==="searching"?i=e.SEARCH_SEARCHING:r==="noResults"?i=e.SEARCH_NO_RESULTS:r==="noMoreResults"&&(i=e.SEARCH_NO_MORE_RESULTS),f("div",{className:"t-theme-chat-search-box",children:[f("button",{className:"t-button t-back-button","aria-label":e.ARIA_LEAVE_SEARCH_MODE,onClick:()=>n.toggleSearchBox(),children:f(B,{type:"arrowLeft",size:"20px"})}),f("div",{className:"t-search-field",children:[f("label",{htmlFor:"t-search-input","t-label-text":i?"on":"off",children:i}),f(ro,{id:"t-search-input",autoFocus:!0,className:"t-search-input",placeholder:e.SEARCH_PLACEHOLDER_TEXT})]}),f("button",{className:"t-button t-previous-button","aria-label":e.ARIA_SEARCH_UP,disabled:r==="searching",onClick:()=>n.jumpToPreviousHighlight(),children:f(B,{type:"chevronUp",size:"20px"})}),f("button",{className:"t-button t-next-button","aria-label":e.ARIA_SEARCH_DOWN,disabled:r==="searching",onClick:()=>n.jumpToNextHighlight(),children:f(B,{type:"chevronDown",size:"20px"})})]})},CompactMessageContent:function(t){return f("span",{className:"t-theme-compact-message-content",children:f(QR,{...t})})},ConversationImage:function(t){const{common:e,conversation:n,participants:r}=t,{currentUser:i,theme:o}=e,{Avatar:s,GroupChatImage:a}=o;return n.photoUrl?f(s,{photoUrl:n.photoUrl,common:e}):r.length===0?null:r.length===1?f(s,{photoUrl:Ct(i),common:e}):r.length===2?f(s,{photoUrl:Ct(r[0].user.id===i.id?r[1].user:r[0].user),common:e}):f(a,{conversation:n,participants:r,common:e})},ConversationListItem:function(t){var A,S,v;const{common:e,conversation:n,isSelected:r}=t,{currentUser:i,theme:o,conversationList:s}=e,{TimeAgo:a,ConversationImage:l,CompactMessageContent:u}=o,{lastMessage:c}=n,d=Ft(n.id,10),h=d.length>=3,p=(A=c==null?void 0:c.sender)==null?void 0:A.name,m=(S=c==null?void 0:c.editedAt)!=null?S:c==null?void 0:c.createdAt,_=d.filter(D=>D.user.id!==i.id),E=_.length?_:d,g=(v=n.subject)!=null?v:E.map(D=>D.user.name).join(", ");return f("div",{className:"t-theme-conversation-list-item","t-unread":n.unreadMessageCount?"":void 0,"t-selected":r?"":void 0,onClick:()=>s.selectConversation(n.id),children:[f(l,{conversation:n,participants:d,common:e}),f("div",{className:"t-inner",children:[f("div",{className:"t-header",children:[f("div",{className:"t-conversation-name",children:g}),m&&f("span",{className:"t-timestamp",children:f(a,{timestamp:m,common:e})})]}),f("div",{className:"t-body",children:[c&&f("div",{className:"t-message",children:[h&&p&&f("span",{className:"t-message-sender",children:[p,":"]}),f(u,{message:c,common:e})]}),f(ty,{...t})]})]})]})},FileBlock:function({block:t,downloadUrl:e}){return f("div",{className:"t-theme-file-block",children:f("a",{className:"t-body-text",href:e,target:"_blank",rel:"noreferrer",children:[f(B,{type:"attachment",className:"t-attachment-icon"}),f(At,{className:"t-filename",text:t.filename}),f("span",{className:"t-filesize",children:[" (",fn(t.size),")"]})]})})},GlobalSearchBox:function(t){const{common:e,query:n,cancel:r}=t,{t:i}=e;return f("div",{className:"t-theme-global-search-box",children:[f(ro,{className:"t-input",placeholder:i.SEARCH_PLACEHOLDER_TEXT}),n.length>0&&f("button",{type:"button",onClick:r,"aria-label":i.ARIA_LEAVE_SEARCH_MODE,className:"t-clear",children:f(B,{type:"close",size:"20px"})}),n.length===0&&f(B,{className:"t-submit",type:"search",size:"20px"})]})},GlobalSearchResultHeader:function(t){const{common:e,canLoadMore:n,loadMore:r,type:i}=t,{t:o}=e;return f("div",{className:"t-theme-global-search-result-header",children:[f("span",{className:"t-title",children:i==="messages"?o.SEARCH_RESULTS_MESSAGES:o.SEARCH_RESULTS_CONVERSATIONS}),n&&f("button",{className:"t-show-more",onClick:r,children:o.SEARCH_RESULTS_SHOW_MORE})]})},GlobalSearchResultItem:function(t){var A,S,v;const{common:e,conversation:n,message:r,isSelected:i}=t,{currentUser:o,theme:s,conversationList:a}=e,{TimeAgo:l,ConversationImage:u,CompactMessageContent:c}=s,d=Ft(n.id,10),h=d.length>=3,p=(A=r==null?void 0:r.sender)==null?void 0:A.name,m=(S=r==null?void 0:r.editedAt)!=null?S:r==null?void 0:r.createdAt,_=d.filter(D=>D.user.id!==o.id),E=_.length?_:d,g=(v=n.subject)!=null?v:E.map(D=>D.user.name).join(", ");return f("div",{className:"t-theme-global-search-result-item","t-selected":i?"":void 0,onClick:()=>{a.selectConversation(n.id,r==null?void 0:r.id)},children:[f(u,{conversation:n,participants:d,common:e}),f("div",{className:"t-inner",children:[f("div",{className:"t-header",children:[f("div",{className:"t-conversation-name",children:f(At,{text:g})}),m&&f("span",{className:"t-timestamp",children:f(l,{timestamp:m,common:e})})]}),f("div",{className:"t-body",children:r&&f("div",{className:"t-message",children:[h&&p&&f("span",{className:"t-message-sender",children:[f(At,{text:p}),":"]}),f(c,{message:r,common:e})]})})]})]})},GroupChatImage:function({participants:t}){return f("div",{className:"t-theme-group-chat-image",children:[f("div",{className:"t-mini-avatar",style:{backgroundImage:`url("${Ct(t[0].user)}")`}}),f("div",{className:"t-mini-avatar",style:{backgroundImage:`url("${Ct(t[1].user)}")`}}),t.length>2&&f("svg",{className:"t-counter",viewBox:"0 0 22 22",xmlns:"http://www.w3.org/2000/svg",children:[f("g",{className:"t-group",children:f("rect",{x:"0",y:"0",width:22,height:22,fill:"currentColor"})}),f("text",{textAnchor:"middle",x:11,y:Math.round(.666*22),width:22,height:22,fontSize:t.length>9?10:12,fill:"currentColor",children:t.length>9?"9+":t.length})]})]})},ImageBlock:function({block:t,downloadUrl:e}){const n={"--img-w":t.width||1,"--img-h":t.height||1};return f("div",{className:"t-theme-image-block",children:[f("a",{href:t.url,className:"t-image-wrapper",target:"_blank",rel:"noopener noreferrer",children:f("div",{className:"t-root",style:n,children:f("img",{src:t.url,className:"t-image"})})}),f("a",{href:e,className:"t-body-text",target:"_blank",rel:"noreferrer",children:[f(B,{className:"download-icon",type:"download"}),f(At,{text:t.filename}),f("span",{className:"t-filesize",children:[" (",fn(t.size),")"]})]})]})},LocationBlock:function({block:t}){const{imageUrl:e,linkUrl:n}=sa(t);return f("div",{className:"t-theme-location-block",children:[f("a",{href:n,target:"_blank",rel:"noreferrer",className:"t-root",style:{background:`${`url(${JSON.stringify(e)})`} center center / cover no-repeat`}}),f("span",{className:"t-body-text",children:f("a",{href:n,target:"_blank",rel:"noopener noreferrer",children:n})})]})},Message:function(t){const{message:e,messageStatus:n,permissions:r,common:i}=t,{currentUser:o,theme:s,conversation:a,conversationId:l,t:u,focusedMessage:c}=i,{Avatar:d,ReferencedMessage:h,TimeAgo:p,MessageActionMenu:m}=s,_=Ft(l,3).length>=3,E=e.sender,g=(E==null?void 0:E.id)!==o.id&&_,A=e.referencedMessage,S=r.canReplyToMessage||r.canDeleteMessage,v=r.canAddReaction&&a.access==="ReadWrite";let D;D=E?E.id===o.id?"currentUser":"other":"system";const y=e.id===(c==null?void 0:c.id);return f("div",{className:"t-theme-message","t-sender":D,"t-message-id":e.id,"t-status":n,"t-focused":y?"":void 0,children:[f("div",{className:"t-message-row",children:[E&&f(d,{photoUrl:Ct(E),common:i}),f("div",{className:"t-message-body",children:[E&&g&&f("div",{className:"t-message-sender-name",style:{color:Tu(E.id)},children:E.name}),A&&f(h,{referencedMessage:A,common:i}),f(hu,{common:i,message:e,messageStatus:n}),f("div",{className:"t-message-status",children:[f(p,{timestamp:e.createdAt,common:i}),D=="currentUser"&&f(JR,{...t})]})]}),(S||v)&&f("div",{className:"t-message-buttons",children:[S&&f(oi,{type:"menu",popoverComponent:m,popoverProps:{message:e,permissions:r,common:i},className:"t-message-action-menu-button","aria-label":u.ARIA_MORE_ACTIONS,children:f(B,{className:"t-action-menu-icon",type:"horizontalDots"})}),v&&f(oi,{className:"t-add-reaction-button",popoverComponent:mu,popoverProps:{messageId:e.id,colorScheme:"light"},"aria-label":u.ADD_REACTION,children:f(B,{type:"addEmoji"})})]})]}),e.reactions.length>0&&f("div",{className:"t-emoji-reactions",children:e.reactions.map(R=>f(qR,{summary:R,message:e,common:i,permissions:r},R.emoji))})]})},MessageActionMenu:function(t){const{message:e,permissions:n,common:r}=t,{chatbox:i,t:o}=r;return f("div",{className:"t-theme-message-action-menu",children:[n.canReplyToMessage&&f(Hn,{className:"t-menu-item",onSelect:()=>i.setReferencedMessage(e.id),children:o.REPLY_TO_MESSAGE}),n.canEditMessage&&f(Hn,{className:"t-menu-item",onSelect:()=>i.setEditing(e.id),children:o.EDIT_MESSAGE}),n.canDeleteMessage&&f(Hn,{className:"t-menu-item t-danger",onSelect:()=>i.deleteMessage(e.id),children:o.DELETE_MESSAGE})]})},MessageDivider:function(t){const{timestamp:e,isReadMarker:n,isDayMarker:r,common:i}=t,{t:o}=i;return f("div",{className:"t-message-divider",children:[f("div",{className:"t-line","t-side":"left",children:f("div",{className:"t-line-segment"})}),r&&f("span",{className:"t-day-marker",children:yu(e,o)}),f("div",{className:"t-line","t-side":"right",children:[f("div",{className:"t-line-segment"}),n&&f("span",{className:"t-unread-marker",children:o.MESSAGELIST_NEW_MARKER})]})]})},MessageField:function(t){const{common:e,referencedMessage:n,editor:r,voiceRecorder:i,permissions:o,editMessageId:s}=t,{chatbox:a,device:l,conversation:u,t:c,theme:d}=e,{ReplyBar:h,VoiceRecorder:p,RecordingPreview:m}=d,_=s?"edit":"send",E=!r.atTextLimit&&!r.isEmpty&&u.access==="ReadWrite",g=_==="send"&&r.isEmpty&&o.canShareLocation,A=_==="send"&&r.isEmpty&&o.canShareFile,S=_==="send"&&l.supportsEmojiPicker&&!l.isMobile,v=_==="send"&&r.isEmpty&&o.canSendVoiceMessage,D=!i&&u.access==="ReadWrite";return f("div",{className:"t-theme-message-field","t-mode":_,children:[r.showEmojiPicker&&f("div",{className:"t-emoji-picker-wrapper",children:f(ta,{colorScheme:"light"})}),f(Eu,{}),f(vu,{}),n&&f(h,{common:e,referencedMessage:n}),f("div",{className:"t-wrapper",children:[r.atTextLimit&&f("div",{className:"t-text-limit-indicator",children:c.ENTRYBOX_TEXT_LIMIT}),f("div",{className:"t-text-form",children:[u.access==="Read"&&f("div",{className:"t-readonly",children:c.ENTRYBOX_PLACEHOLDER_CHAT_READONLY}),(i==null?void 0:i.state)==="recording"&&f(p,{common:e,voiceRecorder:i}),(i==null?void 0:i.state)==="previewing"&&f(m,{common:e,voiceRecorder:i}),D&&f("div",{className:"t-textbox-column",children:[f(lu,{placeholder:c.ENTRYBOX_PLACEHOLDER}),f("div",{className:"t-button-overlay",children:[g&&f("button",{className:"t-location-button","t-kind":"icon-button","aria-label":c.UPLOAD_SHARE_LOCATION,title:c.UPLOAD_SHARE_LOCATION,onClick:()=>r.shareLocation(),children:f(B,{type:"location",size:"20px"})}),A&&f("button",{className:"t-attachment-button","t-kind":"icon-button","aria-label":c.UPLOAD_SEND_FILE,title:c.UPLOAD_SEND_FILE,onClick:()=>r.attachFile(),children:f(B,{type:"attachment"})}),S&&f("button",{className:"t-emoji-button","t-kind":"icon-button","aria-label":c.ARIA_INSERT_EMOJI,title:c.ARIA_INSERT_EMOJI,onClick:()=>r.toggleEmojiPicker(),children:f(B,{type:r.showEmojiPicker?"close":"emoji",size:r.showEmojiPicker?"24px":"20px"})})]})]}),_==="send"&&D&&f("div",{className:"t-send-column",children:[v&&f("button",{className:"t-record-button","t-kind":"icon-button","aria-label":c.VOICE_MESSAGE,title:c.VOICE_MESSAGE,onClick:()=>r.recordVoiceMessage(),children:f(B,{type:"microphone",size:"20px"})}),!v&&f("button",{className:"t-send-button","t-kind":"icon-button","aria-label":c.SEND_BUTTON_TEXT,title:c.SEND_BUTTON_TEXT,onClick:()=>r.send(),disabled:!E,children:f(B,{type:"arrowUp",size:"20px"})})]}),_==="edit"&&f("div",{className:"t-edit-row",children:[f("button",{"t-action":"cancel",onClick:()=>a.setEditing(null),children:c.CANCEL}),f("button",{"t-action":"save",onClick:()=>r.send(),disabled:!E,children:c.SAVE})]})]})]})]})},MessageListFooter:function(t){return null},MessageListHeader:function(t){return null},NoConversationSelected:function({common:t}){return f("div",{className:"t-theme-no-conversation-selected",children:t.t.SELECT_CONVERSATION})},RecordingPreview:function(t){const{common:e,voiceRecorder:n}=t,{t:r}=e;return f("div",{className:"t-theme-recording-preview",children:[f("button",{className:"t-close-button","t-kind":"icon-button","aria-label":r.ARIA_CANCEL_UPLOAD,title:r.ARIA_CANCEL_UPLOAD,onClick:()=>n.cancel(),children:f(B,{type:"close",size:"24px"})}),f("div",{className:"t-textbox-column",children:f(Un,{src:n.recordingUrl})}),n.uploadState==="pending"&&f("div",{className:"t-send-column",children:f("div",{className:"t-loading",children:f(B,{type:"spinner",className:"t-spinner"})})}),n.uploadState==="done"&&f("div",{className:"t-send-column",children:f("button",{className:"t-send-button","t-kind":"icon-button","aria-label":r.SEND_BUTTON_TEXT,title:r.SEND_BUTTON_TEXT,onClick:()=>n.send(),children:f(B,{type:"arrowUp",size:"20px"})})})]})},ReferencedMessage:function(t){const{referencedMessage:e,common:n}=t,{theme:r,chatbox:i}=n,{CompactMessageContent:o}=r;return f("div",{className:"t-theme-referenced-message",onClick:()=>i.focusMessage(e.id),children:[f("div",{className:"t-sender-name",children:e.sender.name}),f("div",{className:"t-content",children:f(o,{message:e,common:n})})]})},ReplyBar:function(t){const{common:e,referencedMessage:n}=t,{chatbox:r,t:i,theme:o}=e,{CompactMessageContent:s}=o;return f("div",{className:"t-theme-reply-bar",children:[f(B,{className:"t-reply-icon",type:"reply"}),f("div",{className:"t-body",onClick:()=>r.focusMessage(n.id),children:[f("div",{className:"t-sender-name",children:n.sender.name}),f("div",{className:"t-content",children:f(s,{message:n,common:e})})]}),f("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:f(B,{className:"t-close-icon",type:"close"})})]})},TextBlock:function({block:t,message:e}){return f("div",{className:"t-theme-text-block",children:f(Ao,{block:t,message:e})})},TimeAgo:function(t){return t.timestamp===-1?null:f(ey,{...t})},VideoBlock:function({block:t,downloadUrl:e}){return f("div",{className:"t-theme-video-block",children:[f("div",{className:"t-video-wrapper",children:f("div",{className:"t-root",style:{"--video-w":t.width||1,"--video-h":t.height||1},children:f("video",{className:"t-video",controls:!0,preload:"metadata",src:`${t.url}#t=0.1`,playsInline:!0})})}),f("a",{href:e,className:"t-body-text",target:"_blank",rel:"noreferrer",children:[f(B,{className:"download-icon",type:"download"}),f(At,{text:t.filename}),f("span",{className:"t-filesize",children:[" (",fn(t.size),")"]})]})]})},VoiceBlock:function({block:t}){return f(Un,{className:"t-theme-voice-block",src:t.url,filename:t.filename})},VoiceRecorder:function(t){const{common:e,voiceRecorder:n}=t,{t:r}=e;return f("div",{className:"t-theme-voice-recorder",children:[f("button",{className:"t-close-button","t-kind":"icon-button","aria-label":r.ARIA_CANCEL_RECORDING,title:r.ARIA_CANCEL_RECORDING,onClick:()=>n.cancel(),children:f(B,{type:"close",size:"24px"})}),f("div",{className:"t-textbox-column t-waveform-wrapper",children:[f(Ou,{className:"t-waveform",voiceRecorder:n}),f("span",{className:"t-duration",children:di(n.duration)})]}),f("div",{className:"t-send-column",children:f("button",{className:"t-stop-button","t-kind":"icon-button","aria-label":r.ARIA_STOP_RECORDING,title:r.ARIA_STOP_RECORDING,onClick:()=>n.stop(),children:f(B,{type:"stop",className:"t-stop-icon",size:"20px"})})})]})}},Symbol.toStringTag,{value:"Module"})),ny=Mf,ry=$g;function iy(t){const{conversation:e,theme:n,chatbox:r,t:i,chatSearchState:o}=t.common,{ConversationImage:s,ChatSearchBox:a}=n,l=Ft(e.id,10);return t.permissions.canSearch&&o!=="hidden"?f("div",{className:"t-theme-chat-header",children:f(a,{common:t.common,searchQuery:t.searchQuery})}):f("div",{className:"t-theme-chat-header",children:f("div",{className:"t-inner",children:[f("div",{className:"t-content",children:[f("button",{className:"t-back-button","aria-label":i.INBOX,title:i.INBOX,onClick:()=>r.clickBackButton(),children:f(B,{type:"chevronLeft",size:20})}),f("div",{className:"t-image",children:f(s,{conversation:e,participants:l,common:t.common})}),f("div",{className:"t-info",children:f(oy,{...t})})]}),f("div",{className:"t-actions",children:f("button",{className:"t-action-button","aria-label":i.ARIA_SEARCH_INSIDE_CONVERSATION,title:i.ARIA_SEARCH_INSIDE_CONVERSATION,onClick:()=>r.toggleSearchBox(),children:f(B,{type:"search",size:20})})})]})})}function oy(t){const{common:e}=t;return e.conversation.subject?f(ie,{children:[f("div",{className:"t-title",children:e.conversation.subject}),f("div",{className:"t-subtitle",children:f(Nf,{...t})})]}):f("div",{className:"t-title",children:f(Nf,{...t})})}function Nf({common:t,isUserConnected:e,permissions:n}){const r=Ft(t.conversation.id,10),i=r.find(({user:a})=>a.id===t.currentUser.id),o=r.filter(({user:a})=>a.id!==t.currentUser.id),s=o.length>2?r:r.length===2?o:i?[i,...o]:[];return n.showOnlineStatus?f("span",{className:"t-participants",children:s.map(({user:a})=>f("span",{className:"t-participant",children:[f("span",{children:a.name}),a.id===t.currentUser.id&&f("span",{className:"t-participant-you",children:" (you)"}),f("span",{className:"t-online-indicator","t-status":e[a.id]?"online":"offline"})]},a.id))}):f("span",{className:"t-participants",children:s.map(({user:a})=>a.name).join(", ")})}function sy(t){return null}function ay(t){var y,R;const{message:e,messageStatus:n,permissions:r,common:i}=t,{currentUser:o,theme:s,conversation:a,t:l}=i,{Avatar:u,ReferencedMessage:c,MessageActionMenu:d}=s,h=Ft(a.id,3).length>=3,p=e.sender,m=(p==null?void 0:p.id)!==o.id&&h,_=e.referencedMessage,E=n!=="sending"&&(r.canReplyToMessage||r.canDeleteMessage),g=r.canAddReaction&&a.access==="ReadWrite";let A;A=p?p.id===o.id?"currentUser":"other":"system";const S=(y=i.focusedMessage)==null?void 0:y.id,v=S!==void 0&&e.id===S,D={messageId:e.id,colorScheme:"light"};return f("div",{className:"t-theme-message","t-sender":A,"t-message-id":e.id,"t-status":n,"t-focused":v?"":void 0,children:[p&&f("div",{className:"t-avatar-wrapper",children:f(u,{photoUrl:Ct(p),common:i})}),p&&m&&f("div",{className:"t-message-sender-name",style:{color:Tu(p.id)},children:p.name}),f("div",{className:"t-message-body",children:[A==="system"&&f("span",{className:"sys-icon",children:f(B,{type:"info",size:14})}),_&&f(c,{referencedMessage:_,common:i}),f(hu,{common:i,message:e,messageStatus:n}),((R=e.reactions)==null?void 0:R.length)>0&&f("div",{className:"t-emoji-reactions",children:e.reactions.map(I=>f(ly,{summary:I,message:e,common:i,permissions:r},I.emoji))})]}),f("div",{className:"t-message-status",children:[f(uy,{timestamp:e.createdAt,common:i}),A=="currentUser"&&f(cy,{...t})]}),f("div",{className:"t-message-buttons",children:[E&&f(oi,{type:"menu",popoverComponent:d,popoverProps:{message:e,permissions:r,common:i},className:"t-message-action-menu-button","aria-label":l.ARIA_MORE_ACTIONS,children:f(B,{type:"horizontalDots",className:"t-action-menu-icon",size:20})}),g&&f(oi,{className:"t-add-reaction-button",popoverComponent:mu,popoverProps:D,"aria-label":l.ADD_REACTION,children:f(B,{type:"addEmoji",className:"t-add-reaction-icon",size:20})})]})]})}function ly({summary:t,message:e,common:n,permissions:r}){const{t:i,chatbox:o,conversation:s}=n,{emoji:a,count:l,currentUserReacted:u}=t,[c,d]=Iu(s.id,e.id,t.emoji),h=c.map(m=>m.user.name);c.length&&c.length<t.count&&h.push("...");const p=h.join(", ");return f("button",{className:"t-reaction-button","t-active":u?"true":void 0,onClick:()=>o.toggleReaction(e.id,a),disabled:!r.canAddReaction,"aria-label":i.ARIA_REACTION_COUNT(l,a),"aria-pressed":u,onMouseOver:d,onTouchStart:d,"t-tooltip-text":p,children:[f("span",{className:"t-emoji",children:a}),f("span",{className:"t-num-reactions",children:l})]})}function cy({messageStatus:t}){return t==="sending"?f("span",{className:"t-status-icon","t-status":"sending",children:f(B,{type:"inProgress",className:"t-message-loading-spinner",size:"20px"})}):t==="sent"?f("span",{className:"t-status-icon","t-status":"sent",children:f(B,{type:"checkmark",size:12})}):t==="everyoneRead"?f("span",{className:"t-status-icon","t-status":"everyoneRead",children:[f(B,{type:"checkmark",size:12}),f(B,{type:"checkmark",size:12})]}):null}function uy({timestamp:t,common:e}){if(t===-1)return null;const{t:n}=e;return f("span",{className:"t-theme-time-ago",children:f("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 dy(t){const{message:e,permissions:n,common:r}=t,{chatbox:i,t:o}=r;return f("div",{className:"t-theme-message-action-menu",children:[n.canReplyToMessage&&f(Hn,{className:"t-menu-item",onSelect:()=>i.setReferencedMessage(e.id),children:[f("span",{className:"t-menu-item-icon-box",children:f(B,{type:"reply",className:"t-menu-item-icon",size:16})}),f("span",{children:o.REPLY_TO_MESSAGE})]}),n.canEditMessage&&f(Hn,{className:"t-menu-item",onSelect:()=>i.setEditing(e.id),children:[f("span",{className:"t-menu-item-icon-box",children:f(B,{type:"edit",className:"t-menu-item-icon",size:16})}),f("span",{children:o.EDIT_MESSAGE})]}),n.canDeleteMessage&&f(Hn,{className:"t-menu-item t-danger",onSelect:()=>i.deleteMessage(e.id),children:[f("span",{className:"t-menu-item-icon-box",children:f(B,{type:"trash",className:"t-menu-item-icon",size:16})}),f("span",{children:o.DELETE_MESSAGE})]})]})}function hy(t){const{common:e,referencedMessage:n,editor:r,voiceRecorder:i,permissions:o,editMessageId:s}=t,{chatbox:a,device:l,conversation:u,t:c,theme:d}=e,{ReplyBar:h,VoiceRecorder:p,RecordingPreview:m}=d,_=s?"edit":"send",E=_==="edit"&&!r.atTextLimit&&r.characterCount>0,g=!r.isEmpty&&!r.atTextLimit&&u.access==="ReadWrite",A=!i&&u.access==="ReadWrite",S=_==="send"&&r.isEmpty&&o.canShareLocation,v=_==="send"&&o.canShareFile,D=_==="send"&&l.supportsEmojiPicker&&!l.isMobile,y=_==="send"&&r.isEmpty&&o.canSendVoiceMessage;return f("div",{className:"t-theme-message-field","t-mode":_,children:[r.showEmojiPicker&&f("div",{className:"t-emoji-picker-wrapper",children:f(ta,{colorScheme:"light"})}),f(Eu,{}),f(vu,{}),n&&f(h,{common:e,referencedMessage:n}),f("div",{className:"t-wrapper",children:[r.atTextLimit&&f("div",{className:"t-text-limit-indicator",children:c.ENTRYBOX_TEXT_LIMIT}),f("div",{className:"t-text-form",children:[u.access==="Read"&&f("div",{className:"t-readonly",children:c.ENTRYBOX_PLACEHOLDER_CHAT_READONLY}),i&&i.state==="recording"&&f(p,{common:e,voiceRecorder:i}),i&&i.state==="previewing"&&f(m,{common:e,voiceRecorder:i}),A&&f(ie,{children:[v&&f("div",{className:"t-attachment-column",children:f("button",{className:"t-attachment-button","t-kind":"icon-button","aria-label":c.UPLOAD_SEND_FILE,title:c.UPLOAD_SEND_FILE,onClick:()=>r.attachFile(),children:f(B,{type:"attachment",size:20})})}),f("div",{className:"t-textbox-column",children:[f(lu,{placeholder:c.ENTRYBOX_PLACEHOLDER}),f("div",{className:"t-button-overlay",children:[S&&f("button",{className:"t-location-button","t-kind":"icon-button","aria-label":c.UPLOAD_SHARE_LOCATION,title:c.UPLOAD_SHARE_LOCATION,onClick:()=>r.shareLocation(),children:f(B,{type:"location",size:20})}),D&&f("button",{className:"t-emoji-button","t-kind":"icon-button","aria-label":c.ARIA_INSERT_EMOJI,title:c.ARIA_INSERT_EMOJI,onClick:()=>r.toggleEmojiPicker(),children:f(B,{type:r.showEmojiPicker?"close":"emoji",size:r.showEmojiPicker?24:20})})]})]})]}),_==="send"&&A&&f("div",{className:"t-send-column",children:[y&&f("button",{className:"t-record-button","t-kind":"icon-button","aria-label":c.VOICE_MESSAGE,title:c.VOICE_MESSAGE,onClick:()=>r.recordVoiceMessage(),children:f(B,{type:"microphone",size:20})}),!y&&f("button",{className:"t-send-button","t-kind":"icon-button","aria-label":c.SEND_BUTTON_TEXT,title:c.SEND_BUTTON_TEXT,onClick:()=>r.send(),disabled:!g,children:f(B,{type:"arrowUp",size:20})})]}),_==="edit"&&f("div",{className:"t-edit-row",children:[f("button",{"t-action":"cancel",onClick:()=>a.setEditing(null),children:c.CANCEL}),f("button",{"t-action":"save",onClick:()=>r.send(),disabled:!E,children:c.SAVE})]})]})]})]})}function py(t){const{timestamp:e,isReadMarker:n,isDayMarker:r,common:i}=t,{t:o}=i;return f("div",{className:"t-message-divider",children:[f("div",{className:"t-line","t-side":"left",children:f("div",{className:"t-line-segment"})}),r&&e!==void 0&&f("span",{className:"t-day-marker",children:yu(e,o)}),f("div",{className:"t-line","t-side":"right",children:[f("div",{className:"t-line-segment"}),n&&f("span",{className:"t-unread-marker",children:o.MESSAGELIST_NEW_MARKER})]})]})}function fy(t){return null}function my({common:t}){const e=t.conversation.welcomeMessages;if(e.length===0)return null;const n=e.map((r,i)=>f(Du,{text:r},i)).reverse();return f("div",{className:"t-message-group",children:n})}function Ey({common:t}){const{typing:e,theme:n}=t,{Avatar:r}=n;if(!e.many&&e.users.length===0)return null;const i=e.many?f("div",{className:"t-theme-avatar",children:"5+"}):e.users.slice(0,2).map(o=>f(r,{photoUrl:Ct(o),common:t},o.id));return f("div",{className:"t-theme-after-messages","t-many":String(e.many),"aria-label":_y(e),children:[f("div",{className:"t-typing-avatars","aria-hidden":"true",children:[i,!e.many&&e.users.length>2&&f("div",{className:"t-theme-avatar",children:["+",e.users.length-2]})]}),f("div",{className:"t-typing-bubble",children:f("div",{className:"t-typing-animation",children:[f("span",{}),f("span",{}),f("span",{})]})})]})}function _y(t){if(t.many)return"Several people are typing";const{users:e}=t;return e.length===1?`${e[0].name} is typing`:e.length===2?`${e[0].name} and ${e[1].name} are typing`:`${e[0].name}, ${e[1].name}, and ${e.length-2} others are typing`}function gy(t){return f("span",{className:"t-theme-compact-message-content",children:f(Ay,{...t})})}function Ay({message:t,common:e}){var i;const n=t.content[0],{t:r}=e;if(n.type==="text")return f(Ao,{block:n,message:t,nonInteractive:!0});if(n.type==="location")return f(ie,{children:[f(B,{type:"location",size:16})," ",r.LOCATION]});if(n.type==="file"){if(n.subtype==="image")return f(ie,{children:[f(B,{type:"image",size:16}),n.filename]});if(n.subtype==="video")return f(ie,{children:[f(B,{type:"movie",size:16}),n.filename]});if(n.subtype==="audio")return f(ie,{children:[f(B,{type:"attachment",size:16}),n.filename]});if(n.subtype==="voice")return f(ie,{children:[f(B,{type:"microphone",size:16}),r.VOICE_MESSAGE," (",di((i=n.duration)!=null?i:0),")"]});if(n.subtype===void 0)return f(ie,{children:[f(B,{type:"attachment",size:16}),n.filename]})}return null}function Sy(t){const{t:e,chatbox:n,chatSearchState:r}=t.common,{searchQuery:i}=t;let o;return r==="searching"?o=e.SEARCH_SEARCHING:r==="noResults"?o=e.SEARCH_NO_RESULTS:r==="noMoreResults"&&(o=e.SEARCH_NO_MORE_RESULTS),f("div",{className:"t-theme-chat-search-wrap",children:[f("div",{className:"t-theme-chat-search-box",children:[f("button",{className:"t-button t-back-button","aria-label":e.ARIA_LEAVE_SEARCH_MODE,onClick:()=>n.toggleSearchBox(),children:f(B,{type:"chevronLeft",size:20})}),f("div",{className:"t-search-field",children:[f(ro,{id:"t-search-input",autoFocus:!0,placeholder:e.SEARCH_PLACEHOLDER_TEXT,className:"t-search-input"}),i.length>0&&f("button",{type:"button",className:"t-clear","aria-label":e.ARIA_LEAVE_SEARCH_MODE,onClick:()=>{n.setSearchQuery("")},children:f(B,{type:"close",size:20})})]}),f("button",{className:"t-button t-previous-button","aria-label":e.ARIA_SEARCH_UP,disabled:r==="searching",onClick:()=>n.jumpToPreviousHighlight(),children:f(B,{type:"chevronUp",size:20})}),f("button",{className:"t-button t-next-button","aria-label":e.ARIA_SEARCH_DOWN,disabled:r==="searching",onClick:()=>n.jumpToNextHighlight(),children:f(B,{type:"chevronDown",size:20})})]}),o&&f("div",{className:"t-theme-chat-search-status",role:"status","aria-live":"polite",children:f("span",{className:"t-text",children:o})})]})}function vy({block:t,downloadUrl:e}){return f("div",{className:"t-theme-audio-block",children:[f(Un,{src:t.url,filename:t.filename}),f("div",{className:"t-metadata",children:[f("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:[f(B,{className:"t-download-icon",type:"download"}),f(At,{className:"t-filename",text:t.filename})]}),f("span",{className:"t-filesize",children:[" (",fn(t.size),")"]})]})]})}function Oy({block:t,downloadUrl:e}){return f("div",{className:"t-theme-file-block",children:f("div",{className:"t-metadata",children:[f("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:[f(B,{type:"attachment",className:"t-attachment-icon"}),f(At,{className:"t-filename",text:t.filename})]}),f("span",{className:"t-filesize",children:[" (",fn(t.size),")"]})]})})}function Dy({block:t,downloadUrl:e}){const n={"--img-w":t.width||1,"--img-h":t.height||1};return f("div",{className:"t-theme-image-block",children:[f("a",{href:t.url,className:"t-image-wrapper",target:"_blank",rel:"noopener noreferrer",children:f("div",{className:"t-root",style:n,children:f("img",{src:t.url,className:"t-image"})})}),f("div",{className:"t-metadata",children:[f("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:[f(B,{className:"t-download-icon",type:"download"}),f(At,{className:"t-filename",text:t.filename})]}),f("span",{className:"t-filesize",children:[" (",fn(t.size),")"]})]})]})}function Ty({block:t}){const{imageUrl:e,linkUrl:n}=sa(t);return f("div",{className:"t-theme-location-block",children:[f("div",{className:"t-location-wrapper",children:f("a",{href:n,target:"_blank",rel:"noopener noreferrer",className:"t-root",style:{backgroundImage:`url(${JSON.stringify(e)})`}})}),f("div",{className:"t-metadata",children:f("a",{href:n,target:"_blank",rel:"noopener noreferrer",children:[f(B,{className:"t-location-icon",type:"pin"}),f("span",{className:"t-location-link",children:n})]})})]})}function Ry({block:t,message:e}){return f("div",{className:"t-theme-text-block",children:f(Ao,{block:t,message:e})})}function yy({block:t,downloadUrl:e}){return f("div",{className:"t-theme-video-block",children:[f("div",{className:"t-video-wrapper",children:f("div",{className:"t-root",style:{"--video-w":t.width||1,"--video-h":t.height||1},children:f("video",{className:"t-video",controls:!0,preload:"metadata",src:`${t.url}#t=0.1`,playsInline:!0})})}),f("div",{className:"t-metadata",children:[f("a",{href:e,className:"t-body-text",target:"_blank",rel:"noopener noreferrer",children:[f(B,{className:"t-download-icon",type:"download"}),f(At,{className:"t-filename",text:t.filename})]}),f("span",{className:"t-filesize",children:[" (",fn(t.size),")"]})]})]})}function Iy({block:t}){return f(Un,{className:"t-theme-voice-block",src:t.url,filename:t.filename})}function Cy({photoUrl:t}){return f("div",{className:"t-theme-avatar",style:{backgroundImage:`url(${t})`}})}function Ny({common:t,conversation:e,participants:n}){const{currentUser:r,theme:i}=t,{Avatar:o,GroupChatImage:s}=i;if(e.photoUrl)return f(o,{photoUrl:e.photoUrl,common:t});if(n.length===0)return null;if(n.length===1)return f(o,{photoUrl:Ct(r),common:t});if(n.length===2){const a=n[0],l=n[1];return!a||!l?null:f(o,{photoUrl:Ct(a.user.id===r.id?l.user:a.user),common:t})}return f(s,{conversation:e,participants:n,common:t})}function by({participants:t,conversation:e}){var r;const n=t[0];return f("div",{className:"t-theme-group-chat-image",children:[f("div",{className:"t-mini-avatar",style:{backgroundImage:`url("${e.subject?Rg(e.id,((r=e.subject[0])!=null?r:"").toUpperCase()):n?Ct(n.user):""}")`}}),t.length>2&&f("svg",{className:"t-counter",viewBox:"0 0 22 22",xmlns:"http://www.w3.org/2000/svg",children:[f("g",{className:"t-group",children:f("rect",{x:"0",y:"0",width:22,height:22,fill:"currentColor"})}),f("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 wy({referencedMessage:t,common:e}){const{theme:n,chatbox:r}=e,{CompactMessageContent:i}=n;return f("div",{className:"t-theme-referenced-message",onClick:()=>r.focusMessage(t.id),children:[f("span",{className:"t-accent-bar"}),f("div",{className:"t-inner",children:[f("span",{className:"t-sender-name",children:t.sender.name}),f("div",{className:"t-content",children:f(i,{message:t,common:e})})]})]})}function ky(t){const{common:e,referencedMessage:n}=t,{chatbox:r,t:i,theme:o}=e,{CompactMessageContent:s}=o;return f("div",{className:"t-theme-reply-bar",children:[f(B,{className:"t-reply-icon",type:"reply",size:20}),f("div",{className:"t-body",onClick:()=>r.focusMessage(n.id),children:[f("div",{className:"t-sender-name",children:n.sender.name}),f("div",{className:"t-content",children:f(s,{message:n,common:e})})]}),f("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:f(B,{className:"t-close-icon",type:"close",size:24})})]})}function Ly({timestamp:t,common:e}){const{t:n}=e,r=Ru(t,n);return t===-1?null:f("span",{className:"t-theme-time-ago",children:f("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 My(t){var A,S,v;const{common:e,conversation:n,isSelected:r}=t,{currentUser:i,theme:o,conversationList:s}=e,{TimeAgo:a,ConversationImage:l,CompactMessageContent:u}=o,{lastMessage:c}=n,d=Ft(n.id,10),h=d.length>=3,p=(A=c==null?void 0:c.sender)==null?void 0:A.name,m=(S=c==null?void 0:c.editedAt)!=null?S:c==null?void 0:c.createdAt,_=d.filter(D=>D.user.id!==i.id),E=_.length?_:d,g=(v=n.subject)!=null?v:E.map(D=>D.user.name).join(", ");return f("div",{className:"t-theme-conversation-list-item","t-unread":n.unreadMessageCount?"":void 0,"t-selected":r?"":void 0,onClick:()=>s.selectConversation(n.id),children:[f(l,{conversation:n,participants:d,common:e}),f("div",{className:"t-inner",children:[f("div",{className:"t-header",children:[f("div",{className:"t-conversation-name",children:g}),m&&f("span",{className:"t-timestamp",children:f(a,{timestamp:m,common:e})})]}),f("div",{className:"t-body",children:[c&&f("div",{className:"t-message",children:[h&&p&&f("span",{className:"t-message-sender",children:[p,":"]}),f(u,{message:c,common:e})]}),f(Py,{...t})]})]})]})}function Py({conversation:t}){const{isUnread:e,unreadMessageCount:n}=t;return e?f("div",n===0?{className:"t-unread-generic-dot"}:n>999?{className:"t-unread-dot",children:f("span",{children:"999+"})}:{className:"t-unread-dot",children:f("span",{children:n})}):null}function xy(t){var A,S,v;const{common:e,conversation:n,message:r,isSelected:i}=t,{currentUser:o,theme:s,conversationList:a}=e,{TimeAgo:l,ConversationImage:u,CompactMessageContent:c}=s,d=Ft(n.id,10),h=d.length>=3,p=(A=r==null?void 0:r.sender)==null?void 0:A.name,m=(S=r==null?void 0:r.editedAt)!=null?S:r==null?void 0:r.createdAt,_=d.filter(D=>D.user.id!==o.id),E=_.length?_:d,g=(v=n.subject)!=null?v:E.map(D=>D.user.name).join(", ");return f("div",{className:"t-theme-global-search-result-item","t-selected":i?"":void 0,onClick:()=>{a.selectConversation(n.id,r==null?void 0:r.id)},children:[f(u,{conversation:n,participants:d,common:e}),f("div",{className:"t-inner",children:[f("div",{className:"t-header",children:[f("div",{className:"t-conversation-name",children:f(At,{text:g})}),m&&f("span",{className:"t-timestamp",children:f(l,{timestamp:m,common:e})})]}),f("div",{className:"t-body",children:r&&f("div",{className:"t-message",children:[h&&p&&f("span",{className:"t-message-sender",children:[f(At,{text:p}),":"]}),f(c,{message:r,common:e})]})})]})]})}function Fy(t){const{common:e,query:n,cancel:r}=t,{t:i}=e;return f("div",{className:"t-theme-global-search-header",children:f("div",{className:"t-theme-global-search-box",children:[f("span",{className:"t-search-icon","aria-hidden":"true",children:f(B,{type:"search",size:20})}),f(ro,{placeholder:i.SEARCH_PLACEHOLDER_TEXT,className:"t-input"}),n.length>0&&f("button",{type:"button",onClick:r,"aria-label":i.ARIA_LEAVE_SEARCH_MODE,className:"t-clear",children:f(B,{type:"close",size:20})})]})})}function Hy(t){const{common:e,canLoadMore:n,loadMore:r,type:i}=t,{t:o}=e;return f("div",{className:"t-theme-global-search-result-header",children:[f("span",{className:"t-title",children:i==="messages"?o.SEARCH_RESULTS_MESSAGES:o.SEARCH_RESULTS_CONVERSATIONS}),n&&f("button",{className:"t-show-more",onClick:r,children:o.SEARCH_RESULTS_SHOW_MORE})]})}function Uy(t){const{common:e,voiceRecorder:n}=t,{t:r}=e;return f("div",{className:"t-theme-recording-preview",children:[f("button",{className:"t-close-button","t-kind":"icon-button","aria-label":r.ARIA_CANCEL_UPLOAD,title:r.ARIA_CANCEL_UPLOAD,onClick:()=>n.cancel(),children:f(B,{type:"close",size:24})}),f("div",{className:"t-textbox-column",children:f(Un,{src:n.recordingUrl})}),n.uploadState==="pending"&&f("div",{className:"t-send-column",children:f("div",{className:"t-loading",children:f(B,{type:"spinner",className:"t-spinner",size:24})})}),n.uploadState==="done"&&f("div",{className:"t-send-column",children:f("button",{className:"t-send-button","t-kind":"icon-button","aria-label":r.SEND_BUTTON_TEXT,title:r.SEND_BUTTON_TEXT,onClick:()=>n.send(),children:f(B,{type:"send",size:24})})})]})}function By(t){const{common:e,voiceRecorder:n}=t,{t:r}=e;return f("div",{className:"t-theme-voice-recorder",children:[f("button",{className:"t-close-button","t-kind":"icon-button","aria-label":r.ARIA_CANCEL_RECORDING,title:r.ARIA_CANCEL_RECORDING,onClick:()=>n.cancel(),children:f(B,{type:"close",size:24})}),f("div",{className:"t-textbox-column t-waveform-wrapper",children:[f(Ou,{className:"t-waveform",voiceRecorder:n}),f("span",{className:"t-duration",children:di(n.duration)})]}),f("div",{className:"t-send-column",children:f("button",{className:"t-stop-button","t-kind":"icon-button","aria-label":r.ARIA_STOP_RECORDING,title:r.ARIA_STOP_RECORDING,onClick:()=>n.stop(),children:f(B,{type:"stop",className:"t-stop-icon",size:20})})})]})}function jy({common:t}){return f("div",{className:"t-theme-no-conversation-selected",children:t.t.SELECT_CONVERSATION})}const Vy=new Promise(t=>{typeof document!="undefined"&&document.readyState==="loading"?document.addEventListener("DOMContentLoaded",t,{once:!0}):t(void 0)});function bu(t,e,n,r){const i=new Map,o=[],s=[];for(const[d,h]of(a=n,Object.entries(a))){const p=[d,d.toLowerCase(),zy(d)];for(const m of p)i.set(m,d);["string","boolean","number"].includes(h.type)&&o.push(...p),h.required!==!1&&s.push(d)}var a;const c=class c extends HTMLElement{constructor(){super(),this._renderRequested=!1,this._props={},this._renderRoot=null,this._ref={current:null};for(const[h,p]of i)if(Object.hasOwnProperty.call(this,h)){const m=this[h];this.updateProp(p,m),delete this[h]}else this.hasAttribute(h)&&this.syncAttributeToProp(h)}updateProp(h,p){const{type:m}=n[h];if(m==="boolean"&&typeof p=="string"?p=p!=="false":m==="number"&&typeof p=="string"&&(p=Number(p)),p===void 0){const _=h in this._props;return delete this._props[h],_}{const _=this._props[h]!==p;return this._props[h]=p,_}}syncAttributeToProp(h){const p=i.get(h);re(p,`Attribute "${h}" should have matching prop`);const m=this.getAttribute(h);return this.updateProp(p,m)}async requestRender(){this.isConnected&&!this._renderRequested&&(this._renderRequested=!0,this._renderRequested=await!1,this.render())}render(){var h;this._renderRoot||(this._renderRoot=(h=this,{render:function(g){Ic(g,h)},unmount:function(){Nc(h)}}));const p=s.filter(g=>!(g in this._props));if(p.length>0)return r(p),void this._renderRoot.render(null);const m=Object.assign({},this._props),_=g=>{const A=[...Object.getOwnPropertyNames(g.current),...Object.getOwnPropertyNames(Object.getPrototypeOf(g.current))];for(const S of A)S!=="constructor"&&(typeof g.current[S]=="function"?this[S]=(...v)=>(this._renderRequested&&this.render(),g.current[S](...v)):Object.defineProperty(this,S,{enumerable:!0,get:()=>g.current[S]}))},E=t;Fs(()=>{this._renderRoot.render(f(E,{...m,ref:this._ref,__hostElement:this,__internalOnLoaded:()=>{_(this._ref)}}))})}async connectedCallback(){await Vy;for(const h of o)this.hasAttribute(h)&&this.syncAttributeToProp(h);this.requestRender()}disconnectedCallback(){this._renderRoot&&setTimeout(()=>{this._renderRoot&&(this._renderRoot.unmount(),this._renderRoot=null)})}attributeChangedCallback(h,p,m){p!==m&&this.syncAttributeToProp(h)&&this.requestRender()}};c.observedAttributes=o;let l=c;const u={};for(const[d,h]of i)u[d]={set(p){this.updateProp(h,p)&&this.requestRender()},get(){return this._props[h]}};return Object.defineProperties(l.prototype,u),Object.defineProperty(l,"name",{value:e}),l}function zy(t){return t.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(e,n)=>(n?"-":"")+e.toLowerCase())}function wu(t,e){const n=JSON.stringify(e).replace(",",", ");Ce.error(`Could not initialize ${t} because the following required props are missing: ${n}.`)}const bf=bu(jg,"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},onSendMessage:{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=>wu("<t-chatbox>",t)),wf=bu(zg,"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=>wu("<t-conversation-list>",t)),kf=bu(XR,"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},onSendMessage:{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=>wu("<t-inbox>",t)),$y=Mf,Yy=$g;customElements.get("t-chatbox")||customElements.define("t-chatbox",bf),customElements.get("t-conversation-list")||customElements.define("t-conversation-list",wf),customElements.get("t-inbox")||customElements.define("t-inbox",kf),exports.AudioPlayer=Un,exports.ChatboxElement=bf,exports.ConversationListElement=wf,exports.Editor=lu,exports.EmojiPicker=ta,exports.EmojiSuggestBar=Eu,exports.Highlightable=At,exports.Icon=B,exports.InboxElement=kf,exports.MentionSuggestList=vu,exports.MenuItem=Hn,exports.MessageContent=hu,exports.PopoverButton=oi,exports.Preact=bc,exports.ReactionPicker=mu,exports.SearchInput=ro,exports.Text=Ao,exports.VirtualMessage=Du,exports.Waveform=Ou,exports.classicTheme=Yy,exports.defaultTheme=$y,exports.formatDuration=di,exports.formatFilesize=fn,exports.getGoogleMapsUrls=sa,exports.getPhotoUrlWithFallback=Ct,exports.getRandomColor=Tu,exports.getSVGForInitials=Rg,exports.html=function(t,...e){const n=x0.bind(me)(t,...e);return Array.isArray(n)?me(ie,{},...n):n},exports.useParticipants=Ft,exports.useReactions=Iu,exports.useTimeAgo=Ru,exports.userFriendlyDate=yu;
1381
+ }`,document.head.appendChild(n),!0}})(),(function({observableFunctions:t,observableProperties:e,jsonReplacer:n,jsonReviver:r}){if(t)for(const i in t){const o=t[i];jg.set(i,o),Td.prototype[i]=function(...s){return o.call(this,this._node,...s)}}if(e)for(const i in e){const o=e[i];Bg.set(i,o),Object.defineProperty(Td.prototype,i,{configurable:!0,get(){return o.get.call(this,this._node)},set(s){return o.set.call(this,this._node,s)}})}n&&(Dd.replacer=n),r&&(Dd.reviver=r)})({observableFunctions:{child:(t,e)=>zs.getProxy(t,e)}}),Ce.registerHandler(({level:t,data:e})=>{console[t]("[TalkJS]",...e)});const jA=_t(function(t,e){const n=X(null),r=Z(()=>new kR(n),[]);Sn(e,()=>r,[r]);const{theme:i,baseTheme:o,...s}=t,a=Z(()=>Hc(o,i,"Chatbox"),[o,i]),l=`chatbox|${t.userId}|${t.appId}`;return f(eE.Provider,{value:r,children:me(LR,{...s,key:l,theme:a,ref:n})})});var Xr,De,Ke,ns;class kR{constructor(e){Cr(this,De);Cr(this,Xr);yo(this,Xr,e)}deleteMessage(e){return _e(this,De,Ke).deleteMessage(e)}setEditing(e){_e(this,De,Ke).setEditing(e)}editMessage(e,n){return _e(this,De,Ke).editMessage(e,n)}sendMessage(e){return _e(this,De,Ke).sendMessage(e)}sendFileMessage(e){return _e(this,De,Ke).sendFileMessage(e)}sendLocationMessage(e){return _e(this,De,Ke).sendLocationMessage(e)}setReferencedMessage(e){_e(this,De,Ke).setReferencedMessage(e)}toggleReaction(e,n,r){return _e(this,De,Ke).toggleReaction(e,n,r)}getMessageFieldText(){return _e(this,De,ns).getText()}setMessageFieldText(e){_e(this,De,ns).setText(e)}focusMessageField(){_e(this,De,ns).focus()}toggleSearchBox(e){_e(this,De,Ke).toggleSearchBox(e)}async focusMessage(e){return _e(this,De,Ke).focusMessage(e)}setHighlightedStrings(e){_e(this,De,Ke).setHighlightedStrings(e)}setSearchQuery(e){_e(this,De,Ke).setSearchQuery(e)}async jumpToPreviousHighlight(){return _e(this,De,Ke).jumpToHighlight("up")}async jumpToNextHighlight(){return _e(this,De,Ke).jumpToHighlight("down")}clickBackButton(){_e(this,De,Ke).clickBackButton()}}Xr=new WeakMap,De=new WeakSet,Ke=function(){return _e(this,Xr).current.controller},ns=function(){return _e(this,Xr).current.editorInternals};function MR({conversation:t}){const e=ae(),n=Qe(),r=cu(),i=J(e.currentConversationId$),o=uu(i);return f(n.ConversationListItem,{common:r,conversation:t,participants:o,isSelected:i===t.id})}function PR(){const t=ae(),e=X(null);z(()=>{let r=!0;const i=e.current;return(async function(){var s;let o=0;for(;r&&t.conversationListSubscription&&i.scrollHeight===i.clientHeight&&o<2;)await((s=t.conversationListSubscription)==null?void 0:s.loadMore(20)),o+=1})(),()=>{r=!1}},[t]);const n=q(r=>{const i=r.currentTarget;i.scrollHeight-i.clientHeight-i.scrollTop<15&&t.conversationListSubscription&&t.conversationListSubscription.loadMore(20)},[t]);return f("div",{className:"t-conversation-list-scrollable",ref:e,"t-menu-boundary":"",onScroll:n,children:f($i,{each:t.conversationsArray$,children:r=>f(MR,{conversation:r.get()})})})}function xR(){const t=ae(),e=Qe(),n=cu(),r=J(t.globalSearchState$.query),i=q(s=>{t.setGlobalSearchQuery(s)},[t]),o=q(()=>{t.cancelGlobalSearch()},[t]);return f(e.GlobalSearchBox,{common:n,query:r,setQuery:i,cancel:o})}function FR({appId:t}){const e=ae(),n=(function(){const s=ae(),a=ct(()=>{const c=s.currentUser$.get(),d=s.app$.get(),h=s.errors$.get(),p=s.authTokenState$.get();return h.serverError?"server-error":h.wrongAppId?"wrong-app-id":p==="loading"||p==="idle"?"loading-token":p==="invalid"?"invalid-token":p==="expired"?"expired-token":p==="valid"?h.unknownUser?"unknown-user":c&&d?"loaded":"loading-data":void re.unreachable()}),l=ct({type:"loading"});Yi(c=>{const d=a.get(),h=s.extUserId$.peek(),p=s.appId$.peek();switch(d){case"invalid-token":l.set({type:"auth-failed"});break;case"expired-token":l.set({type:"expired-token"});break;case"wrong-app-id":l.set({type:"wrong-app-id",appId:p});break;case"server-error":l.set({type:"server-error"});break;case"loading-data":case"loading-token":l.set({type:"loading"});break;case"loaded":l.set({type:"loaded",currentUser:s.currentUser$.peek()});break;case"unknown-user":c.onCleanup=(function(m){l.set({type:"loading"});const _=setTimeout(()=>{l.set(m)},5e3);return()=>clearTimeout(_)})({type:"unknown-user",userId:h});break;default:re.never(d)}});const u=ct({type:"loading"});return Yi(c=>{if(l.type.get()==="loading"){u.set({type:"invisible-loading"});const d=setTimeout(()=>{u.set({type:"loading"})},1e3);c.onCleanup=()=>{clearTimeout(d)}}else u.set(l.get())}),J(u)})(),r=J(e.globalSearchEnabled$),i=J(e.globalSearchActive$),o=X(null);return n.type==="invisible-loading"?f(ie,{}):n.type==="loading"?f(bA,{}):n.type==="unknown-user"||n.type==="auth-failed"||n.type==="wrong-app-id"||n.type==="server-error"||n.type==="unexpected-error"?f(aa,{appId:t,chatboxState:n}):n.type==="expired-token"?f(wA,{}):n.type==="loaded"?f("div",{className:"t-conversation-list-content","t-menu-boundary":"root",ref:o,children:[r&&f(xR,{}),f(i?HR:PR,{}),f(PA,{containerRef:o})]}):f(ie,{})}function HR(){const t=ae(),e=Qe(),n=cu(),r=J(t.t$),i=J(t.globalSearchState$.messageStatus),o=J(t.globalSearchState$.conversationStatus),s=J(t.globalSearchStatus$);return f("div",s==="searching"?{className:"t-global-search-results","t-status":"loading",children:r.SEARCH_SEARCHING}:s==="noResults"?{className:"t-global-search-results","t-status":"empty",children:r.SEARCH_NO_RESULTS}:{className:"t-global-search-results","t-status":"loaded",children:[f(Fd,{if:()=>t.globalSearchState$.conversationResults.get().length,children:()=>f(ie,{children:[f(e.GlobalSearchResultHeader,{common:n,type:"conversations",canLoadMore:o==="canLoadMore",loadMore:()=>t.conversationSearch.loadMore()}),f($i,{each:t.globalSearchState$.conversationResults,children:a=>f(e.GlobalSearchResultItem,{common:n,conversation:a.get(),isSelected:a.id.get()===t.globalSearchState$.selectedResultId.get()})})]})}),f(Fd,{if:()=>t.globalSearchState$.messageResults.get().length,children:()=>f(ie,{children:[f(e.GlobalSearchResultHeader,{common:n,type:"messages",canLoadMore:i==="canLoadMore",loadMore:()=>t.messageSearch.loadMore()}),f($i,{each:t.globalSearchState$.messageResults,children:a=>f(e.GlobalSearchResultItem,{common:n,conversation:a.conversation.get(),message:a.message.get(),isSelected:a.message.id.get()===t.globalSearchState$.selectedResultId.get()})})]})})]})}class UR extends sE{constructor(){super(...arguments),this.type="ConversationListStore",this.conversationListSubscription=null,this.conversationFilter$=se(void 0),this.currentConversationId$=se(null),this.conversationsArray$=se([]),this.conversationsMap$=se({}),this.globalSearchState$=se({query:"",selectedResultId:null,conversationResults:[],conversationStatus:"idle",messageResults:[],messageStatus:"idle"}),this.globalSearchStatus$=(function(e,n){const r=se(e);return mt(i=>{const o=r.peek();let s=!0;const a=n(o);(function(l){return!!l&&typeof l=="object"&&typeof l.then=="function"})(a)?a.then(l=>{s&&r.set(l)}):r.set(a),i.onCleanup=()=>{s=!1}}),r})("idle",()=>{const e=this.globalSearchState$.conversationStatus.get(),n=this.globalSearchState$.messageStatus.get(),r=this.globalSearchState$.conversationResults.get(),i=this.globalSearchState$.messageResults.get(),o=r.length>0||i.length>0;return e==="searching"||n==="searching"?o?(s=1e3,new Promise(a=>setTimeout(a,s))).then(()=>"searching"):"searching":o||e!=="loadedAll"||n!=="loadedAll"?"idle":"noResults";var s}),this.globalSearchEnabled$=se(()=>{var n;const e=this.app$.features.get();return(n=e==null?void 0:e.includes("search_conv_and_messages"))!=null?n:!1}),this.globalSearchActive$=se(()=>{const e=this.globalSearchEnabled$.get(),n=this.globalSearchState$.query.get().trim();return e&&n.length>=3}),this.highlightedStrings$=se(()=>{const e=this.globalSearchActive$.get(),n=this.globalSearchState$.query.get();return e?n.split(/\s+/).map(r=>r.trim()).filter(r=>r.length):[]})}setGlobalSearchQuery(e){this.globalSearchEnabled$.peek()?wt(()=>{this.globalSearchState$.query.set(e),this.globalSearchActive$.peek()||this.globalSearchState$.selectedResultId.set(null)}):Ce.error('The "Search messages & conversations" feature is only available to customers on Growth plan and above.')}cancelGlobalSearch(){this.globalSearchEnabled$.peek()?this.setGlobalSearchQuery(""):Ce.error('The "Search messages & conversations" feature is only available to customers on Growth plan and above.')}}class BR{constructor(e,n,r){this.session=e,this.store=n,this.onSelectConversation=r}async selectConversation(e,n){var s;if(e===this.store.currentConversationId$.peek()&&!n)return;wt(()=>{if(this.store.globalSearchActive$.peek()){const a=n!=null?n:e;this.store.globalSearchState$.selectedResultId.set(a)}this.store.currentConversationId$.set(e)});const r=e&&n&&await this.session.conversation(e).message(n).get(),i=e&&((s=this.store.conversationsMap$.child(e).peek())!=null?s:await this.session.conversation(e).get()),o={currentUser:this.store.currentUser$.peek(),conversation:i,...r&&{focusedMessage:r}};this.onSelectConversation(o)}jumpToHighlight(e){}}var If,yf,jR=(yf||(yf=1,If=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){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;i--!==0;)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;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;i--!==0;){var s=o[i];if(!(s==="_owner"&&e.$$typeof||t(e[s],n[s])))return!1}return!0}return e!=e&&n!=n}),If);const VR=Ys(jR);function zR(t,e){z(t,(function(n){const r=X(void 0);return VR(n,r.current)||(r.current=n),r.current})(e))}const $R=_t(function(t,e){const{__hostElement:n,onSelectConversation:r}=t;z(()=>{var m;(m=t.__internalOnLoaded)==null||m.call(t)},[]);const i=BA(),o=X(n!=null?n:null);UA(o);const s=St(r,n,["selectConversation","select-conversation","selectconversation","SelectConversation"]),a=Z(()=>new UR(t.appId,t.userId),[]);z(()=>{wt(()=>{a.extUserId$.set(t.userId),a.appId$.set(t.appId)})},[a,t.appId,t.userId]);const{session:l,fetcher:u}=HA(a,t);z(()=>{const m=u.subscribeToConversationListBaseData();return()=>m()},[u]),zR(()=>{const m=u.subscribeToConversationList(t.conversationFilter);return()=>m()},[u,t.conversationFilter]);const c=Z(()=>new BR(l,a,s),[l,a,s]),d=X(void 0);z(()=>{t.selectedConversationId!==d.current&&(d.current=t.selectedConversationId,a.currentConversationId$.set(t.selectedConversationId||null))},[a,t.selectedConversationId]),z(()=>{const m=t.__hostElement;if(m)return a.currentConversationId$.onChange(({value:_})=>{m.selectedConversationId=_})},[a,t.__hostElement]),Sn(e,()=>({controller:c}));const h=q(({error:m})=>f(aa,{appId:t.appId,chatboxState:{type:"unexpected-error",error:m}}),[t.appId]),p=i?null:f(Vm,{fallbackRender:h,children:f(Jm.Provider,{value:a,children:f(Km.Provider,{value:t.theme,children:f(Zm.Provider,{value:c,children:f(Bc.Provider,{value:l,children:f(FR,{appId:t.appId})})})})})});return n?p:f("div",{className:"t-conversation-list"+(t.className?` ${t.className}`:""),style:t.style,ref:o,children:p})});var so,Ms,VA;class YR{constructor(e){Cr(this,Ms);Cr(this,so);yo(this,so,e)}selectConversation(e,n){return _e(this,Ms,VA).selectConversation(e,n)}}so=new WeakMap,Ms=new WeakSet,VA=function(){return _e(this,so).current.controller};const zA=_t(function(t,e){const n=X(null),r=Z(()=>new YR(n),[]);Sn(e,()=>r,[r]);const{theme:i,baseTheme:o,...s}=t,a=Z(()=>Hc(o,i,"ConversationList"),[o,i]),l=`conversation-list|${t.userId}|${t.appId}`;return f(eE.Provider,{value:r,children:me($R,{...s,key:l,theme:a,ref:n})})});function GR(t){const{selectedConversationId:e,focusedMessageId:n,chatboxProps:r,conversationListProps:i,style:o,__hostElement:s}=t,{onDeleteMessage:a,onSendMessage:l,onMessageAction:u,onFocusMessage:c,onMissingBrowserPermission:d,...h}=r,{onSelectConversation:p,...m}=i,[_,E]=ee(e||null),[A,g]=ee(t.focusedMessageId||null);z(()=>{E(e||null)},[e]),z(()=>{g(t.focusedMessageId||null)},[t.focusedMessageId]);const S=St(a,s,["deleteMessage","delete-message","deletemessage","DeleteMessage"]),O=St(l,s,["sendMessage","send-message","sendmessage","SendMessage"]),D=St(u,s,["messageAction","message-action","messageaction","MessageAction"]),I=St(c,s,["focusMessage","focus-message","focusmessage","FocusMessage"]),R=St(d,s,["browserPermissionDenied","browser-permission-denied","browserpermissiondenied","BrowserPermissionDenied"]),y=St(p,s,["selectConversation","select-conversation","selectconversation","SelectConversation"]),v=q(M=>{var U,V;E((V=(U=M.conversation)==null?void 0:U.id)!=null?V:null),y(M)},[y]),T=q(M=>{var U,V;g((V=(U=M.message)==null?void 0:U.id)!=null?V:null),I(M)},[I]);z(()=>{var M;(M=t.__internalOnLoaded)==null||M.call(t)},[]);const C=X(s!=null?s:null),[N,L]=ee(void 0);We(()=>{var V;const M=(V=t.mobileBreakPoint)!=null?V:700,U=new ResizeObserver(W=>{const $=W[0].contentRect.width;L($>=M)});return U.observe(C.current),()=>U.disconnect()},[t.mobileBreakPoint]);const b=q(M=>{E(null),y({conversation:null,currentUser:M.currentUser})},[y]),k=_?"chatbox":"conversation-list";z(()=>{s&&(N?s.removeAttribute("t-mobile-inbox"):s.setAttribute("t-mobile-inbox",k))},[N,s,k]);const x=N===void 0?null:f(ie,{children:[f(zA,{...m,onSelectConversation:v,selectedConversationId:_!=null?_:void 0}),f(jA,{...h,onDeleteMessage:S,onSendMessage:O,onMessageAction:D,onFocusMessage:T,onMissingBrowserPermission:R,onBackButtonClick:b,conversationId:_,focusedMessageId:A!=null?A:void 0})]});if(s)return x;{const M="t-inbox"+(t.className?` ${t.className}`:"");return f("div",{ref:C,style:o,className:M,"t-mobile-inbox":N?void 0:k,children:x})}}var ao;class WR{constructor(e){Cr(this,ao);yo(this,ao,e)}get chatbox(){return _e(this,ao).current}}ao=new WeakMap;const XR=_t(function(t,e){const n=X(null),r=X(null),i=Z(()=>new WR(n),[]);Sn(e,()=>i,[i]);const{theme:o,baseTheme:s,appId:a,userId:l,__hostElement:u,__internalOnLoaded:c,beforeBrowserPermissionPrompt:d,chatHeaderVisible:h,className:p,style:m,enterSendsMessage:_,messageFieldVisible:E,messageFieldSpellcheck:A,messageFieldPlaceholder:g,onDeleteMessage:S,onSendMessage:O,onMessageAction:D,onFocusMessage:I,onMissingBrowserPermission:R,onSelectConversation:y,themeCustom:v,host:T,focusedMessageId:C,selectedConversationId:N,conversationFilter:L,mobileBreakPoint:b}=t,k=Z(()=>Hc(s,o,"Inbox"),[s,o]);return f(GR,{style:m,className:p,selectedConversationId:N,focusedMessageId:C,chatboxProps:{appId:a,userId:l,theme:k,host:T,focusedMessageId:C,enterSendsMessage:_,chatHeaderVisible:h,messageFieldVisible:E,messageFieldSpellcheck:A,messageFieldPlaceholder:g,beforeBrowserPermissionPrompt:d,onDeleteMessage:S,onSendMessage:O,onMessageAction:D,onFocusMessage:I,onMissingBrowserPermission:R,themeCustom:v,ref:n},conversationListProps:{appId:a,userId:l,theme:k,host:T,onSelectConversation:y,conversationFilter:L,themeCustom:v,ref:r},mobileBreakPoint:b,__hostElement:u,__internalOnLoaded:c},`inbox|${t.userId}|${t.appId}`)});function KR(t){const{common:e}=t;return e.conversation.subject?f(ie,{children:[f("div",{className:"t-title",children:e.conversation.subject}),f("div",{className:"t-subtitle",children:f(Cf,{...t})})]}):f("div",{className:"t-title",children:f(Cf,{...t})})}function Cf(t){const{common:e,isUserConnected:n,permissions:r}=t,i=Ft(e.conversation.id,10),o=i.filter(({user:a})=>a.id!==e.currentUser.id),s=o.length===0?i:o;return r.showOnlineStatus?f("span",{className:"t-participants",children:s.map(({user:a})=>f("span",{className:"t-participant",children:[f("span",{children:a.name}),f("span",{className:"t-online-indicator","t-status":n[a.id]?"online":"offline"})]},a.id))}):f("span",{className:"t-participants",children:s.map(({user:a})=>a.name).join(", ")})}function qR(t){const{summary:e,message:n,common:r,permissions:i}=t,{t:o,chatbox:s,conversationId:a}=r,{emoji:l,count:u,currentUserReacted:c}=e,[d,h]=yu(a,n.id,e.emoji),p=d.map(m=>m.user.name);return d.length&&d.length<e.count&&p.push("..."),f("button",{className:"t-reaction-button","t-active":c?"true":void 0,onClick:()=>s.toggleReaction(n.id,l),disabled:!i.canAddReaction,"aria-label":o.ARIA_REACTION_COUNT(u,l),"aria-pressed":c,onMouseOver:h,onTouchStart:h,"t-tooltip-text":p.join(", "),children:[f("span",{className:"t-emoji",children:l}),f("span",{className:"t-num-reactions",children:u})]})}function JR({messageStatus:t}){return t==="virtual"?null:t==="sending"?f("span",{className:"t-status-icon",children:f(B,{type:"spinner",className:"t-message-loading-spinner"})}):t==="sent"?f("span",{className:"t-status-icon",children:"✓"}):t==="everyoneRead"?f("span",{className:"t-status-icon",children:"✓✓"}):null}function ZR(t){if(t.many)return"Several people are typing";const{users:e}=t;return e.length===1?`${e[0].name} is typing`:e.length===2?`${e[0].name} and ${e[1].name} are typing`:`${e[0].name}, ${e[1].name}, and ${e.length-2} others are typing`}function QR({message:t,common:e}){var i;const n=t.content[0],{t:r}=e;if(n.type==="text")return f(go,{block:n,message:t,nonInteractive:!0});if(n.type==="location")return f(ie,{children:[f(B,{type:"location"})," ",r.LOCATION]});if(n.type==="file"){if(n.subtype==="image")return f(ie,{children:[f(B,{type:"image"})," ",n.filename]});if(n.subtype==="video")return f(ie,{children:[f(B,{type:"movie"})," ",n.filename]});if(n.subtype==="audio")return f(ie,{children:[f(B,{type:"attachment"})," ",n.filename]});if(n.subtype==="voice")return f(ie,{children:[f(B,{type:"microphone"})," ",r.VOICE_MESSAGE," (",di((i=n.duration)!=null?i:0),")"]});if(n.subtype===void 0)return f(ie,{children:[f(B,{type:"attachment"})," ",n.filename]})}return null}function eI({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=Ru(t,n);return f("span",{className:"t-theme-time-ago",children:f("span",{role:"time",title:r,"aria-description":i.long,children:i.short})})}function tI({conversation:t}){const{isUnread:e,unreadMessageCount:n}=t;return e?f("div",n===0?{className:"t-unread-generic-dot"}:n>999?{className:"t-unread-dot",children:f("span",{children:"999+"})}:{className:"t-unread-dot",children:f("span",{children:n})}):null}const $A=Object.freeze(Object.defineProperty({__proto__:null,AfterMessages:function({common:t}){const{typing:e,theme:n}=t,{Avatar:r}=n;if(!e.many&&e.users.length===0)return null;const i=e.many?f("div",{className:"t-theme-avatar",children:"5+"}):e.users.slice(0,2).map(o=>f(r,{photoUrl:Ct(o),common:t},o.id));return f("div",{className:"t-theme-after-messages","t-many":String(e.many),"aria-label":ZR(e),children:[f("div",{className:"t-typing-avatars","aria-hidden":"true",children:[i,!e.many&&e.users.length>2&&f("div",{className:"t-theme-avatar",children:["+",e.users.length-2]})]}),f("div",{className:"t-typing-bubble",children:f("div",{className:"t-typing-animation",children:[f("span",{}),f("span",{}),f("span",{})]})})]})},AudioBlock:function({block:t,downloadUrl:e}){return f("div",{className:"t-theme-audio-block",children:[f(Un,{src:t.url,filename:t.filename}),f("a",{className:"t-body-text",href:e,target:"_blank",rel:"noreferrer",children:[f(B,{type:"attachment",className:"t-attachment-icon"}),f(gt,{text:t.filename}),f("span",{className:"t-filesize",children:[" (",fn(t.size),")"]})]})]})},Avatar:function({photoUrl:t}){return f("div",{className:"t-theme-avatar",style:{backgroundImage:`url("${t}")`}})},BeforeMessages:function({common:t}){const e=t.conversation.welcomeMessages;if(e.length===0)return null;const n=e.map((r,i)=>f(Du,{text:r},i));return f("div",{className:"t-message-group",children:n.reverse()})},ChatHeader:function(t){const{conversation:e,theme:n,t:r,chatbox:i,chatSearchState:o}=t.common,{ConversationImage:s,ChatSearchBox:a}=n,l=Ft(e.id,10);return t.permissions.canSearch&&o!=="hidden"?f("div",{className:"t-theme-chat-header",children:f(a,{common:t.common,searchQuery:t.searchQuery})}):f("div",{className:"t-theme-chat-header",children:f("div",{className:"t-inner",children:[f("div",{className:"t-content",children:[f("button",{className:"t-back-button","aria-label":r.INBOX,title:r.INBOX,onClick:()=>i.clickBackButton(),children:f(B,{type:"chevronLeft"})}),f("div",{className:"t-image",children:f(s,{conversation:e,participants:l,common:t.common})}),f("div",{className:"t-info",children:f(KR,{...t})})]}),f("div",{className:"t-actions",children:f("button",{className:"t-action-button","aria-label":r.ARIA_SEARCH_INSIDE_CONVERSATION,title:r.ARIA_SEARCH_INSIDE_CONVERSATION,onClick:()=>i.toggleSearchBox(),children:f(B,{type:"search",size:"20px"})})})]})})},ChatSearchBox:function(t){const{t:e,chatbox:n,chatSearchState:r}=t.common;let i;return r==="searching"?i=e.SEARCH_SEARCHING:r==="noResults"?i=e.SEARCH_NO_RESULTS:r==="noMoreResults"&&(i=e.SEARCH_NO_MORE_RESULTS),f("div",{className:"t-theme-chat-search-box",children:[f("button",{className:"t-button t-back-button","aria-label":e.ARIA_LEAVE_SEARCH_MODE,onClick:()=>n.toggleSearchBox(),children:f(B,{type:"arrowLeft",size:"20px"})}),f("div",{className:"t-search-field",children:[f("label",{htmlFor:"t-search-input","t-label-text":i?"on":"off",children:i}),f(ro,{id:"t-search-input",autoFocus:!0,className:"t-search-input",placeholder:e.SEARCH_PLACEHOLDER_TEXT})]}),f("button",{className:"t-button t-previous-button","aria-label":e.ARIA_SEARCH_UP,disabled:r==="searching",onClick:()=>n.jumpToPreviousHighlight(),children:f(B,{type:"chevronUp",size:"20px"})}),f("button",{className:"t-button t-next-button","aria-label":e.ARIA_SEARCH_DOWN,disabled:r==="searching",onClick:()=>n.jumpToNextHighlight(),children:f(B,{type:"chevronDown",size:"20px"})})]})},CompactMessageContent:function(t){return f("span",{className:"t-theme-compact-message-content",children:f(QR,{...t})})},ConversationImage:function(t){const{common:e,conversation:n,participants:r}=t,{currentUser:i,theme:o}=e,{Avatar:s,GroupChatImage:a}=o;return n.photoUrl?f(s,{photoUrl:n.photoUrl,common:e}):r.length===0?null:r.length===1?f(s,{photoUrl:Ct(i),common:e}):r.length===2?f(s,{photoUrl:Ct(r[0].user.id===i.id?r[1].user:r[0].user),common:e}):f(a,{conversation:n,participants:r,common:e})},ConversationListItem:function(t){var g,S,O;const{common:e,conversation:n,isSelected:r}=t,{currentUser:i,theme:o,conversationList:s}=e,{TimeAgo:a,ConversationImage:l,CompactMessageContent:u}=o,{lastMessage:c}=n,d=Ft(n.id,10),h=d.length>=3,p=(g=c==null?void 0:c.sender)==null?void 0:g.name,m=(S=c==null?void 0:c.editedAt)!=null?S:c==null?void 0:c.createdAt,_=d.filter(D=>D.user.id!==i.id),E=_.length?_:d,A=(O=n.subject)!=null?O:E.map(D=>D.user.name).join(", ");return f("div",{className:"t-theme-conversation-list-item","t-unread":n.unreadMessageCount?"":void 0,"t-selected":r?"":void 0,onClick:()=>s.selectConversation(n.id),children:[f(l,{conversation:n,participants:d,common:e}),f("div",{className:"t-inner",children:[f("div",{className:"t-header",children:[f("div",{className:"t-conversation-name",children:A}),m&&f("span",{className:"t-timestamp",children:f(a,{timestamp:m,common:e})})]}),f("div",{className:"t-body",children:[c&&f("div",{className:"t-message",children:[h&&p&&f("span",{className:"t-message-sender",children:[p,":"]}),f(u,{message:c,common:e})]}),f(tI,{...t})]})]})]})},FileBlock:function({block:t,downloadUrl:e}){return f("div",{className:"t-theme-file-block",children:f("a",{className:"t-body-text",href:e,target:"_blank",rel:"noreferrer",children:[f(B,{type:"attachment",className:"t-attachment-icon"}),f(gt,{className:"t-filename",text:t.filename}),f("span",{className:"t-filesize",children:[" (",fn(t.size),")"]})]})})},GlobalSearchBox:function(t){const{common:e,query:n,cancel:r}=t,{t:i}=e;return f("div",{className:"t-theme-global-search-box",children:[f(ro,{className:"t-input",placeholder:i.SEARCH_PLACEHOLDER_TEXT}),n.length>0&&f("button",{type:"button",onClick:r,"aria-label":i.ARIA_LEAVE_SEARCH_MODE,className:"t-clear",children:f(B,{type:"close",size:"20px"})}),n.length===0&&f(B,{className:"t-submit",type:"search",size:"20px"})]})},GlobalSearchResultHeader:function(t){const{common:e,canLoadMore:n,loadMore:r,type:i}=t,{t:o}=e;return f("div",{className:"t-theme-global-search-result-header",children:[f("span",{className:"t-title",children:i==="messages"?o.SEARCH_RESULTS_MESSAGES:o.SEARCH_RESULTS_CONVERSATIONS}),n&&f("button",{className:"t-show-more",onClick:r,children:o.SEARCH_RESULTS_SHOW_MORE})]})},GlobalSearchResultItem:function(t){var g,S,O;const{common:e,conversation:n,message:r,isSelected:i}=t,{currentUser:o,theme:s,conversationList:a}=e,{TimeAgo:l,ConversationImage:u,CompactMessageContent:c}=s,d=Ft(n.id,10),h=d.length>=3,p=(g=r==null?void 0:r.sender)==null?void 0:g.name,m=(S=r==null?void 0:r.editedAt)!=null?S:r==null?void 0:r.createdAt,_=d.filter(D=>D.user.id!==o.id),E=_.length?_:d,A=(O=n.subject)!=null?O:E.map(D=>D.user.name).join(", ");return f("div",{className:"t-theme-global-search-result-item","t-selected":i?"":void 0,onClick:()=>{a.selectConversation(n.id,r==null?void 0:r.id)},children:[f(u,{conversation:n,participants:d,common:e}),f("div",{className:"t-inner",children:[f("div",{className:"t-header",children:[f("div",{className:"t-conversation-name",children:f(gt,{text:A})}),m&&f("span",{className:"t-timestamp",children:f(l,{timestamp:m,common:e})})]}),f("div",{className:"t-body",children:r&&f("div",{className:"t-message",children:[h&&p&&f("span",{className:"t-message-sender",children:[f(gt,{text:p}),":"]}),f(c,{message:r,common:e})]})})]})]})},GroupChatImage:function({participants:t}){return f("div",{className:"t-theme-group-chat-image",children:[f("div",{className:"t-mini-avatar",style:{backgroundImage:`url("${Ct(t[0].user)}")`}}),f("div",{className:"t-mini-avatar",style:{backgroundImage:`url("${Ct(t[1].user)}")`}}),t.length>2&&f("svg",{className:"t-counter",viewBox:"0 0 22 22",xmlns:"http://www.w3.org/2000/svg",children:[f("g",{className:"t-group",children:f("rect",{x:"0",y:"0",width:22,height:22,fill:"currentColor"})}),f("text",{textAnchor:"middle",x:11,y:Math.round(.666*22),width:22,height:22,fontSize:t.length>9?10:12,fill:"currentColor",children:t.length>9?"9+":t.length})]})]})},ImageBlock:function({block:t,downloadUrl:e}){const n={"--img-w":t.width||1,"--img-h":t.height||1};return f("div",{className:"t-theme-image-block",children:[f("a",{href:t.url,className:"t-image-wrapper",target:"_blank",rel:"noopener noreferrer",children:f("div",{className:"t-root",style:n,children:f("img",{src:t.url,className:"t-image"})})}),f("a",{href:e,className:"t-body-text",target:"_blank",rel:"noreferrer",children:[f(B,{className:"download-icon",type:"download"}),f(gt,{text:t.filename}),f("span",{className:"t-filesize",children:[" (",fn(t.size),")"]})]})]})},LocationBlock:function({block:t}){const{imageUrl:e,linkUrl:n}=sa(t);return f("div",{className:"t-theme-location-block",children:[f("a",{href:n,target:"_blank",rel:"noreferrer",className:"t-root",style:{background:`${`url(${JSON.stringify(e)})`} center center / cover no-repeat`}}),f("span",{className:"t-body-text",children:f("a",{href:n,target:"_blank",rel:"noopener noreferrer",children:n})})]})},Message:function(t){const{message:e,messageStatus:n,permissions:r,common:i}=t,{currentUser:o,theme:s,conversation:a,conversationId:l,t:u,focusedMessage:c}=i,{Avatar:d,ReferencedMessage:h,TimeAgo:p,MessageActionMenu:m}=s,_=Ft(l,3).length>=3,E=e.sender,A=(E==null?void 0:E.id)!==o.id&&_,g=e.referencedMessage,S=r.canReplyToMessage||r.canDeleteMessage,O=r.canAddReaction&&a.access==="ReadWrite";let D;D=E?E.id===o.id?"currentUser":"other":"system";const I=e.id===(c==null?void 0:c.id);return f("div",{className:"t-theme-message","t-sender":D,"t-message-id":e.id,"t-status":n,"t-focused":I?"":void 0,children:[f("div",{className:"t-message-row",children:[E&&f(d,{photoUrl:Ct(E),common:i}),f("div",{className:"t-message-body",children:[E&&A&&f("div",{className:"t-message-sender-name",style:{color:Tu(E.id)},children:E.name}),g&&f(h,{referencedMessage:g,common:i}),f(hu,{common:i,message:e,messageStatus:n}),f("div",{className:"t-message-status",children:[f(p,{timestamp:e.createdAt,common:i}),D=="currentUser"&&f(JR,{...t})]})]}),(S||O)&&f("div",{className:"t-message-buttons",children:[S&&f(oi,{type:"menu",popoverComponent:m,popoverProps:{message:e,permissions:r,common:i},className:"t-message-action-menu-button","aria-label":u.ARIA_MORE_ACTIONS,children:f(B,{className:"t-action-menu-icon",type:"horizontalDots"})}),O&&f(oi,{className:"t-add-reaction-button",popoverComponent:mu,popoverProps:{messageId:e.id,colorScheme:"light"},"aria-label":u.ADD_REACTION,children:f(B,{type:"addEmoji"})})]})]}),e.reactions.length>0&&f("div",{className:"t-emoji-reactions",children:e.reactions.map(R=>f(qR,{summary:R,message:e,common:i,permissions:r},R.emoji))})]})},MessageActionMenu:function(t){const{message:e,permissions:n,common:r}=t,{chatbox:i,t:o}=r;return f("div",{className:"t-theme-message-action-menu",children:[n.canReplyToMessage&&f(Hn,{className:"t-menu-item",onSelect:()=>i.setReferencedMessage(e.id),children:o.REPLY_TO_MESSAGE}),n.canEditMessage&&f(Hn,{className:"t-menu-item",onSelect:()=>i.setEditing(e.id),children:o.EDIT_MESSAGE}),n.canDeleteMessage&&f(Hn,{className:"t-menu-item t-danger",onSelect:()=>i.deleteMessage(e.id),children:o.DELETE_MESSAGE})]})},MessageDivider:function(t){const{timestamp:e,isReadMarker:n,isDayMarker:r,common:i}=t,{t:o}=i;return f("div",{className:"t-message-divider",children:[f("div",{className:"t-line","t-side":"left",children:f("div",{className:"t-line-segment"})}),r&&f("span",{className:"t-day-marker",children:Iu(e,o)}),f("div",{className:"t-line","t-side":"right",children:[f("div",{className:"t-line-segment"}),n&&f("span",{className:"t-unread-marker",children:o.MESSAGELIST_NEW_MARKER})]})]})},MessageField:function(t){const{common:e,referencedMessage:n,editor:r,voiceRecorder:i,permissions:o,editMessageId:s}=t,{chatbox:a,device:l,conversation:u,t:c,theme:d}=e,{ReplyBar:h,VoiceRecorder:p,RecordingPreview:m}=d,_=s?"edit":"send",E=!r.atTextLimit&&!r.isEmpty&&u.access==="ReadWrite",A=_==="send"&&r.isEmpty&&o.canShareLocation,g=_==="send"&&r.isEmpty&&o.canShareFile,S=_==="send"&&l.supportsEmojiPicker&&!l.isMobile,O=_==="send"&&r.isEmpty&&o.canSendVoiceMessage,D=!i&&u.access==="ReadWrite";return f("div",{className:"t-theme-message-field","t-mode":_,children:[r.showEmojiPicker&&f("div",{className:"t-emoji-picker-wrapper",children:f(ta,{colorScheme:"light"})}),f(Eu,{}),f(Ou,{}),n&&f(h,{common:e,referencedMessage:n}),f("div",{className:"t-wrapper",children:[r.atTextLimit&&f("div",{className:"t-text-limit-indicator",children:c.ENTRYBOX_TEXT_LIMIT}),f("div",{className:"t-text-form",children:[u.access==="Read"&&f("div",{className:"t-readonly",children:c.ENTRYBOX_PLACEHOLDER_CHAT_READONLY}),(i==null?void 0:i.state)==="recording"&&f(p,{common:e,voiceRecorder:i}),(i==null?void 0:i.state)==="previewing"&&f(m,{common:e,voiceRecorder:i}),D&&f("div",{className:"t-textbox-column",children:[f(lu,{placeholder:c.ENTRYBOX_PLACEHOLDER}),f("div",{className:"t-button-overlay",children:[A&&f("button",{className:"t-location-button","t-kind":"icon-button","aria-label":c.UPLOAD_SHARE_LOCATION,title:c.UPLOAD_SHARE_LOCATION,onClick:()=>r.shareLocation(),children:f(B,{type:"location",size:"20px"})}),g&&f("button",{className:"t-attachment-button","t-kind":"icon-button","aria-label":c.UPLOAD_SEND_FILE,title:c.UPLOAD_SEND_FILE,onClick:()=>r.attachFile(),children:f(B,{type:"attachment"})}),S&&f("button",{className:"t-emoji-button","t-kind":"icon-button","aria-label":c.ARIA_INSERT_EMOJI,title:c.ARIA_INSERT_EMOJI,onClick:()=>r.toggleEmojiPicker(),children:f(B,{type:r.showEmojiPicker?"close":"emoji",size:r.showEmojiPicker?"24px":"20px"})})]})]}),_==="send"&&D&&f("div",{className:"t-send-column",children:[O&&f("button",{className:"t-record-button","t-kind":"icon-button","aria-label":c.VOICE_MESSAGE,title:c.VOICE_MESSAGE,onClick:()=>r.recordVoiceMessage(),children:f(B,{type:"microphone",size:"20px"})}),!O&&f("button",{className:"t-send-button","t-kind":"icon-button","aria-label":c.SEND_BUTTON_TEXT,title:c.SEND_BUTTON_TEXT,onClick:()=>r.send(),disabled:!E,children:f(B,{type:"arrowUp",size:"20px"})})]}),_==="edit"&&f("div",{className:"t-edit-row",children:[f("button",{"t-action":"cancel",onClick:()=>a.setEditing(null),children:c.CANCEL}),f("button",{"t-action":"save",onClick:()=>r.send(),disabled:!E,children:c.SAVE})]})]})]})]})},MessageListFooter:function(t){return null},MessageListHeader:function(t){return null},NoConversationSelected:function({common:t}){return f("div",{className:"t-theme-no-conversation-selected",children:t.t.SELECT_CONVERSATION})},RecordingPreview:function(t){const{common:e,voiceRecorder:n}=t,{t:r}=e;return f("div",{className:"t-theme-recording-preview",children:[f("button",{className:"t-close-button","t-kind":"icon-button","aria-label":r.ARIA_CANCEL_UPLOAD,title:r.ARIA_CANCEL_UPLOAD,onClick:()=>n.cancel(),children:f(B,{type:"close",size:"24px"})}),f("div",{className:"t-textbox-column",children:f(Un,{src:n.recordingUrl})}),n.uploadState==="pending"&&f("div",{className:"t-send-column",children:f("div",{className:"t-loading",children:f(B,{type:"spinner",className:"t-spinner"})})}),n.uploadState==="done"&&f("div",{className:"t-send-column",children:f("button",{className:"t-send-button","t-kind":"icon-button","aria-label":r.SEND_BUTTON_TEXT,title:r.SEND_BUTTON_TEXT,onClick:()=>n.send(),children:f(B,{type:"arrowUp",size:"20px"})})})]})},ReferencedMessage:function(t){const{referencedMessage:e,common:n}=t,{theme:r,chatbox:i}=n,{CompactMessageContent:o}=r;return f("div",{className:"t-theme-referenced-message",onClick:()=>i.focusMessage(e.id),children:[f("div",{className:"t-sender-name",children:e.sender.name}),f("div",{className:"t-content",children:f(o,{message:e,common:n})})]})},ReplyBar:function(t){const{common:e,referencedMessage:n}=t,{chatbox:r,t:i,theme:o}=e,{CompactMessageContent:s}=o;return f("div",{className:"t-theme-reply-bar",children:[f(B,{className:"t-reply-icon",type:"reply"}),f("div",{className:"t-body",onClick:()=>r.focusMessage(n.id),children:[f("div",{className:"t-sender-name",children:n.sender.name}),f("div",{className:"t-content",children:f(s,{message:n,common:e})})]}),f("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:f(B,{className:"t-close-icon",type:"close"})})]})},TextBlock:function({block:t,message:e}){return f("div",{className:"t-theme-text-block",children:f(go,{block:t,message:e})})},TimeAgo:function(t){return t.timestamp===-1?null:f(eI,{...t})},VideoBlock:function({block:t,downloadUrl:e}){return f("div",{className:"t-theme-video-block",children:[f("div",{className:"t-video-wrapper",children:f("div",{className:"t-root",style:{"--video-w":t.width||1,"--video-h":t.height||1},children:f("video",{className:"t-video",controls:!0,preload:"metadata",src:`${t.url}#t=0.1`,playsInline:!0})})}),f("a",{href:e,className:"t-body-text",target:"_blank",rel:"noreferrer",children:[f(B,{className:"download-icon",type:"download"}),f(gt,{text:t.filename}),f("span",{className:"t-filesize",children:[" (",fn(t.size),")"]})]})]})},VoiceBlock:function({block:t}){return f(Un,{className:"t-theme-voice-block",src:t.url,filename:t.filename})},VoiceRecorder:function(t){const{common:e,voiceRecorder:n}=t,{t:r}=e;return f("div",{className:"t-theme-voice-recorder",children:[f("button",{className:"t-close-button","t-kind":"icon-button","aria-label":r.ARIA_CANCEL_RECORDING,title:r.ARIA_CANCEL_RECORDING,onClick:()=>n.cancel(),children:f(B,{type:"close",size:"24px"})}),f("div",{className:"t-textbox-column t-waveform-wrapper",children:[f(vu,{className:"t-waveform",voiceRecorder:n}),f("span",{className:"t-duration",children:di(n.duration)})]}),f("div",{className:"t-send-column",children:f("button",{className:"t-stop-button","t-kind":"icon-button","aria-label":r.ARIA_STOP_RECORDING,title:r.ARIA_STOP_RECORDING,onClick:()=>n.stop(),children:f(B,{type:"stop",className:"t-stop-icon",size:"20px"})})})]})}},Symbol.toStringTag,{value:"Module"})),nI=Mf,rI=$A;function iI(t){const{conversation:e,theme:n,chatbox:r,t:i,chatSearchState:o}=t.common,{ConversationImage:s,ChatSearchBox:a}=n,l=Ft(e.id,10);return t.permissions.canSearch&&o!=="hidden"?f("div",{className:"t-theme-chat-header",children:f(a,{common:t.common,searchQuery:t.searchQuery})}):f("div",{className:"t-theme-chat-header",children:f("div",{className:"t-inner",children:[f("div",{className:"t-content",children:[f("button",{className:"t-back-button","aria-label":i.INBOX,title:i.INBOX,onClick:()=>r.clickBackButton(),children:f(B,{type:"chevronLeft",size:20})}),f("div",{className:"t-image",children:f(s,{conversation:e,participants:l,common:t.common})}),f("div",{className:"t-info",children:f(oI,{...t})})]}),f("div",{className:"t-actions",children:f("button",{className:"t-action-button","aria-label":i.ARIA_SEARCH_INSIDE_CONVERSATION,title:i.ARIA_SEARCH_INSIDE_CONVERSATION,onClick:()=>r.toggleSearchBox(),children:f(B,{type:"search",size:20})})})]})})}function oI(t){const{common:e}=t;return e.conversation.subject?f(ie,{children:[f("div",{className:"t-title",children:e.conversation.subject}),f("div",{className:"t-subtitle",children:f(Nf,{...t})})]}):f("div",{className:"t-title",children:f(Nf,{...t})})}function Nf({common:t,isUserConnected:e,permissions:n}){const r=Ft(t.conversation.id,10),i=r.find(({user:a})=>a.id===t.currentUser.id),o=r.filter(({user:a})=>a.id!==t.currentUser.id),s=o.length>2?r:r.length===2?o:i?[i,...o]:[];return n.showOnlineStatus?f("span",{className:"t-participants",children:s.map(({user:a})=>f("span",{className:"t-participant",children:[f("span",{children:a.name}),a.id===t.currentUser.id&&f("span",{className:"t-participant-you",children:" (you)"}),f("span",{className:"t-online-indicator","t-status":e[a.id]?"online":"offline"})]},a.id))}):f("span",{className:"t-participants",children:s.map(({user:a})=>a.name).join(", ")})}function sI(t){return null}function aI(t){var I,R;const{message:e,messageStatus:n,permissions:r,common:i}=t,{currentUser:o,theme:s,conversation:a,t:l}=i,{Avatar:u,ReferencedMessage:c,MessageActionMenu:d}=s,h=Ft(a.id,3).length>=3,p=e.sender,m=(p==null?void 0:p.id)!==o.id&&h,_=e.referencedMessage,E=n!=="sending"&&(r.canReplyToMessage||r.canDeleteMessage),A=r.canAddReaction&&a.access==="ReadWrite";let g;g=p?p.id===o.id?"currentUser":"other":"system";const S=(I=i.focusedMessage)==null?void 0:I.id,O=S!==void 0&&e.id===S,D={messageId:e.id,colorScheme:"light"};return f("div",{className:"t-theme-message","t-sender":g,"t-message-id":e.id,"t-status":n,"t-focused":O?"":void 0,children:[p&&f("div",{className:"t-avatar-wrapper",children:f(u,{photoUrl:Ct(p),common:i})}),p&&m&&f("div",{className:"t-message-sender-name",style:{color:Tu(p.id)},children:p.name}),f("div",{className:"t-message-body",children:[g==="system"&&f("span",{className:"sys-icon",children:f(B,{type:"info",size:14})}),_&&f(c,{referencedMessage:_,common:i}),f(hu,{common:i,message:e,messageStatus:n}),((R=e.reactions)==null?void 0:R.length)>0&&f("div",{className:"t-emoji-reactions",children:e.reactions.map(y=>f(lI,{summary:y,message:e,common:i,permissions:r},y.emoji))})]}),f("div",{className:"t-message-status",children:[f(uI,{timestamp:e.createdAt,common:i}),g=="currentUser"&&f(cI,{...t})]}),f("div",{className:"t-message-buttons",children:[E&&f(oi,{type:"menu",popoverComponent:d,popoverProps:{message:e,permissions:r,common:i},className:"t-message-action-menu-button","aria-label":l.ARIA_MORE_ACTIONS,children:f(B,{type:"horizontalDots",className:"t-action-menu-icon",size:20})}),A&&f(oi,{className:"t-add-reaction-button",popoverComponent:mu,popoverProps:D,"aria-label":l.ADD_REACTION,children:f(B,{type:"addEmoji",className:"t-add-reaction-icon",size:20})})]})]})}function lI({summary:t,message:e,common:n,permissions:r}){const{t:i,chatbox:o,conversation:s}=n,{emoji:a,count:l,currentUserReacted:u}=t,[c,d]=yu(s.id,e.id,t.emoji),h=c.map(m=>m.user.name);c.length&&c.length<t.count&&h.push("...");const p=h.join(", ");return f("button",{className:"t-reaction-button","t-active":u?"true":void 0,onClick:()=>o.toggleReaction(e.id,a),disabled:!r.canAddReaction,"aria-label":i.ARIA_REACTION_COUNT(l,a),"aria-pressed":u,onMouseOver:d,onTouchStart:d,"t-tooltip-text":p,children:[f("span",{className:"t-emoji",children:a}),f("span",{className:"t-num-reactions",children:l})]})}function cI({messageStatus:t}){return t==="sending"?f("span",{className:"t-status-icon","t-status":"sending",children:f(B,{type:"inProgress",className:"t-message-loading-spinner",size:"20px"})}):t==="sent"?f("span",{className:"t-status-icon","t-status":"sent",children:f(B,{type:"checkmark",size:12})}):t==="everyoneRead"?f("span",{className:"t-status-icon","t-status":"everyoneRead",children:[f(B,{type:"checkmark",size:12}),f(B,{type:"checkmark",size:12})]}):null}function uI({timestamp:t,common:e}){if(t===-1)return null;const{t:n}=e;return f("span",{className:"t-theme-time-ago",children:f("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 dI(t){const{message:e,permissions:n,common:r}=t,{chatbox:i,t:o}=r;return f("div",{className:"t-theme-message-action-menu",children:[n.canReplyToMessage&&f(Hn,{className:"t-menu-item",onSelect:()=>i.setReferencedMessage(e.id),children:[f("span",{className:"t-menu-item-icon-box",children:f(B,{type:"reply",className:"t-menu-item-icon",size:16})}),f("span",{children:o.REPLY_TO_MESSAGE})]}),n.canEditMessage&&f(Hn,{className:"t-menu-item",onSelect:()=>i.setEditing(e.id),children:[f("span",{className:"t-menu-item-icon-box",children:f(B,{type:"edit",className:"t-menu-item-icon",size:16})}),f("span",{children:o.EDIT_MESSAGE})]}),n.canDeleteMessage&&f(Hn,{className:"t-menu-item t-danger",onSelect:()=>i.deleteMessage(e.id),children:[f("span",{className:"t-menu-item-icon-box",children:f(B,{type:"trash",className:"t-menu-item-icon",size:16})}),f("span",{children:o.DELETE_MESSAGE})]})]})}function hI(t){const{common:e,referencedMessage:n,editor:r,voiceRecorder:i,permissions:o,editMessageId:s}=t,{chatbox:a,device:l,conversation:u,t:c,theme:d}=e,{ReplyBar:h,VoiceRecorder:p,RecordingPreview:m}=d,_=s?"edit":"send",E=_==="edit"&&!r.atTextLimit&&r.characterCount>0,A=!r.isEmpty&&!r.atTextLimit&&u.access==="ReadWrite",g=!i&&u.access==="ReadWrite",S=_==="send"&&r.isEmpty&&o.canShareLocation,O=_==="send"&&o.canShareFile,D=_==="send"&&l.supportsEmojiPicker&&!l.isMobile,I=_==="send"&&r.isEmpty&&o.canSendVoiceMessage;return f("div",{className:"t-theme-message-field","t-mode":_,children:[r.showEmojiPicker&&f("div",{className:"t-emoji-picker-wrapper",children:f(ta,{colorScheme:"light"})}),f(Eu,{}),f(Ou,{}),n&&f(h,{common:e,referencedMessage:n}),f("div",{className:"t-wrapper",children:[r.atTextLimit&&f("div",{className:"t-text-limit-indicator",children:c.ENTRYBOX_TEXT_LIMIT}),f("div",{className:"t-text-form",children:[u.access==="Read"&&f("div",{className:"t-readonly",children:c.ENTRYBOX_PLACEHOLDER_CHAT_READONLY}),i&&i.state==="recording"&&f(p,{common:e,voiceRecorder:i}),i&&i.state==="previewing"&&f(m,{common:e,voiceRecorder:i}),g&&f(ie,{children:[O&&f("div",{className:"t-attachment-column",children:f("button",{className:"t-attachment-button","t-kind":"icon-button","aria-label":c.UPLOAD_SEND_FILE,title:c.UPLOAD_SEND_FILE,onClick:()=>r.attachFile(),children:f(B,{type:"attachment",size:20})})}),f("div",{className:"t-textbox-column",children:[f(lu,{placeholder:c.ENTRYBOX_PLACEHOLDER}),f("div",{className:"t-button-overlay",children:[S&&f("button",{className:"t-location-button","t-kind":"icon-button","aria-label":c.UPLOAD_SHARE_LOCATION,title:c.UPLOAD_SHARE_LOCATION,onClick:()=>r.shareLocation(),children:f(B,{type:"location",size:20})}),D&&f("button",{className:"t-emoji-button","t-kind":"icon-button","aria-label":c.ARIA_INSERT_EMOJI,title:c.ARIA_INSERT_EMOJI,onClick:()=>r.toggleEmojiPicker(),children:f(B,{type:r.showEmojiPicker?"close":"emoji",size:r.showEmojiPicker?24:20})})]})]})]}),_==="send"&&g&&f("div",{className:"t-send-column",children:[I&&f("button",{className:"t-record-button","t-kind":"icon-button","aria-label":c.VOICE_MESSAGE,title:c.VOICE_MESSAGE,onClick:()=>r.recordVoiceMessage(),children:f(B,{type:"microphone",size:20})}),!I&&f("button",{className:"t-send-button","t-kind":"icon-button","aria-label":c.SEND_BUTTON_TEXT,title:c.SEND_BUTTON_TEXT,onClick:()=>r.send(),disabled:!A,children:f(B,{type:"arrowUp",size:20})})]}),_==="edit"&&f("div",{className:"t-edit-row",children:[f("button",{"t-action":"cancel",onClick:()=>a.setEditing(null),children:c.CANCEL}),f("button",{"t-action":"save",onClick:()=>r.send(),disabled:!E,children:c.SAVE})]})]})]})]})}function pI(t){const{timestamp:e,isReadMarker:n,isDayMarker:r,common:i}=t,{t:o}=i;return f("div",{className:"t-message-divider",children:[f("div",{className:"t-line","t-side":"left",children:f("div",{className:"t-line-segment"})}),r&&e!==void 0&&f("span",{className:"t-day-marker",children:Iu(e,o)}),f("div",{className:"t-line","t-side":"right",children:[f("div",{className:"t-line-segment"}),n&&f("span",{className:"t-unread-marker",children:o.MESSAGELIST_NEW_MARKER})]})]})}function fI(t){return null}function mI({common:t}){const e=t.conversation.welcomeMessages;if(e.length===0)return null;const n=e.map((r,i)=>f(Du,{text:r},i)).reverse();return f("div",{className:"t-message-group",children:n})}function EI({common:t}){const{typing:e,theme:n}=t,{Avatar:r}=n;if(!e.many&&e.users.length===0)return null;const i=e.many?f("div",{className:"t-theme-avatar",children:"5+"}):e.users.slice(0,2).map(o=>f(r,{photoUrl:Ct(o),common:t},o.id));return f("div",{className:"t-theme-after-messages","t-many":String(e.many),"aria-label":_I(e),children:[f("div",{className:"t-typing-avatars","aria-hidden":"true",children:[i,!e.many&&e.users.length>2&&f("div",{className:"t-theme-avatar",children:["+",e.users.length-2]})]}),f("div",{className:"t-typing-bubble",children:f("div",{className:"t-typing-animation",children:[f("span",{}),f("span",{}),f("span",{})]})})]})}function _I(t){if(t.many)return"Several people are typing";const{users:e}=t;return e.length===1?`${e[0].name} is typing`:e.length===2?`${e[0].name} and ${e[1].name} are typing`:`${e[0].name}, ${e[1].name}, and ${e.length-2} others are typing`}function AI(t){return f("span",{className:"t-theme-compact-message-content",children:f(gI,{...t})})}function gI({message:t,common:e}){var i;const n=t.content[0],{t:r}=e;if(n.type==="text")return f(go,{block:n,message:t,nonInteractive:!0});if(n.type==="location")return f(ie,{children:[f(B,{type:"location",size:16})," ",r.LOCATION]});if(n.type==="file"){if(n.subtype==="image")return f(ie,{children:[f(B,{type:"image",size:16}),n.filename]});if(n.subtype==="video")return f(ie,{children:[f(B,{type:"movie",size:16}),n.filename]});if(n.subtype==="audio")return f(ie,{children:[f(B,{type:"attachment",size:16}),n.filename]});if(n.subtype==="voice")return f(ie,{children:[f(B,{type:"microphone",size:16}),r.VOICE_MESSAGE," (",di((i=n.duration)!=null?i:0),")"]});if(n.subtype===void 0)return f(ie,{children:[f(B,{type:"attachment",size:16}),n.filename]})}return null}function SI(t){const{t:e,chatbox:n,chatSearchState:r}=t.common,{searchQuery:i}=t;let o;return r==="searching"?o=e.SEARCH_SEARCHING:r==="noResults"?o=e.SEARCH_NO_RESULTS:r==="noMoreResults"&&(o=e.SEARCH_NO_MORE_RESULTS),f("div",{className:"t-theme-chat-search-wrap",children:[f("div",{className:"t-theme-chat-search-box",children:[f("button",{className:"t-button t-back-button","aria-label":e.ARIA_LEAVE_SEARCH_MODE,onClick:()=>n.toggleSearchBox(),children:f(B,{type:"chevronLeft",size:20})}),f("div",{className:"t-search-field",children:[f(ro,{id:"t-search-input",autoFocus:!0,placeholder:e.SEARCH_PLACEHOLDER_TEXT,className:"t-search-input"}),i.length>0&&f("button",{type:"button",className:"t-clear","aria-label":e.ARIA_LEAVE_SEARCH_MODE,onClick:()=>{n.setSearchQuery("")},children:f(B,{type:"close",size:20})})]}),f("button",{className:"t-button t-previous-button","aria-label":e.ARIA_SEARCH_UP,disabled:r==="searching",onClick:()=>n.jumpToPreviousHighlight(),children:f(B,{type:"chevronUp",size:20})}),f("button",{className:"t-button t-next-button","aria-label":e.ARIA_SEARCH_DOWN,disabled:r==="searching",onClick:()=>n.jumpToNextHighlight(),children:f(B,{type:"chevronDown",size:20})})]}),o&&f("div",{className:"t-theme-chat-search-status",role:"status","aria-live":"polite",children:f("span",{className:"t-text",children:o})})]})}function OI({block:t,downloadUrl:e}){return f("div",{className:"t-theme-audio-block",children:[f(Un,{src:t.url,filename:t.filename}),f("div",{className:"t-metadata",children:[f("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:[f(B,{className:"t-download-icon",type:"download"}),f(gt,{className:"t-filename",text:t.filename})]}),f("span",{className:"t-filesize",children:[" (",fn(t.size),")"]})]})]})}function vI({block:t,downloadUrl:e}){return f("div",{className:"t-theme-file-block",children:f("div",{className:"t-metadata",children:[f("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:[f(B,{type:"attachment",className:"t-attachment-icon"}),f(gt,{className:"t-filename",text:t.filename})]}),f("span",{className:"t-filesize",children:[" (",fn(t.size),")"]})]})})}function DI({block:t,downloadUrl:e}){const n={"--img-w":t.width||1,"--img-h":t.height||1};return f("div",{className:"t-theme-image-block",children:[f("a",{href:t.url,className:"t-image-wrapper",target:"_blank",rel:"noopener noreferrer",children:f("div",{className:"t-root",style:n,children:f("img",{src:t.url,className:"t-image"})})}),f("div",{className:"t-metadata",children:[f("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:[f(B,{className:"t-download-icon",type:"download"}),f(gt,{className:"t-filename",text:t.filename})]}),f("span",{className:"t-filesize",children:[" (",fn(t.size),")"]})]})]})}function TI({block:t}){const{imageUrl:e,linkUrl:n}=sa(t);return f("div",{className:"t-theme-location-block",children:[f("div",{className:"t-location-wrapper",children:f("a",{href:n,target:"_blank",rel:"noopener noreferrer",className:"t-root",style:{backgroundImage:`url(${JSON.stringify(e)})`}})}),f("div",{className:"t-metadata",children:f("a",{href:n,target:"_blank",rel:"noopener noreferrer",children:[f(B,{className:"t-location-icon",type:"pin"}),f("span",{className:"t-location-link",children:n})]})})]})}function RI({block:t,message:e}){return f("div",{className:"t-theme-text-block",children:f(go,{block:t,message:e})})}function II({block:t,downloadUrl:e}){return f("div",{className:"t-theme-video-block",children:[f("div",{className:"t-video-wrapper",children:f("div",{className:"t-root",style:{"--video-w":t.width||1,"--video-h":t.height||1},children:f("video",{className:"t-video",controls:!0,preload:"metadata",src:`${t.url}#t=0.1`,playsInline:!0})})}),f("div",{className:"t-metadata",children:[f("a",{href:e,className:"t-body-text",target:"_blank",rel:"noopener noreferrer",children:[f(B,{className:"t-download-icon",type:"download"}),f(gt,{className:"t-filename",text:t.filename})]}),f("span",{className:"t-filesize",children:[" (",fn(t.size),")"]})]})]})}function yI({block:t}){return f(Un,{className:"t-theme-voice-block",src:t.url,filename:t.filename})}function CI({photoUrl:t}){return f("div",{className:"t-theme-avatar",style:{backgroundImage:`url("${t}")`}})}function NI({common:t,conversation:e,participants:n}){const{currentUser:r,theme:i}=t,{Avatar:o,GroupChatImage:s}=i;if(e.photoUrl)return f(o,{photoUrl:e.photoUrl,common:t});if(n.length===0)return null;if(n.length===1)return f(o,{photoUrl:Ct(r),common:t});if(n.length===2){const a=n[0],l=n[1];return!a||!l?null:f(o,{photoUrl:Ct(a.user.id===r.id?l.user:a.user),common:t})}return f(s,{conversation:e,participants:n,common:t})}function bI({participants:t,conversation:e}){var r;const n=t[0];return f("div",{className:"t-theme-group-chat-image",children:[f("div",{className:"t-mini-avatar",style:{backgroundImage:`url("${e.subject?RA(e.id,((r=e.subject[0])!=null?r:"").toUpperCase()):n?Ct(n.user):""}")`}}),t.length>2&&f("svg",{className:"t-counter",viewBox:"0 0 22 22",xmlns:"http://www.w3.org/2000/svg",children:[f("g",{className:"t-group",children:f("rect",{x:"0",y:"0",width:22,height:22,fill:"currentColor"})}),f("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 wI({referencedMessage:t,common:e}){const{theme:n,chatbox:r}=e,{CompactMessageContent:i}=n;return f("div",{className:"t-theme-referenced-message",onClick:()=>r.focusMessage(t.id),children:[f("span",{className:"t-accent-bar"}),f("div",{className:"t-inner",children:[f("span",{className:"t-sender-name",children:t.sender.name}),f("div",{className:"t-content",children:f(i,{message:t,common:e})})]})]})}function LI(t){const{common:e,referencedMessage:n}=t,{chatbox:r,t:i,theme:o}=e,{CompactMessageContent:s}=o;return f("div",{className:"t-theme-reply-bar",children:[f(B,{className:"t-reply-icon",type:"reply",size:20}),f("div",{className:"t-body",onClick:()=>r.focusMessage(n.id),children:[f("div",{className:"t-sender-name",children:n.sender.name}),f("div",{className:"t-content",children:f(s,{message:n,common:e})})]}),f("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:f(B,{className:"t-close-icon",type:"close",size:24})})]})}function kI({timestamp:t,common:e}){const{t:n}=e,r=Ru(t,n);return t===-1?null:f("span",{className:"t-theme-time-ago",children:f("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 MI(t){var g,S,O;const{common:e,conversation:n,isSelected:r}=t,{currentUser:i,theme:o,conversationList:s}=e,{TimeAgo:a,ConversationImage:l,CompactMessageContent:u}=o,{lastMessage:c}=n,d=Ft(n.id,10),h=d.length>=3,p=(g=c==null?void 0:c.sender)==null?void 0:g.name,m=(S=c==null?void 0:c.editedAt)!=null?S:c==null?void 0:c.createdAt,_=d.filter(D=>D.user.id!==i.id),E=_.length?_:d,A=(O=n.subject)!=null?O:E.map(D=>D.user.name).join(", ");return f("div",{className:"t-theme-conversation-list-item","t-unread":n.unreadMessageCount?"":void 0,"t-selected":r?"":void 0,onClick:()=>s.selectConversation(n.id),children:[f(l,{conversation:n,participants:d,common:e}),f("div",{className:"t-inner",children:[f("div",{className:"t-header",children:[f("div",{className:"t-conversation-name",children:A}),m&&f("span",{className:"t-timestamp",children:f(a,{timestamp:m,common:e})})]}),f("div",{className:"t-body",children:[c&&f("div",{className:"t-message",children:[h&&p&&f("span",{className:"t-message-sender",children:[p,":"]}),f(u,{message:c,common:e})]}),f(PI,{...t})]})]})]})}function PI({conversation:t}){const{isUnread:e,unreadMessageCount:n}=t;return e?f("div",n===0?{className:"t-unread-generic-dot"}:n>999?{className:"t-unread-dot",children:f("span",{children:"999+"})}:{className:"t-unread-dot",children:f("span",{children:n})}):null}function xI(t){var g,S,O;const{common:e,conversation:n,message:r,isSelected:i}=t,{currentUser:o,theme:s,conversationList:a}=e,{TimeAgo:l,ConversationImage:u,CompactMessageContent:c}=s,d=Ft(n.id,10),h=d.length>=3,p=(g=r==null?void 0:r.sender)==null?void 0:g.name,m=(S=r==null?void 0:r.editedAt)!=null?S:r==null?void 0:r.createdAt,_=d.filter(D=>D.user.id!==o.id),E=_.length?_:d,A=(O=n.subject)!=null?O:E.map(D=>D.user.name).join(", ");return f("div",{className:"t-theme-global-search-result-item","t-selected":i?"":void 0,onClick:()=>{a.selectConversation(n.id,r==null?void 0:r.id)},children:[f(u,{conversation:n,participants:d,common:e}),f("div",{className:"t-inner",children:[f("div",{className:"t-header",children:[f("div",{className:"t-conversation-name",children:f(gt,{text:A})}),m&&f("span",{className:"t-timestamp",children:f(l,{timestamp:m,common:e})})]}),f("div",{className:"t-body",children:r&&f("div",{className:"t-message",children:[h&&p&&f("span",{className:"t-message-sender",children:[f(gt,{text:p}),":"]}),f(c,{message:r,common:e})]})})]})]})}function FI(t){const{common:e,query:n,cancel:r}=t,{t:i}=e;return f("div",{className:"t-theme-global-search-header",children:f("div",{className:"t-theme-global-search-box",children:[f("span",{className:"t-search-icon","aria-hidden":"true",children:f(B,{type:"search",size:20})}),f(ro,{placeholder:i.SEARCH_PLACEHOLDER_TEXT,className:"t-input"}),n.length>0&&f("button",{type:"button",onClick:r,"aria-label":i.ARIA_LEAVE_SEARCH_MODE,className:"t-clear",children:f(B,{type:"close",size:20})})]})})}function HI(t){const{common:e,canLoadMore:n,loadMore:r,type:i}=t,{t:o}=e;return f("div",{className:"t-theme-global-search-result-header",children:[f("span",{className:"t-title",children:i==="messages"?o.SEARCH_RESULTS_MESSAGES:o.SEARCH_RESULTS_CONVERSATIONS}),n&&f("button",{className:"t-show-more",onClick:r,children:o.SEARCH_RESULTS_SHOW_MORE})]})}function UI(t){const{common:e,voiceRecorder:n}=t,{t:r}=e;return f("div",{className:"t-theme-recording-preview",children:[f("button",{className:"t-close-button","t-kind":"icon-button","aria-label":r.ARIA_CANCEL_UPLOAD,title:r.ARIA_CANCEL_UPLOAD,onClick:()=>n.cancel(),children:f(B,{type:"close",size:24})}),f("div",{className:"t-textbox-column",children:f(Un,{src:n.recordingUrl})}),n.uploadState==="pending"&&f("div",{className:"t-send-column",children:f("div",{className:"t-loading",children:f(B,{type:"spinner",className:"t-spinner",size:24})})}),n.uploadState==="done"&&f("div",{className:"t-send-column",children:f("button",{className:"t-send-button","t-kind":"icon-button","aria-label":r.SEND_BUTTON_TEXT,title:r.SEND_BUTTON_TEXT,onClick:()=>n.send(),children:f(B,{type:"send",size:24})})})]})}function BI(t){const{common:e,voiceRecorder:n}=t,{t:r}=e;return f("div",{className:"t-theme-voice-recorder",children:[f("button",{className:"t-close-button","t-kind":"icon-button","aria-label":r.ARIA_CANCEL_RECORDING,title:r.ARIA_CANCEL_RECORDING,onClick:()=>n.cancel(),children:f(B,{type:"close",size:24})}),f("div",{className:"t-textbox-column t-waveform-wrapper",children:[f(vu,{className:"t-waveform",voiceRecorder:n}),f("span",{className:"t-duration",children:di(n.duration)})]}),f("div",{className:"t-send-column",children:f("button",{className:"t-stop-button","t-kind":"icon-button","aria-label":r.ARIA_STOP_RECORDING,title:r.ARIA_STOP_RECORDING,onClick:()=>n.stop(),children:f(B,{type:"stop",className:"t-stop-icon",size:20})})})]})}function jI({common:t}){return f("div",{className:"t-theme-no-conversation-selected",children:t.t.SELECT_CONVERSATION})}const VI=new Promise(t=>{typeof document!="undefined"&&document.readyState==="loading"?document.addEventListener("DOMContentLoaded",t,{once:!0}):t(void 0)});function bu(t,e,n,r){const i=new Map,o=[],s=[];for(const[d,h]of(a=n,Object.entries(a))){const p=[d,d.toLowerCase(),zI(d)];for(const m of p)i.set(m,d);["string","boolean","number"].includes(h.type)&&o.push(...p),h.required!==!1&&s.push(d)}var a;const c=class c extends HTMLElement{constructor(){super(),this._renderRequested=!1,this._props={},this._renderRoot=null,this._ref={current:null};for(const[h,p]of i)if(Object.hasOwnProperty.call(this,h)){const m=this[h];this.updateProp(p,m),delete this[h]}else this.hasAttribute(h)&&this.syncAttributeToProp(h)}updateProp(h,p){const{type:m}=n[h];if(m==="boolean"&&typeof p=="string"?p=p!=="false":m==="number"&&typeof p=="string"&&(p=Number(p)),p===void 0){const _=h in this._props;return delete this._props[h],_}{const _=this._props[h]!==p;return this._props[h]=p,_}}syncAttributeToProp(h){const p=i.get(h);re(p,`Attribute "${h}" should have matching prop`);const m=this.getAttribute(h);return this.updateProp(p,m)}async requestRender(){this.isConnected&&!this._renderRequested&&(this._renderRequested=!0,this._renderRequested=await!1,this.render())}render(){var h;this._renderRoot||(this._renderRoot=(h=this,{render:function(A){yc(A,h)},unmount:function(){Nc(h)}}));const p=s.filter(A=>!(A in this._props));if(p.length>0)return r(p),void this._renderRoot.render(null);const m=Object.assign({},this._props),_=A=>{const g=[...Object.getOwnPropertyNames(A.current),...Object.getOwnPropertyNames(Object.getPrototypeOf(A.current))];for(const S of g)S!=="constructor"&&(typeof A.current[S]=="function"?this[S]=(...O)=>(this._renderRequested&&this.render(),A.current[S](...O)):Object.defineProperty(this,S,{enumerable:!0,get:()=>A.current[S]}))},E=t;Fs(()=>{this._renderRoot.render(f(E,{...m,ref:this._ref,__hostElement:this,__internalOnLoaded:()=>{_(this._ref)}}))})}async connectedCallback(){await VI;for(const h of o)this.hasAttribute(h)&&this.syncAttributeToProp(h);this.requestRender()}disconnectedCallback(){this._renderRoot&&setTimeout(()=>{this._renderRoot&&(this._renderRoot.unmount(),this._renderRoot=null)})}attributeChangedCallback(h,p,m){p!==m&&this.syncAttributeToProp(h)&&this.requestRender()}};c.observedAttributes=o;let l=c;const u={};for(const[d,h]of i)u[d]={set(p){this.updateProp(h,p)&&this.requestRender()},get(){return this._props[h]}};return Object.defineProperties(l.prototype,u),Object.defineProperty(l,"name",{value:e}),l}function zI(t){return t.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(e,n)=>(n?"-":"")+e.toLowerCase())}function wu(t,e){const n=JSON.stringify(e).replace(",",", ");Ce.error(`Could not initialize ${t} because the following required props are missing: ${n}.`)}const bf=bu(jA,"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},onSendMessage:{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=>wu("<t-chatbox>",t)),wf=bu(zA,"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=>wu("<t-conversation-list>",t)),Lf=bu(XR,"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},onSendMessage:{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=>wu("<t-inbox>",t)),$I=Mf,YI=$A;customElements.get("t-chatbox")||customElements.define("t-chatbox",bf),customElements.get("t-conversation-list")||customElements.define("t-conversation-list",wf),customElements.get("t-inbox")||customElements.define("t-inbox",Lf),exports.AudioPlayer=Un,exports.ChatboxElement=bf,exports.ConversationListElement=wf,exports.Editor=lu,exports.EmojiPicker=ta,exports.EmojiSuggestBar=Eu,exports.Highlightable=gt,exports.Icon=B,exports.InboxElement=Lf,exports.MentionSuggestList=Ou,exports.MenuItem=Hn,exports.MessageContent=hu,exports.PopoverButton=oi,exports.Preact=bc,exports.ReactionPicker=mu,exports.SearchInput=ro,exports.Text=go,exports.VirtualMessage=Du,exports.Waveform=vu,exports.classicTheme=YI,exports.defaultTheme=$I,exports.formatDuration=di,exports.formatFilesize=fn,exports.getGoogleMapsUrls=sa,exports.getPhotoUrlWithFallback=Ct,exports.getRandomColor=Tu,exports.getSVGForInitials=RA,exports.html=function(t,...e){const n=x0.bind(me)(t,...e);return Array.isArray(n)?me(ie,{},...n):n},exports.useParticipants=Ft,exports.useReactions=yu,exports.useTimeAgo=Ru,exports.userFriendlyDate=Iu;