@talkjs/web-components 0.1.8 → 0.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/default.cjs CHANGED
@@ -1,21 +1,21 @@
1
- "use client";"use strict";var Wu=t=>{throw TypeError(t)};var Xu=(t,e,n)=>e.has(t)||Wu("Cannot "+n);var we=(t,e,n)=>(Xu(t,e,"read from private field"),n?n.call(t):e.get(t)),Kr=(t,e,n)=>e.has(t)?Wu("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),Wo=(t,e,n,r)=>(Xu(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const FA=require("@talkjs/core"),kc=Object.freeze(Object.defineProperty({__proto__:null,get AfterMessages(){return hR},get AudioBlock(){return _R},get Avatar(){return TR},get BeforeMessages(){return dR},get ChatHeader(){return ZT},get ChatSearchBox(){return ER},get CompactMessageContent(){return fR},get ConversationImage(){return RR},get ConversationListItem(){return kR},get FileBlock(){return AR},get GlobalSearchBox(){return MR},get GlobalSearchResultHeader(){return PR},get GlobalSearchResultItem(){return wR},get GroupChatImage(){return CR},get Icon(){return aR},get ImageBlock(){return gR},get LocationBlock(){return SR},get Message(){return tR},get MessageActionMenu(){return rR},get MessageDivider(){return cR},get MessageField(){return iR},get MessageListFooter(){return uR},get MessageListHeader(){return eR},get NoConversationSelected(){return pR},get RecordingPreview(){return sR},get ReferencedMessage(){return IR},get ReplyBar(){return yR},get TextBlock(){return OR},get TimeAgo(){return NR},get VideoBlock(){return DR},get VoiceBlock(){return vR},get VoiceRecorder(){return oR}},Symbol.toStringTag,{value:"Module"}));var Lo,ae,_f,Sr,Ku,Af,gf,Sf,Lc,bl,kl,Of,ao={},Df=[],HA=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,lo=Array.isArray;function pn(t,e){for(var n in e)t[n]=e[n];return t}function Ll(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function Te(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 Ji(t,s,r,i,null)}function Ji(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?++_f:i,__i:-1,__u:0};return i==null&&ae.vnode!=null&&ae.vnode(o),o}function vf(){return{current:null}}function Ue(t){return t.children}function Jt(t,e){this.props=t,this.context=e}function gi(t,e){if(e==null)return t.__?gi(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"?gi(t):null}function Tf(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 Tf(t)}}function wl(t){(!t.__d&&(t.__d=!0)&&Sr.push(t)&&!Rs.__r++||Ku!=ae.debounceRendering)&&((Ku=ae.debounceRendering)||Af)(Rs)}function Rs(){for(var t,e,n,r,i,o,s,a=1;Sr.length;)Sr.length>a&&Sr.sort(gf),t=Sr.shift(),a=Sr.length,t.__d&&(n=void 0,r=void 0,i=(r=(e=t).__v).__e,o=[],s=[],e.__P&&((n=pn({},r)).__v=r.__v+1,ae.vnode&&ae.vnode(n),wc(e.__P,n,r,e.__n,e.__P.namespaceURI,32&r.__u?[i]:null,o,i==null?gi(r):i,!!(32&r.__u),s),n.__v=r.__v,n.__.__k[n.__i]=n,Cf(o,n,s),r.__e=r.__=null,n.__e!=i&&Tf(n)));Rs.__r=0}function qu(t,e,n,r,i,o,s,a,l,u,c){var h,d,p,f,m,E,A,_=r&&r.__k||Df,g=e.length;for(l=function(O,D,C,T,I){var S,v,y,b,M,k=C.length,P=k,B=0;for(O.__k=new Array(I),S=0;S<I;S++)(v=D[S])!=null&&typeof v!="boolean"&&typeof v!="function"?(typeof v=="string"||typeof v=="number"||typeof v=="bigint"||v.constructor==String?v=O.__k[S]=Ji(null,v,null,null,null):lo(v)?v=O.__k[S]=Ji(Ue,{children:v},null,null,null):v.constructor==null&&v.__b>0?v=O.__k[S]=Ji(v.type,v.props,v.key,v.ref?v.ref:null,v.__v):O.__k[S]=v,b=S+B,v.__=O,v.__b=O.__b+1,y=null,(M=v.__i=UA(v,C,b,P))!=-1&&(P--,(y=C[M])&&(y.__u|=2)),y==null||y.__v==null?(M==-1&&(I>k?B--:I<k&&B++),typeof v.type!="function"&&(v.__u|=4)):M!=b&&(M==b-1?B--:M==b+1?B++:(M>b?B--:B++,v.__u|=4))):O.__k[S]=null;if(P)for(S=0;S<k;S++)(y=C[S])!=null&&!(2&y.__u)&&(y.__e==T&&(T=gi(y)),yf(y,y));return T}(n,e,_,l,g),h=0;h<g;h++)(p=n.__k[h])!=null&&(d=p.__i==-1?ao:_[p.__i]||ao,p.__i=h,E=wc(t,p,d,i,o,s,a,l,u,c),f=p.__e,p.ref&&d.ref!=p.ref&&(d.ref&&Mc(d.ref,null,p),c.push(p.ref,p.__c||f,p)),m==null&&f!=null&&(m=f),(A=!!(4&p.__u))||d.__k===p.__k?l=Rf(p,l,t,A):typeof p.type=="function"&&E!==void 0?l=E:f&&(l=f.nextSibling),p.__u&=-7);return n.__e=m,l}function Rf(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=Rf(i[o],e,n,r));return e}t.__e!=e&&(r&&(e&&t.type&&!e.parentNode&&(e=gi(t)),n.insertBefore(t.__e,e||null)),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function xn(t,e){return e=e||[],t==null||typeof t=="boolean"||(lo(t)?t.some(function(n){xn(n,e)}):e.push(t)),e}function UA(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 Ju(t,e,n){e[0]=="-"?t.setProperty(e,n==null?"":n):t[e]=n==null?"":typeof n!="number"||HA.test(e)?n:n+"px"}function Xo(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||Ju(t.style,e,"");if(n)for(e in n)r&&n[e]==r[e]||Ju(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")o=e!=(e=e.replace(Sf,"$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=Lc,t.addEventListener(e,o?kl:bl,o)):t.removeEventListener(e,o?kl:bl,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 Zu(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e.t==null)e.t=Lc++;else if(e.t<n.u)return;return n(ae.event?ae.event(e):e)}}}function wc(t,e,n,r,i,o,s,a,l,u){var c,h,d,p,f,m,E,A,_,g,O,D,C,T,I,S,v,y=e.type;if(e.constructor!=null)return null;128&n.__u&&(l=!!(32&n.__u),o=[a=e.__e=n.__e]),(c=ae.__b)&&c(e);e:if(typeof y=="function")try{if(A=e.props,_="prototype"in y&&y.prototype.render,g=(c=y.contextType)&&r[c.__c],O=c?g?g.props.value:c.__:r,n.__c?E=(h=e.__c=n.__c).__=h.__E:(_?e.__c=h=new y(A,O):(e.__c=h=new Jt(A,O),h.constructor=y,h.render=BA),g&&g.sub(h),h.state||(h.state={}),h.__n=r,d=h.__d=!0,h.__h=[],h._sb=[]),_&&h.__s==null&&(h.__s=h.state),_&&y.getDerivedStateFromProps!=null&&(h.__s==h.state&&(h.__s=pn({},h.__s)),pn(h.__s,y.getDerivedStateFromProps(A,h.__s))),p=h.props,f=h.state,h.__v=e,d)_&&y.getDerivedStateFromProps==null&&h.componentWillMount!=null&&h.componentWillMount(),_&&h.componentDidMount!=null&&h.__h.push(h.componentDidMount);else{if(_&&y.getDerivedStateFromProps==null&&A!==p&&h.componentWillReceiveProps!=null&&h.componentWillReceiveProps(A,O),e.__v==n.__v||!h.__e&&h.shouldComponentUpdate!=null&&h.shouldComponentUpdate(A,h.__s,O)===!1){for(e.__v!=n.__v&&(h.props=A,h.state=h.__s,h.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(b){b&&(b.__=e)}),D=0;D<h._sb.length;D++)h.__h.push(h._sb[D]);h._sb=[],h.__h.length&&s.push(h);break e}h.componentWillUpdate!=null&&h.componentWillUpdate(A,h.__s,O),_&&h.componentDidUpdate!=null&&h.__h.push(function(){h.componentDidUpdate(p,f,m)})}if(h.context=O,h.props=A,h.__P=t,h.__e=!1,C=ae.__r,T=0,_){for(h.state=h.__s,h.__d=!1,C&&C(e),c=h.render(h.props,h.state,h.context),I=0;I<h._sb.length;I++)h.__h.push(h._sb[I]);h._sb=[]}else do h.__d=!1,C&&C(e),c=h.render(h.props,h.state,h.context),h.state=h.__s;while(h.__d&&++T<25);h.state=h.__s,h.getChildContext!=null&&(r=pn(pn({},r),h.getChildContext())),_&&!d&&h.getSnapshotBeforeUpdate!=null&&(m=h.getSnapshotBeforeUpdate(p,f)),S=c,c!=null&&c.type===Ue&&c.key==null&&(S=If(c.props.children)),a=qu(t,lo(S)?S:[S],e,n,r,i,o,s,a,l,u),h.base=e.__e,e.__u&=-161,h.__h.length&&s.push(h),E&&(h.__E=h.__=null)}catch(b){if(e.__v=null,l||o!=null)if(b.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(v=o.length;v--;)Ll(o[v]);Ml(e)}else e.__e=n.__e,e.__k=n.__k,b.then||Ml(e);ae.__e(b,e,n)}else o==null&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):a=e.__e=function(b,M,k,P,B,F,X,G,z){var K,me,ee,ie,ne,ge,it,qe=k.props||ao,Re=M.props,xe=M.type;if(xe=="svg"?B="http://www.w3.org/2000/svg":xe=="math"?B="http://www.w3.org/1998/Math/MathML":B||(B="http://www.w3.org/1999/xhtml"),F!=null){for(K=0;K<F.length;K++)if((ne=F[K])&&"setAttribute"in ne==!!xe&&(xe?ne.localName==xe:ne.nodeType==3)){b=ne,F[K]=null;break}}if(b==null){if(xe==null)return document.createTextNode(Re);b=document.createElementNS(B,xe,Re.is&&Re),G&&(ae.__m&&ae.__m(M,F),G=!1),F=null}if(xe==null)qe===Re||G&&b.data==Re||(b.data=Re);else{if(F=F&&Lo.call(b.childNodes),!G&&F!=null)for(qe={},K=0;K<b.attributes.length;K++)qe[(ne=b.attributes[K]).name]=ne.value;for(K in qe)if(ne=qe[K],K!="children"){if(K=="dangerouslySetInnerHTML")ee=ne;else if(!(K in Re)){if(K=="value"&&"defaultValue"in Re||K=="checked"&&"defaultChecked"in Re)continue;Xo(b,K,null,ne,B)}}for(K in Re)ne=Re[K],K=="children"?ie=ne:K=="dangerouslySetInnerHTML"?me=ne:K=="value"?ge=ne:K=="checked"?it=ne:G&&typeof ne!="function"||qe[K]===ne||Xo(b,K,ne,qe[K],B);if(me)G||ee&&(me.__html==ee.__html||me.__html==b.innerHTML)||(b.innerHTML=me.__html),M.__k=[];else if(ee&&(b.innerHTML=""),qu(M.type=="template"?b.content:b,lo(ie)?ie:[ie],M,k,P,xe=="foreignObject"?"http://www.w3.org/1999/xhtml":B,F,X,F?F[0]:k.__k&&gi(k,0),G,z),F!=null)for(K=F.length;K--;)Ll(F[K]);G||(K="value",xe=="progress"&&ge==null?b.removeAttribute("value"):ge!=null&&(ge!==b[K]||xe=="progress"&&!ge||xe=="option"&&ge!=qe[K])&&Xo(b,K,ge,qe[K],B),K="checked",it!=null&&it!=b[K]&&Xo(b,K,it,qe[K],B))}return b}(n.__e,e,n,r,i,o,s,l,u);return(c=ae.diffed)&&c(e),128&e.__u?void 0:a}function Ml(t){t&&t.__c&&(t.__c.__e=!0),t&&t.__k&&t.__k.forEach(Ml)}function Cf(t,e,n){for(var r=0;r<n.length;r++)Mc(n[r],n[++r],n[++r]);ae.__c&&ae.__c(e,t),t.some(function(i){try{t=i.__h,i.__h=[],t.some(function(o){o.call(i)})}catch(o){ae.__e(o,i.__v)}})}function If(t){return typeof t!="object"||t==null||t.__b&&t.__b>0?t:lo(t)?t.map(If):pn({},t)}function Mc(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){ae.__e(i,n)}}function yf(t,e,n){var r,i;if(ae.unmount&&ae.unmount(t),(r=t.ref)&&(r.current&&r.current!=t.__e||Mc(r,null,e)),(r=t.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){ae.__e(o,e)}r.base=r.__P=null}if(r=t.__k)for(i=0;i<r.length;i++)r[i]&&yf(r[i],e,n||typeof t.type!="function");n||Ll(t.__e),t.__c=t.__=t.__e=void 0}function BA(t,e,n){return this.constructor(t,n)}function co(t,e,n){var r,i,o,s;e==document&&(e=document.documentElement),ae.__&&ae.__(t,e),i=(r=typeof n=="function")?null:n&&n.__k||e.__k,o=[],s=[],wc(e,t=(!r&&n||e).__k=Te(Ue,null,[t]),i||ao,ao,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),Cf(o,t,s)}function Nf(t,e){co(t,e,Nf)}function jA(t,e,n){var r,i,o,s,a=pn({},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),Ji(t.type,a,r||t.key,i||t.ref,null)}function ki(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,wl(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"+Of++,e.__=t,e.Provider=e.__l=(e.Consumer=function(n,r){return n.children(r)}).contextType=e,e}Lo=Df.slice,ae={__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}},_f=0,Jt.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=pn({},this.state),typeof t=="function"&&(t=t(pn({},n),this.props)),t&&pn(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),wl(this))},Jt.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),wl(this))},Jt.prototype.render=Ue,Sr=[],Af=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,gf=function(t,e){return t.__v.__b-e.__v.__b},Rs.__r=0,Sf=/(PointerCapture)$|Capture$/i,Lc=0,bl=Zu(!1),kl=Zu(!0),Of=0;var $A=0;function L(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:--$A,__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 ae.vnode&&ae.vnode(u),u}var Un,Ce,wa,Qu,Si=0,bf=[],Me=ae,ed=Me.__b,td=Me.__r,nd=Me.diffed,rd=Me.__c,id=Me.unmount,od=Me.__;function Vr(t,e){Me.__h&&Me.__h(Ce,t,Si||e),Si=0;var n=Ce.__H||(Ce.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function ue(t){return Si=1,ia(kf,t)}function ia(t,e,n){var r=Vr(Un++,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=Ce,!Ce.__f)){var i=function(a,l,u){if(!r.__c.__H)return!0;var c=r.__c.__H.__.filter(function(d){return!!d.__c});if(c.every(function(d){return!d.__N}))return!o||o.call(this,a,l,u);var h=r.__c.props!==a;return c.forEach(function(d){if(d.__N){var p=d.__[0];d.__=d.__N,d.__N=void 0,p!==d.__[0]&&(h=!0)}}),o&&o.call(this,a,l,u)||h};Ce.__f=!0;var o=Ce.shouldComponentUpdate,s=Ce.componentWillUpdate;Ce.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)},Ce.shouldComponentUpdate=i}return r.__N||r.__}function Z(t,e){var n=Vr(Un++,3);!Me.__s&&xc(n.__H,e)&&(n.__=t,n.u=e,Ce.__H.__h.push(n))}function mt(t,e){var n=Vr(Un++,4);!Me.__s&&xc(n.__H,e)&&(n.__=t,n.u=e,Ce.__h.push(n))}function Q(t){return Si=5,le(function(){return{current:t}},[])}function $n(t,e,n){Si=6,mt(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 le(t,e){var n=Vr(Un++,7);return xc(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function te(t,e){return Si=8,le(function(){return t},e)}function lr(t){var e=Ce.context[t.__c],n=Vr(Un++,9);return n.c=t,e?(n.__==null&&(n.__=!0,e.sub(Ce)),e.props.value):t.__}function Pc(t,e){Me.useDebugValue&&Me.useDebugValue(e?e(t):t)}function oa(){var t=Vr(Un++,11);if(!t.__){for(var e=Ce.__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 VA(){for(var t;t=bf.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(us),t.__H.__h.forEach(Pl),t.__H.__h=[]}catch(e){t.__H.__h=[],Me.__e(e,t.__v)}}Me.__b=function(t){Ce=null,ed&&ed(t)},Me.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),od&&od(t,e)},Me.__r=function(t){td&&td(t),Un=0;var e=(Ce=t.__c).__H;e&&(wa===Ce?(e.__h=[],Ce.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(e.__h.forEach(us),e.__h.forEach(Pl),e.__h=[],Un=0)),wa=Ce},Me.diffed=function(t){nd&&nd(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(bf.push(e)!==1&&Qu===Me.requestAnimationFrame||((Qu=Me.requestAnimationFrame)||zA)(VA)),e.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),wa=Ce=null},Me.__c=function(t,e){e.some(function(n){try{n.__h.forEach(us),n.__h=n.__h.filter(function(r){return!r.__||Pl(r)})}catch(r){e.some(function(i){i.__h&&(i.__h=[])}),e=[],Me.__e(r,n.__v)}}),rd&&rd(t,e)},Me.unmount=function(t){id&&id(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{us(r)}catch(i){e=i}}),n.__H=void 0,e&&Me.__e(e,n.__v))};var sd=typeof requestAnimationFrame=="function";function zA(t){var e,n=function(){clearTimeout(r),sd&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,35);sd&&(e=requestAnimationFrame(n))}function us(t){var e=Ce,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),Ce=e}function Pl(t){var e=Ce;t.__c=t.__(),Ce=e}function xc(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 Lf(t,e){for(var n in e)t[n]=e[n];return t}function xl(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 Fc(t,e){var n=e(),r=ue({t:{__:n,u:e}}),i=r[0].t,o=r[1];return mt(function(){i.__=n,i.u=e,Ma(i)&&o({t:i})},[t,n,e]),Z(function(){return Ma(i)&&o({t:i}),t(function(){Ma(i)&&o({t:i})})},[t]),n}function Ma(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 Hc(t){t()}function Uc(t){return t}function Bc(){return[!1,Hc]}var jc=mt;function Cs(t,e){this.props=t,this.context=e}function Bn(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:xl(this.props,i)}function r(i){return this.shouldComponentUpdate=n,Te(t,i)}return r.displayName="Memo("+(t.displayName||t.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r.type=t,r}(Cs.prototype=new Jt).isPureReactComponent=!0,Cs.prototype.shouldComponentUpdate=function(t,e){return xl(this.props,t)||xl(this.state,e)};var ad=ae.__b;ae.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),ad&&ad(t)};var YA=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Yt(t){function e(n){var r=Lf({},n);return delete r.ref,t(r,n.ref||null)}return e.$$typeof=YA,e.render=t,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var ld=function(t,e){return t==null?null:xn(xn(t).map(e))},wf={map:ld,forEach:ld,count:function(t){return t?xn(t).length:0},only:function(t){var e=xn(t);if(e.length!==1)throw"Children.only";return e[0]},toArray:xn},GA=ae.__e;ae.__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)}GA(t,e,n,r)};var cd=ae.unmount;function Mf(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=Lf({},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 Mf(r,e,n)})),t}function Pf(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(r){return Pf(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 Zi(){this.__u=0,this.o=null,this.__b=null}function xf(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function Ff(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?Te(i,s):null}return o.displayName="Lazy",o.__f=!0,o}function ni(){this.i=null,this.l=null}ae.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),cd&&cd(t)},(Zi.prototype=new Jt).__c=function(t,e){var n=e.__c,r=this;r.o==null&&(r.o=[]),r.o.push(n);var i=xf(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]=Pf(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)},Zi.prototype.componentWillUnmount=function(){this.o=[]},Zi.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]=Mf(this.__b,n,r.__O=r.__P)}this.__b=null}var i=e.__a&&Te(Ue,null,t.fallback);return i&&(i.__u&=-33),[Te(Ue,null,e.__a?null:t.children),i]};var ud=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 WA(t){return this.getChildContext=function(){return t.context},t.children}function XA(t){var e=this,n=t.h;if(e.componentWillUnmount=function(){co(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)}}}co(Te(WA,{context:e.context},t.__v),e.v)}function $c(t,e){var n=Te(XA,{__v:t,h:e});return n.containerInfo=e,n}(ni.prototype=new Jt).__a=function(t){var e=this,n=xf(e.__v),r=e.l.get(t);return r[0]++,function(i){var o=function(){e.props.revealOrder?(r.push(i),ud(e,t,r)):i()};n?n(o):o()}},ni.prototype.render=function(t){this.i=null,this.l=new Map;var e=xn(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},ni.prototype.componentDidUpdate=ni.prototype.componentDidMount=function(){var t=this;this.l.forEach(function(e,n){ud(t,n,e)})};var Hf=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.element")||60103,KA=/^(?: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]/,qA=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,JA=/[A-Z0-9]/g,ZA=typeof document!="undefined",QA=function(t){return(typeof Symbol!="undefined"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(t)};function Vc(t,e,n){return e.__k==null&&(e.textContent=""),co(t,e),typeof n=="function"&&n(),t?t.__c:null}function Uf(t,e,n){return Nf(t,e),typeof n=="function"&&n(),t?t.__c:null}Jt.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(Jt.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})});var dd=ae.event;function eg(){}function tg(){return this.cancelBubble}function ng(){return this.defaultPrevented}ae.event=function(t){return dd&&(t=dd(t)),t.persist=eg,t.isPropagationStopped=tg,t.isDefaultPrevented=ng,t.nativeEvent=t};var zc,rg={enumerable:!1,configurable:!0,get:function(){return this.class}},hd=ae.vnode;ae.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||ZA&&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"||QA(n.type)?l==="onfocus"?s="onfocusin":l==="onblur"?s="onfocusout":qA.test(s)&&(s=l):l=s="oninput":o&&KA.test(s)?s=s.replace(JA,"-$&").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=xn(n.children).forEach(function(u){u.props.selected=i.value.indexOf(u.props.value)!=-1})),r=="select"&&i.defaultValue!=null&&(i.value=xn(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",rg)):(n.className&&!n.class||n.class&&n.className)&&(i.class=i.className=n.className),e.props=i}(t),t.$$typeof=Hf,hd&&hd(t)};var pd=ae.__r;ae.__r=function(t){pd&&pd(t),zc=t.__c};var fd=ae.diffed;ae.diffed=function(t){fd&&fd(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),zc=null};var Bf={ReactCurrentDispatcher:{current:{readContext:function(t){return zc.__n[t.__c].props.value},useCallback:te,useContext:lr,useDebugValue:Pc,useDeferredValue:Uc,useEffect:Z,useId:oa,useImperativeHandle:$n,useInsertionEffect:jc,useLayoutEffect:mt,useMemo:le,useReducer:ia,useRef:Q,useState:ue,useSyncExternalStore:Fc,useTransition:Bc}}};function jf(t){return Te.bind(null,t)}function wo(t){return!!t&&t.$$typeof===Hf}function $f(t){return wo(t)&&t.type===Ue}function Vf(t){return!!t&&!!t.displayName&&(typeof t.displayName=="string"||t.displayName instanceof String)&&t.displayName.startsWith("Memo(")}function zf(t){return wo(t)?jA.apply(null,arguments):t}function Yc(t){return!!t.__k&&(co(null,t),!0)}function Yf(t){return t&&(t.base||t.nodeType===1&&t)||null}var Gf=function(t,e){return t(e)},sa=function(t,e){return t(e)},Wf=Ue,Xf=wo,Ft={useState:ue,useId:oa,useReducer:ia,useEffect:Z,useLayoutEffect:mt,useInsertionEffect:jc,useTransition:Bc,useDeferredValue:Uc,useSyncExternalStore:Fc,startTransition:Hc,useRef:Q,useImperativeHandle:$n,useMemo:le,useCallback:te,useContext:lr,useDebugValue:Pc,version:"18.3.1",Children:wf,render:Vc,hydrate:Uf,unmountComponentAtNode:Yc,createPortal:$c,createElement:Te,createContext:ki,createFactory:jf,cloneElement:zf,createRef:vf,Fragment:Ue,isValidElement:wo,isElement:Xf,isFragment:$f,isMemo:Vf,findDOMNode:Yf,Component:Jt,PureComponent:Cs,memo:Bn,forwardRef:Yt,flushSync:sa,unstable_batchedUpdates:Gf,StrictMode:Wf,Suspense:Zi,SuspenseList:ni,lazy:Ff,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Bf};const Gc=Object.freeze(Object.defineProperty({__proto__:null,Children:wf,Component:Jt,Fragment:Ue,PureComponent:Cs,StrictMode:Wf,Suspense:Zi,SuspenseList:ni,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Bf,cloneElement:zf,createContext:ki,createElement:Te,createFactory:jf,createPortal:$c,createRef:vf,default:Ft,findDOMNode:Yf,flushSync:sa,forwardRef:Yt,hydrate:Uf,isElement:Xf,isFragment:$f,isMemo:Vf,isValidElement:wo,lazy:Ff,memo:Bn,render:Vc,startTransition:Hc,unmountComponentAtNode:Yc,unstable_batchedUpdates:Gf,useCallback:te,useContext:lr,useDebugValue:Pc,useDeferredValue:Uc,useEffect:Z,useErrorBoundary:function(t){var e=Vr(Un++,10),n=ue();return e.__=t,Ce.componentDidCatch||(Ce.componentDidCatch=function(r,i){e.__&&e.__(r,i),n[1](r)}),[n[0],function(){n[1](void 0)}]},useId:oa,useImperativeHandle:$n,useInsertionEffect:jc,useLayoutEffect:mt,useMemo:le,useReducer:ia,useRef:Q,useState:ue,useSyncExternalStore:Fc,useTransition:Bc,version:"18.3.1"},Symbol.toStringTag,{value:"Module"}));var Wc=Object.prototype.hasOwnProperty;function Ke(t){return Array.isArray(t)}function En(t){return!(!t||typeof t!="object"||t instanceof Date||Ke(t))}function ig(t){return En(t)&&t.constructor===Object}function ce(t){return typeof t=="function"}function Rt(t){const e=typeof t;return t!==void 0&&(Fl(t)||e!=="object"&&e!=="function")}function Fl(t){return t instanceof Date}function Kf(t){return typeof t=="boolean"}function fn(t){return t instanceof Promise}function nt(t){return t instanceof Map||t instanceof WeakMap}function jn(t){return t instanceof Set||t instanceof WeakSet}function Is(t){if(!t)return!1;if(Ke(t))return t.length===0;if(nt(t)||jn(t))return t.size===0;for(const e in t)if(Wc.call(t,e))return!1;return!0}var og=new Set(["boolean","string","number"]);function aa(t){return!!t.parent}var sg=Symbol.toPrimitive,ag=Symbol.iterator,Oi=Symbol("getNode"),la=Symbol("delete"),qf=Symbol("opaque"),lg=Symbol("plain"),Xc=Symbol("optimized"),uo=Symbol("linked"),We={pendingNodes:new Map,dirtyNodes:new Set};function ho(t){return t&&(t[qf]||t.$$typeof)}function Jf(t){return t&&t[lg]}function Zf(t){return Ke(t)?"array":nt(t)?"map":t instanceof Set?"set":"object"}function cg(t,e){return nt(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 ug=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z$/;function dg(t,e){if(e){if(typeof e=="string"&&ug.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 Qf(t){return t&&JSON.stringify(t,cg)}function em(t){return t&&JSON.parse(t,dg)}function tm(t){return em(Qf(t))}function ze(t){return!!t&&!!t[Oi]}function Mo(t){return t&&t[Oi]}function nm(t,e,n,r,i){return r?t.add(n):i?t.set(e,n):t[e]=n,n}function Fn(t,e){var n;const r=(n=t.parent)!=null?n:t,i=t.parent?t.key:"_",o=e===la;o&&(e=void 0);const s=t.parent?Kc(r):r.root,a=jn(s),l=nt(s),u=a?i:l?s.get(i):s[i],c=ce(e);if((e=r.isAssigning||!c||ce(u)?e:e(u))!==u)try{r.isSetting=(r.isSetting||0)+1,o?l||a?s.delete(i):delete s[i]:nm(s,i,e,a,l)}finally{r.isSetting--}return{prevValue:u,newValue:e,parentValue:s}}var md=[];function ke(t){let e=0,n=t;for(;aa(n);)md[e++]=n.key,n=n.parent;let r=t.root._;for(let i=e-1;r&&i>=0;i--){const o=md[i];r=o!=="size"&&nt(r)?r.get(o):r[o]}return r}function on(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)),ce(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=ke(t);if(!e||ce(e))if(aa(t)){const n=Kc(t.parent),r=jn(n),i=nt(n);e=nm(n,t.key,{},r,i)}else e=t.root._={};return e}function rm(t,e){var n,r;let i=ze(t)?void 0:En(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:ke(e.parent)[e.key+"_keyExtractor"];s&&ce(s)&&(i=s)}return i}function Ed(t,e,n){t.functions||(t.functions=new Map),t.functions.set(e,n)}function im(t,e){return t===e||Fl(t)&&Fl(e)&&+t==+e}function Hl(t,e,n,r){return e?void 0:t?r?Array.from(t):n?Array.from(t.keys()):Object.keys(t):[]}function hg(t,e){return t&&Object.defineProperty(t,e,{value:!0,enumerable:!1,writable:!0,configurable:!0}),t}var _d=function(t){return hg(t,qf)};function om(t,e){var n;t.isPlain||!((n=t.parent)!=null&&n.isPlain)&&!Jf(e)||(t.isPlain=!0)}function _n(t,e,n,r){let i=t;return!ze(i)&&ce(i)&&(i=n?i(n):i()),ze(i)&&!r?i.get(e):i}var Qi,pg=(t,e)=>t&&t[e];function sm(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 h=nt(l);let d=l?h?l.get(a):l[a]:void 0;const p=u?h?u.get(a):u[a]:void 0;if(d===la)return u&&(h?l.set(a,p):l[a]=p,s==null||s(e.slice(0,c+1),p)),t;if(d===void 0&&r===void 0&&c===e.length-1)return t;c<e.length-1&&d==null&&(d=qc(n[c]),nt(l)?l.set(a,d):l[a]=d),c<e.length-1&&(l=d,u&&(u=p))}}return a===void 0?t=i==="merge"?ys(t,r):r:i==="merge"?l[a]=ys(l[a],r):nt(l)?l.set(a,r):l[a]=r,t}function Ad(t,e,n){let r=n;for(let i=0;i<t.length;i++){const o=t[i];r=r?r[o]:qc(e[i])}return r}function Ul(t){return!(!t||(En(t)||Ke(t))&&Is(t))}function qc(t){switch(t){case"array":return[];case"map":return new Map;case"set":return new Set;default:return{}}}function fg(t,e,n){const{path:r,valueAtPath:i,prevAtPath:o,pathTypes:s}=e;return sm(t,r,s,o)}function ys(t,...e){if(Rt(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(ig(i)||Ke(i)){const o=i;for(const s in o)Wc.call(o,s)&&(o[s]instanceof Object&&!ze(o[s])&&Object.keys(o[s]).length>0?n[s]=ys(n[s]||(Ke(o[s])?[]:{}),o[s]):n[s]=o[s])}else n=i}return n}var Ns=0,Pa=!1,xa=!1,ci=new Map;function mg(){ci.size>0&&Li(!0)}function am(t,e){for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function Eg(t,e){try{return function(n,r){for(let i=0;i<r.length;i++)n=fg(n,r[i]);return n}(t?tm(t):{},e)}catch(n){return}}function Jc(t,e){return function(){return Eg(t,e)}}function po(t,e,n,r,i){const o=new Map;bs(o,t,!!We.isLoadingLocal,!!We.isLoadingRemote,e,[],[],e,n,!0,r,i);const s=ci.get(t);s?s.prev===e?ci.delete(t):s.value=e:ci.set(t,{value:e,prev:n,level:r,whenOptimizedOnlyIf:i,isFromSync:!!We.isLoadingRemote,isFromPersist:!!We.isLoadingLocal}),o.size&&lm(o,!0),Ns<=0&&cm()}function bs(t,e,n,r,i,o,s,a,l,u,c,h){if(e.numListenersRecursive>0&&(function(d,p,f,m,E,A,_,g,O,D,C,T){if(D?p.listenersImmediate:p.listeners){const I={path:A,pathTypes:_,valueAtPath:g,prevAtPath:O},S=d.get(p);if(S&&A.length>0){const{changes:v}=S;am(v[0].path,I.path)||(v.push(I),S.level=Math.min(S.level,C),S.whenOptimizedOnlyIf||(S.whenOptimizedOnlyIf=T))}else d.set(p,{level:C,value:E,isFromSync:m,isFromPersist:f,whenOptimizedOnlyIf:T,changes:[I]})}}(t,e,n,r,i,o,s,a,l,u,c,h),e.linkedFromNodes))for(const d of e.linkedFromNodes)bs(t,_g(d,o),n,r,a,[],[],a,l,u,0,h);if(e.parent){const d=e.parent;d&&bs(t,d,n,r,ke(d),[e.key].concat(o),[Zf(i)].concat(s),a,l,u,c+1,h)}}function lm(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 h;const d=Array.from(c);for(let p=0;p<d.length;p++){const f=d[p],{track:m,noArgs:E,listener:A}=f;n.has(A)||(m===!0?i<=0:m!==Xc||l&&i<=0)&&(E||h||(h={value:o,isFromPersist:s,isFromSync:a,getPrevious:Jc(o,r),changes:r}),m||n.add(A),A(h))}}})}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=ci;ci=new Map;const n=new Map;e.forEach(({value:r,prev:i,level:o,isFromPersist:s,isFromSync:a,whenOptimizedOnlyIf:l},u)=>{bs(n,u,s,a,r,[],[],r,i,!1,o,l)}),n.size&&lm(n,!1)}function An(t){ca();try{t()}finally{Li()}}function ca(){Ns++,Qi||(Qi=setTimeout(mg,0))}function Li(t){(--Ns<=0||t)&&(Pa?xa=!0:(Qi&&(clearTimeout(Qi),Qi=void 0),Ns=0,Pa=!0,cm(),Pa=!1,xa&&(xa=!1,Li(!0))))}function _g(t,e){let n=t;for(let r=0;r<e.length;r++)n=on(n,e[r]);return n}function Zc(t,e,n,r,i){if(ze(t))return t;const o=fn(t);let s={root:{_:t},lazy:!0,numListenersRecursive:0};ce(t)&&(s=Object.assign(()=>{},s),s.lazyFn=t);var a;const l=e||(a=t,og.has(typeof a))?new i(s):r(s);return o&&(Fn(s,void 0),n(s,t)),l}var ri=new WeakMap,um=[],dm=[],hm=[],ii=0,Bl=!1;function Fa(t,e,n){const r=ri.get(t);if(!r||!r.has(n))return;const i=r.get(n);i&&i.size!==0&&(um[ii]=t,dm[ii]=e,hm[ii]=n,ii++,Bl||(Bl=!0,queueMicrotask(Ag)))}var Ui={type:"listener-added",node:null,listener:void 0,timestamp:0};function Ag(){Bl=!1;const t=typeof performance!="undefined"?performance.now():Date.now();Ui.timestamp=t;for(let e=0;e<ii;e++){const n=um[e],r=dm[e],i=hm[e],o=ri.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)continue;let u=!1;if(u=i==="listener-added"?!!(a!=null&&a.has(r))||!!(l!=null&&l.has(r)):i==="listener-removed"?!(a!=null&&a.has(r))&&!(l!=null&&l.has(r)):!(a!=null&&a.size)&&!(l!=null&&l.size),u){Ui.type=i,Ui.node=n,Ui.listener=r;const c=Array.from(s);for(let h=0;h<c.length;h++)try{c[h](Ui)}catch(d){console.error(`Error in middleware handler for ${i}:`,d)}}}ii=0}function sr(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 m=ke(t);e({value:m,isFromPersist:!0,isFromSync:!1,changes:[{path:[],pathTypes:[],prevAtPath:m,valueAtPath:m}],getPrevious:()=>{}})}let h;function d(m,E=e,A){if(!(r!=null&&r.has(m))){r||(r=new Set),r.add(A||t),E||(E=e);const _={trackingType:!0,...n};h=[...h||[],sr(m,E,_,r)]}}t.linkedToNode&&d(t.linkedToNode),(i=t.linkedFromNodes)==null||i.forEach(m=>d(m)),t.numListenersRecursive++;let p=t.parent,f=[t.key];for(;p;){if(p.linkedFromNodes)for(const m of p.linkedFromNodes)r!=null&&r.has(m)||d(m,gg(m,f,e),p);p.numListenersRecursive++,f=[p.key,...f],p=p.parent}return Fa(t,c,"listener-added"),()=>{u.delete(c),h==null||h.forEach(E=>E());let m=t;for(;m;)m.numListenersRecursive--,m=m.parent;Fa(t,c,"listener-removed"),u.size===0&&Fa(t,void 0,"listeners-cleared")}}function gg(t,e,n){let r=Ad(e,[],ke(t));return function({value:i,isFromPersist:o,isFromSync:s}){const a=Ad(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(sr(s,e,{trackingType:a,immediate:r,noArgs:n}))}),()=>{if(i){for(let o=0;o<i.length;o++)i[o]();i=void 0}}}var ds=0,Sd=[],oi={current:void 0};function hs(t,e){if(ds){const n=oi.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 pm(t,e,n,r,i,o){let s,a,l=e;Sd.push(oi.current),ds++,oi.current={};const u=t&&_n(t,n,r,i==null?void 0:i.fromComputed),c=oi.current.nodes;return--ds<0&&(ds=0),oi.current=Sd.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 Dt(t,e,n){let r,i;ce(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,ca(),delete s.value,i==null||i();const{dispose:l,value:u,nodes:c}=pm(t,a,void 0,s,n);var h,d;i=l,s.value=u,s.nodes=c,s.refresh=a,s.onCleanupReaction&&(s.onCleanupReaction(),s.onCleanupReaction=void 0),Li(),o=!1,!r||!(n!=null&&n.fromComputed)&&(!(s.num>0)&&(h=t)&&((d=h[Oi])!=null&&d.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 fm(t,e,n){if(fn(t))return e?t.then(e):t;const r=Ke(t);let i,o;return Dt(function(s){const a=r?t.map(l=>_n(l)):_n(t);if(!fn(a)){{let l=!0;if(Ke(a))for(let u=0;u<a.length;u++){let c=a[u];ze(c)?c=_n(c):ce(c)&&(c=c()),l=l&&!!(n?Ul(c):c)}else l=n?Ul(a):a;l&&(i=a,s.cancel=!0)}return i}i=a},function(){o=e==null?void 0:e(i)}),fn(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(fn(u)?u.then(c=>c):u)}}else e=s})}function ua(t,e){return fm(t,e,!1)}var Ha=new Set(["copyWithin","fill","from","pop","push","reverse","shift","sort","splice","unshift"]),Od=new Set(["every","filter","find","findIndex","flatMap","forEach","join","map","reduce","some"]),Sg=new Set(["filter","find"]),jl=new Map,$l=new Map([["get",da],["set",Zt],["peek",wi],["onChange",sr],["assign",function(t,e){const n=Lt(t);if(ca(),Rt(t.root._)&&(t.root._={}),nt(e)){const r=ke(t);nt(r)?e.forEach((i,o)=>r.set(o,i)):Zt(t,e)}else{t.isAssigning=(t.isAssigning||0)+1;try{Object.assign(n,e)}finally{t.isAssigning--}}return Li(),n}],["delete",_m],["toggle",function(t){const e=ke(t);(e==null||Kf(e))&&Zt(t,!e)}]]);function mm(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=aa(t),l=a?t.key:"_";(a?ke(t.parent):t.root)[l]=o,Di((i=t.parent)!=null?i:t,l,e)}return s}Di(t,e.length+"",r[0])}function Qc(t,e,n){var r,i,o;if(En(e)&&ho(e)||En(n)&&ho(n)){const D=e!==n;return D&&(t.listeners||t.listenersImmediate)&&po(t,e,n,0),D}const s=Ke(e);let a,l;const u=nt(e),c=jn(e),h=nt(n),d=jn(n),p=Hl(e,s,u,c),f=Hl(n,s,h,d),m=((r=p||e)==null?void 0:r.length)||0,E=((i=f||n)==null?void 0:i.length)||0;let A,_,g,O=!1;if(s&&Ke(n)){if(n.length>0){const D=n[0];if(D!==void 0&&(A=rm(D,t),A&&(_=ce(A),a=new Map,l=[]),t.children))for(let C=0;C<n.length;C++){const T=n[C];if(T){const I=t.children.get(C+"");if(I&&(e[C]||Dd(I,T),A)){const S=_?A(T):T[A];a.set(S,I)}}}}}else if(n&&(!e||En(e))){const D=f.length;for(let C=0;C<D;C++){const T=f[C];if(!p.includes(T)){O=!0;const I=on(t,T),S=h?n.get(T):n[T];S!==void 0&&Dd(I,S)}}}if(e&&!Rt(e)){O=O||m!==E;const D=O;let C=!1;for(let T=0;T<m;T++){const I=s?T+"":p[T];let S=u?e.get(I):e[I];const v=h?n==null?void 0:n.get(I):n==null?void 0:n[I];let y=!im(S,v);if(y){const b=A&&S?_?A(S):S[A]:void 0,M=(o=t.children)==null?void 0:o.get(I);if(ze(S)){const P=Mo(S);if((M==null?void 0:M.linkedToNode)===P){const F=ke(P);u?e.set(I,F):e[I]=F;continue}const B=S;S=()=>B}let k=on(t,I,S);if(k.lazy||!ce(S)&&!ze(S)||(Sm(k,S),wr(k)),s&&b!==void 0){const P=b!==void 0?a==null?void 0:a.get(b):void 0;if(P){if(P!==void 0&&P.key!==I){const B=n[P.key];D&&(k=P,t.children.delete(k.key),k.key=I,l.push([I,k])),C=!0,y=B!==S}}else O=!0}if(y)if(ce(S)||ze(S))Ti(t,I,S);else if(Rt(S))O=!0;else{const P=Qc(k,S,v);O=O||P,y=P}(y||s&&!D)&&(k.listeners||k.listenersImmediate)&&po(k,S,v,0,!D)}}if(l)for(let T=0;T<l.length;T++){const[I,S]=l[T];t.children.set(I,S)}g=O||C}else n!==void 0&&(g=!0);return g!=null&&g}function Dd(t,e){var n,r;(n=t.linkedToNodeDispose)==null||n.call(t),(r=t.activatedObserveDispose)==null||r.call(t),Rt(e)||Qc(t,void 0,e),(t.listeners||t.listenersImmediate)&&po(t,void 0,e,0)}function Lt(t,e,n){return e!==void 0&&(t=on(t,e,n)),t.proxy||(t.proxy=new Proxy(t,Em))}function Vl(){if(We.pendingNodes.size>0){const t=Array.from(We.pendingNodes.values());We.pendingNodes.clear(),t.forEach(e=>e())}}var Em={get(t,e,n){var r,i;if(e===sg)throw new Error("[legend-state] observable is not a primitive.");if(e===Oi)return t;if(e==="apply"||e==="call"){const h=ke(t);if(ce(h))return h[e]}let o=wr(t,e==="get"||e==="peek");if(e===ag)return!o||Rt(o)?void 0:o[e];const s=t.linkedToNode||(o==null?void 0:o[Oi]);if(s&&e!=="onChange")return Em.get(s,e,n);if(nt(o)||jn(o)){const h=function(d,p,f){const m=f==null?void 0:f[p];if(p==="size")return hs(d,!0),f[p];if(ce(m))return function(E,A,_){const g=arguments.length,O=f;if(p==="get"){if(g>0&&typeof E!="boolean"&&E!==Xc)return Lt(d,E)}else{if(p==="set")return g===2?Zt(on(d,E),A):g===1&&nt(f)&&Zt(d,E),Lt(d);if(p==="delete"){if(g>0){const C=f.get?O.get(E):E;return _m(d,E),C!==void 0}}else{if(p==="clear"){const C=jn(O)?new Set(O):new Map(O),T=O.size;return O.clear(),void(T&&Am(d,f,C))}if(p==="add"){const C=new Set(f),T=f.add(E);return f.has(p)||po(d,T,C,0),Lt(d)}}}const D=$l.get(p);if(!D)return f[p](E,A);switch(g){case 0:return D(d);case 1:return D(d,E);case 2:return D(d,E,A);default:return D(d,E,A,_)}}}(t,e,o);if(h!==void 0)return h}const a=$l.get(e);if(a)return e!=="get"&&e!=="peek"||Vl(),function(h,d,p){switch(arguments.length){case 0:return a(t);case 1:return a(t,h);case 2:return a(t,h,d);default:return a(t,h,d,p)}};const l=jl.get(e);if(l)return l.get(t);let u=o==null?void 0:o[e];if(En(o)&&ho(o))return u;const c=(r=t.functions)==null?void 0:r.get(e);if(c)return ze(c)?c:Lt(t,e,c);if(u=function(h,d){if(h){const p=Object.getOwnPropertyDescriptor(h,d);return p!=null&&p.get&&(delete h[d],h[d]=p.set?function(f){ce(f)&&(f={get:f});const m=function(){return{[uo]:f}};return m.prototype[uo]=f,m}({get:p.get,set:({value:f})=>p.set(f)}):p.get),h[d]}}(o,e),function(h){return h==null}(o)&&u===void 0&&(Ha.has(e)||Od.has(e))&&(o=[],Ha.has(e)&&Fn(t,o),u=o[e]),ce(u)){if(Ke(o)){if(Ha.has(e))return(...d)=>mm(t,o,e,...d);if(Od.has(e))return hs(t,!0),function(d,p){const f=e==="reduce",m=f?(_,g,O,D)=>d(_,Lt(t,O+"",g),O,D):(_,g,O)=>d(Lt(t,g+"",_),g,O);if(f||!Sg.has(e))return o[e](m,p);const E=e==="find",A=[];for(let _=0;_<o.length;_++)if(m(o[_],_,o)){const g=Lt(t,_+"");if(E)return g;A.push(g)}return E?void 0:A}}Ti(t,e,u);const h=(i=t.functions)==null?void 0:i.get(e);return h?Lt(t,e,h):u.bind(o)}return Rt(u)&&e==="length"&&Ke(o)?(hs(t,!0),u):Lt(t,e)},getPrototypeOf(t){const e=ke(t);return e!==null&&typeof e=="object"?Reflect.getPrototypeOf(e):null},ownKeys(t){wr(t);const e=da(t,!0);if(Rt(e))return[];const n=e?Reflect.ownKeys(e):[];if(Ke(e)&&n[n.length-1]==="length"&&n.splice(n.length-1,1),ce(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=ke(t);if(Rt(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 Di(t,e,n),!0;const r=jl.get(e);return!!r&&(r.set(t,n),!0)},deleteProperty:(t,e)=>!!t.isSetting&&Reflect.deleteProperty(t,e),has(t,e){const n=ke(t);return Reflect.has(n,e)},apply(t,e,n){ze(e)&&(e=e.peek());const r=ke(t),i=ce(r)?r:t.lazyFn||t;return Reflect.apply(i,e,n)}};function Zt(t,e){t.parent?Di(t.parent,t.key,e):Di(t,"_",e)}function Di(t,e,n,r){const i=!t.parent&&e==="_";om(t,n),!t.parent||ke(t)||ce(n)||Zt(t,{[e]:n});const o=i?t:on(t,e,n);if(ze(n))ks(o,n);else{const{newValue:s,prevValue:a,parentValue:l}=Fn(o,n),u=Rt(a)||a instanceof Date||Rt(s)||s instanceof Date;if(!u){let d=o;do d.needsExtract=!0,d.recursivelyAutoActivated=!1;while(d=d.parent)}const c=!im(s,a),h=!c&&o.isComputing&&!u&&!o.isPlain;!c&&!h||o.isComputing&&o.isPlain&&t.numListenersRecursive===0||Am(t,s,a,o,l,u,i,r,h),Ti(t,e,s)}}function _m(t,e){e===void 0&&aa(t)&&(e=t.key,t=t.parent);const n=ke(t);Ke(n)?mm(t,n,"splice",e,1):Di(t,e!=null?e:"_",la,-1)}function Am(t,e,n,r,i,o,s,a,l){r||(r=t),ca(),o===void 0&&(o=Rt(e));let u,c,h=l||o,d=!1;(!o||n&&!Rt(n))&&(h=h||Qc(r,e,n),Ke(e)?u=e:(nt(e)||jn(e))&&(c=e)),Ke(i)?u=i:(nt(i)||jn(i))&&(c=i),u?d=(u==null?void 0:u.length)!==(n==null?void 0:n.length):c&&(d=(c==null?void 0:c.size)!==(n==null?void 0:n.size)),(o||!e||Is(e)&&!Is(n)?e!==n:h)&&po(o&&s?t:r,e,n,(a!=null?a:n===void 0)?-1:h?0:1,d),Li()}function vi(t,e,n){const r=t.numGets=(t.numGets||0)+1;t.state||(t.state=Zc({isLoaded:!1},!1,vi,Lt)),e.then(i=>{r>=(t.getNumResolved||0)&&(t.getNumResolved=t.numGets,n?n({value:i}):Zt(t,i),t.state.assign({isLoaded:!0,error:void 0}))}).catch(i=>{t.state.error.set(i)})}function Ti(t,e,n){if(fn(n)){const r=on(t,e);return vi(r,n),void Fn(r,void 0)}if(ze(n)){const r=()=>n;Ed(t,e,r);const i=on(t,e,r),o=wi(Mo(n));return ks(i,n),Fn(i,o),ke(i)}if(typeof n=="function")return Ed(t,e,n),e}function da(t,e){return hs(t,e?En(e)?e.shallow:e:void 0),wi(t)}function wi(t){return wr(t,!0)}var Ko=!1;function wr(t,e){var n;if(Ko=!0,e&&((n=t.dirtyChildren)==null?void 0:n.size)){const i=Array.from(t.dirtyChildren);t.dirtyChildren.clear(),i.forEach(o=>o.dirtyFn&&wr(o))}if(t.dirtyFn){const i=t.dirtyFn;t.dirtyFn=void 0,We.dirtyNodes.delete(t),i()}Ko=!1;let r=ke(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,ce(u))if(u.length===1)o={};else{if(i.parent){const c=ke(i.parent);ce(o)&&(c?delete c[i.key]:i.root._=void 0)}o=function(c,h){let d,p,f,m=!0;const E=h;let A,_,g=[];function O(){c.dirtyFn=_,We.dirtyNodes.add(c)}const D=Dt(()=>{var C,T,I,S;if(m)m=!1,ce(ke(c))&&Fn(c,void 0);else if(!Ko&&_&&function(k,P){if(!Ko&&!function(F){var X,G;let z=F,K=F.numListenersRecursive>0;for(;z&&!K;)((X=z.listeners)!=null&&X.size||(G=z.listenersImmediate)!=null&&G.size)&&(K=!0),z=z.parent;return K}(k)){P&&(k.dirtyFn=P);let F=k;for(;F;)F.dirtyChildren||(F.dirtyChildren=new Set),F.dirtyChildren.add(k),F=F.parent;return!0}}(c,_))return void(f=!0);let v=E(),y=!1;const b=ze(v);(b||c.linkedToNode)&&(y=b,v=ks(c,v)),ce(v)&&v.length===0&&(v=v());const M=b||v==null?void 0:v[uo];if(M&&(c.activationState=M,v=void 0),f=!1,p=fn(v),c.activated){if(c.activationState){const k=c.activationState;(T=(C=c.state)==null?void 0:C.peek())!=null&&T.sync?(c.state.sync(),f=!0):v=(S=(I=k.get)==null?void 0:I.call(k))!=null?S:k.initial}}else{c.activated=!0;let k=Og;M!=null&&M.synced&&(k=We.activateSyncedNode,f=!0);const P=k(c,v);d=P.update;let B=P.value;!y&&ze(B)&&(B=ks(c,B)),v=B!=null?B:M==null?void 0:M.initial}return f&&(A=v),p=p||fn(v),v},C=>{const{value:T,nodes:I,refresh:S}=C;if(_=S,!f){if(!p||!We.isLoadingRemote)if(p)if(c.activationState){const{initial:v}=c.activationState;T&&fn(T)&&vi(c,T,d),ce(ke(c))&&Fn(c,v!=null?v:void 0)}else c.activated&&(vi(c,T,d),ce(ke(c))&&Fn(c,void 0));else{A=T;const v=c.state.isLoaded.peek();!v&&ce(T)||(c.isComputing=!0,Zt(c,T),c.isComputing=!1),v||c.state.assign({isLoaded:!0,error:void 0})}g.forEach(v=>v()),g=[],I==null||I.forEach(({node:v,track:y})=>{g.push(sr(v,O,{immediate:!0,trackingType:y}))})}C.cancel=!0},{fromComputed:!0});return c.activatedObserveDispose=()=>{D==null||D(),g.forEach(C=>C())},A}(i,u)}else ze(o)&&(o=Ti(i.parent,i.key,o))}return om(i,o),!l&&!i.needsExtract||i.isPlain||ze(o)||Rt(o)||(s&&function(u,c){if(!c.recursivelyAutoActivated&&(En(u)||Ke(u))&&!ho(u)){c.recursivelyAutoActivated=!0;const h=[];Om(u,h,()=>{var p;let f=c;for(let m=0;m<h.length;m++){const E=h[m],A=(p=ke(f))==null?void 0:p[E];f=on(f,E,ce(A)?A:void 0),wr(f)}return f})}}(o,i),i.parent&&Ti(i.parent,i.key,a)),o}(t,r,!!e)),r}function gm(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 Sm(t,e){gm(t),t.lazyFn=e,t.lazy=!0}function Og(t,e){if(t.state||(t.state=Zc({isLoaded:!1},!1,vi,Lt)),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,h,d,p=!1,f=!1;u?(c=u.changes,h=u.value,p=u.isFromPersist,f=u.isFromSync,d=u.getPrevious):(c=s,h=o,d=Jc(h,c)),s=[],o=void 0,We.pendingNodes.delete(t),a++;const m=a,E=()=>{m===a&&(t.isComputing=!0,n({value:h,changes:c,isFromPersist:p,isFromSync:f,getPrevious:d}),t.isComputing=!1)};fm(t.state.isLoaded,E,!0)}};sr(t,({value:u,changes:c})=>{t.isComputing||(c.length>1||!ce(c[0].prevAtPath))&&(o=u,s.length>0&&(c=c.filter(h=>!am(s[0].path,h.path))),s.push(...c),We.pendingNodes.set(t,l))},{immediate:!0}),sr(t,l)}}return{update:({value:n})=>{t.isComputing||(t.isComputing=!0,Zt(t,n),t.isComputing=!1)},value:e}}function ks(t,e){var n;const r=e?Mo(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=sr(r,()=>{ce(e=wr(r))||Zt(t,e)},{initial:!0},new Set([t])))),e}function Om(t,e,n){var r;if((En(t)||Ke(t))&&!ho(t)&&!Jf(t)){for(const i in t)if(Wc.call(t,i)){const o=t[i];if(ze(o)){const s=n();Ti(s,i,o),delete s.lazy}else{const s=ce(o)&&((r=o.prototype)==null?void 0:r[uo]);if(s){const a=s.activate;(!a||a==="auto")&&wi(on(n(),i,o))}}typeof o=="object"&&(e.push(i),Om(o,e,n),e.pop())}}}var vd=["get","set","peek","onChange","toggle"];function ui(t){this._node=t;for(let e=0;e<vd.length;e++){const n=vd[e];this[n]=this[n].bind(this)}}function qo(t,e){ui.prototype[t]=function(...n){return e.call(this,this._node,...n)}}function Ae(t){return Zc(t,!1,vi,Lt,ui)}qo("peek",t=>(Vl(),wi(t))),qo("get",(t,e)=>(Vl(),da(t,e))),qo("set",Zt),qo("onChange",sr),Object.defineProperty(ui.prototype,Oi,{configurable:!0,get(){return this._node}}),ui.prototype.toggle=function(){const t=this.peek();(t==null||Kf(t))&&this.set(!t)},ui.prototype.delete=function(){return this.set(void 0),this};var ha={createPreviousHandler:Jc,clone:tm,deactivateNode:gm,deepMerge:ys,ensureNodeValue:Kc,findIDKey:rm,get:da,getChildNode:on,getKeys:Hl,getNode:Mo,getNodeValue:ke,getPathType:Zf,getProxy:Lt,getValueAtPath:function(t,e){return e.reduce(pg,t)},globalState:We,initializePathType:qc,ObservablePrimitiveClass:ui,observableProperties:jl,observableFns:$l,optimized:Xc,peek:wi,reactivateNode:Sm,registerMiddleware:function(t,e,n){let r=ri.get(t);r||(r=new Map,ri.set(t,r));let i=r.get(e);return i||(i=new Set,r.set(e,i)),i.add(n),()=>{const o=ri.get(t);if(!o)return;const s=o.get(e);s&&(s.delete(n),s.size===0&&(o.delete(e),o.size===0&&ri.delete(t)))}},safeParse:em,safeStringify:Qf,set:Zt,setAtPath:sm,setNodeValue:Fn,symbolLinked:uo,symbolDelete:la,tracking:oi},{globalState:Td,observableProperties:Dg,observableFns:vg,ObservablePrimitiveClass:Rd}=ha;class pa{constructor(e={}){this._handlers=new Set,this._meta=e}meta(e){return new pa(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 zl=new pa,Ge=new pa;function Cd(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=Cd(e,t,"#fff"),r=Cd(e,t,"#000");return r===n&&!r.startsWith("0,0,0,")}const Tg=ki(null),Ua={didCatch:!1,error:null};class Dm extends Jt{constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=Ua}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(Ua)}}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(Ua))}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=Te(r,l);else{if(i===void 0)throw s;a=i}}return Te(Tg.Provider,{value:{didCatch:o,error:s,resetErrorBoundary:this.resetErrorBoundary}},a)}}var Jo=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function eu(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function tu(t){if(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 vm={exports:{}},yd={};const Tm=tu(Gc);var Ri=Tm,Rg=typeof Object.is=="function"?Object.is:function(t,e){return t===e&&(t!==0||1/t==1/e)||t!=t&&e!=e},Cg=Ri.useState,Ig=Ri.useEffect,yg=Ri.useLayoutEffect,Ng=Ri.useDebugValue;function Ba(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!Rg(t,n)}catch(r){return!0}}var bg=typeof window=="undefined"||window.document===void 0||window.document.createElement===void 0?function(t,e){return e()}:function(t,e){var n=e(),r=Cg({inst:{value:n,getSnapshot:e}}),i=r[0].inst,o=r[1];return yg(function(){i.value=n,i.getSnapshot=e,Ba(i)&&o({inst:i})},[t,n,e]),Ig(function(){return Ba(i)&&o({inst:i}),t(function(){Ba(i)&&o({inst:i})})},[t]),Ng(n),n};yd.useSyncExternalStore=Ri.useSyncExternalStore!==void 0?Ri.useSyncExternalStore:bg,vm.exports=yd;var kg=vm.exports,Nd=!1,Yl={inObserver:!1},bd=void 0,Lg=()=>bd||(bd=ki(null));function kd(t){const e=ua(t);if(!Ft.use)throw e;Ft.use(e)}function re(t,e){let n;if(Yl.inObserver&&ze(t)&&!(e!=null&&e.suspense))return n=_n(t,e),e!=null&&e.suspense&&n===void 0&&kd(t),n;try{const r=lr(Lg()),i=le(()=>function(l,u){let c,h,d,p,f,m,E=0;const A=()=>{h==null||h();const{value:g,dispose:O,resubscribe:D}=pm(p,_,l,void 0,void 0,!0);return h=O,d=D,g},_=({value:g})=>{if(u!=null&&u.peek()){const O=m;m=g,O===void 0&&ua(()=>!u.get(),()=>{const D=m;m=void 0,_({value:D})})}else{let O=l==null?void 0:l.skipCheck;if(!O){const D=A();(D!==f||!Rt(D)&&D===g)&&(O=!0)}O&&(E++,c==null||c())}};return{subscribe:g=>(c=g,!h&&d&&(h=d()),()=>{h==null||h(),h=void 0}),getVersion:()=>E,run:g=>(p=g,f=A())}}(e,r),[]),{subscribe:o,getVersion:s,run:a}=i;n=a(t),kg.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 Rm(t,e,n,r,i){const o=Ld?Symbol.for("react.forward_ref"):Yt(f=>null).$$typeof,s=Ld?Symbol.for("react.memo"):Bn(f=>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,h={apply(f,m,E){if(n){const A=E[0],_={},g=Object.keys(A);for(let O=0;O<g.length;O++){const D=g[O],C=A[D],T=c&&c.has(D);if(D==="children"&&(ce(C)||ze(C)))_[D]=re(C,{skipCheck:!0});else if(T||D.startsWith("$")||D.endsWith("$")){const I=T?D:D.endsWith("$")?D.slice(0,-1):D.slice(1),S=i==null?void 0:i[I],v=S&&ze(C);if(_[I]=v&&(S!=null&&S.selector)?S.selector(_,C):re(C),v&&(S.defaultValue!==void 0&&_[I]===void 0&&(_[I]=S.defaultValue),S.handler&&S.getValue)){const y=b=>{var M;C.set(S.getValue(b)),(M=A[S.handler])==null||M.call(A,b)};_[S.handler]=te(y,[A[S.handler],i])}T||delete _[D]}else _[D]===void 0&&(_[D]=C)}E[0]=_}return e?re(()=>{Yl.inObserver=!0;try{return Reflect.apply(f,m,E)}finally{Yl.inObserver=!1}},{skipCheck:!0}):Reflect.apply(f,m,E)}},d=new Proxy(u,h);let p;return a?(p=Yt(d),p.__legend_proxied=!0):p=d,e||l?Bn(p):p}var{findIDKey:wg,getNode:Mg,optimized:Pg}=ha,wd=new Map;function fo({each:t,optimized:e,item:n,itemProps:r,sortValues:i,children:o}){var s;if(!t)return null;const a=re(()=>t.get(!e||Pg));if(!n&&o){const u=Q();u.current=o,n=le(()=>{return c=({item$:h,id:d})=>u.current(h,d),Rm(c,!0);var c},[])}else if(n.$$typeof!==Symbol.for("react.memo")){let u=wd.get(n);u||(u=Bn(n),wd.set(n,u)),n=u}if(!a)return null;const l=[];if(Ke(a)){const u=a[0],c=Mg(t),h=a.length,d=h>0?c&&wg(u,c)||(u.id!==void 0?"id":u.key!==void 0?"key":void 0):void 0,p=ce(d);for(let f=0;f<h;f++)if(a[f]){const m=a[f],E=(s=p?d(m):m[d])!=null?s:f,A=t[f],_={key:E,id:E,item$:A,item:A};l.push(Te(n,r?Object.assign(_,r):_))}}else{const u=nt(a),c=u?Array.from(a.keys()):Object.keys(a);i&&c.sort((h,d)=>i(u?a.get(h):a[h],u?a.get(d):a[d],h,d));for(let h=0;h<c.length;h++){const d=c[h];if(u?a.get(d):a[d]){const p=u?t.get(d):t[d],f={key:d,id:d,item$:p,item:p};l.push(Te(n,r?Object.assign(f,r):f))}}}return l}Bn(function({children:t}){return re(()=>_n(_n(t)),{skipCheck:!0})},(t,e)=>!e.scoped||t.children===e.children);var Md=new Map,Pd=new Map;function xd({if:t,ifReady:e,else:n,$value:r,wrap:i,children:o}){const s=re(t!=null?t:e),a=re((e!==void 0?Ul(s):s)?ce(o)?()=>o(r?r.get():s):o:n!=null?n:null,{skipCheck:!0});return i?Te(i,void 0,a):a}new Proxy({},{get(t,e){if(!t[e]){const n=Md.get(e)||e,r=Yt((i,o)=>{const s={...i};return!o||!ce(o)&&Is(o)||(s.ref=o),Te(n,s)});t[e]=function(i,o,s){return Rm(i,!1,!0,o,s)}(r,[],Pd.get(e))}return t[e]}}),function(t){(function(e){if(Nd)return;Nd=!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)Md.set(n,t[n]);if(e)for(const n in e)Pd.set(n,e[n])});var xg=(t,e)=>{{const n=Q({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&&ce(s))return i.dispose=s,()=>queueMicrotask(o)}},e)}};function Cm(t){return xg(()=>{const e=t();if(!fn(e))return e},[])}var Fg=Cm;function Im(t){return Cm(()=>t)}var Hg=Im,{deactivateNode:Ug}=ha;function Vt(t,e){var n;const r=Q({});r.current.value=t;const i=e?Vt(e):void 0;if(!((n=r.current)!=null&&n.obs$)){const o=i?ce(t)&&t.length===1?s=>(i.get(),r.current.value(s)):()=>(i.get(),_n(r.current.value)):t;r.current.obs$=Ae(o)}return i&&i.set(e),Im(()=>{const o=r.current.obs$;if(o){const s=Mo(o);Ug(s)}}),r.current.obs$}function mo(t,e,n,r){let i;ce(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=Q({}),s=r?Vt(r):void 0;o.current.selector=t,o.current.reaction=i,s&&s.set(r),Fg(()=>Dt(a=>{var l;return s==null||s.get(),_n((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 ym extends Error{}function Fd(t,e){if(!t)throw new ym(e!=null?e:"Assertion failed")}const de=Object.assign(Fd,{is:function(t,e,n){return Fd(e,n)},unreachable:function(){throw new Error("Unreachable code")},never:function(t){throw new Error("Unreachable")},defined:function(t){if(t==null)throw new ym("Value is not defined")}}),[Nm,rt]=Tn(),[bm,Po]=Tn(),[km]=Tn(),[nu,xo]=Tn(),[Bg,jg]=Tn(),[Lm,pe]=Tn(),[wm,zr]=Tn(),[Mm,Pm]=Tn(),[xm,$g]=Tn(),[Vg,ru]=Tn();function Tn(){const t=ki(void 0);return[t,()=>{const e=lr(t);return de(e!==void 0),e}]}const di={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"}},Hd={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:di,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:"選擇對話"}}},Fm=()=>{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},Ud=(t,e)=>{const n=Fm();return n.fillStyle=e,n.fillText(t,0,0),n.getImageData(0,0,1,1).data},zg=t=>!t.includes("‍")||Fm().measureText(t).width<160,Yg=(t,e)=>{const n=[...t].join(",");return n===[...e].join(",")&&!n.startsWith("0,0,0,")};function Hm(t){try{return function(e){const n=Ud(e,"#000"),r=Ud(e,"#fff"),i=zg(e);return n&&r&&i&&Yg(n,r)}(t)}catch(e){return!0}}var Ef;const Um=(Ef=globalThis.window)!=null&&Ef.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(Hm(e))return n}():0;class Bm{constructor(e,n){this.currentUser$=Ae(null),this.app$=Ae(null),this.appId$=Ae(null),this.extUserId$=Ae(null),this.hasTokenFetcher$=Ae(!1),this.authTokenState$=Ae("idle"),this.themeCustom$=Ae(_d({value:void 0})),this.highlightedStrings$=Ae([]),this.device$=Ae({supportsEmojiPicker:!!Um,isMobile:typeof window!="undefined"&&/Mobi/i.test(window.navigator.userAgent)}),this.errors$=Ae({unknownUser:!1,wrongAppId:!1,serverError:!1}),this.conversationSearch=null,this.messageSearch=null,this.locale$=Ae(()=>{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$=Ae(()=>function(r){const i=r.replace(/_/g,"-").toLowerCase(),o=Hd[i];if(o)return{strings:{...o.translation,locale:i},emojiPickerTranslationUrl:o.emojiPickerTranslationUrl,emojiDataUrl:o.emojiDataUrl};const s=i.slice(0,2),a=Hd[s];return a?{strings:{...a.translation,locale:s},emojiPickerTranslationUrl:a.emojiPickerTranslationUrl,emojiDataUrl:a.emojiDataUrl}:(Ge.warn(`User locale '${r}' not supported; falling back to English.`),{strings:{...di.translation,locale:"en-US"},emojiPickerTranslationUrl:di.emojiPickerTranslationUrl,emojiDataUrl:di.emojiDataUrl})}(this.locale$.get())),this.t$=Ae(()=>this.translationData$.strings.get()),An(()=>{this.appId$.set(e),this.extUserId$.set(n)})}updateThemeCustom(e){this.themeCustom$.set(_d({value:e}))}}const Gg={canReplyToMessage:!1,canEditMessage:!1,canDeleteMessage:!1,canAddReaction:!1};class jm extends Bm{constructor(e,n){super(e,n),this.type="ChatboxStore",this.messageSubscriptions={},this.readyForNewMessagesPromise=Promise.resolve(),this.renderedConversationId$=Ae(void 0),this.focusedMessage$=Ae(null),this.chatSearchState$=Ae("hidden"),this.newMessageMarker$=Ae(void 0),this.state$=Ae({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 de.defined(i),de.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();de.defined(r);const i=this.state$.userPermissions.get(),o={...Gg,...i},s={canReplyToMessage:Yn(r.messages.reply,!0),canEditMessage:Yn(r.messages.edit,!0),canDeleteMessage:Yn(r.messages.delete,!0),canAddReaction:Yn(r.messages.emojiReactions,!0),...i},a={...s,canEditMessage:!1},l={canReplyToMessage:Yn(r.messages.reply,!1),canEditMessage:Yn(r.messages.edit,!1),canDeleteMessage:Yn(r.messages.delete,!1),canAddReaction:Yn(r.messages.emojiReactions,!1),...i};return{system:o,own:s,ownWithoutEditing:a,other:l,otherWithoutEditing:{...l,canEditMessage:!1}}}}),this.referencedMessage$=Ae(()=>{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$=Ae(()=>{var f,m,E;const r=this.state$.currentConversationId.get();if(!r)return[];const i=(f=this.newMessageMarker$.get())!=null?f:1/0,o=(m=this.state$.messages.child(r).state.get())!=null?m:[],s=Object.values((E=this.state$.ephemeralMessages.child(r).get())!=null?E:{}),a=s.length===0?o:s.concat(o).sort((A,_)=>_.createdAt-A.createdAt),l=a.map(A=>{const _=A.content[0],g=_==null?void 0:_.type;if(!_||g!=="file")return A;const O=_.size+","+_.filename,D=this.state$.localFileBlobUrls.child(r).child(O).url.get();return D?{...A,content:[{..._,url:D}]}:A});let u=null,c=0,h=!1;const d=[];for(const A of l){const _=new Date(A.createdAt),g=new Date(_).setHours(0,0,0,0),O=c&&g!==c,D=_.getTime()>i,C=!(!h||D||u!=null&&u.id.startsWith("ephemeral"));(C||O)&&d.push(new ps({id:"border-before-"+A.id,isDayMarker:!!O,isReadMarker:!!C,timestamp:O?c:void 0})),d.push(A),h=D,c=g,u=A}const p=this.extUserId$.peek();return function(A,_){const g=[];let O=[];const D=Symbol("NO_KEY");let C=D;for(const T of A){const I=_(T);C===D||C===I?O.push(T):(g.push(O),O=[T]),C=I}return O.length!==0&&g.push(O),g}(d,A=>{var _;return A instanceof ps?A.id:(_=A.sender)==null?void 0:_.id}).map(A=>{var g;const _=A[A.length-1];return{items:A,id:_.id,type:_ instanceof ps?"divider":_.sender?((g=_.sender)==null?void 0:g.id)===p?"own":"other":"system"}})})}storeTyping(e,n){this.state$.typing.child(e).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){An(()=>{var a;const i=n.reduce((l,u)=>(l[u.id]=u,l),{}),o=this.extUserId$.peek();de(o),this.state$.messages.child(e).set({state:n,lookup:i,loadedAll:r});const s=this.state$.ephemeralMessages.child(e);for(const l of n){const u=this.state$.ephemeralMessageIdMapping.child(e).child(l.id).peek();u&&s.child(u).delete();const c=l.content[0];if(((a=l.sender)==null?void 0:a.id)!==o||c.type!=="file")continue;const h=c.size+","+c.filename,d=this.state$.localFileBlobUrls.child(e).child(h);if(d.fetching.peek()!==!1)continue;const p=()=>{URL.revokeObjectURL(d.url.peek()),d.delete()};if(c.subtype==="image"){d.fetching.set(!0);const f=document.createElement("img");f.addEventListener("load",p,{once:!0}),f.src=c.url}else if(c.subtype==="video"){d.fetching.set(!0);const f=document.createElement("video");f.addEventListener("loadeddata",p,{once:!0}),f.src=c.url}else if(c.subtype==="audio"||c.subtype==="voice"){d.fetching.set(!0);const f=document.createElement("audio");f.addEventListener("loadeddata",p,{once:!0}),f.src=c.url}}})}}function Yn(t,e){return t==="all"||t==="own"&&e||t==="other"&&!e}class ps{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 dn(t,e=!1){return function(n,r=!1){return n.map(i=>{if(typeof i=="string")return i;switch(i.type){case"bold":return"*"+dn(i.children)+"*";case"italic":return"_"+dn(i.children)+"_";case"strikethrough":return"~"+dn(i.children)+"~";case"blockquote":return dn(i.children).split(`
1
+ "use client";"use strict";var Wu=t=>{throw TypeError(t)};var Xu=(t,e,n)=>e.has(t)||Wu("Cannot "+n);var be=(t,e,n)=>(Xu(t,e,"read from private field"),n?n.call(t):e.get(t)),qr=(t,e,n)=>e.has(t)?Wu("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),Xo=(t,e,n,r)=>(Xu(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const VA=require("@talkjs/core"),Lc=Object.freeze(Object.defineProperty({__proto__:null,get AfterMessages(){return gR},get AudioBlock(){return TR},get Avatar(){return kR},get BeforeMessages(){return AR},get ChatHeader(){return iR},get ChatSearchBox(){return vR},get CompactMessageContent(){return OR},get ConversationImage(){return LR},get ConversationListItem(){return HR},get FileBlock(){return RR},get GlobalSearchBox(){return jR},get GlobalSearchResultHeader(){return $R},get GlobalSearchResultItem(){return BR},get GroupChatImage(){return wR},get Icon(){return fR},get ImageBlock(){return CR},get LocationBlock(){return IR},get Message(){return aR},get MessageActionMenu(){return uR},get MessageDivider(){return ER},get MessageField(){return dR},get MessageListFooter(){return _R},get MessageListHeader(){return sR},get NoConversationSelected(){return SR},get RecordingPreview(){return pR},get ReferencedMessage(){return MR},get ReplyBar(){return PR},get TextBlock(){return yR},get TimeAgo(){return xR},get VideoBlock(){return NR},get VoiceBlock(){return bR},get VoiceRecorder(){return hR}},Symbol.toStringTag,{value:"Module"}));var wo,oe,_f,Or,Ku,Af,gf,Sf,wc,kl,Ll,Of,lo={},Df=[],zA=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,co=Array.isArray;function dn(t,e){for(var n in e)t[n]=e[n];return t}function wl(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function Oe(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?wo.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 Zi(t,s,r,i,null)}function Zi(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?++_f:i,__i:-1,__u:0};return i==null&&oe.vnode!=null&&oe.vnode(o),o}function vf(){return{current:null}}function Pe(t){return t.children}function Wt(t,e){this.props=t,this.context=e}function Si(t,e){if(e==null)return t.__?Si(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"?Si(t):null}function Tf(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 Tf(t)}}function Ml(t){(!t.__d&&(t.__d=!0)&&Or.push(t)&&!Cs.__r++||Ku!=oe.debounceRendering)&&((Ku=oe.debounceRendering)||Af)(Cs)}function Cs(){for(var t,e,n,r,i,o,s,a=1;Or.length;)Or.length>a&&Or.sort(gf),t=Or.shift(),a=Or.length,t.__d&&(n=void 0,r=void 0,i=(r=(e=t).__v).__e,o=[],s=[],e.__P&&((n=dn({},r)).__v=r.__v+1,oe.vnode&&oe.vnode(n),Mc(e.__P,n,r,e.__n,e.__P.namespaceURI,32&r.__u?[i]:null,o,i==null?Si(r):i,!!(32&r.__u),s),n.__v=r.__v,n.__.__k[n.__i]=n,Cf(o,n,s),r.__e=r.__=null,n.__e!=i&&Tf(n)));Cs.__r=0}function qu(t,e,n,r,i,o,s,a,l,u,c){var h,d,p,f,m,E,A,_=r&&r.__k||Df,g=e.length;for(l=function(O,D,R,T,I){var S,v,y,b,M,k=R.length,P=k,B=0;for(O.__k=new Array(I),S=0;S<I;S++)(v=D[S])!=null&&typeof v!="boolean"&&typeof v!="function"?(typeof v=="string"||typeof v=="number"||typeof v=="bigint"||v.constructor==String?v=O.__k[S]=Zi(null,v,null,null,null):co(v)?v=O.__k[S]=Zi(Pe,{children:v},null,null,null):v.constructor==null&&v.__b>0?v=O.__k[S]=Zi(v.type,v.props,v.key,v.ref?v.ref:null,v.__v):O.__k[S]=v,b=S+B,v.__=O,v.__b=O.__b+1,y=null,(M=v.__i=YA(v,R,b,P))!=-1&&(P--,(y=R[M])&&(y.__u|=2)),y==null||y.__v==null?(M==-1&&(I>k?B--:I<k&&B++),typeof v.type!="function"&&(v.__u|=4)):M!=b&&(M==b-1?B--:M==b+1?B++:(M>b?B--:B++,v.__u|=4))):O.__k[S]=null;if(P)for(S=0;S<k;S++)(y=R[S])!=null&&!(2&y.__u)&&(y.__e==T&&(T=Si(y)),yf(y,y));return T}(n,e,_,l,g),h=0;h<g;h++)(p=n.__k[h])!=null&&(d=p.__i==-1?lo:_[p.__i]||lo,p.__i=h,E=Mc(t,p,d,i,o,s,a,l,u,c),f=p.__e,p.ref&&d.ref!=p.ref&&(d.ref&&Pc(d.ref,null,p),c.push(p.ref,p.__c||f,p)),m==null&&f!=null&&(m=f),(A=!!(4&p.__u))||d.__k===p.__k?l=Rf(p,l,t,A):typeof p.type=="function"&&E!==void 0?l=E:f&&(l=f.nextSibling),p.__u&=-7);return n.__e=m,l}function Rf(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=Rf(i[o],e,n,r));return e}t.__e!=e&&(r&&(e&&t.type&&!e.parentNode&&(e=Si(t)),n.insertBefore(t.__e,e||null)),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function Pn(t,e){return e=e||[],t==null||typeof t=="boolean"||(co(t)?t.some(function(n){Pn(n,e)}):e.push(t)),e}function YA(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 Ju(t,e,n){e[0]=="-"?t.setProperty(e,n==null?"":n):t[e]=n==null?"":typeof n!="number"||zA.test(e)?n:n+"px"}function Ko(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||Ju(t.style,e,"");if(n)for(e in n)r&&n[e]==r[e]||Ju(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")o=e!=(e=e.replace(Sf,"$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=wc,t.addEventListener(e,o?Ll:kl,o)):t.removeEventListener(e,o?Ll:kl,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 Zu(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e.t==null)e.t=wc++;else if(e.t<n.u)return;return n(oe.event?oe.event(e):e)}}}function Mc(t,e,n,r,i,o,s,a,l,u){var c,h,d,p,f,m,E,A,_,g,O,D,R,T,I,S,v,y=e.type;if(e.constructor!=null)return null;128&n.__u&&(l=!!(32&n.__u),o=[a=e.__e=n.__e]),(c=oe.__b)&&c(e);e:if(typeof y=="function")try{if(A=e.props,_="prototype"in y&&y.prototype.render,g=(c=y.contextType)&&r[c.__c],O=c?g?g.props.value:c.__:r,n.__c?E=(h=e.__c=n.__c).__=h.__E:(_?e.__c=h=new y(A,O):(e.__c=h=new Wt(A,O),h.constructor=y,h.render=GA),g&&g.sub(h),h.state||(h.state={}),h.__n=r,d=h.__d=!0,h.__h=[],h._sb=[]),_&&h.__s==null&&(h.__s=h.state),_&&y.getDerivedStateFromProps!=null&&(h.__s==h.state&&(h.__s=dn({},h.__s)),dn(h.__s,y.getDerivedStateFromProps(A,h.__s))),p=h.props,f=h.state,h.__v=e,d)_&&y.getDerivedStateFromProps==null&&h.componentWillMount!=null&&h.componentWillMount(),_&&h.componentDidMount!=null&&h.__h.push(h.componentDidMount);else{if(_&&y.getDerivedStateFromProps==null&&A!==p&&h.componentWillReceiveProps!=null&&h.componentWillReceiveProps(A,O),e.__v==n.__v||!h.__e&&h.shouldComponentUpdate!=null&&h.shouldComponentUpdate(A,h.__s,O)===!1){for(e.__v!=n.__v&&(h.props=A,h.state=h.__s,h.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(b){b&&(b.__=e)}),D=0;D<h._sb.length;D++)h.__h.push(h._sb[D]);h._sb=[],h.__h.length&&s.push(h);break e}h.componentWillUpdate!=null&&h.componentWillUpdate(A,h.__s,O),_&&h.componentDidUpdate!=null&&h.__h.push(function(){h.componentDidUpdate(p,f,m)})}if(h.context=O,h.props=A,h.__P=t,h.__e=!1,R=oe.__r,T=0,_){for(h.state=h.__s,h.__d=!1,R&&R(e),c=h.render(h.props,h.state,h.context),I=0;I<h._sb.length;I++)h.__h.push(h._sb[I]);h._sb=[]}else do h.__d=!1,R&&R(e),c=h.render(h.props,h.state,h.context),h.state=h.__s;while(h.__d&&++T<25);h.state=h.__s,h.getChildContext!=null&&(r=dn(dn({},r),h.getChildContext())),_&&!d&&h.getSnapshotBeforeUpdate!=null&&(m=h.getSnapshotBeforeUpdate(p,f)),S=c,c!=null&&c.type===Pe&&c.key==null&&(S=If(c.props.children)),a=qu(t,co(S)?S:[S],e,n,r,i,o,s,a,l,u),h.base=e.__e,e.__u&=-161,h.__h.length&&s.push(h),E&&(h.__E=h.__=null)}catch(b){if(e.__v=null,l||o!=null)if(b.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(v=o.length;v--;)wl(o[v]);Pl(e)}else e.__e=n.__e,e.__k=n.__k,b.then||Pl(e);oe.__e(b,e,n)}else o==null&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):a=e.__e=function(b,M,k,P,B,F,V,G,z){var K,_e,ie,ue,le,Ie,$t,rt=k.props||lo,ye=M.props,Ke=M.type;if(Ke=="svg"?B="http://www.w3.org/2000/svg":Ke=="math"?B="http://www.w3.org/1998/Math/MathML":B||(B="http://www.w3.org/1999/xhtml"),F!=null){for(K=0;K<F.length;K++)if((le=F[K])&&"setAttribute"in le==!!Ke&&(Ke?le.localName==Ke:le.nodeType==3)){b=le,F[K]=null;break}}if(b==null){if(Ke==null)return document.createTextNode(ye);b=document.createElementNS(B,Ke,ye.is&&ye),G&&(oe.__m&&oe.__m(M,F),G=!1),F=null}if(Ke==null)rt===ye||G&&b.data==ye||(b.data=ye);else{if(F=F&&wo.call(b.childNodes),!G&&F!=null)for(rt={},K=0;K<b.attributes.length;K++)rt[(le=b.attributes[K]).name]=le.value;for(K in rt)if(le=rt[K],K!="children"){if(K=="dangerouslySetInnerHTML")ie=le;else if(!(K in ye)){if(K=="value"&&"defaultValue"in ye||K=="checked"&&"defaultChecked"in ye)continue;Ko(b,K,null,le,B)}}for(K in ye)le=ye[K],K=="children"?ue=le:K=="dangerouslySetInnerHTML"?_e=le:K=="value"?Ie=le:K=="checked"?$t=le:G&&typeof le!="function"||rt[K]===le||Ko(b,K,le,rt[K],B);if(_e)G||ie&&(_e.__html==ie.__html||_e.__html==b.innerHTML)||(b.innerHTML=_e.__html),M.__k=[];else if(ie&&(b.innerHTML=""),qu(M.type=="template"?b.content:b,co(ue)?ue:[ue],M,k,P,Ke=="foreignObject"?"http://www.w3.org/1999/xhtml":B,F,V,F?F[0]:k.__k&&Si(k,0),G,z),F!=null)for(K=F.length;K--;)wl(F[K]);G||(K="value",Ke=="progress"&&Ie==null?b.removeAttribute("value"):Ie!=null&&(Ie!==b[K]||Ke=="progress"&&!Ie||Ke=="option"&&Ie!=rt[K])&&Ko(b,K,Ie,rt[K],B),K="checked",$t!=null&&$t!=b[K]&&Ko(b,K,$t,rt[K],B))}return b}(n.__e,e,n,r,i,o,s,l,u);return(c=oe.diffed)&&c(e),128&e.__u?void 0:a}function Pl(t){t&&t.__c&&(t.__c.__e=!0),t&&t.__k&&t.__k.forEach(Pl)}function Cf(t,e,n){for(var r=0;r<n.length;r++)Pc(n[r],n[++r],n[++r]);oe.__c&&oe.__c(e,t),t.some(function(i){try{t=i.__h,i.__h=[],t.some(function(o){o.call(i)})}catch(o){oe.__e(o,i.__v)}})}function If(t){return typeof t!="object"||t==null||t.__b&&t.__b>0?t:co(t)?t.map(If):dn({},t)}function Pc(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){oe.__e(i,n)}}function yf(t,e,n){var r,i;if(oe.unmount&&oe.unmount(t),(r=t.ref)&&(r.current&&r.current!=t.__e||Pc(r,null,e)),(r=t.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){oe.__e(o,e)}r.base=r.__P=null}if(r=t.__k)for(i=0;i<r.length;i++)r[i]&&yf(r[i],e,n||typeof t.type!="function");n||wl(t.__e),t.__c=t.__=t.__e=void 0}function GA(t,e,n){return this.constructor(t,n)}function uo(t,e,n){var r,i,o,s;e==document&&(e=document.documentElement),oe.__&&oe.__(t,e),i=(r=typeof n=="function")?null:n&&n.__k||e.__k,o=[],s=[],Mc(e,t=(!r&&n||e).__k=Oe(Pe,null,[t]),i||lo,lo,e.namespaceURI,!r&&n?[n]:i?null:e.firstChild?wo.call(e.childNodes):null,o,!r&&n?n:i?i.__e:e.firstChild,r,s),Cf(o,t,s)}function Nf(t,e){uo(t,e,Nf)}function WA(t,e,n){var r,i,o,s,a=dn({},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?wo.call(arguments,2):n),Zi(t.type,a,r||t.key,i||t.ref,null)}function ki(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,Ml(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"+Of++,e.__=t,e.Provider=e.__l=(e.Consumer=function(n,r){return n.children(r)}).contextType=e,e}wo=Df.slice,oe={__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}},_f=0,Wt.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=dn({},this.state),typeof t=="function"&&(t=t(dn({},n),this.props)),t&&dn(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),Ml(this))},Wt.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),Ml(this))},Wt.prototype.render=Pe,Or=[],Af=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,gf=function(t,e){return t.__v.__b-e.__v.__b},Cs.__r=0,Sf=/(PointerCapture)$|Capture$/i,wc=0,kl=Zu(!1),Ll=Zu(!0),Of=0;var XA=0;function L(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:--XA,__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 oe.vnode&&oe.vnode(u),u}var Hn,De,Ma,Qu,Oi=0,bf=[],ke=oe,ed=ke.__b,td=ke.__r,nd=ke.diffed,rd=ke.__c,id=ke.unmount,od=ke.__;function zr(t,e){ke.__h&&ke.__h(De,t,Oi||e),Oi=0;var n=De.__H||(De.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function ae(t){return Oi=1,oa(kf,t)}function oa(t,e,n){var r=zr(Hn++,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=De,!De.__f)){var i=function(a,l,u){if(!r.__c.__H)return!0;var c=r.__c.__H.__.filter(function(d){return!!d.__c});if(c.every(function(d){return!d.__N}))return!o||o.call(this,a,l,u);var h=r.__c.props!==a;return c.forEach(function(d){if(d.__N){var p=d.__[0];d.__=d.__N,d.__N=void 0,p!==d.__[0]&&(h=!0)}}),o&&o.call(this,a,l,u)||h};De.__f=!0;var o=De.shouldComponentUpdate,s=De.componentWillUpdate;De.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)},De.shouldComponentUpdate=i}return r.__N||r.__}function Z(t,e){var n=zr(Hn++,3);!ke.__s&&Fc(n.__H,e)&&(n.__=t,n.u=e,De.__H.__h.push(n))}function ft(t,e){var n=zr(Hn++,4);!ke.__s&&Fc(n.__H,e)&&(n.__=t,n.u=e,De.__h.push(n))}function Q(t){return Oi=5,se(function(){return{current:t}},[])}function jn(t,e,n){Oi=6,ft(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 se(t,e){var n=zr(Hn++,7);return Fc(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function ee(t,e){return Oi=8,se(function(){return t},e)}function lr(t){var e=De.context[t.__c],n=zr(Hn++,9);return n.c=t,e?(n.__==null&&(n.__=!0,e.sub(De)),e.props.value):t.__}function xc(t,e){ke.useDebugValue&&ke.useDebugValue(e?e(t):t)}function sa(){var t=zr(Hn++,11);if(!t.__){for(var e=De.__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 KA(){for(var t;t=bf.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(ds),t.__H.__h.forEach(xl),t.__H.__h=[]}catch(e){t.__H.__h=[],ke.__e(e,t.__v)}}ke.__b=function(t){De=null,ed&&ed(t)},ke.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),od&&od(t,e)},ke.__r=function(t){td&&td(t),Hn=0;var e=(De=t.__c).__H;e&&(Ma===De?(e.__h=[],De.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(e.__h.forEach(ds),e.__h.forEach(xl),e.__h=[],Hn=0)),Ma=De},ke.diffed=function(t){nd&&nd(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(bf.push(e)!==1&&Qu===ke.requestAnimationFrame||((Qu=ke.requestAnimationFrame)||qA)(KA)),e.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),Ma=De=null},ke.__c=function(t,e){e.some(function(n){try{n.__h.forEach(ds),n.__h=n.__h.filter(function(r){return!r.__||xl(r)})}catch(r){e.some(function(i){i.__h&&(i.__h=[])}),e=[],ke.__e(r,n.__v)}}),rd&&rd(t,e)},ke.unmount=function(t){id&&id(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{ds(r)}catch(i){e=i}}),n.__H=void 0,e&&ke.__e(e,n.__v))};var sd=typeof requestAnimationFrame=="function";function qA(t){var e,n=function(){clearTimeout(r),sd&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,35);sd&&(e=requestAnimationFrame(n))}function ds(t){var e=De,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),De=e}function xl(t){var e=De;t.__c=t.__(),De=e}function Fc(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 Lf(t,e){for(var n in e)t[n]=e[n];return t}function Fl(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 Hc(t,e){var n=e(),r=ae({t:{__:n,u:e}}),i=r[0].t,o=r[1];return ft(function(){i.__=n,i.u=e,Pa(i)&&o({t:i})},[t,n,e]),Z(function(){return Pa(i)&&o({t:i}),t(function(){Pa(i)&&o({t:i})})},[t]),n}function Pa(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 Uc(t){t()}function Bc(t){return t}function jc(){return[!1,Uc]}var $c=ft;function Is(t,e){this.props=t,this.context=e}function Un(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:Fl(this.props,i)}function r(i){return this.shouldComponentUpdate=n,Oe(t,i)}return r.displayName="Memo("+(t.displayName||t.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r.type=t,r}(Is.prototype=new Wt).isPureReactComponent=!0,Is.prototype.shouldComponentUpdate=function(t,e){return Fl(this.props,t)||Fl(this.state,e)};var ad=oe.__b;oe.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),ad&&ad(t)};var JA=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function jt(t){function e(n){var r=Lf({},n);return delete r.ref,t(r,n.ref||null)}return e.$$typeof=JA,e.render=t,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var ld=function(t,e){return t==null?null:Pn(Pn(t).map(e))},wf={map:ld,forEach:ld,count:function(t){return t?Pn(t).length:0},only:function(t){var e=Pn(t);if(e.length!==1)throw"Children.only";return e[0]},toArray:Pn},ZA=oe.__e;oe.__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)}ZA(t,e,n,r)};var cd=oe.unmount;function Mf(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=Lf({},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 Mf(r,e,n)})),t}function Pf(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(r){return Pf(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 Qi(){this.__u=0,this.o=null,this.__b=null}function xf(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function Ff(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?Oe(i,s):null}return o.displayName="Lazy",o.__f=!0,o}function ri(){this.i=null,this.l=null}oe.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),cd&&cd(t)},(Qi.prototype=new Wt).__c=function(t,e){var n=e.__c,r=this;r.o==null&&(r.o=[]),r.o.push(n);var i=xf(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]=Pf(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)},Qi.prototype.componentWillUnmount=function(){this.o=[]},Qi.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]=Mf(this.__b,n,r.__O=r.__P)}this.__b=null}var i=e.__a&&Oe(Pe,null,t.fallback);return i&&(i.__u&=-33),[Oe(Pe,null,e.__a?null:t.children),i]};var ud=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 QA(t){return this.getChildContext=function(){return t.context},t.children}function eg(t){var e=this,n=t.h;if(e.componentWillUnmount=function(){uo(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)}}}uo(Oe(QA,{context:e.context},t.__v),e.v)}function Vc(t,e){var n=Oe(eg,{__v:t,h:e});return n.containerInfo=e,n}(ri.prototype=new Wt).__a=function(t){var e=this,n=xf(e.__v),r=e.l.get(t);return r[0]++,function(i){var o=function(){e.props.revealOrder?(r.push(i),ud(e,t,r)):i()};n?n(o):o()}},ri.prototype.render=function(t){this.i=null,this.l=new Map;var e=Pn(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},ri.prototype.componentDidUpdate=ri.prototype.componentDidMount=function(){var t=this;this.l.forEach(function(e,n){ud(t,n,e)})};var Hf=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.element")||60103,tg=/^(?: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]/,ng=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,rg=/[A-Z0-9]/g,ig=typeof document!="undefined",og=function(t){return(typeof Symbol!="undefined"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(t)};function zc(t,e,n){return e.__k==null&&(e.textContent=""),uo(t,e),typeof n=="function"&&n(),t?t.__c:null}function Uf(t,e,n){return Nf(t,e),typeof n=="function"&&n(),t?t.__c:null}Wt.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(Wt.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})});var dd=oe.event;function sg(){}function ag(){return this.cancelBubble}function lg(){return this.defaultPrevented}oe.event=function(t){return dd&&(t=dd(t)),t.persist=sg,t.isPropagationStopped=ag,t.isDefaultPrevented=lg,t.nativeEvent=t};var Yc,cg={enumerable:!1,configurable:!0,get:function(){return this.class}},hd=oe.vnode;oe.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||ig&&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"||og(n.type)?l==="onfocus"?s="onfocusin":l==="onblur"?s="onfocusout":ng.test(s)&&(s=l):l=s="oninput":o&&tg.test(s)?s=s.replace(rg,"-$&").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=Pn(n.children).forEach(function(u){u.props.selected=i.value.indexOf(u.props.value)!=-1})),r=="select"&&i.defaultValue!=null&&(i.value=Pn(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",cg)):(n.className&&!n.class||n.class&&n.className)&&(i.class=i.className=n.className),e.props=i}(t),t.$$typeof=Hf,hd&&hd(t)};var pd=oe.__r;oe.__r=function(t){pd&&pd(t),Yc=t.__c};var fd=oe.diffed;oe.diffed=function(t){fd&&fd(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),Yc=null};var Bf={ReactCurrentDispatcher:{current:{readContext:function(t){return Yc.__n[t.__c].props.value},useCallback:ee,useContext:lr,useDebugValue:xc,useDeferredValue:Bc,useEffect:Z,useId:sa,useImperativeHandle:jn,useInsertionEffect:$c,useLayoutEffect:ft,useMemo:se,useReducer:oa,useRef:Q,useState:ae,useSyncExternalStore:Hc,useTransition:jc}}};function jf(t){return Oe.bind(null,t)}function Mo(t){return!!t&&t.$$typeof===Hf}function $f(t){return Mo(t)&&t.type===Pe}function Vf(t){return!!t&&!!t.displayName&&(typeof t.displayName=="string"||t.displayName instanceof String)&&t.displayName.startsWith("Memo(")}function zf(t){return Mo(t)?WA.apply(null,arguments):t}function Gc(t){return!!t.__k&&(uo(null,t),!0)}function Yf(t){return t&&(t.base||t.nodeType===1&&t)||null}var Gf=function(t,e){return t(e)},aa=function(t,e){return t(e)},Wf=Pe,Xf=Mo,Mt={useState:ae,useId:sa,useReducer:oa,useEffect:Z,useLayoutEffect:ft,useInsertionEffect:$c,useTransition:jc,useDeferredValue:Bc,useSyncExternalStore:Hc,startTransition:Uc,useRef:Q,useImperativeHandle:jn,useMemo:se,useCallback:ee,useContext:lr,useDebugValue:xc,version:"18.3.1",Children:wf,render:zc,hydrate:Uf,unmountComponentAtNode:Gc,createPortal:Vc,createElement:Oe,createContext:ki,createFactory:jf,cloneElement:zf,createRef:vf,Fragment:Pe,isValidElement:Mo,isElement:Xf,isFragment:$f,isMemo:Vf,findDOMNode:Yf,Component:Wt,PureComponent:Is,memo:Un,forwardRef:jt,flushSync:aa,unstable_batchedUpdates:Gf,StrictMode:Wf,Suspense:Qi,SuspenseList:ri,lazy:Ff,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Bf};const Wc=Object.freeze(Object.defineProperty({__proto__:null,Children:wf,Component:Wt,Fragment:Pe,PureComponent:Is,StrictMode:Wf,Suspense:Qi,SuspenseList:ri,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Bf,cloneElement:zf,createContext:ki,createElement:Oe,createFactory:jf,createPortal:Vc,createRef:vf,default:Mt,findDOMNode:Yf,flushSync:aa,forwardRef:jt,hydrate:Uf,isElement:Xf,isFragment:$f,isMemo:Vf,isValidElement:Mo,lazy:Ff,memo:Un,render:zc,startTransition:Uc,unmountComponentAtNode:Gc,unstable_batchedUpdates:Gf,useCallback:ee,useContext:lr,useDebugValue:xc,useDeferredValue:Bc,useEffect:Z,useErrorBoundary:function(t){var e=zr(Hn++,10),n=ae();return e.__=t,De.componentDidCatch||(De.componentDidCatch=function(r,i){e.__&&e.__(r,i),n[1](r)}),[n[0],function(){n[1](void 0)}]},useId:sa,useImperativeHandle:jn,useInsertionEffect:$c,useLayoutEffect:ft,useMemo:se,useReducer:oa,useRef:Q,useState:ae,useSyncExternalStore:Hc,useTransition:jc,version:"18.3.1"},Symbol.toStringTag,{value:"Module"}));var Xc=Object.prototype.hasOwnProperty;function Ye(t){return Array.isArray(t)}function fn(t){return!(!t||typeof t!="object"||t instanceof Date||Ye(t))}function ug(t){return fn(t)&&t.constructor===Object}function ce(t){return typeof t=="function"}function Dt(t){const e=typeof t;return t!==void 0&&(Hl(t)||e!=="object"&&e!=="function")}function Hl(t){return t instanceof Date}function Kf(t){return typeof t=="boolean"}function hn(t){return t instanceof Promise}function tt(t){return t instanceof Map||t instanceof WeakMap}function Bn(t){return t instanceof Set||t instanceof WeakSet}function ys(t){if(!t)return!1;if(Ye(t))return t.length===0;if(tt(t)||Bn(t))return t.size===0;for(const e in t)if(Xc.call(t,e))return!1;return!0}var dg=new Set(["boolean","string","number"]);function la(t){return!!t.parent}var hg=Symbol.toPrimitive,pg=Symbol.iterator,Di=Symbol("getNode"),ca=Symbol("delete"),qf=Symbol("opaque"),fg=Symbol("plain"),Kc=Symbol("optimized"),ho=Symbol("linked"),Ve={pendingNodes:new Map,dirtyNodes:new Set};function po(t){return t&&(t[qf]||t.$$typeof)}function Jf(t){return t&&t[fg]}function Zf(t){return Ye(t)?"array":tt(t)?"map":t instanceof Set?"set":"object"}function mg(t,e){return tt(e)?{__LSType:"Map",value:Array.from(e.entries())}:e instanceof Set?{__LSType:"Set",value:Array.from(e)}:(Ve.replacer&&(e=Ve.replacer(t,e)),e)}var Eg=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z$/;function _g(t,e){if(e){if(typeof e=="string"&&Eg.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)}Ve.reviver&&(e=Ve.reviver(t,e))}return e}function Qf(t){return t&&JSON.stringify(t,mg)}function em(t){return t&&JSON.parse(t,_g)}function tm(t){return em(Qf(t))}function Be(t){return!!t&&!!t[Di]}function Po(t){return t&&t[Di]}function nm(t,e,n,r,i){return r?t.add(n):i?t.set(e,n):t[e]=n,n}function xn(t,e){var n;const r=(n=t.parent)!=null?n:t,i=t.parent?t.key:"_",o=e===ca;o&&(e=void 0);const s=t.parent?qc(r):r.root,a=Bn(s),l=tt(s),u=a?i:l?s.get(i):s[i],c=ce(e);if((e=r.isAssigning||!c||ce(u)?e:e(u))!==u)try{r.isSetting=(r.isSetting||0)+1,o?l||a?s.delete(i):delete s[i]:nm(s,i,e,a,l)}finally{r.isSetting--}return{prevValue:u,newValue:e,parentValue:s}}var md=[];function Ce(t){let e=0,n=t;for(;la(n);)md[e++]=n.key,n=n.parent;let r=t.root._;for(let i=e-1;r&&i>=0;i--){const o=md[i];r=o!=="size"&&tt(r)?r.get(o):r[o]}return r}function tn(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)),ce(n)&&(o=Object.assign(()=>{},o),o.lazyFn=n),t.children||(t.children=new Map),t.children.set(e,o)),o}function qc(t){let e=Ce(t);if(!e||ce(e))if(la(t)){const n=qc(t.parent),r=Bn(n),i=tt(n);e=nm(n,t.key,{},r,i)}else e=t.root._={};return e}function rm(t,e){var n,r;let i=Be(t)?void 0:fn(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:Ce(e.parent)[e.key+"_keyExtractor"];s&&ce(s)&&(i=s)}return i}function Ed(t,e,n){t.functions||(t.functions=new Map),t.functions.set(e,n)}function im(t,e){return t===e||Hl(t)&&Hl(e)&&+t==+e}function Ul(t,e,n,r){return e?void 0:t?r?Array.from(t):n?Array.from(t.keys()):Object.keys(t):[]}function Ag(t,e){return t&&Object.defineProperty(t,e,{value:!0,enumerable:!1,writable:!0,configurable:!0}),t}var _d=function(t){return Ag(t,qf)};function om(t,e){var n;t.isPlain||!((n=t.parent)!=null&&n.isPlain)&&!Jf(e)||(t.isPlain=!0)}function mn(t,e,n,r){let i=t;return!Be(i)&&ce(i)&&(i=n?i(n):i()),Be(i)&&!r?i.get(e):i}var eo,gg=(t,e)=>t&&t[e];function sm(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 h=tt(l);let d=l?h?l.get(a):l[a]:void 0;const p=u?h?u.get(a):u[a]:void 0;if(d===ca)return u&&(h?l.set(a,p):l[a]=p,s==null||s(e.slice(0,c+1),p)),t;if(d===void 0&&r===void 0&&c===e.length-1)return t;c<e.length-1&&d==null&&(d=Jc(n[c]),tt(l)?l.set(a,d):l[a]=d),c<e.length-1&&(l=d,u&&(u=p))}}return a===void 0?t=i==="merge"?Ns(t,r):r:i==="merge"?l[a]=Ns(l[a],r):tt(l)?l.set(a,r):l[a]=r,t}function Ad(t,e,n){let r=n;for(let i=0;i<t.length;i++){const o=t[i];r=r?r[o]:Jc(e[i])}return r}function Bl(t){return!(!t||(fn(t)||Ye(t))&&ys(t))}function Jc(t){switch(t){case"array":return[];case"map":return new Map;case"set":return new Set;default:return{}}}function Sg(t,e,n){const{path:r,valueAtPath:i,prevAtPath:o,pathTypes:s}=e;return sm(t,r,s,o)}function Ns(t,...e){if(Dt(t))return e[e.length-1];let n=Ye(t)?[...t]:{...t};for(let r=0;r<e.length;r++){const i=e[r];if(ug(i)||Ye(i)){const o=i;for(const s in o)Xc.call(o,s)&&(o[s]instanceof Object&&!Be(o[s])&&Object.keys(o[s]).length>0?n[s]=Ns(n[s]||(Ye(o[s])?[]:{}),o[s]):n[s]=o[s])}else n=i}return n}var bs=0,xa=!1,Fa=!1,ui=new Map;function Og(){ui.size>0&&Li(!0)}function am(t,e){for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function Dg(t,e){try{return function(n,r){for(let i=0;i<r.length;i++)n=Sg(n,r[i]);return n}(t?tm(t):{},e)}catch(n){return}}function Zc(t,e){return function(){return Dg(t,e)}}function fo(t,e,n,r,i){const o=new Map;ks(o,t,!!Ve.isLoadingLocal,!!Ve.isLoadingRemote,e,[],[],e,n,!0,r,i);const s=ui.get(t);s?s.prev===e?ui.delete(t):s.value=e:ui.set(t,{value:e,prev:n,level:r,whenOptimizedOnlyIf:i,isFromSync:!!Ve.isLoadingRemote,isFromPersist:!!Ve.isLoadingLocal}),o.size&&lm(o,!0),bs<=0&&cm()}function ks(t,e,n,r,i,o,s,a,l,u,c,h){if(e.numListenersRecursive>0&&(function(d,p,f,m,E,A,_,g,O,D,R,T){if(D?p.listenersImmediate:p.listeners){const I={path:A,pathTypes:_,valueAtPath:g,prevAtPath:O},S=d.get(p);if(S&&A.length>0){const{changes:v}=S;am(v[0].path,I.path)||(v.push(I),S.level=Math.min(S.level,R),S.whenOptimizedOnlyIf||(S.whenOptimizedOnlyIf=T))}else d.set(p,{level:R,value:E,isFromSync:m,isFromPersist:f,whenOptimizedOnlyIf:T,changes:[I]})}}(t,e,n,r,i,o,s,a,l,u,c,h),e.linkedFromNodes))for(const d of e.linkedFromNodes)ks(t,vg(d,o),n,r,a,[],[],a,l,u,0,h);if(e.parent){const d=e.parent;d&&ks(t,d,n,r,Ce(d),[e.key].concat(o),[Zf(i)].concat(s),a,l,u,c+1,h)}}function lm(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 h;const d=Array.from(c);for(let p=0;p<d.length;p++){const f=d[p],{track:m,noArgs:E,listener:A}=f;n.has(A)||(m===!0?i<=0:m!==Kc||l&&i<=0)&&(E||h||(h={value:o,isFromPersist:s,isFromSync:a,getPrevious:Zc(o,r),changes:r}),m||n.add(A),A(h))}}})}function cm(){const t=Array.from(Ve.dirtyNodes);Ve.dirtyNodes.clear(),t.forEach(r=>{const i=r.dirtyFn;i&&(r.dirtyFn=void 0,i())});const e=ui;ui=new Map;const n=new Map;e.forEach(({value:r,prev:i,level:o,isFromPersist:s,isFromSync:a,whenOptimizedOnlyIf:l},u)=>{ks(n,u,s,a,r,[],[],r,i,!1,o,l)}),n.size&&lm(n,!1)}function En(t){ua();try{t()}finally{Li()}}function ua(){bs++,eo||(eo=setTimeout(Og,0))}function Li(t){(--bs<=0||t)&&(xa?Fa=!0:(eo&&(clearTimeout(eo),eo=void 0),bs=0,xa=!0,cm(),xa=!1,Fa&&(Fa=!1,Li(!0))))}function vg(t,e){let n=t;for(let r=0;r<e.length;r++)n=tn(n,e[r]);return n}function Qc(t,e,n,r,i){if(Be(t))return t;const o=hn(t);let s={root:{_:t},lazy:!0,numListenersRecursive:0};ce(t)&&(s=Object.assign(()=>{},s),s.lazyFn=t);var a;const l=e||(a=t,dg.has(typeof a))?new i(s):r(s);return o&&(xn(s,void 0),n(s,t)),l}var ii=new WeakMap,um=[],dm=[],hm=[],oi=0,jl=!1;function Ha(t,e,n){const r=ii.get(t);if(!r||!r.has(n))return;const i=r.get(n);i&&i.size!==0&&(um[oi]=t,dm[oi]=e,hm[oi]=n,oi++,jl||(jl=!0,queueMicrotask(Tg)))}var Bi={type:"listener-added",node:null,listener:void 0,timestamp:0};function Tg(){jl=!1;const t=typeof performance!="undefined"?performance.now():Date.now();Bi.timestamp=t;for(let e=0;e<oi;e++){const n=um[e],r=dm[e],i=hm[e],o=ii.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)continue;let u=!1;if(u=i==="listener-added"?!!(a!=null&&a.has(r))||!!(l!=null&&l.has(r)):i==="listener-removed"?!(a!=null&&a.has(r))&&!(l!=null&&l.has(r)):!(a!=null&&a.size)&&!(l!=null&&l.size),u){Bi.type=i,Bi.node=n,Bi.listener=r;const c=Array.from(s);for(let h=0;h<c.length;h++)try{c[h](Bi)}catch(d){console.error(`Error in middleware handler for ${i}:`,d)}}}oi=0}function sr(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 m=Ce(t);e({value:m,isFromPersist:!0,isFromSync:!1,changes:[{path:[],pathTypes:[],prevAtPath:m,valueAtPath:m}],getPrevious:()=>{}})}let h;function d(m,E=e,A){if(!(r!=null&&r.has(m))){r||(r=new Set),r.add(A||t),E||(E=e);const _={trackingType:!0,...n};h=[...h||[],sr(m,E,_,r)]}}t.linkedToNode&&d(t.linkedToNode),(i=t.linkedFromNodes)==null||i.forEach(m=>d(m)),t.numListenersRecursive++;let p=t.parent,f=[t.key];for(;p;){if(p.linkedFromNodes)for(const m of p.linkedFromNodes)r!=null&&r.has(m)||d(m,Rg(m,f,e),p);p.numListenersRecursive++,f=[p.key,...f],p=p.parent}return Ha(t,c,"listener-added"),()=>{u.delete(c),h==null||h.forEach(E=>E());let m=t;for(;m;)m.numListenersRecursive--,m=m.parent;Ha(t,c,"listener-removed"),u.size===0&&Ha(t,void 0,"listeners-cleared")}}function Rg(t,e,n){let r=Ad(e,[],Ce(t));return function({value:i,isFromPersist:o,isFromSync:s}){const a=Ad(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(sr(s,e,{trackingType:a,immediate:r,noArgs:n}))}),()=>{if(i){for(let o=0;o<i.length;o++)i[o]();i=void 0}}}var hs=0,Sd=[],si={current:void 0};function ps(t,e){if(hs){const n=si.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 pm(t,e,n,r,i,o){let s,a,l=e;Sd.push(si.current),hs++,si.current={};const u=t&&mn(t,n,r,i==null?void 0:i.fromComputed),c=si.current.nodes;return--hs<0&&(hs=0),si.current=Sd.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 gt(t,e,n){let r,i;ce(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,ua(),delete s.value,i==null||i();const{dispose:l,value:u,nodes:c}=pm(t,a,void 0,s,n);var h,d;i=l,s.value=u,s.nodes=c,s.refresh=a,s.onCleanupReaction&&(s.onCleanupReaction(),s.onCleanupReaction=void 0),Li(),o=!1,!r||!(n!=null&&n.fromComputed)&&(!(s.num>0)&&(h=t)&&((d=h[Di])!=null&&d.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 fm(t,e,n){if(hn(t))return e?t.then(e):t;const r=Ye(t);let i,o;return gt(function(s){const a=r?t.map(l=>mn(l)):mn(t);if(!hn(a)){{let l=!0;if(Ye(a))for(let u=0;u<a.length;u++){let c=a[u];Be(c)?c=mn(c):ce(c)&&(c=c()),l=l&&!!(n?Bl(c):c)}else l=n?Bl(a):a;l&&(i=a,s.cancel=!0)}return i}i=a},function(){o=e==null?void 0:e(i)}),hn(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(hn(u)?u.then(c=>c):u)}}else e=s})}function da(t,e){return fm(t,e,!1)}var Ua=new Set(["copyWithin","fill","from","pop","push","reverse","shift","sort","splice","unshift"]),Od=new Set(["every","filter","find","findIndex","flatMap","forEach","join","map","reduce","some"]),Cg=new Set(["filter","find"]),$l=new Map,Vl=new Map([["get",ha],["set",Xt],["peek",wi],["onChange",sr],["assign",function(t,e){const n=Nt(t);if(ua(),Dt(t.root._)&&(t.root._={}),tt(e)){const r=Ce(t);tt(r)?e.forEach((i,o)=>r.set(o,i)):Xt(t,e)}else{t.isAssigning=(t.isAssigning||0)+1;try{Object.assign(n,e)}finally{t.isAssigning--}}return Li(),n}],["delete",_m],["toggle",function(t){const e=Ce(t);(e==null||Kf(e))&&Xt(t,!e)}]]);function mm(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=la(t),l=a?t.key:"_";(a?Ce(t.parent):t.root)[l]=o,vi((i=t.parent)!=null?i:t,l,e)}return s}vi(t,e.length+"",r[0])}function eu(t,e,n){var r,i,o;if(fn(e)&&po(e)||fn(n)&&po(n)){const D=e!==n;return D&&(t.listeners||t.listenersImmediate)&&fo(t,e,n,0),D}const s=Ye(e);let a,l;const u=tt(e),c=Bn(e),h=tt(n),d=Bn(n),p=Ul(e,s,u,c),f=Ul(n,s,h,d),m=((r=p||e)==null?void 0:r.length)||0,E=((i=f||n)==null?void 0:i.length)||0;let A,_,g,O=!1;if(s&&Ye(n)){if(n.length>0){const D=n[0];if(D!==void 0&&(A=rm(D,t),A&&(_=ce(A),a=new Map,l=[]),t.children))for(let R=0;R<n.length;R++){const T=n[R];if(T){const I=t.children.get(R+"");if(I&&(e[R]||Dd(I,T),A)){const S=_?A(T):T[A];a.set(S,I)}}}}}else if(n&&(!e||fn(e))){const D=f.length;for(let R=0;R<D;R++){const T=f[R];if(!p.includes(T)){O=!0;const I=tn(t,T),S=h?n.get(T):n[T];S!==void 0&&Dd(I,S)}}}if(e&&!Dt(e)){O=O||m!==E;const D=O;let R=!1;for(let T=0;T<m;T++){const I=s?T+"":p[T];let S=u?e.get(I):e[I];const v=h?n==null?void 0:n.get(I):n==null?void 0:n[I];let y=!im(S,v);if(y){const b=A&&S?_?A(S):S[A]:void 0,M=(o=t.children)==null?void 0:o.get(I);if(Be(S)){const P=Po(S);if((M==null?void 0:M.linkedToNode)===P){const F=Ce(P);u?e.set(I,F):e[I]=F;continue}const B=S;S=()=>B}let k=tn(t,I,S);if(k.lazy||!ce(S)&&!Be(S)||(Sm(k,S),wr(k)),s&&b!==void 0){const P=b!==void 0?a==null?void 0:a.get(b):void 0;if(P){if(P!==void 0&&P.key!==I){const B=n[P.key];D&&(k=P,t.children.delete(k.key),k.key=I,l.push([I,k])),R=!0,y=B!==S}}else O=!0}if(y)if(ce(S)||Be(S))Ri(t,I,S);else if(Dt(S))O=!0;else{const P=eu(k,S,v);O=O||P,y=P}(y||s&&!D)&&(k.listeners||k.listenersImmediate)&&fo(k,S,v,0,!D)}}if(l)for(let T=0;T<l.length;T++){const[I,S]=l[T];t.children.set(I,S)}g=O||R}else n!==void 0&&(g=!0);return g!=null&&g}function Dd(t,e){var n,r;(n=t.linkedToNodeDispose)==null||n.call(t),(r=t.activatedObserveDispose)==null||r.call(t),Dt(e)||eu(t,void 0,e),(t.listeners||t.listenersImmediate)&&fo(t,void 0,e,0)}function Nt(t,e,n){return e!==void 0&&(t=tn(t,e,n)),t.proxy||(t.proxy=new Proxy(t,Em))}function zl(){if(Ve.pendingNodes.size>0){const t=Array.from(Ve.pendingNodes.values());Ve.pendingNodes.clear(),t.forEach(e=>e())}}var Em={get(t,e,n){var r,i;if(e===hg)throw new Error("[legend-state] observable is not a primitive.");if(e===Di)return t;if(e==="apply"||e==="call"){const h=Ce(t);if(ce(h))return h[e]}let o=wr(t,e==="get"||e==="peek");if(e===pg)return!o||Dt(o)?void 0:o[e];const s=t.linkedToNode||(o==null?void 0:o[Di]);if(s&&e!=="onChange")return Em.get(s,e,n);if(tt(o)||Bn(o)){const h=function(d,p,f){const m=f==null?void 0:f[p];if(p==="size")return ps(d,!0),f[p];if(ce(m))return function(E,A,_){const g=arguments.length,O=f;if(p==="get"){if(g>0&&typeof E!="boolean"&&E!==Kc)return Nt(d,E)}else{if(p==="set")return g===2?Xt(tn(d,E),A):g===1&&tt(f)&&Xt(d,E),Nt(d);if(p==="delete"){if(g>0){const R=f.get?O.get(E):E;return _m(d,E),R!==void 0}}else{if(p==="clear"){const R=Bn(O)?new Set(O):new Map(O),T=O.size;return O.clear(),void(T&&Am(d,f,R))}if(p==="add"){const R=new Set(f),T=f.add(E);return f.has(p)||fo(d,T,R,0),Nt(d)}}}const D=Vl.get(p);if(!D)return f[p](E,A);switch(g){case 0:return D(d);case 1:return D(d,E);case 2:return D(d,E,A);default:return D(d,E,A,_)}}}(t,e,o);if(h!==void 0)return h}const a=Vl.get(e);if(a)return e!=="get"&&e!=="peek"||zl(),function(h,d,p){switch(arguments.length){case 0:return a(t);case 1:return a(t,h);case 2:return a(t,h,d);default:return a(t,h,d,p)}};const l=$l.get(e);if(l)return l.get(t);let u=o==null?void 0:o[e];if(fn(o)&&po(o))return u;const c=(r=t.functions)==null?void 0:r.get(e);if(c)return Be(c)?c:Nt(t,e,c);if(u=function(h,d){if(h){const p=Object.getOwnPropertyDescriptor(h,d);return p!=null&&p.get&&(delete h[d],h[d]=p.set?function(f){ce(f)&&(f={get:f});const m=function(){return{[ho]:f}};return m.prototype[ho]=f,m}({get:p.get,set:({value:f})=>p.set(f)}):p.get),h[d]}}(o,e),function(h){return h==null}(o)&&u===void 0&&(Ua.has(e)||Od.has(e))&&(o=[],Ua.has(e)&&xn(t,o),u=o[e]),ce(u)){if(Ye(o)){if(Ua.has(e))return(...d)=>mm(t,o,e,...d);if(Od.has(e))return ps(t,!0),function(d,p){const f=e==="reduce",m=f?(_,g,O,D)=>d(_,Nt(t,O+"",g),O,D):(_,g,O)=>d(Nt(t,g+"",_),g,O);if(f||!Cg.has(e))return o[e](m,p);const E=e==="find",A=[];for(let _=0;_<o.length;_++)if(m(o[_],_,o)){const g=Nt(t,_+"");if(E)return g;A.push(g)}return E?void 0:A}}Ri(t,e,u);const h=(i=t.functions)==null?void 0:i.get(e);return h?Nt(t,e,h):u.bind(o)}return Dt(u)&&e==="length"&&Ye(o)?(ps(t,!0),u):Nt(t,e)},getPrototypeOf(t){const e=Ce(t);return e!==null&&typeof e=="object"?Reflect.getPrototypeOf(e):null},ownKeys(t){wr(t);const e=ha(t,!0);if(Dt(e))return[];const n=e?Reflect.ownKeys(e):[];if(Ye(e)&&n[n.length-1]==="length"&&n.splice(n.length-1,1),ce(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=Ce(t);if(Dt(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 vi(t,e,n),!0;const r=$l.get(e);return!!r&&(r.set(t,n),!0)},deleteProperty:(t,e)=>!!t.isSetting&&Reflect.deleteProperty(t,e),has(t,e){const n=Ce(t);return Reflect.has(n,e)},apply(t,e,n){Be(e)&&(e=e.peek());const r=Ce(t),i=ce(r)?r:t.lazyFn||t;return Reflect.apply(i,e,n)}};function Xt(t,e){t.parent?vi(t.parent,t.key,e):vi(t,"_",e)}function vi(t,e,n,r){const i=!t.parent&&e==="_";om(t,n),!t.parent||Ce(t)||ce(n)||Xt(t,{[e]:n});const o=i?t:tn(t,e,n);if(Be(n))Ls(o,n);else{const{newValue:s,prevValue:a,parentValue:l}=xn(o,n),u=Dt(a)||a instanceof Date||Dt(s)||s instanceof Date;if(!u){let d=o;do d.needsExtract=!0,d.recursivelyAutoActivated=!1;while(d=d.parent)}const c=!im(s,a),h=!c&&o.isComputing&&!u&&!o.isPlain;!c&&!h||o.isComputing&&o.isPlain&&t.numListenersRecursive===0||Am(t,s,a,o,l,u,i,r,h),Ri(t,e,s)}}function _m(t,e){e===void 0&&la(t)&&(e=t.key,t=t.parent);const n=Ce(t);Ye(n)?mm(t,n,"splice",e,1):vi(t,e!=null?e:"_",ca,-1)}function Am(t,e,n,r,i,o,s,a,l){r||(r=t),ua(),o===void 0&&(o=Dt(e));let u,c,h=l||o,d=!1;(!o||n&&!Dt(n))&&(h=h||eu(r,e,n),Ye(e)?u=e:(tt(e)||Bn(e))&&(c=e)),Ye(i)?u=i:(tt(i)||Bn(i))&&(c=i),u?d=(u==null?void 0:u.length)!==(n==null?void 0:n.length):c&&(d=(c==null?void 0:c.size)!==(n==null?void 0:n.size)),(o||!e||ys(e)&&!ys(n)?e!==n:h)&&fo(o&&s?t:r,e,n,(a!=null?a:n===void 0)?-1:h?0:1,d),Li()}function Ti(t,e,n){const r=t.numGets=(t.numGets||0)+1;t.state||(t.state=Qc({isLoaded:!1},!1,Ti,Nt)),e.then(i=>{r>=(t.getNumResolved||0)&&(t.getNumResolved=t.numGets,n?n({value:i}):Xt(t,i),t.state.assign({isLoaded:!0,error:void 0}))}).catch(i=>{t.state.error.set(i)})}function Ri(t,e,n){if(hn(n)){const r=tn(t,e);return Ti(r,n),void xn(r,void 0)}if(Be(n)){const r=()=>n;Ed(t,e,r);const i=tn(t,e,r),o=wi(Po(n));return Ls(i,n),xn(i,o),Ce(i)}if(typeof n=="function")return Ed(t,e,n),e}function ha(t,e){return ps(t,e?fn(e)?e.shallow:e:void 0),wi(t)}function wi(t){return wr(t,!0)}var qo=!1;function wr(t,e){var n;if(qo=!0,e&&((n=t.dirtyChildren)==null?void 0:n.size)){const i=Array.from(t.dirtyChildren);t.dirtyChildren.clear(),i.forEach(o=>o.dirtyFn&&wr(o))}if(t.dirtyFn){const i=t.dirtyFn;t.dirtyFn=void 0,Ve.dirtyNodes.delete(t),i()}qo=!1;let r=Ce(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,ce(u))if(u.length===1)o={};else{if(i.parent){const c=Ce(i.parent);ce(o)&&(c?delete c[i.key]:i.root._=void 0)}o=function(c,h){let d,p,f,m=!0;const E=h;let A,_,g=[];function O(){c.dirtyFn=_,Ve.dirtyNodes.add(c)}const D=gt(()=>{var R,T,I,S;if(m)m=!1,ce(Ce(c))&&xn(c,void 0);else if(!qo&&_&&function(k,P){if(!qo&&!function(F){var V,G;let z=F,K=F.numListenersRecursive>0;for(;z&&!K;)((V=z.listeners)!=null&&V.size||(G=z.listenersImmediate)!=null&&G.size)&&(K=!0),z=z.parent;return K}(k)){P&&(k.dirtyFn=P);let F=k;for(;F;)F.dirtyChildren||(F.dirtyChildren=new Set),F.dirtyChildren.add(k),F=F.parent;return!0}}(c,_))return void(f=!0);let v=E(),y=!1;const b=Be(v);(b||c.linkedToNode)&&(y=b,v=Ls(c,v)),ce(v)&&v.length===0&&(v=v());const M=b||v==null?void 0:v[ho];if(M&&(c.activationState=M,v=void 0),f=!1,p=hn(v),c.activated){if(c.activationState){const k=c.activationState;(T=(R=c.state)==null?void 0:R.peek())!=null&&T.sync?(c.state.sync(),f=!0):v=(S=(I=k.get)==null?void 0:I.call(k))!=null?S:k.initial}}else{c.activated=!0;let k=Ig;M!=null&&M.synced&&(k=Ve.activateSyncedNode,f=!0);const P=k(c,v);d=P.update;let B=P.value;!y&&Be(B)&&(B=Ls(c,B)),v=B!=null?B:M==null?void 0:M.initial}return f&&(A=v),p=p||hn(v),v},R=>{const{value:T,nodes:I,refresh:S}=R;if(_=S,!f){if(!p||!Ve.isLoadingRemote)if(p)if(c.activationState){const{initial:v}=c.activationState;T&&hn(T)&&Ti(c,T,d),ce(Ce(c))&&xn(c,v!=null?v:void 0)}else c.activated&&(Ti(c,T,d),ce(Ce(c))&&xn(c,void 0));else{A=T;const v=c.state.isLoaded.peek();!v&&ce(T)||(c.isComputing=!0,Xt(c,T),c.isComputing=!1),v||c.state.assign({isLoaded:!0,error:void 0})}g.forEach(v=>v()),g=[],I==null||I.forEach(({node:v,track:y})=>{g.push(sr(v,O,{immediate:!0,trackingType:y}))})}R.cancel=!0},{fromComputed:!0});return c.activatedObserveDispose=()=>{D==null||D(),g.forEach(R=>R())},A}(i,u)}else Be(o)&&(o=Ri(i.parent,i.key,o))}return om(i,o),!l&&!i.needsExtract||i.isPlain||Be(o)||Dt(o)||(s&&function(u,c){if(!c.recursivelyAutoActivated&&(fn(u)||Ye(u))&&!po(u)){c.recursivelyAutoActivated=!0;const h=[];Om(u,h,()=>{var p;let f=c;for(let m=0;m<h.length;m++){const E=h[m],A=(p=Ce(f))==null?void 0:p[E];f=tn(f,E,ce(A)?A:void 0),wr(f)}return f})}}(o,i),i.parent&&Ri(i.parent,i.key,a)),o}(t,r,!!e)),r}function gm(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 Sm(t,e){gm(t),t.lazyFn=e,t.lazy=!0}function Ig(t,e){if(t.state||(t.state=Qc({isLoaded:!1},!1,Ti,Nt)),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,h,d,p=!1,f=!1;u?(c=u.changes,h=u.value,p=u.isFromPersist,f=u.isFromSync,d=u.getPrevious):(c=s,h=o,d=Zc(h,c)),s=[],o=void 0,Ve.pendingNodes.delete(t),a++;const m=a,E=()=>{m===a&&(t.isComputing=!0,n({value:h,changes:c,isFromPersist:p,isFromSync:f,getPrevious:d}),t.isComputing=!1)};fm(t.state.isLoaded,E,!0)}};sr(t,({value:u,changes:c})=>{t.isComputing||(c.length>1||!ce(c[0].prevAtPath))&&(o=u,s.length>0&&(c=c.filter(h=>!am(s[0].path,h.path))),s.push(...c),Ve.pendingNodes.set(t,l))},{immediate:!0}),sr(t,l)}}return{update:({value:n})=>{t.isComputing||(t.isComputing=!0,Xt(t,n),t.isComputing=!1)},value:e}}function Ls(t,e){var n;const r=e?Po(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=sr(r,()=>{ce(e=wr(r))||Xt(t,e)},{initial:!0},new Set([t])))),e}function Om(t,e,n){var r;if((fn(t)||Ye(t))&&!po(t)&&!Jf(t)){for(const i in t)if(Xc.call(t,i)){const o=t[i];if(Be(o)){const s=n();Ri(s,i,o),delete s.lazy}else{const s=ce(o)&&((r=o.prototype)==null?void 0:r[ho]);if(s){const a=s.activate;(!a||a==="auto")&&wi(tn(n(),i,o))}}typeof o=="object"&&(e.push(i),Om(o,e,n),e.pop())}}}var vd=["get","set","peek","onChange","toggle"];function di(t){this._node=t;for(let e=0;e<vd.length;e++){const n=vd[e];this[n]=this[n].bind(this)}}function Jo(t,e){di.prototype[t]=function(...n){return e.call(this,this._node,...n)}}function me(t){return Qc(t,!1,Ti,Nt,di)}Jo("peek",t=>(zl(),wi(t))),Jo("get",(t,e)=>(zl(),ha(t,e))),Jo("set",Xt),Jo("onChange",sr),Object.defineProperty(di.prototype,Di,{configurable:!0,get(){return this._node}}),di.prototype.toggle=function(){const t=this.peek();(t==null||Kf(t))&&this.set(!t)},di.prototype.delete=function(){return this.set(void 0),this};var pa={createPreviousHandler:Zc,clone:tm,deactivateNode:gm,deepMerge:Ns,ensureNodeValue:qc,findIDKey:rm,get:ha,getChildNode:tn,getKeys:Ul,getNode:Po,getNodeValue:Ce,getPathType:Zf,getProxy:Nt,getValueAtPath:function(t,e){return e.reduce(gg,t)},globalState:Ve,initializePathType:Jc,ObservablePrimitiveClass:di,observableProperties:$l,observableFns:Vl,optimized:Kc,peek:wi,reactivateNode:Sm,registerMiddleware:function(t,e,n){let r=ii.get(t);r||(r=new Map,ii.set(t,r));let i=r.get(e);return i||(i=new Set,r.set(e,i)),i.add(n),()=>{const o=ii.get(t);if(!o)return;const s=o.get(e);s&&(s.delete(n),s.size===0&&(o.delete(e),o.size===0&&ii.delete(t)))}},safeParse:em,safeStringify:Qf,set:Xt,setAtPath:sm,setNodeValue:xn,symbolLinked:ho,symbolDelete:ca,tracking:si},{globalState:Td,observableProperties:yg,observableFns:Ng,ObservablePrimitiveClass:Rd}=pa;class fa{constructor(e={}){this._handlers=new Set,this._meta=e}meta(e){return new fa(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 Yl=new fa,$e=new fa;function Cd(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=Cd(e,t,"#fff"),r=Cd(e,t,"#000");return r===n&&!r.startsWith("0,0,0,")}const bg=ki(null),Ba={didCatch:!1,error:null};class Dm extends Wt{constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=Ba}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(Ba)}}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(Ba))}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=Oe(r,l);else{if(i===void 0)throw s;a=i}}return Oe(bg.Provider,{value:{didCatch:o,error:s,resetErrorBoundary:this.resetErrorBoundary}},a)}}var Zo=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function tu(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function nu(t){if(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 vm={exports:{}},yd={};const Tm=nu(Wc);var Ci=Tm,kg=typeof Object.is=="function"?Object.is:function(t,e){return t===e&&(t!==0||1/t==1/e)||t!=t&&e!=e},Lg=Ci.useState,wg=Ci.useEffect,Mg=Ci.useLayoutEffect,Pg=Ci.useDebugValue;function ja(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!kg(t,n)}catch(r){return!0}}var xg=typeof window=="undefined"||window.document===void 0||window.document.createElement===void 0?function(t,e){return e()}:function(t,e){var n=e(),r=Lg({inst:{value:n,getSnapshot:e}}),i=r[0].inst,o=r[1];return Mg(function(){i.value=n,i.getSnapshot=e,ja(i)&&o({inst:i})},[t,n,e]),wg(function(){return ja(i)&&o({inst:i}),t(function(){ja(i)&&o({inst:i})})},[t]),Pg(n),n};yd.useSyncExternalStore=Ci.useSyncExternalStore!==void 0?Ci.useSyncExternalStore:xg,vm.exports=yd;var Fg=vm.exports,Nd=!1,Gl={inObserver:!1},bd=void 0,Hg=()=>bd||(bd=ki(null));function kd(t){const e=da(t);if(!Mt.use)throw e;Mt.use(e)}function te(t,e){let n;if(Gl.inObserver&&Be(t)&&!(e!=null&&e.suspense))return n=mn(t,e),e!=null&&e.suspense&&n===void 0&&kd(t),n;try{const r=lr(Hg()),i=se(()=>function(l,u){let c,h,d,p,f,m,E=0;const A=()=>{h==null||h();const{value:g,dispose:O,resubscribe:D}=pm(p,_,l,void 0,void 0,!0);return h=O,d=D,g},_=({value:g})=>{if(u!=null&&u.peek()){const O=m;m=g,O===void 0&&da(()=>!u.get(),()=>{const D=m;m=void 0,_({value:D})})}else{let O=l==null?void 0:l.skipCheck;if(!O){const D=A();(D!==f||!Dt(D)&&D===g)&&(O=!0)}O&&(E++,c==null||c())}};return{subscribe:g=>(c=g,!h&&d&&(h=d()),()=>{h==null||h(),h=void 0}),getVersion:()=>E,run:g=>(p=g,f=A())}}(e,r),[]),{subscribe:o,getVersion:s,run:a}=i;n=a(t),Fg.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 Rm(t,e,n,r,i){const o=Ld?Symbol.for("react.forward_ref"):jt(f=>null).$$typeof,s=Ld?Symbol.for("react.memo"):Un(f=>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,h={apply(f,m,E){if(n){const A=E[0],_={},g=Object.keys(A);for(let O=0;O<g.length;O++){const D=g[O],R=A[D],T=c&&c.has(D);if(D==="children"&&(ce(R)||Be(R)))_[D]=te(R,{skipCheck:!0});else if(T||D.startsWith("$")||D.endsWith("$")){const I=T?D:D.endsWith("$")?D.slice(0,-1):D.slice(1),S=i==null?void 0:i[I],v=S&&Be(R);if(_[I]=v&&(S!=null&&S.selector)?S.selector(_,R):te(R),v&&(S.defaultValue!==void 0&&_[I]===void 0&&(_[I]=S.defaultValue),S.handler&&S.getValue)){const y=b=>{var M;R.set(S.getValue(b)),(M=A[S.handler])==null||M.call(A,b)};_[S.handler]=ee(y,[A[S.handler],i])}T||delete _[D]}else _[D]===void 0&&(_[D]=R)}E[0]=_}return e?te(()=>{Gl.inObserver=!0;try{return Reflect.apply(f,m,E)}finally{Gl.inObserver=!1}},{skipCheck:!0}):Reflect.apply(f,m,E)}},d=new Proxy(u,h);let p;return a?(p=jt(d),p.__legend_proxied=!0):p=d,e||l?Un(p):p}var{findIDKey:Ug,getNode:Bg,optimized:jg}=pa,wd=new Map;function mo({each:t,optimized:e,item:n,itemProps:r,sortValues:i,children:o}){var s;if(!t)return null;const a=te(()=>t.get(!e||jg));if(!n&&o){const u=Q();u.current=o,n=se(()=>{return c=({item$:h,id:d})=>u.current(h,d),Rm(c,!0);var c},[])}else if(n.$$typeof!==Symbol.for("react.memo")){let u=wd.get(n);u||(u=Un(n),wd.set(n,u)),n=u}if(!a)return null;const l=[];if(Ye(a)){const u=a[0],c=Bg(t),h=a.length,d=h>0?c&&Ug(u,c)||(u.id!==void 0?"id":u.key!==void 0?"key":void 0):void 0,p=ce(d);for(let f=0;f<h;f++)if(a[f]){const m=a[f],E=(s=p?d(m):m[d])!=null?s:f,A=t[f],_={key:E,id:E,item$:A,item:A};l.push(Oe(n,r?Object.assign(_,r):_))}}else{const u=tt(a),c=u?Array.from(a.keys()):Object.keys(a);i&&c.sort((h,d)=>i(u?a.get(h):a[h],u?a.get(d):a[d],h,d));for(let h=0;h<c.length;h++){const d=c[h];if(u?a.get(d):a[d]){const p=u?t.get(d):t[d],f={key:d,id:d,item$:p,item:p};l.push(Oe(n,r?Object.assign(f,r):f))}}}return l}Un(function({children:t}){return te(()=>mn(mn(t)),{skipCheck:!0})},(t,e)=>!e.scoped||t.children===e.children);var Md=new Map,Pd=new Map;function xd({if:t,ifReady:e,else:n,$value:r,wrap:i,children:o}){const s=te(t!=null?t:e),a=te((e!==void 0?Bl(s):s)?ce(o)?()=>o(r?r.get():s):o:n!=null?n:null,{skipCheck:!0});return i?Oe(i,void 0,a):a}new Proxy({},{get(t,e){if(!t[e]){const n=Md.get(e)||e,r=jt((i,o)=>{const s={...i};return!o||!ce(o)&&ys(o)||(s.ref=o),Oe(n,s)});t[e]=function(i,o,s){return Rm(i,!1,!0,o,s)}(r,[],Pd.get(e))}return t[e]}}),function(t){(function(e){if(Nd)return;Nd=!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)Md.set(n,t[n]);if(e)for(const n in e)Pd.set(n,e[n])});var $g=(t,e)=>{{const n=Q({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&&ce(s))return i.dispose=s,()=>queueMicrotask(o)}},e)}};function Cm(t){return $g(()=>{const e=t();if(!hn(e))return e},[])}var Vg=Cm;function Im(t){return Cm(()=>t)}var zg=Im,{deactivateNode:Yg}=pa;function vt(t,e){var n;const r=Q({});r.current.value=t;const i=e?vt(e):void 0;if(!((n=r.current)!=null&&n.obs$)){const o=i?ce(t)&&t.length===1?s=>(i.get(),r.current.value(s)):()=>(i.get(),mn(r.current.value)):t;r.current.obs$=me(o)}return i&&i.set(e),Im(()=>{const o=r.current.obs$;if(o){const s=Po(o);Yg(s)}}),r.current.obs$}function ym(t,e,n,r){let i;ce(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))?vt(r):void 0,s=Q({});return s.current.selector=t,s.current.reaction=i,o&&o.set(r),s.current.dispose||(s.current.dispose=gt(a=>{var l;return o==null||o.get(),mn((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)),zg(()=>{var a,l;(l=(a=s.current)==null?void 0:a.dispose)==null||l.call(a)}),s.current.dispose}function Eo(t,e,n,r){let i;ce(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=Q({}),s=r?vt(r):void 0;o.current.selector=t,o.current.reaction=i,s&&s.set(r),Vg(()=>gt(a=>{var l;return s==null||s.get(),mn((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 Nm extends Error{}function Fd(t,e){if(!t)throw new Nm(e!=null?e:"Assertion failed")}const de=Object.assign(Fd,{is:function(t,e,n){return Fd(e,n)},unreachable:function(){throw new Error("Unreachable code")},never:function(t){throw new Error("Unreachable")},defined:function(t){if(t==null)throw new Nm("Value is not defined")}}),[bm,nt]=Dn(),[km,xo]=Dn(),[Lm]=Dn(),[ru,Mi]=Dn(),[Gg,Wg]=Dn(),[wm,he]=Dn(),[Mm,Yr]=Dn(),[Pm,xm]=Dn(),[Fm,Xg]=Dn(),[Kg,iu]=Dn();function Dn(){const t=ki(void 0);return[t,()=>{const e=lr(t);return de(e!==void 0),e}]}const hi={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"}},Hd={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:hi,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:"選擇對話"}}},Hm=()=>{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},Ud=(t,e)=>{const n=Hm();return n.fillStyle=e,n.fillText(t,0,0),n.getImageData(0,0,1,1).data},qg=t=>!t.includes("‍")||Hm().measureText(t).width<160,Jg=(t,e)=>{const n=[...t].join(",");return n===[...e].join(",")&&!n.startsWith("0,0,0,")};function Um(t){try{return function(e){const n=Ud(e,"#000"),r=Ud(e,"#fff"),i=qg(e);return n&&r&&i&&Jg(n,r)}(t)}catch(e){return!0}}var Ef;const Bm=(Ef=globalThis.window)!=null&&Ef.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(Um(e))return n}():0;class jm{constructor(e,n){this.currentUser$=me(null),this.app$=me(null),this.appId$=me(null),this.extUserId$=me(null),this.hasTokenFetcher$=me(!1),this.authTokenState$=me("idle"),this.themeCustom$=me(_d({value:void 0})),this.highlightedStrings$=me([]),this.device$=me({supportsEmojiPicker:!!Bm,isMobile:typeof window!="undefined"&&/Mobi/i.test(window.navigator.userAgent)}),this.errors$=me({unknownUser:!1,wrongAppId:!1,serverError:!1}),this.conversationSearch=null,this.messageSearch=null,this.locale$=me(()=>{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$=me(()=>function(r){const i=r.replace(/_/g,"-").toLowerCase(),o=Hd[i];if(o)return{strings:{...o.translation,locale:i},emojiPickerTranslationUrl:o.emojiPickerTranslationUrl,emojiDataUrl:o.emojiDataUrl};const s=i.slice(0,2),a=Hd[s];return a?{strings:{...a.translation,locale:s},emojiPickerTranslationUrl:a.emojiPickerTranslationUrl,emojiDataUrl:a.emojiDataUrl}:($e.warn(`User locale '${r}' not supported; falling back to English.`),{strings:{...hi.translation,locale:"en-US"},emojiPickerTranslationUrl:hi.emojiPickerTranslationUrl,emojiDataUrl:hi.emojiDataUrl})}(this.locale$.get())),this.t$=me(()=>this.translationData$.strings.get()),En(()=>{this.appId$.set(e),this.extUserId$.set(n)})}updateThemeCustom(e){this.themeCustom$.set(_d({value:e}))}}const Zg={canReplyToMessage:!1,canEditMessage:!1,canDeleteMessage:!1,canAddReaction:!1};class $m extends jm{constructor(e,n){super(e,n),this.type="ChatboxStore",this.messageSubscriptions={},this.readyForNewMessagesPromise=Promise.resolve(),this.renderedConversationId$=me(void 0),this.focusedMessage$=me(null),this.chatSearchState$=me("hidden"),this.newMessageMarker$=me(void 0),this.state$=me({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 de.defined(i),de.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();de.defined(r);const i=this.state$.userPermissions.get(),o={...Zg,...i},s={canReplyToMessage:zn(r.messages.reply,!0),canEditMessage:zn(r.messages.edit,!0),canDeleteMessage:zn(r.messages.delete,!0),canAddReaction:zn(r.messages.emojiReactions,!0),...i},a={...s,canEditMessage:!1},l={canReplyToMessage:zn(r.messages.reply,!1),canEditMessage:zn(r.messages.edit,!1),canDeleteMessage:zn(r.messages.delete,!1),canAddReaction:zn(r.messages.emojiReactions,!1),...i};return{system:o,own:s,ownWithoutEditing:a,other:l,otherWithoutEditing:{...l,canEditMessage:!1}}}}),this.referencedMessage$=me(()=>{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$=me(()=>{var f,m,E;const r=this.state$.currentConversationId.get();if(!r)return[];const i=(f=this.newMessageMarker$.get())!=null?f:1/0,o=(m=this.state$.messages.child(r).state.get())!=null?m:[],s=Object.values((E=this.state$.ephemeralMessages.child(r).get())!=null?E:{}),a=s.length===0?o:s.concat(o).sort((A,_)=>_.createdAt-A.createdAt),l=a.map(A=>{const _=A.content[0],g=_==null?void 0:_.type;if(!_||g!=="file")return A;const O=_.size+","+_.filename,D=this.state$.localFileBlobUrls.child(r).child(O).url.get();return D?{...A,content:[{..._,url:D}]}:A});let u=null,c=0,h=!1;const d=[];for(const A of l){const _=new Date(A.createdAt),g=new Date(_).setHours(0,0,0,0),O=c&&g!==c,D=_.getTime()>i,R=!(!h||D||u!=null&&u.id.startsWith("ephemeral"));(R||O)&&d.push(new fs({id:"border-before-"+A.id,isDayMarker:!!O,isReadMarker:!!R,timestamp:O?c:void 0})),d.push(A),h=D,c=g,u=A}const p=this.extUserId$.peek();return function(A,_){const g=[];let O=[];const D=Symbol("NO_KEY");let R=D;for(const T of A){const I=_(T);R===D||R===I?O.push(T):(g.push(O),O=[T]),R=I}return O.length!==0&&g.push(O),g}(d,A=>{var _;return A instanceof fs?A.id:(_=A.sender)==null?void 0:_.id}).map(A=>{var g;const _=A[A.length-1];return{items:A,id:_.id,type:_ instanceof fs?"divider":_.sender?((g=_.sender)==null?void 0:g.id)===p?"own":"other":"system"}})})}storeTyping(e,n){this.state$.typing.child(e).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){En(()=>{var a;const i=n.reduce((l,u)=>(l[u.id]=u,l),{}),o=this.extUserId$.peek();de(o),this.state$.messages.child(e).set({state:n,lookup:i,loadedAll:r});const s=this.state$.ephemeralMessages.child(e);for(const l of n){const u=this.state$.ephemeralMessageIdMapping.child(e).child(l.id).peek();u&&s.child(u).delete();const c=l.content[0];if(((a=l.sender)==null?void 0:a.id)!==o||c.type!=="file")continue;const h=c.size+","+c.filename,d=this.state$.localFileBlobUrls.child(e).child(h);if(d.fetching.peek()!==!1)continue;const p=()=>{URL.revokeObjectURL(d.url.peek()),d.delete()};if(c.subtype==="image"){d.fetching.set(!0);const f=document.createElement("img");f.addEventListener("load",p,{once:!0}),f.src=c.url}else if(c.subtype==="video"){d.fetching.set(!0);const f=document.createElement("video");f.addEventListener("loadeddata",p,{once:!0}),f.src=c.url}else if(c.subtype==="audio"||c.subtype==="voice"){d.fetching.set(!0);const f=document.createElement("audio");f.addEventListener("loadeddata",p,{once:!0}),f.src=c.url}}})}}function zn(t,e){return t==="all"||t==="own"&&e||t==="other"&&!e}class fs{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 cn(t,e=!1){return function(n,r=!1){return n.map(i=>{if(typeof i=="string")return i;switch(i.type){case"bold":return"*"+cn(i.children)+"*";case"italic":return"_"+cn(i.children)+"_";case"strikethrough":return"~"+cn(i.children)+"~";case"blockquote":return cn(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
- `+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}|${dn(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}|${dn(o.children)}>`}(i);case"bulletlist":case"bulletList":return`
6
- `+dn(i.children);case"bulletpoint":case"bulletPoint":return"- "+dn(i.children)+`
7
- `}}).join("")}(t,e).trim()}class Bd{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 st(t){this.content=t}function $m(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=$m(i.content,o.content,n+1);if(s!=null)return s}n+=i.nodeSize}else n+=i.nodeSize}}function Vm(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=Vm(s.content,a.content,n-1,r-1);if(u)return u}n-=l,r-=l}else n-=l,r-=l}}st.prototype={constructor:st,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 st(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 st(n)},addToStart:function(t,e){return new st([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new st(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 st(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=st.from(t)).size?new st(t.content.concat(this.subtract(t).content)):this},append:function(t){return(t=st.from(t)).size?new st(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=st.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}},st.from=function(t){if(t instanceof st)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new st(e)};class W{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 W(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 W(r,i)}cutByIndex(e,n){return e==n?W.empty:e==0&&n==this.content.length?this:new W(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 W(i,o)}addToStart(e){return new W([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new W(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 $m(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return Vm(this,e,n,r)}findIndex(e){if(e==0)return Zo(0,e);if(e==this.size)return Zo(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?Zo(n+1,i):Zo(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 W.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new W(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return W.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 W(n||e,r)}static from(e){if(!e)return W.empty;if(e instanceof W)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new W([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}W.empty=new W([],0);const ja={index:0,offset:0};function Zo(t,e){return ja.index=t,ja.offset=e,ja}function Ls(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(!Ls(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!Ls(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}class De{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&&Ls(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 De.none;if(e instanceof De)return[e];let n=e.slice();return n.sort((r,i)=>r.type.rank-i.type.rank),n}}De.none=[];class ws extends Error{}class J{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=Ym(this.content,e+this.openStart,n);return r&&new J(r,this.openStart,this.openEnd)}removeBetween(e,n){return new J(zm(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 J.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 J(W.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 J(e,r,i)}}function zm(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(zm(o.content,e-i-1,n-i-1)))}function Ym(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=Ym(s.content,e-o-1,n,s);return a&&t.replaceChild(i,s.copy(a))}function Wg(t,e,n){if(n.openStart>t.depth)throw new ws("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new ws("Inconsistent open depths");return Gm(t,e,n,0)}function Gm(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=Gm(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,h=u.node(c).copy(l.content);for(let d=c-1;d>=0;d--)h=u.node(d).copy(W.from(h));return{start:h.resolveNoCache(l.openStart+c),end:h.resolveNoCache(h.content.size-l.openEnd-c)}}(n,t);return yr(o,Xm(t,s,a,e,r))}{let s=t.parent,a=s.content;return yr(s,a.cut(0,t.parentOffset).append(n.content).append(a.cut(e.parentOffset)))}}return yr(o,Ms(t,e,r))}function Wm(t,e){if(!e.type.compatibleContent(t.type))throw new ws("Cannot join "+e.type.name+" onto "+t.type.name)}function Gl(t,e,n){let r=t.node(n);return Wm(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 eo(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 yr(t,e){return t.type.checkContent(e),t.copy(e)}function Xm(t,e,n,r,i){let o=t.depth>i&&Gl(t,e,i+1),s=r.depth>i&&Gl(n,r,i+1),a=[];return eo(null,t,i,a),o&&s&&e.index(i)==n.index(i)?(Wm(o,s),Ir(yr(o,Xm(t,e,n,r,i+1)),a)):(o&&Ir(yr(o,Ms(t,e,i+1)),a),eo(e,n,i,a),s&&Ir(yr(s,Ms(n,r,i+1)),a)),eo(r,null,i,a),new W(a)}function Ms(t,e,n){let r=[];return eo(null,t,n,r),t.depth>n&&Ir(yr(Gl(t,e,n+1),Ms(t,e,n+1)),r),eo(e,null,n,r),new W(r)}J.empty=new J(W.empty,0,0);class Eo{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 De.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 qg(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 Eo(n,r,o)}static resolveCached(e,n){let r=jd.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 jd.set(e,r=new Xg);let i=r.elts[r.i]=Eo.resolve(e,n);return r.i=(r.i+1)%Kg,i}}class Xg{constructor(){this.elts=[],this.i=0}}const Kg=12,jd=new WeakMap;class qg{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 Jg=Object.create(null);let Nr=class Wl{constructor(e,n,r,i=De.none){this.type=e,this.attrs=n,this.marks=i,this.content=r||W.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&&Ls(this.attrs,n||e.defaultAttrs||Jg)&&De.sameSet(this.marks,r||De.none)}copy(e=null){return e==this.content?this:new Wl(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new Wl(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 J.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 J(l,i.depth-s,o.depth-s)}replace(e,n,r){return Wg(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 Eo.resolveCached(this,e)}resolveNoCache(e){return Eo.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()+")"),Km(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=W.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=De.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(!De.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=W.fromJSON(e,n.content),o=e.nodeType(n.type).create(n.attrs,i,r);return o.type.checkAttrs(o.attrs),o}};Nr.prototype.text=void 0;class Ps extends Nr{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):Km(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 Ps(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Ps(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 Km(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class Mr{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new Zg(e,n);if(r.next==null)return Mr.empty;let i=qm(r);r.next&&r.err("Unexpected trailing text");let o=function(s){let a=Object.create(null);return l(Vd(s,0));function l(u){let c=[];u.forEach(d=>{s[d].forEach(({term:p,to:f})=>{if(!p)return;let m;for(let E=0;E<c.length;E++)c[E][0]==p&&(m=c[E][1]);Vd(s,f).forEach(E=>{m||c.push([p,m=[]]),m.indexOf(E)==-1&&m.push(E)})})});let h=a[u.join(",")]=new Mr(u.indexOf(s.length-1)>-1);for(let d=0;d<c.length;d++){let p=c[d][1].sort(Jm);h.next.push({type:c[d][0],next:a[p.join(",")]||l(p)})}return h}}(function(s){let a=[[]];return c(h(s,0),l()),a;function l(){return a.push([])-1}function u(d,p,f){let m={term:f,to:p};return a[d].push(m),m}function c(d,p){d.forEach(f=>f.to=p)}function h(d,p){if(d.type=="choice")return d.exprs.reduce((f,m)=>f.concat(h(m,p)),[]);if(d.type!="seq"){if(d.type=="star"){let f=l();return u(p,f),c(h(d.expr,f),f),[u(f)]}if(d.type=="plus"){let f=l();return c(h(d.expr,p),f),c(h(d.expr,f),f),[u(f)]}if(d.type=="opt")return[u(p)].concat(h(d.expr,p));if(d.type=="range"){let f=p;for(let m=0;m<d.min;m++){let E=l();c(h(d.expr,f),E),f=E}if(d.max==-1)c(h(d.expr,f),f);else for(let m=d.min;m<d.max;m++){let E=l();u(f,E),c(h(d.expr,f),E),f=E}return[u(f)]}if(d.type=="name")return[u(p,void 0,d.value)];throw new Error("Unknown expr type")}for(let f=0;;f++){let m=h(d.exprs[f],p);if(f==d.exprs.length-1)return m;c(m,p=l())}}}(i));return function(s,a){for(let l=0,u=[s];l<u.length;l++){let c=u[l],h=!c.validEnd,d=[];for(let p=0;p<c.next.length;p++){let{type:f,next:m}=c.next[p];d.push(f.name),!h||f.isText||f.hasRequiredAttrs()||(h=!1),u.indexOf(m)==-1&&u.push(m)}h&&a.err("Only non-generatable nodes ("+d.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 W.from(a.map(u=>u.createAndFill()));for(let u=0;u<s.next.length;u++){let{type:c,next:h}=s.next[u];if(!c.isText&&!c.hasRequiredAttrs()&&i.indexOf(h)==-1){i.push(h);let d=o(h,a.concat(c));if(d)return d}}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
- `)}}Mr.empty=new Mr(!0);class Zg{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 qm(t){let e=[];do e.push(Qg(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function Qg(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=qm(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=tS(t,e)}return e}function $d(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function tS(t,e){let n=$d(t),r=n;return t.eat(",")&&(r=t.next!="}"?$d(t):-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function Jm(t,e){return e-t}function Vd(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(Jm)}function Zm(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 Qm(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 eE(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 tE(t,e){let n=Object.create(null);if(e)for(let r in e)n[r]=new nS(t,r,e[r]);return n}let zd=class nE{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=tE(e,r.attrs),this.defaultAttrs=Zm(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==Mr.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:Qm(this.attrs,e)}create(e=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Nr(this,this.computeAttrs(e),W.from(n),De.setFrom(r))}createChecked(e=null,n,r){return n=W.from(n),this.checkContent(n),new Nr(this,this.computeAttrs(e),n,De.setFrom(r))}createAndFill(e=null,n,r){if(e=this.computeAttrs(e),(n=W.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(W.empty,!0);return o?new Nr(this,e,n.append(o),De.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){eE(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:De.none:e}static compile(e,n){let r=Object.create(null);e.forEach((o,s)=>r[o]=new nE(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 nS{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 fa{constructor(e,n,r,i){this.name=e,this.rank=n,this.schema=r,this.spec=i,this.attrs=tE(e,i.attrs),this.excluded=null;let o=Zm(this.attrs);this.instance=o?new De(this,o):null}create(e=null){return!e&&this.instance?this.instance:new De(this,Qm(this.attrs,e))}static compile(e,n){let r=Object.create(null),i=0;return e.forEach((o,s)=>r[o]=new fa(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){eE(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}function Yd(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 _o{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 Xd(this,n,!1);return r.addAll(e,De.none,n.from,n.to),r.finish()}parseSlice(e,n={}){let r=new Xd(this,n,!0);return r.addAll(e,De.none,n.from,n.to),J.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(iS(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=Kd(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=Kd(s)),s.node||s.ignore||s.mark||(s.node=i)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new _o(e,_o.schemaRules(e)))}}const rE={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},rS={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Gd={ol:!0,ul:!0};function Wd(t,e,n){return e!=null?(e?1:0)|(e==="full"?2:0):t&&t.whitespace=="pre"?3:-5&n}class $a{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=De.none,this.match=o||(4&s?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(W.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=W.from(this.content);return!e&&this.match&&(n=n.append(this.match.fillBefore(W.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&&!rE.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class Xd{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=Wd(null,n.preserveWhitespace,0)|(r?4:0);i=o?new $a(o.type,o.attrs,De.none,!0,n.topMatch||o.type.contentMatch,s):new $a(r?null:e.schema.topNodeType,null,De.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();Gd.hasOwnProperty(a)&&this.parser.normalizeLists&&function(u){for(let c=u.firstChild,h=null;c;c=c.nextSibling){let d=c.nodeType==1?c.nodeName.toLowerCase():null;d&&Gd.hasOwnProperty(d)&&h?(h.appendChild(c),c=h):d=="li"?h=c:d&&(h=null)}}(e);let l=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(s=this.parser.matchTag(e,this,r));e:if(l?l.ignore:rS.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(rE.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 h=l&&l.skip?n:this.readStyles(e,n);h&&this.addAll(e,h),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=De.none;for(let a of i.concat(e.marks))(o.type?o.type.allowsMarkType(a.type):qd(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=Wd(e,o,s.options);4&s.options&&s.content.length==0&&(a|=4);let l=De.none;return r=r.filter(u=>!(s.type?s.type.allowsMarkType(u.type):qd(u.type,e))||(l=u.addToSet(l),!1)),this.nodes.push(new $a(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 iS(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function Kd(t){let e={};for(let n in t)e[n]=t[n];return e}function qd(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 Mi{constructor(e,n){this.nodes=e,this.marks=n}serializeFragment(e,n={},r){r||(r=Va(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}=fs(Va(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&&fs(Va(r),i(e,n),null,e.attrs)}static renderSpec(e,n,r=null,i){return fs(e,n,r,i)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new Mi(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=Jd(e.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(e){return Jd(e.marks)}}function Jd(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function Va(t){return t.document||window.document}const Zd=new WeakMap;function oS(t){let e=Zd.get(t);return e===void 0&&Zd.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 fs(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 h in u)if(u[h]!=null){let d=h.indexOf(" ");d>0?l.setAttributeNS(h.slice(0,d),h.slice(d+1),u[h]):h=="style"&&l.style?l.style.cssText=u[h]:l.setAttribute(h,u[h])}}for(let h=c;h<e.length;h++){let d=e[h];if(d===0){if(h<e.length-1||h>c)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}{let{dom:p,contentDOM:f}=fs(t,d,n,r);if(l.appendChild(p),f){if(s)throw new RangeError("Multiple content holes");s=f}}}return{dom:l,contentDOM:s}}const iE=Math.pow(2,16);function sS(t,e){return t+e*iE}function Qd(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 Ut{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&Ut.empty)return Ut.empty}recover(e){let n=0,r=Qd(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))/iE}(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],h=l+u;if(e<=h){let d=l+i+((u?e==l?-1:e==h?1:n:n)<0?0:c);if(r)return d;let p=e==(n<0?l:h)?null:sS(a/3,e-l),f=e==l?2:e==h?1:4;return(n<0?e!=l:e!=h)&&(f|=8),new Xl(d,f,p)}i+=c-u}return r?e+i:new Xl(e+i,0,null)}touches(e,n){let r=0,i=Qd(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 Ut(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?Ut.empty:new Ut(e<0?[0,-e,0]:[0,0,e])}}Ut.empty=new Ut([]);class Ao{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 Ao(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 Ao;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 za=Object.create(null);class Et{getMap(){return Ut.empty}merge(e){return null}static fromJSON(e,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=za[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 za)throw new RangeError("Duplicate use of step JSON ID "+e);return za[e]=n,n.prototype.jsonID=e,n}}class Xe{constructor(e,n){this.doc=e,this.failed=n}static ok(e){return new Xe(e,null)}static fail(e){return new Xe(null,e)}static fromReplace(e,n,r,i){try{return Xe.ok(e.replace(n,r,i))}catch(o){if(o instanceof ws)return Xe.fail(o.message);throw o}}}function iu(t,e,n){let r=[];for(let i=0;i<t.childCount;i++){let o=t.child(i);o.content.size&&(o=o.copy(iu(o.content,e,o))),o.isInline&&(o=e(o,n,i)),r.push(o)}return W.fromArray(r)}class Qn 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 J(iu(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 Xe.fromReplace(e,this.from,this.to,o)}invert(){return new mn(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 Qn(n.pos,r.pos,this.mark)}merge(e){return e instanceof Qn&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Qn(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 Qn(n.from,n.to,e.markFromJSON(n.mark))}}Et.jsonID("addMark",Qn);class mn 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 J(iu(n.content,i=>i.mark(this.mark.removeFromSet(i.marks)),e),n.openStart,n.openEnd);return Xe.fromReplace(e,this.from,this.to,r)}invert(){return new Qn(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 mn(n.pos,r.pos,this.mark)}merge(e){return e instanceof mn&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new mn(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 mn(n.from,n.to,e.markFromJSON(n.mark))}}Et.jsonID("removeMark",mn);class er extends Et{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return Xe.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return Xe.fromReplace(e,this.pos,this.pos+1,new J(W.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 er(this.pos,n.marks[i]);return new er(this.pos,this.mark)}}return new Pr(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new er(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 er(n.pos,e.markFromJSON(n.mark))}}Et.jsonID("addNodeMark",er);class Pr extends Et{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return Xe.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return Xe.fromReplace(e,this.pos,this.pos+1,new J(W.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);return n&&this.mark.isInSet(n.marks)?new er(this.pos,this.mark):this}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Pr(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 Pr(n.pos,e.markFromJSON(n.mark))}}Et.jsonID("removeNodeMark",Pr);class lt 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&&Kl(e,this.from,this.to)?Xe.fail("Structure replace would overwrite content"):Xe.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new Ut([this.from,this.to-this.from,this.slice.size])}invert(e){return new lt(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 lt(n.pos,Math.max(n.pos,r.pos),this.slice,this.structure)}merge(e){if(!(e instanceof lt)||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?J.empty:new J(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new lt(e.from,this.to,n,this.structure)}}{let n=this.slice.size+e.slice.size==0?J.empty:new J(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new lt(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 lt(n.from,n.to,J.fromJSON(e,n.slice),!!n.structure)}}Et.jsonID("replace",lt);class Bt 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&&(Kl(e,this.from,this.gapFrom)||Kl(e,this.gapTo,this.to)))return Xe.fail("Structure gap-replace would overwrite content");let n=e.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return Xe.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?Xe.fromReplace(e,this.from,this.to,r):Xe.fail("Content does not fit in gap")}getMap(){return new Ut([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 Bt(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 Bt(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 Bt(n.from,n.to,n.gapFrom,n.gapTo,J.fromJSON(e,n.slice),n.insert,!!n.structure)}}function Kl(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 Ya(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,h=r.matchType(u.type);if(h){r=h;for(let d=0;d<u.marks.length;d++)n.allowsMarkType(u.marks[d].type)||t.step(new mn(a,c,u.marks[d]));if(i&&u.isText&&n.whitespace!="pre"){let d,p,f=/\r?\n|\r/g;for(;d=f.exec(u.text);)p||(p=new J(W.from(n.schema.text(" ",n.allowedMarks(u.marks))),0,0)),s.push(new lt(a+d.index,a+d.index+d[0].length,p))}}else s.push(new lt(a,c,J.empty));a=c}if(!r.validEnd){let l=r.fillBefore(W.empty,!0);t.replace(a,a,new J(l,0,0))}for(let l=s.length-1;l>=0;l--)t.step(s[l])}function aS(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function ou(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||!aS(o,s,a))break;s&&(r=1),a<o.childCount&&(i=1)}return null}function eh(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 th(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 ms(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 h=i.node(u),d=i.index(u);if(h.type.spec.isolating)return!1;let p=h.content.cutByIndex(d,h.childCount),f=r&&r[c+1];f&&(p=p.replaceChild(0,f.type.create(f.attrs)));let m=r&&r[c]||h;if(!h.canReplace(d+1,h.childCount)||!m.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 nh(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 h=a.child(c),d=h.type==u?s.type.schema.nodes.text:h.type;if(l=l.matchType(d),!l||!s.type.allowsMarks(h.marks))return!1}return l.validEnd}(i,o))}(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function su(t,e,n=e,r=J.empty){if(e==n&&!r.size)return null;let i=t.resolve(e),o=t.resolve(n);return oE(i,o,r)?new lt(e,n,r):new lS(i,o,r).fit()}function oE(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}Et.jsonID("replaceAround",Bt);class lS{constructor(e,n,r){this.$from=e,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=W.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=W.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 J(o,s,a);return e>-1?new Bt(r.pos,e,this.$to.pos,this.$to.end(),l,n):l.size||r.pos!=this.$to.pos?new lt(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=Ga(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],h=null;if(n==1&&(s?c.matchType(s.type)||(h=c.fillBefore(W.from(s),!1)):o&&u.compatibleContent(o.type)))return{sliceDepth:r,frontierDepth:a,parent:o,inject:h};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=Ga(e,n);return!(!i.childCount||i.firstChild.isLeaf)&&(this.unplaced=new J(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=Ga(e,n);if(i.childCount<=1&&n>0){let o=e.size-n<=n+i.size;this.unplaced=new J(zi(e,n-1,1),n-1,o?n-1:r)}else this.unplaced=new J(zi(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 m=0;m<o.length;m++)this.openFrontierNode(o[m]);let s=this.unplaced,a=r?r.content:s.content,l=s.openStart-e,u=0,c=[],{match:h,type:d}=this.frontier[n];if(i){for(let m=0;m<i.childCount;m++)c.push(i.child(m));h=h.matchFragment(i)}let p=a.size+e-(s.content.size-s.openEnd);for(;u<a.childCount;){let m=a.child(u),E=h.matchType(m.type);if(!E)break;u++,(u>1||l==0||m.content.size)&&(h=E,c.push(sE(m.mark(d.allowedMarks(m.marks)),u==1?l:0,u==a.childCount?p:-1)))}let f=u==a.childCount;f||(p=-1),this.placed=Yi(this.placed,n,W.from(c)),this.frontier[n].match=h,f&&p<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let m=0,E=a;m<p;m++){let A=E.lastChild;this.frontier.push({type:A.type,match:A.contentMatchAt(A.childCount)}),E=A.content}this.unplaced=f?e==0?J.empty:new J(zi(s.content,e-1,1),e-1,p<0?s.openEnd:e-1):new J(zi(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||!Wa(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=Wa(e,n,i,r,o);if(s){for(let a=n-1;a>=0;a--){let{match:l,type:u}=this.frontier[a],c=Wa(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=Yi(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=Yi(this.placed,this.depth,W.from(e.create(n,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let e=this.frontier.pop().match.fillBefore(W.empty,!0);e.childCount&&(this.placed=Yi(this.placed,this.frontier.length,e))}}function zi(t,e,n){return e==0?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(zi(t.firstChild.content,e-1,n)))}function Yi(t,e,n){return e==0?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(Yi(t.lastChild.content,e-1,n)))}function Ga(t,e){for(let n=0;n<e;n++)t=t.firstChild.content;return t}function sE(t,e,n){if(e<=0)return t;let r=t.content;return e>1&&(r=r.replaceChild(0,sE(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(W.empty,!0)))),t.copy(r)}function Wa(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 h=c;h<u.childCount;h++)if(!l.allowsMarks(u.child(h).marks))return!0;return!1}(n,o.content,s)?a:null}function cS(t){return t.spec.defining||t.spec.definingForContent}function aE(t,e,n,r,i){if(e<n){let o=t.firstChild;t=t.replaceChild(0,o.copy(aE(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(W.empty,!0))}return t}function rh(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 hi 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 Xe.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 Xe.fromReplace(e,this.pos,this.pos+1,new J(W.from(i),0,n.isLeaf?0:1))}getMap(){return Ut.empty}invert(e){return new hi(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 hi(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 hi(n.pos,n.attr,n.value)}}Et.jsonID("attr",hi);class go 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 Xe.ok(r)}getMap(){return Ut.empty}invert(e){return new go(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 go(n.attr,n.value)}}Et.jsonID("docAttr",go);let Gi=class extends Error{};Gi=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n},(Gi.prototype=Object.create(Error.prototype)).constructor=Gi,Gi.prototype.name="TransformError";class uS{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new Ao}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let n=this.maybeStep(e);if(n.failed)throw new Gi(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=J.empty){let i=su(this.doc,e,n,r);return i&&this.step(i),this}replaceWith(e,n,r){return this.replace(e,n,new J(W.from(r),0,0))}delete(e,n){return this.replace(e,n,J.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(oE(l,u,a))return i.step(new lt(o,s,a));let c=rh(l,u);c[c.length-1]==0&&c.pop();let h=-(l.depth+1);c.unshift(h);for(let E=l.depth,A=l.pos-1;E>0;E--,A--){let _=l.node(E).type.spec;if(_.defining||_.definingAsContext||_.isolating)break;c.indexOf(E)>-1?h=E:l.before(E)==A&&c.splice(1,0,-E)}let d=c.indexOf(h),p=[],f=a.openStart;for(let E=a.content,A=0;;A++){let _=E.firstChild;if(p.push(_),A==a.openStart)break;E=_.content}for(let E=f-1;E>=0;E--){let A=p[E],_=cS(A.type);if(_&&!A.sameMarkup(l.node(Math.abs(h)-1)))f=E;else if(_||!A.type.isTextblock)break}for(let E=a.openStart;E>=0;E--){let A=(E+f+1)%(a.openStart+1),_=p[A];if(_)for(let g=0;g<c.length;g++){let O=c[(g+d)%c.length],D=!0;O<0&&(D=!1,O=-O);let C=l.node(O-1),T=l.index(O-1);if(C.canReplaceWith(T,T,_.type,_.marks))return i.replace(l.before(O),D?u.after(O):s,new J(aE(a.content,0,a.openStart,A),A,a.openEnd))}}let m=i.steps.length;for(let E=c.length-1;E>=0&&(i.replace(o,s,a),!(i.steps.length>m));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,h){let d=u.resolve(c);if(d.parent.canReplaceWith(d.index(),d.index(),h))return c;if(d.parentOffset==0)for(let p=d.depth-1;p>=0;p--){let f=d.index(p);if(d.node(p).canReplaceWith(f,f,h))return d.before(p+1);if(f>0)return null}if(d.parentOffset==d.parent.content.size)for(let p=d.depth-1;p>=0;p--){let f=d.indexAfter(p);if(d.node(p).canReplaceWith(f,f,h))return d.after(p+1);if(f<d.node(p).childCount)return null}return null}(i.doc,o,a.type);l!=null&&(o=s=l)}i.replaceRange(o,s,new J(W.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=rh(s,a);for(let u=0;u<l.length;u++){let c=l[u],h=u==l.length-1;if(h&&c==0||s.node(c).type.contentMatch.validEnd)return r.delete(s.start(c),a.end(c));if(c>0&&(h||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),h=u,d=c,p=W.empty,f=0;for(let A=l,_=!1;A>o;A--)_||s.index(A)>0?(_=!0,p=W.from(s.node(A).copy(p)),f++):h--;let m=W.empty,E=0;for(let A=l,_=!1;A>o;A--)_||a.after(A+1)<a.end(A)?(_=!0,m=W.from(a.node(A).copy(m)),E++):d++;r.step(new Bt(h,d,u,c,new J(p.append(m),f,E),p.size-f,!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",f=!!u.contentMatch.matchType(a);p&&!f?s=!1:!p&&f&&(s=!0)}let c=r.steps.length;if(s===!1){let p=r.doc.resolve(i+o);th(r,p.node(),p.before(),c)}u.inlineContent&&Ya(r,i+o-1,u,l.node().contentMatchAt(l.index()),s==null);let h=r.mapping.slice(c),d=h.map(i-o);if(r.step(new lt(d,h.map(i+o,-1),J.empty,!0)),s===!0){let p=r.doc.resolve(d);eh(r,p.node(),p.before(),r.steps.length)}}(this,e,n),this}wrap(e,n){return function(r,i,o){let s=W.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=W.from(o[u].type.create(o[u].attrs,s))}let a=i.start,l=i.end;r.step(new Bt(a,l,a,l,new J(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,(h,d)=>{let p=typeof u=="function"?u(h):u;if(h.isTextblock&&!h.hasMarkup(l,p)&&function(f,m,E){let A=f.resolve(m),_=A.index();return A.parent.canReplaceWith(_,_+1,E)}(o.doc,o.mapping.slice(c).map(d),l)){let f=null;if(l.schema.linebreakReplacement){let _=l.whitespace=="pre",g=!!l.contentMatch.matchType(l.schema.linebreakReplacement);_&&!g?f=!1:!_&&g&&(f=!0)}f===!1&&th(o,h,d,c),Ya(o,o.mapping.slice(c).map(d,1),l,void 0,f===null);let m=o.mapping.slice(c),E=m.map(d,1),A=m.map(d+h.nodeSize,1);return o.step(new Bt(E,A,E+1,A-1,new J(W.from(l.create(p,null,h.marks)),0,0),1,!0)),f===!0&&eh(o,h,d,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 h=a.create(l,null,u||c.marks);if(c.isLeaf)return o.replaceWith(s,s+c.nodeSize,h);if(!a.validContent(c.content))throw new RangeError("Invalid content for node type "+a.name);o.step(new Bt(s,s+c.nodeSize,s+1,s+c.nodeSize-1,new J(W.from(h),0,0),1,!0))}(this,e,n,r,i),this}setNodeAttribute(e,n,r){return this.step(new hi(e,n,r)),this}setDocAttribute(e,n){return this.step(new go(e,n)),this}addNodeMark(e,n){return this.step(new er(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 De)n.isInSet(r.marks)&&this.step(new Pr(e,n));else{let i,o=r.marks,s=[];for(;i=n.isInSet(o);)s.push(new Pr(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=W.empty,c=W.empty;for(let h=l.depth,d=l.depth-s,p=s-1;h>d;h--,p--){u=W.from(l.node(h).copy(u));let f=a&&a[p];c=W.from(f?f.type.create(f.attrs,c):l.node(h).copy(c))}i.step(new lt(o,o,new J(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=[],h=[];i.doc.nodesBetween(o,s,(d,p,f)=>{if(!d.isInline)return;let m=d.marks;if(!a.isInSet(m)&&f.type.allowsMarkType(a.type)){let E=Math.max(p,o),A=Math.min(p+d.nodeSize,s),_=a.addToSet(m);for(let g=0;g<m.length;g++)m[g].isInSet(_)||(l&&l.to==E&&l.mark.eq(m[g])?l.to=A:c.push(l=new mn(E,A,m[g])));u&&u.to==E?u.to=A:h.push(u=new Qn(E,A,a))}}),c.forEach(d=>i.step(d)),h.forEach(d=>i.step(d))}(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,h)=>{if(!c.isInline)return;u++;let d=null;if(a instanceof fa){let p,f=c.marks;for(;p=a.isInSet(f);)(d||(d=[])).push(p),f=p.removeFromSet(f)}else a?a.isInSet(c.marks)&&(d=[a]):d=c.marks;if(d&&d.length){let p=Math.min(h+c.nodeSize,s);for(let f=0;f<d.length;f++){let m,E=d[f];for(let A=0;A<l.length;A++){let _=l[A];_.step==u-1&&E.eq(l[A].style)&&(m=_)}m?(m.to=p,m.step=u):l.push({style:E,from:Math.max(h,o),to:p,step:u})}}}),l.forEach(c=>i.step(new mn(c.from,c.to,c.style)))}(this,e,n,r),this}clearIncompatible(e,n,r){return Ya(this,e,n,r),this}}const Xa=Object.create(null);class Oe{constructor(e,n,r){this.$anchor=e,this.$head=n,this.ranges=r||[new dS(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=J.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?J.empty:n),a==0&&sh(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),sh(e,r,n.isInline?-1:1))}}static findFrom(e,n,r=!1){let i=e.parent.inlineContent?new Se(e):Qr(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?Qr(e.node(0),e.node(o),e.before(o+1),e.index(o),n,r):Qr(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 zt(e.node(0))}static atStart(e){return Qr(e,e,0,0,1)||new zt(e)}static atEnd(e){return Qr(e,e,e.content.size,e.childCount,-1)||new zt(e)}static fromJSON(e,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=Xa[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 Xa)throw new RangeError("Duplicate use of selection JSON ID "+e);return Xa[e]=n,n.prototype.jsonID=e,n}getBookmark(){return Se.between(this.$anchor,this.$head).getBookmark()}}Oe.prototype.visible=!0;class dS{constructor(e,n){this.$from=e,this.$to=n}}let ih=!1;function oh(t){ih||t.parent.inlineContent||(ih=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class Se extends Oe{constructor(e,n=e){oh(e),oh(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 Oe.near(r);let i=e.resolve(n.map(this.anchor));return new Se(i.parent.inlineContent?i:r,r)}replace(e,n=J.empty){if(super.replace(e,n),n==J.empty){let r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}eq(e){return e instanceof Se&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new ma(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 Se(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=Oe.findFrom(n,r,!0)||Oe.findFrom(n,-r,!0);if(!o)return Oe.near(n,r);n=o.$head}return e.parent.inlineContent||(i==0||(e=(Oe.findFrom(e,-r,!0)||Oe.findFrom(e,r,!0)).$anchor).pos<n.pos!=i<0)&&(e=n),new Se(e,n)}}Oe.jsonID("text",Se);class ma{constructor(e,n){this.anchor=e,this.head=n}map(e){return new ma(e.map(this.anchor),e.map(this.head))}resolve(e){return Se.between(e.resolve(this.anchor),e.resolve(this.head))}}class se extends Oe{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?Oe.near(o):new se(o)}content(){return new J(W.from(this.node),0,0)}eq(e){return e instanceof se&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new au(this.anchor)}static fromJSON(e,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new se(e.resolve(n.anchor))}static create(e,n){return new se(e.resolve(n))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}se.prototype.visible=!1,Oe.jsonID("node",se);class au{constructor(e){this.anchor=e}map(e){let{deleted:n,pos:r}=e.mapResult(this.anchor);return n?new ma(r,r):new au(r)}resolve(e){let n=e.resolve(this.anchor),r=n.nodeAfter;return r&&se.isSelectable(r)?new se(n):Oe.near(n)}}class zt extends Oe{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,n=J.empty){if(n==J.empty){e.delete(0,e.doc.content.size);let r=Oe.atStart(e.doc);r.eq(e.selection)||e.setSelection(r)}else super.replace(e,n)}toJSON(){return{type:"all"}}static fromJSON(e){return new zt(e)}map(e){return new zt(e)}eq(e){return e instanceof zt}getBookmark(){return hS}}Oe.jsonID("all",zt);const hS={map(){return this},resolve:t=>new zt(t)};function Qr(t,e,n,r,i,o=!1){if(e.inlineContent)return Se.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&&se.isSelectable(a))return se.create(t,n-(i<0?a.nodeSize:0))}else{let l=Qr(t,a,n+i,i<0?a.childCount:0,i,o);if(l)return l}n+=a.nodeSize*i}return null}function sh(t,e,n){let r=t.steps.length-1;if(r<e)return;let i,o=t.steps[r];(o instanceof lt||o instanceof Bt)&&(t.mapping.maps[r].forEach((s,a,l,u)=>{i==null&&(i=u)}),t.setSelection(Oe.near(t.doc.resolve(i),n)))}class pS extends uS{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 De.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)||De.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(Oe.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 ah(t,e){return e&&t?t.bind(e):t}class Wi{constructor(e,n,r){this.name=e,this.init=ah(n.init,r),this.apply=ah(n.apply,r)}}const fS=[new Wi("doc",{init:t=>t.doc||t.schema.topNodeType.createAndFill(),apply:t=>t.doc}),new Wi("selection",{init:(t,e)=>t.selection||Oe.atStart(e.doc),apply:t=>t.selection}),new Wi("storedMarks",{init:t=>t.storedMarks||null,apply:(t,e,n,r)=>r.selection.$cursor?t.storedMarks:null}),new Wi("scrollToSelection",{init:()=>0,apply:(t,e)=>t.scrolledIntoView?e+1:e})];class Ka{constructor(e,n){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=fS.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 Wi(r.key,r.spec.state,r))})}}class si{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 h=0;h<this.config.plugins.length;h++)i.push(h<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 si(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 pS(this)}static create(e){let n=new Ka(e.doc?e.doc.type.schema:e.schema,e.plugins),r=new si(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 Ka(this.schema,e.plugins),r=n.fields,i=new si(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 Ka(e.schema,e.plugins),o=new si(i);return i.fields.forEach(s=>{if(s.name=="doc")o.doc=Nr.fromJSON(e.schema,n.doc);else if(s.name=="selection")o.selection=Oe.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 lE(t,e,n){for(let r in t){let i=t[r];i instanceof Function?i=i.bind(e):r=="handleDOMEvents"&&(i=lE(i,e,{})),n[r]=i}return n}class Ea{constructor(e){this.spec=e,this.props={},e.props&&lE(e.props,this,this.props),this.key=e.key?e.key.key:cE("plugin")}getState(e){return e[this.key]}}const qa=Object.create(null);function cE(t){return t in qa?t+"$"+ ++qa[t]:(qa[t]=0,t+"$")}class _a{constructor(e="key"){this.key=cE(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const ct=function(t){for(var e=0;;e++)if(!(t=t.previousSibling))return e},Ci=function(t){let e=t.assignedSlot||t.parentNode;return e&&e.nodeType==11?e.host:e};let ql=null;const Ln=function(t,e,n){let r=ql||(ql=document.createRange());return r.setEnd(t,n==null?t.nodeValue.length:n),r.setStart(t,e||0),r},xr=function(t,e,n,r){return n&&(lh(t,e,n,r,-1)||lh(t,e,n,r,1))},mS=/^(img|br|input|textarea|hr)$/i;function lh(t,e,n,r,i){for(var o;;){if(t==n&&e==r)return!0;if(e==(i<0?0:qt(t))){let s=t.parentNode;if(!s||s.nodeType!=1||So(t)||mS.test(t.nodeName)||t.contentEditable=="false")return!1;e=ct(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?qt(t):0}}}}function qt(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function So(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 Aa=function(t){return t.focusNode&&xr(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function Or(t,e){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}const Dn=typeof navigator!="undefined"?navigator:null,ch=typeof document!="undefined"?document:null,cr=Dn&&Dn.userAgent||"",Jl=/Edge\/(\d+)/.exec(cr),uE=/MSIE \d/.exec(cr),Zl=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(cr),wt=!!(uE||Zl||Jl),rr=uE?document.documentMode:Zl?+Zl[1]:Jl?+Jl[1]:0,Qt=!wt&&/gecko\/(\d+)/i.test(cr);Qt&&(/Firefox\/(\d+)/.exec(cr)||[0,0])[1];const Ql=!wt&&/Chrome\/(\d+)/.exec(cr),tt=!!Ql,dE=Ql?+Ql[1]:0,ut=!wt&&!!Dn&&/Apple Computer/.test(Dn.vendor),Ii=ut&&(/Mobile\/\w+/.test(cr)||!!Dn&&Dn.maxTouchPoints>2),Kt=Ii||!!Dn&&/Mac/.test(Dn.platform),hE=!!Dn&&/Win/.test(Dn.platform),Pn=/Android \d/.test(cr),Fo=!!ch&&"webkitFontSmoothing"in ch.documentElement.style,ES=Fo?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function _S(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 bn(t,e){return typeof t=="number"?t:t[e]}function AS(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 uh(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=Ci(s);continue}let a=s,l=a==o.body,u=l?_S(o):AS(a),c=0,h=0;if(e.top<u.top+bn(r,"top")?h=-(u.top-e.top+bn(i,"top")):e.bottom>u.bottom-bn(r,"bottom")&&(h=e.bottom-e.top>u.bottom-u.top?e.top+bn(i,"top")-u.top:e.bottom-u.bottom+bn(i,"bottom")),e.left<u.left+bn(r,"left")?c=-(u.left-e.left+bn(i,"left")):e.right>u.right-bn(r,"right")&&(c=e.right-u.right+bn(i,"right")),c||h)if(l)o.defaultView.scrollBy(c,h);else{let p=a.scrollLeft,f=a.scrollTop;h&&(a.scrollTop+=h),c&&(a.scrollLeft+=c);let m=a.scrollLeft-p,E=a.scrollTop-f;e={left:e.left-m,top:e.top-E,right:e.right-m,bottom:e.bottom-E}}let d=l?"fixed":getComputedStyle(s).position;if(/^(fixed|sticky)$/.test(d))break;s=d=="absolute"?s.offsetParent:Ci(s)}}function dh(t){let e=[],n=t.ownerDocument;for(let r=t;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),t!=n);r=Ci(r));return e}function hh(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 qr=null;function pE(t,e){let n,r,i,o,s=2e8,a=0,l=e.top,u=e.top;for(let c=t.firstChild,h=0;c;c=c.nextSibling,h++){let d;if(c.nodeType==1)d=c.getClientRects();else{if(c.nodeType!=3)continue;d=Ln(c).getClientRects()}for(let p=0;p<d.length;p++){let f=d[p];if(f.top<=l&&f.bottom>=u){l=Math.max(f.bottom,l),u=Math.min(f.top,u);let m=f.left>e.left?f.left-e.left:f.right<e.left?e.left-f.right:0;if(m<s){n=c,s=m,r=m&&n.nodeType==3?{left:f.right<e.left?f.right:f.left,top:e.top}:e,c.nodeType==1&&m&&(a=h+(e.left>=(f.left+f.right)/2?1:0));continue}}else f.top>e.top&&!i&&f.left<=e.left&&f.right>=e.left&&(i=c,o={left:Math.max(f.left,Math.min(f.right,e.left)),top:f.top});!n&&(e.left>=f.right&&e.top>=f.top||e.left>=f.left&&e.top>=f.bottom)&&(a=h+1)}}return!n&&i&&(n=i,r=o,s=0),n&&n.nodeType==3?function(c,h){let d,p=c.nodeValue.length,f=document.createRange();for(let m=0;m<p;m++){f.setEnd(c,m+1),f.setStart(c,m);let E=Gn(f,1);if(E.top!=E.bottom&&lu(h,E)){d={node:c,offset:m+(h.left>=(E.left+E.right)/2?1:0)};break}}return f.detach(),d||{node:c,offset:0}}(n,r):!n||s&&n.nodeType==1?{node:t,offset:a}:pE(n,r)}function lu(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function fE(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(lu(e,u))return fE(s,e,u)}}if((o=(o+1)%r)==i)break}return t}function gS(t,e){let n,r=t.dom.ownerDocument,i=0,o=function(u,c,h){if(u.caretPositionFromPoint)try{let d=u.caretPositionFromPoint(c,h);if(d)return{node:d.offsetNode,offset:Math.min(qt(d.offsetNode),d.offset)}}catch(d){}if(u.caretRangeFromPoint){let d=u.caretRangeFromPoint(c,h);if(d)return{node:d.startContainer,offset:Math.min(qt(d.startContainer),d.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(!lu(e,u)||(a=fE(t.dom,e,u),!a))return null}if(ut)for(let u=a;n&&u;u=Ci(u))u.draggable&&(n=void 0);if(a=function(u,c){let h=u.parentNode;return h&&/^li$/i.test(h.nodeName)&&c.left<u.getBoundingClientRect().left?h:u}(a,e),n){if(Qt&&n.nodeType==1&&(i=Math.min(i,n.childNodes.length),i<n.childNodes.length)){let c,h=n.childNodes[i];h.nodeName=="IMG"&&(c=h.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,h,d,p){let f=-1;for(let m=h,E=!1;m!=c.dom;){let A,_=c.docView.nearestDesc(m,!0);if(!_)return null;if(_.dom.nodeType==1&&(_.node.isBlock&&_.parent||!_.contentDOM)&&((A=_.dom.getBoundingClientRect()).width||A.height)&&(_.node.isBlock&&_.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(_.dom.nodeName)&&(!E&&A.left>p.left||A.top>p.top?f=_.posBefore:(!E&&A.right<p.left||A.bottom<p.top)&&(f=_.posAfter),E=!0),!_.contentDOM&&f<0&&!_.node.isText))return(_.node.isBlock?p.top<(A.top+A.bottom)/2:p.left<(A.left+A.right)/2)?_.posBefore:_.posAfter;m=_.dom.parentNode}return f>-1?f:c.docView.posFromDOM(h,d,-1)}(t,n,i,e))}s==null&&(s=function(u,c,h){let{node:d,offset:p}=pE(c,h),f=-1;if(d.nodeType==1&&!d.firstChild){let m=d.getBoundingClientRect();f=m.left!=m.right&&h.left>(m.left+m.right)/2?1:-1}return u.docView.posFromDOM(d,p,f)}(t,a,e));let l=t.docView.nearestDesc(a,!0);return{pos:s,inside:l?l.posAtStart-l.border:-1}}function ph(t){return t.top<t.bottom||t.left<t.right}function Gn(t,e){let n=t.getClientRects();if(n.length){let r=n[e<0?0:n.length-1];if(ph(r))return r}return Array.prototype.find.call(n,ph)||t.getBoundingClientRect()}const SS=/[\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||Qt;if(r.nodeType==3){if(!s||!SS.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++,Bi(Gn(Ln(r,a,l),u),u<0)}{let a=Gn(Ln(r,i,i),n);if(Qt&&i&&/\s/.test(r.nodeValue[i-1])&&i<r.nodeValue.length){let l=Gn(Ln(r,i-1,i-1),-1);if(l.top==a.top){let u=Gn(Ln(r,i,i+1),-1);if(u.top!=a.top)return Bi(u,u.left<l.left)}}return a}}if(!t.state.doc.resolve(e-(o||0)).parent.inlineContent){if(o==null&&i&&(n<0||i==qt(r))){let a=r.childNodes[i-1];if(a.nodeType==1)return Ja(a.getBoundingClientRect(),!1)}if(o==null&&i<qt(r)){let a=r.childNodes[i];if(a.nodeType==1)return Ja(a.getBoundingClientRect(),!0)}return Ja(r.getBoundingClientRect(),n>=0)}if(o==null&&i&&(n<0||i==qt(r))){let a=r.childNodes[i-1],l=a.nodeType==3?Ln(a,qt(a)-(s?0:1)):a.nodeType!=1||a.nodeName=="BR"&&a.nextSibling?null:a;if(l)return Bi(Gn(l,1),!1)}if(o==null&&i<qt(r)){let a=r.childNodes[i];for(;a.pmViewDesc&&a.pmViewDesc.ignoreForCoords;)a=a.nextSibling;let l=a?a.nodeType==3?Ln(a,0,s?0:1):a.nodeType==1?a:null:null;if(l)return Bi(Gn(l,-1),!0)}return Bi(Gn(r.nodeType==3?Ln(r):r,-n),n>=0)}function Bi(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 Ja(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 fh(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 OS=/[\u0590-\u08ac]/;let mh=null,Eh=null,_h=!1;function DS(t,e,n){return mh==e&&Eh==n?_h:(mh=e,Eh=n,_h=n=="up"||n=="down"?function(r,i,o){let s=i.selection,a=o=="up"?s.$from:s.$to;return fh(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 h;if(c.nodeType==1)h=c.getClientRects();else{if(c.nodeType!=3)continue;h=Ln(c,0,c.nodeValue.length).getClientRects()}for(let d=0;d<h.length;d++){let p=h[d];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?OS.test(s.parent.textContent)&&c.modify?fh(r,i,()=>{let{focusNode:h,focusOffset:d,anchorNode:p,anchorOffset:f}=r.domSelectionRange(),m=c.caretBidiLevel;c.modify("move",o,"character");let E=s.depth?r.docView.domAfterPos(s.before()):r.dom,{focusNode:A,focusOffset:_}=r.domSelectionRange(),g=A&&!E.contains(A.nodeType==1?A:A.parentNode)||h==A&&d==_;try{c.collapse(p,f),h&&(h!=p||d!=f)&&c.extend&&c.extend(h,d)}catch(O){}return m!=null&&(c.caretBidiLevel=m),g}):o=="left"||o=="backward"?l:u:s.pos==s.start()||s.pos==s.end()}(t,e,n))}class Ho{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>ct(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 _E){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 EE&&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?ct(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?ct(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 h=a;h>0;h--){let d=this.children[h-1];if(d.size&&d.dom.parentNode==this.contentDOM&&!d.emptyChildAt(1)){i=ct(d.dom)+1;break}e-=d.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 h=this.children[c];if(h.size&&h.dom.parentNode==this.contentDOM&&!h.emptyChildAt(-1)){o=ct(h.dom);break}n+=h.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,f=0;p<this.children.length;p++){let m=this.children[p],E=f+m.size;if(o>f&&s<E)return m.setSelection(e-f-m.border,n-f-m.border,r,i);f=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(),h=!1;if((Qt||ut)&&e==n){let{node:p,offset:f}=a;if(p.nodeType==3){if(h=!(!f||p.nodeValue[f-1]!=`
12
- `),h&&f==p.nodeValue.length)for(let m,E=p;E;E=E.parentNode){if(m=E.nextSibling){m.nodeName=="BR"&&(a=l={node:m.parentNode,offset:ct(m)+1});break}let A=E.pmViewDesc;if(A&&A.node&&A.node.isBlock)break}}else{let m=p.childNodes[f-1];h=m&&(m.nodeName=="BR"||m.contentEditable=="false")}}if(Qt&&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||h&&ut)&&xr(a.node,a.offset,c.anchorNode,c.anchorOffset)&&xr(l.node,l.offset,c.focusNode,c.focusOffset))return;let d=!1;if((u.extend||e==n)&&(!h||!Qt)){u.collapse(a.node,a.offset);try{e!=n&&u.extend(l.node,l.offset),d=!0}catch(p){}}if(!d){if(e>n){let f=a;a=l,l=f}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 EE extends Ho{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 vS extends Ho{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 br extends Ho{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=Mi.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new br(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=br.create(this.parent,this.mark,!0,r),o=this.children,s=this.size;n<s&&(o=tc(o,n,s,r)),e>0&&(o=tc(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 ir extends Ho{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,h=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:h}=Mi.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));h||n.isText||c.nodeName=="BR"||(c.hasAttribute("contenteditable")||(c.contentEditable="false"),n.type.spec.draggable&&(c.draggable=!0));let d=c;return c=SE(c,r,n),u?a=new TS(e,n,r,i,c,h||null,d,u,o,s+1):n.isText?new ga(e,n,r,i,c,d,o):new ir(e,n,r,i,c,h||null,d,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=()=>W.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)&&xs(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 CS(this,s&&s.node,e);(function(u,c,h,d){let p=c.locals(u),f=0;if(p.length==0){for(let _=0;_<u.childCount;_++){let g=u.child(_);d(g,p,c.forChild(f,g),_),f+=g.nodeSize}return}let m=0,E=[],A=null;for(let _=0;;){let g,O,D,C;for(;m<p.length&&p[m].to==f;){let S=p[m++];S.widget&&(g?(O||(O=[g])).push(S):g=S)}if(g)if(O){O.sort(IS);for(let S=0;S<O.length;S++)h(O[S],_,!!A)}else h(g,_,!!A);if(A)C=-1,D=A,A=null;else{if(!(_<u.childCount))break;C=_,D=u.child(_++)}for(let S=0;S<E.length;S++)E[S].to<=f&&E.splice(S--,1);for(;m<p.length&&p[m].from<=f&&p[m].to>f;)E.push(p[m++]);let T=f+D.nodeSize;if(D.isText){let S=T;m<p.length&&p[m].from<S&&(S=p[m].from);for(let v=0;v<E.length;v++)E[v].to<S&&(S=E[v].to);S<T&&(A=D.cut(S-f),D=D.cut(0,S-f),T=S,C=-1)}else for(;m<p.length&&p[m].to<T;)m++;let I=D.isInline&&!D.isLeaf?E.filter(S=>!S.inline):E.slice();d(D,I,c.forChild(f,D),C),f=T}})(this.node,this.innerDeco,(u,c,h)=>{u.spec.marks?l.syncToMarks(u.spec.marks,r,e,c):u.type.side>=0&&!h&&l.syncToMarks(c==this.node.childCount?De.none:this.node.child(c).marks,r,e,c),l.placeWidget(u,e,i)},(u,c,h,d)=>{let p;l.syncToMarks(u.marks,r,e,d),l.findNodeMatch(u,c,h,d)||a&&e.state.selection.from>i&&e.state.selection.to<i+u.nodeSize&&(p=l.findIndexWithChild(o.node))>-1&&l.updateNodeAt(u,c,h,p,e)||l.updateNextNode(u,c,h,e,d,i)||l.addNode(u,c,h,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),AE(this.contentDOM,this.children,e),Ii&&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 Se)||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,h){for(let d=0,p=0;d<l.childCount&&p<=h;){let f=l.child(d++),m=p;if(p+=f.nodeSize,!f.isText)continue;let E=f.text;for(;d<l.childCount;){let A=l.child(d++);if(p+=A.nodeSize,!A.isText)break;E+=A.text}if(p>=c){if(p>=h&&E.slice(h-u.length-m,h-m)==u)return h-u.length;let A=m<h?E.lastIndexOf(u,h-m-1):-1;if(A>=0&&A+u.length+m>=c)return m+A;if(c==h&&E.length>=h+u.length-m&&E.slice(h-m,h-m+u.length)==u)return h}}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 vS(this,o,n,i);e.input.compositionNodes.push(s),this.children=tc(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(xs(e,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=gE(this.dom,this.nodeDOM,ec(this.outerDeco,this.node,n),ec(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){SE(r,e,t);let o=new ir(void 0,t,e,n,r,r,r,i,0);return o.contentDOM&&o.updateChildren(i,0),o}class ga extends ir{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 ga(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 _E extends Ho{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 TS extends ir{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 AE(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=gh(r),i=!0;r=r.nextSibling}else i=!0,t.insertBefore(a,r);if(s instanceof br){let l=r?r.previousSibling:t.lastChild;AE(s.contentDOM,s.children,n),r=l?l.nextSibling:t.firstChild}}for(;r;)r=gh(r),i=!0;i&&n.trackWrites==t&&(n.trackWrites=null)}const to=function(t){t&&(this.nodeName=t)};to.prototype=Object.create(null);const vr=[new to];function ec(t,e,n){if(t.length==0)return vr;let r=n?vr[0]:new to,i=[r];for(let o=0;o<t.length;o++){let s=t[o].type.attrs;if(s){s.nodeName&&i.push(r=new to(s.nodeName));for(let a in s){let l=s[a];l!=null&&(n&&i.length==1&&i.push(r=new to(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 gE(t,e,n,r){if(n==vr&&r==vr)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=vr[0]),i=l}RS(i,a||vr[0],s)}return i}function RS(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 SE(t,e,n){return gE(t,t,vr,ec(e,n,t.nodeType!=1))}function xs(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 gh(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class CS{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 h;for(;;)if(a){let p=s.children[a-1];if(!(p instanceof br)){h=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 d=h.node;if(d){if(d!=i.child(l-1))break;--l,u.set(h,l),c.push(h)}}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 h=this.top.children[c];if(h.matchesMark(e[s])&&!this.isLocked(h.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=br.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 ir){let u=this.preMatch.matched.get(l);if(u!=null&&u!=o)return!1;let c,h=l.dom,d=this.isLocked(h)&&!(e.isText&&l.node&&l.node.isText&&l.nodeDOM.nodeValue==e.text&&l.dirty!=3&&xs(n,l.outerDeco));if(!d&&l.update(e,n,r,i))return this.destroyBetween(this.index,a),l.dom!=h&&(this.changed=!0),this.index++,!0;if(!d&&(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)||!xs(r,e.outerDeco)||!i.eq(e.innerDeco))return null;let a=ir.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=ir.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 EE(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 br;)n=e,e=n.children[n.children.length-1];(!e||!(e instanceof ga)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((ut||tt)&&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 _E(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 IS(t,e){return t.type.side-e.type.side}function tc(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 cu(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(Aa(n)){for(a=s;i&&!i.node;)i=i.parent;let h=i.node;if(i&&h.isAtom&&se.isSelectable(h)&&i.parent&&(!h.isInline||!function(d,p,f){for(let m=p==0,E=p==qt(d);m||E;){if(d==f)return!0;let A=ct(d);if(!(d=d.parentNode))return!1;m=m&&A==0,E=E&&A==qt(d)}}(n.focusNode,n.focusOffset,i.dom))){let d=i.posBefore;l=new se(s==d?u:r.resolve(d))}}else{if(n instanceof t.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let h=s,d=s;for(let p=0;p<n.rangeCount;p++){let f=n.getRangeAt(p);h=Math.min(h,t.docView.posFromDOM(f.startContainer,f.startOffset,1)),d=Math.max(d,t.docView.posFromDOM(f.endContainer,f.endOffset,-1))}if(h<0)return null;[a,s]=d==t.state.selection.anchor?[d,h]:[h,d],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=uu(t,c,u,e=="pointer"||t.state.selection.head<u.pos&&!o?1:-1)),l}function Sh(t){return t.editable?t.hasFocus():DE(t)&&document.activeElement&&document.activeElement.contains(t.dom)}function Hn(t,e=!1){let n=t.state.selection;if(OE(t,n),Sh(t)){if(!e&&t.input.mouseDown&&t.input.mouseDown.allowDefault&&tt){let r=t.domSelectionRange(),i=t.domObserver.currentSelection;if(r.anchorNode&&i.anchorNode&&xr(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,ct(o)+1):i.collapse(o,0),!s&&!r.state.selection.visible&&wt&&rr<=11&&(o.disabled=!0,o.disabled=!1)})(t);else{let r,i,{anchor:o,head:s}=n;!Oh||n instanceof Se||(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&&vh(r),i&&vh(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,h=u.anchorOffset;l.addEventListener("selectionchange",a.input.hideSelectionGuard=()=>{u.anchorNode==c&&u.anchorOffset==h||(l.removeEventListener("selectionchange",a.input.hideSelectionGuard),setTimeout(()=>{Sh(a)&&!a.state.selection.visible||a.dom.classList.remove("ProseMirror-hideselection")},20))})}(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}const Oh=ut||tt&&dE<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(ut&&i&&i.contentEditable=="false")return Za(i);if(!(i&&i.contentEditable!="false"||o&&o.contentEditable!="false")){if(i)return Za(i);if(o)return Za(o)}}function Za(t){return t.contentEditable="true",ut&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function vh(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function OE(t,e){if(e instanceof se){let n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(Th(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else Th(t)}function Th(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function uu(t,e,n,r){return t.someProp("createSelectionBetween",i=>i(t,e,n))||Se.between(e,n,r)}function Rh(t){return!(t.editable&&!t.hasFocus())&&DE(t)}function DE(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 nc(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&&Oe.findFrom(o,e)}function Xn(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function Ch(t,e,n){let r=t.state.selection;if(!(r instanceof Se)){if(r instanceof se&&r.node.isInline)return Xn(t,new Se(e>0?r.$to:r.$from));{let i=nc(t.state,e);return!!i&&Xn(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 Xn(t,new Se(r.$anchor,s))}if(!r.empty)return!1;if(t.endOfTextblock(e>0?"forward":"backward")){let i=nc(t.state,e);return!!(i&&i instanceof se)&&Xn(t,i)}if(!(Kt&&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)&&(se.isSelectable(s)?Xn(t,new se(e<0?t.state.doc.resolve(o.pos-s.nodeSize):o)):!!Fo&&Xn(t,new Se(t.state.doc.resolve(e<0?a:a+s.nodeSize))))}}function Qo(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function ji(t,e){let n=t.pmViewDesc;return n&&n.size==0&&(e<0||t.nextSibling||t.nodeName!="BR")}function Jr(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(Qt&&i.nodeType==1&&o<Qo(i)&&ji(i.childNodes[o],-1)&&(l=!0);;)if(o>0){if(i.nodeType!=1)break;{let u=i.childNodes[o-1];if(ji(u,-1))s=i,a=--o;else{if(u.nodeType!=3)break;i=u,o=i.nodeValue.length}}}else{if(Ih(i))break;{let u=i.previousSibling;for(;u&&ji(u,-1);)s=i.parentNode,a=ct(u),u=u.previousSibling;if(u)i=u,o=Qo(i);else{if(i=i.parentNode,i==n.dom)break;o=0}}}l?Qa(n,i,o):s&&Qa(n,s,a)}(t):function(n){let r=n.domSelectionRange(),i=r.focusNode,o=r.focusOffset;if(!i)return;let s,a,l=Qo(i);for(;;)if(o<l){if(i.nodeType!=1||!ji(i.childNodes[o],1))break;s=i,a=++o}else{if(Ih(i))break;{let u=i.nextSibling;for(;u&&ji(u,1);)s=u.parentNode,a=ct(u)+1,u=u.nextSibling;if(u)i=u,o=0,l=Qo(i);else{if(i=i.parentNode,i==n.dom)break;o=l=0}}}s&&Qa(n,s,a)}(t)}function Ih(t){let e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function Qa(t,e,n){if(e.nodeType!=3){let o,s;(s=function(a,l){for(;a&&l==a.childNodes.length&&!So(a);)l=ct(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&&!So(a);)l=ct(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(Aa(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&&Hn(t)},50)}function yh(t,e){let n=t.state.doc.resolve(e);if(!tt&&!hE&&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 Nh(t,e,n){let r=t.state.selection;if(r instanceof Se&&!r.empty||n.indexOf("s")>-1||Kt&&n.indexOf("m")>-1)return!1;let{$from:i,$to:o}=r;if(!i.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let s=nc(t.state,e);if(s&&s instanceof se)return Xn(t,s)}if(!i.parent.inlineContent){let s=e<0?i:o,a=r instanceof zt?Oe.near(s,e):Oe.findFrom(s,e);return!!a&&Xn(t,a)}return!1}function bh(t,e){if(!(t.state.selection instanceof Se))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 yS(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||Kt&&n==72&&r=="c")return bh(t,-1)||Jr(t,-1);if(n==46&&!e.shiftKey||Kt&&n==68&&r=="c")return bh(t,1)||Jr(t,1);if(n==13||n==27)return!0;if(n==37||Kt&&n==66&&r=="c"){let i=n==37?yh(t,t.state.selection.from)=="ltr"?-1:1:-1;return Ch(t,i,r)||Jr(t,i)}if(n==39||Kt&&n==70&&r=="c"){let i=n==39?yh(t,t.state.selection.from)=="ltr"?1:-1:1;return Ch(t,i,r)||Jr(t,i)}return n==38||Kt&&n==80&&r=="c"?Nh(t,-1,r)||Jr(t,-1):n==40||Kt&&n==78&&r=="c"?function(i){if(!ut||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)||Nh(t,1,r)||Jr(t,1):r==(Kt?"m":"c")&&(n==66||n==73||n==89||n==90)}function du(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")||Mi.fromSchema(t.state.schema),a=yE(),l=a.createElement("div");l.appendChild(s.serializeFragment(r,{document:a}));let u,c=l.firstChild,h=0;for(;c&&c.nodeType==1&&(u=IE[c.nodeName.toLowerCase()]);){for(let p=u.length-1;p>=0;p--){let f=a.createElement(u[p]);for(;l.firstChild;)f.appendChild(l.firstChild);l.appendChild(f),h++}c=l.firstChild}c&&c.nodeType==1&&c.setAttribute("data-pm-slice",`${i} ${o}${h?` -${h}`:""} ${JSON.stringify(n)}`);let d=t.someProp("clipboardTextSerializer",p=>p(e,t))||e.content.textBetween(0,e.content.size,`
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}|${cn(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}|${cn(o.children)}>`}(i);case"bulletlist":case"bulletList":return`
6
+ `+cn(i.children);case"bulletpoint":case"bulletPoint":return"- "+cn(i.children)+`
7
+ `}}).join("")}(t,e).trim()}class Bd{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 ot(t){this.content=t}function Vm(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=Vm(i.content,o.content,n+1);if(s!=null)return s}n+=i.nodeSize}else n+=i.nodeSize}}function zm(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=zm(s.content,a.content,n-1,r-1);if(u)return u}n-=l,r-=l}else n-=l,r-=l}}ot.prototype={constructor:ot,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 ot(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 ot(n)},addToStart:function(t,e){return new ot([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new ot(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 ot(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=ot.from(t)).size?new ot(t.content.concat(this.subtract(t).content)):this},append:function(t){return(t=ot.from(t)).size?new ot(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=ot.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}},ot.from=function(t){if(t instanceof ot)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new ot(e)};class X{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 X(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 X(r,i)}cutByIndex(e,n){return e==n?X.empty:e==0&&n==this.content.length?this:new X(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 X(i,o)}addToStart(e){return new X([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new X(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 Vm(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return zm(this,e,n,r)}findIndex(e){if(e==0)return Qo(0,e);if(e==this.size)return Qo(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?Qo(n+1,i):Qo(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 X.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new X(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return X.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 X(n||e,r)}static from(e){if(!e)return X.empty;if(e instanceof X)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new X([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}X.empty=new X([],0);const $a={index:0,offset:0};function Qo(t,e){return $a.index=t,$a.offset=e,$a}function ws(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(!ws(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!ws(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}class ge{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&&ws(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 ge.none;if(e instanceof ge)return[e];let n=e.slice();return n.sort((r,i)=>r.type.rank-i.type.rank),n}}ge.none=[];class Ms extends Error{}class J{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=Gm(this.content,e+this.openStart,n);return r&&new J(r,this.openStart,this.openEnd)}removeBetween(e,n){return new J(Ym(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 J.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 J(X.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 J(e,r,i)}}function Ym(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(Ym(o.content,e-i-1,n-i-1)))}function Gm(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=Gm(s.content,e-o-1,n,s);return a&&t.replaceChild(i,s.copy(a))}function Qg(t,e,n){if(n.openStart>t.depth)throw new Ms("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new Ms("Inconsistent open depths");return Wm(t,e,n,0)}function Wm(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=Wm(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,h=u.node(c).copy(l.content);for(let d=c-1;d>=0;d--)h=u.node(d).copy(X.from(h));return{start:h.resolveNoCache(l.openStart+c),end:h.resolveNoCache(h.content.size-l.openEnd-c)}}(n,t);return yr(o,Km(t,s,a,e,r))}{let s=t.parent,a=s.content;return yr(s,a.cut(0,t.parentOffset).append(n.content).append(a.cut(e.parentOffset)))}}return yr(o,Ps(t,e,r))}function Xm(t,e){if(!e.type.compatibleContent(t.type))throw new Ms("Cannot join "+e.type.name+" onto "+t.type.name)}function Wl(t,e,n){let r=t.node(n);return Xm(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 to(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 yr(t,e){return t.type.checkContent(e),t.copy(e)}function Km(t,e,n,r,i){let o=t.depth>i&&Wl(t,e,i+1),s=r.depth>i&&Wl(n,r,i+1),a=[];return to(null,t,i,a),o&&s&&e.index(i)==n.index(i)?(Xm(o,s),Ir(yr(o,Km(t,e,n,r,i+1)),a)):(o&&Ir(yr(o,Ps(t,e,i+1)),a),to(e,n,i,a),s&&Ir(yr(s,Ps(n,r,i+1)),a)),to(r,null,i,a),new X(a)}function Ps(t,e,n){let r=[];return to(null,t,n,r),t.depth>n&&Ir(yr(Wl(t,e,n+1),Ps(t,e,n+1)),r),to(e,null,n,r),new X(r)}J.empty=new J(X.empty,0,0);class _o{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 ge.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 nS(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 _o(n,r,o)}static resolveCached(e,n){let r=jd.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 jd.set(e,r=new eS);let i=r.elts[r.i]=_o.resolve(e,n);return r.i=(r.i+1)%tS,i}}class eS{constructor(){this.elts=[],this.i=0}}const tS=12,jd=new WeakMap;class nS{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 rS=Object.create(null);let Nr=class Xl{constructor(e,n,r,i=ge.none){this.type=e,this.attrs=n,this.marks=i,this.content=r||X.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&&ws(this.attrs,n||e.defaultAttrs||rS)&&ge.sameSet(this.marks,r||ge.none)}copy(e=null){return e==this.content?this:new Xl(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new Xl(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 J.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 J(l,i.depth-s,o.depth-s)}replace(e,n,r){return Qg(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 _o.resolveCached(this,e)}resolveNoCache(e){return _o.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()+")"),qm(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=X.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=ge.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(!ge.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=X.fromJSON(e,n.content),o=e.nodeType(n.type).create(n.attrs,i,r);return o.type.checkAttrs(o.attrs),o}};Nr.prototype.text=void 0;class xs extends Nr{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):qm(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 xs(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new xs(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 qm(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class Mr{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new iS(e,n);if(r.next==null)return Mr.empty;let i=Jm(r);r.next&&r.err("Unexpected trailing text");let o=function(s){let a=Object.create(null);return l(Vd(s,0));function l(u){let c=[];u.forEach(d=>{s[d].forEach(({term:p,to:f})=>{if(!p)return;let m;for(let E=0;E<c.length;E++)c[E][0]==p&&(m=c[E][1]);Vd(s,f).forEach(E=>{m||c.push([p,m=[]]),m.indexOf(E)==-1&&m.push(E)})})});let h=a[u.join(",")]=new Mr(u.indexOf(s.length-1)>-1);for(let d=0;d<c.length;d++){let p=c[d][1].sort(Zm);h.next.push({type:c[d][0],next:a[p.join(",")]||l(p)})}return h}}(function(s){let a=[[]];return c(h(s,0),l()),a;function l(){return a.push([])-1}function u(d,p,f){let m={term:f,to:p};return a[d].push(m),m}function c(d,p){d.forEach(f=>f.to=p)}function h(d,p){if(d.type=="choice")return d.exprs.reduce((f,m)=>f.concat(h(m,p)),[]);if(d.type!="seq"){if(d.type=="star"){let f=l();return u(p,f),c(h(d.expr,f),f),[u(f)]}if(d.type=="plus"){let f=l();return c(h(d.expr,p),f),c(h(d.expr,f),f),[u(f)]}if(d.type=="opt")return[u(p)].concat(h(d.expr,p));if(d.type=="range"){let f=p;for(let m=0;m<d.min;m++){let E=l();c(h(d.expr,f),E),f=E}if(d.max==-1)c(h(d.expr,f),f);else for(let m=d.min;m<d.max;m++){let E=l();u(f,E),c(h(d.expr,f),E),f=E}return[u(f)]}if(d.type=="name")return[u(p,void 0,d.value)];throw new Error("Unknown expr type")}for(let f=0;;f++){let m=h(d.exprs[f],p);if(f==d.exprs.length-1)return m;c(m,p=l())}}}(i));return function(s,a){for(let l=0,u=[s];l<u.length;l++){let c=u[l],h=!c.validEnd,d=[];for(let p=0;p<c.next.length;p++){let{type:f,next:m}=c.next[p];d.push(f.name),!h||f.isText||f.hasRequiredAttrs()||(h=!1),u.indexOf(m)==-1&&u.push(m)}h&&a.err("Only non-generatable nodes ("+d.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 X.from(a.map(u=>u.createAndFill()));for(let u=0;u<s.next.length;u++){let{type:c,next:h}=s.next[u];if(!c.isText&&!c.hasRequiredAttrs()&&i.indexOf(h)==-1){i.push(h);let d=o(h,a.concat(c));if(d)return d}}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
+ `)}}Mr.empty=new Mr(!0);class iS{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 Jm(t){let e=[];do e.push(oS(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function oS(t){let e=[];do e.push(sS(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function sS(t){let e=function(n){if(n.eat("(")){let r=Jm(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=aS(t,e)}return e}function $d(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function aS(t,e){let n=$d(t),r=n;return t.eat(",")&&(r=t.next!="}"?$d(t):-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function Zm(t,e){return e-t}function Vd(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(Zm)}function Qm(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 eE(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 tE(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 nE(t,e){let n=Object.create(null);if(e)for(let r in e)n[r]=new lS(t,r,e[r]);return n}let zd=class rE{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=nE(e,r.attrs),this.defaultAttrs=Qm(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==Mr.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:eE(this.attrs,e)}create(e=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Nr(this,this.computeAttrs(e),X.from(n),ge.setFrom(r))}createChecked(e=null,n,r){return n=X.from(n),this.checkContent(n),new Nr(this,this.computeAttrs(e),n,ge.setFrom(r))}createAndFill(e=null,n,r){if(e=this.computeAttrs(e),(n=X.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(X.empty,!0);return o?new Nr(this,e,n.append(o),ge.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){tE(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:ge.none:e}static compile(e,n){let r=Object.create(null);e.forEach((o,s)=>r[o]=new rE(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 lS{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 ma{constructor(e,n,r,i){this.name=e,this.rank=n,this.schema=r,this.spec=i,this.attrs=nE(e,i.attrs),this.excluded=null;let o=Qm(this.attrs);this.instance=o?new ge(this,o):null}create(e=null){return!e&&this.instance?this.instance:new ge(this,eE(this.attrs,e))}static compile(e,n){let r=Object.create(null),i=0;return e.forEach((o,s)=>r[o]=new ma(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){tE(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}function Yd(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 Ao{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 Xd(this,n,!1);return r.addAll(e,ge.none,n.from,n.to),r.finish()}parseSlice(e,n={}){let r=new Xd(this,n,!0);return r.addAll(e,ge.none,n.from,n.to),J.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(uS(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=Kd(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=Kd(s)),s.node||s.ignore||s.mark||(s.node=i)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new Ao(e,Ao.schemaRules(e)))}}const iE={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},cS={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Gd={ol:!0,ul:!0};function Wd(t,e,n){return e!=null?(e?1:0)|(e==="full"?2:0):t&&t.whitespace=="pre"?3:-5&n}class Va{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=ge.none,this.match=o||(4&s?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(X.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=X.from(this.content);return!e&&this.match&&(n=n.append(this.match.fillBefore(X.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&&!iE.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class Xd{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=Wd(null,n.preserveWhitespace,0)|(r?4:0);i=o?new Va(o.type,o.attrs,ge.none,!0,n.topMatch||o.type.contentMatch,s):new Va(r?null:e.schema.topNodeType,null,ge.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();Gd.hasOwnProperty(a)&&this.parser.normalizeLists&&function(u){for(let c=u.firstChild,h=null;c;c=c.nextSibling){let d=c.nodeType==1?c.nodeName.toLowerCase():null;d&&Gd.hasOwnProperty(d)&&h?(h.appendChild(c),c=h):d=="li"?h=c:d&&(h=null)}}(e);let l=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(s=this.parser.matchTag(e,this,r));e:if(l?l.ignore:cS.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(iE.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 h=l&&l.skip?n:this.readStyles(e,n);h&&this.addAll(e,h),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=ge.none;for(let a of i.concat(e.marks))(o.type?o.type.allowsMarkType(a.type):qd(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=Wd(e,o,s.options);4&s.options&&s.content.length==0&&(a|=4);let l=ge.none;return r=r.filter(u=>!(s.type?s.type.allowsMarkType(u.type):qd(u.type,e))||(l=u.addToSet(l),!1)),this.nodes.push(new Va(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 uS(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function Kd(t){let e={};for(let n in t)e[n]=t[n];return e}function qd(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 Pi{constructor(e,n){this.nodes=e,this.marks=n}serializeFragment(e,n={},r){r||(r=za(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}=ms(za(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&&ms(za(r),i(e,n),null,e.attrs)}static renderSpec(e,n,r=null,i){return ms(e,n,r,i)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new Pi(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=Jd(e.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(e){return Jd(e.marks)}}function Jd(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function za(t){return t.document||window.document}const Zd=new WeakMap;function dS(t){let e=Zd.get(t);return e===void 0&&Zd.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 ms(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=dS(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 h in u)if(u[h]!=null){let d=h.indexOf(" ");d>0?l.setAttributeNS(h.slice(0,d),h.slice(d+1),u[h]):h=="style"&&l.style?l.style.cssText=u[h]:l.setAttribute(h,u[h])}}for(let h=c;h<e.length;h++){let d=e[h];if(d===0){if(h<e.length-1||h>c)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}{let{dom:p,contentDOM:f}=ms(t,d,n,r);if(l.appendChild(p),f){if(s)throw new RangeError("Multiple content holes");s=f}}}return{dom:l,contentDOM:s}}const oE=Math.pow(2,16);function hS(t,e){return t+e*oE}function Qd(t){return 65535&t}class Kl{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 xt{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&xt.empty)return xt.empty}recover(e){let n=0,r=Qd(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))/oE}(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],h=l+u;if(e<=h){let d=l+i+((u?e==l?-1:e==h?1:n:n)<0?0:c);if(r)return d;let p=e==(n<0?l:h)?null:hS(a/3,e-l),f=e==l?2:e==h?1:4;return(n<0?e!=l:e!=h)&&(f|=8),new Kl(d,f,p)}i+=c-u}return r?e+i:new Kl(e+i,0,null)}touches(e,n){let r=0,i=Qd(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 xt(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?xt.empty:new xt(e<0?[0,-e,0]:[0,0,e])}}xt.empty=new xt([]);class go{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 go(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 go;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 Kl(e,i,null)}}const Ya=Object.create(null);class mt{getMap(){return xt.empty}merge(e){return null}static fromJSON(e,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=Ya[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 Ya)throw new RangeError("Duplicate use of step JSON ID "+e);return Ya[e]=n,n.prototype.jsonID=e,n}}class ze{constructor(e,n){this.doc=e,this.failed=n}static ok(e){return new ze(e,null)}static fail(e){return new ze(null,e)}static fromReplace(e,n,r,i){try{return ze.ok(e.replace(n,r,i))}catch(o){if(o instanceof Ms)return ze.fail(o.message);throw o}}}function ou(t,e,n){let r=[];for(let i=0;i<t.childCount;i++){let o=t.child(i);o.content.size&&(o=o.copy(ou(o.content,e,o))),o.isInline&&(o=e(o,n,i)),r.push(o)}return X.fromArray(r)}class Zn extends mt{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 J(ou(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 ze.fromReplace(e,this.from,this.to,o)}invert(){return new pn(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 Zn(n.pos,r.pos,this.mark)}merge(e){return e instanceof Zn&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Zn(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 Zn(n.from,n.to,e.markFromJSON(n.mark))}}mt.jsonID("addMark",Zn);class pn extends mt{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 J(ou(n.content,i=>i.mark(this.mark.removeFromSet(i.marks)),e),n.openStart,n.openEnd);return ze.fromReplace(e,this.from,this.to,r)}invert(){return new Zn(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 pn(n.pos,r.pos,this.mark)}merge(e){return e instanceof pn&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new pn(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 pn(n.from,n.to,e.markFromJSON(n.mark))}}mt.jsonID("removeMark",pn);class Qn extends mt{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return ze.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return ze.fromReplace(e,this.pos,this.pos+1,new J(X.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 Qn(this.pos,n.marks[i]);return new Qn(this.pos,this.mark)}}return new Pr(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Qn(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 Qn(n.pos,e.markFromJSON(n.mark))}}mt.jsonID("addNodeMark",Qn);class Pr extends mt{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return ze.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return ze.fromReplace(e,this.pos,this.pos+1,new J(X.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);return n&&this.mark.isInSet(n.marks)?new Qn(this.pos,this.mark):this}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Pr(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 Pr(n.pos,e.markFromJSON(n.mark))}}mt.jsonID("removeNodeMark",Pr);class at extends mt{constructor(e,n,r,i=!1){super(),this.from=e,this.to=n,this.slice=r,this.structure=i}apply(e){return this.structure&&ql(e,this.from,this.to)?ze.fail("Structure replace would overwrite content"):ze.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new xt([this.from,this.to-this.from,this.slice.size])}invert(e){return new at(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 at(n.pos,Math.max(n.pos,r.pos),this.slice,this.structure)}merge(e){if(!(e instanceof at)||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?J.empty:new J(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new at(e.from,this.to,n,this.structure)}}{let n=this.slice.size+e.slice.size==0?J.empty:new J(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new at(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 at(n.from,n.to,J.fromJSON(e,n.slice),!!n.structure)}}mt.jsonID("replace",at);class Ft extends mt{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&&(ql(e,this.from,this.gapFrom)||ql(e,this.gapTo,this.to)))return ze.fail("Structure gap-replace would overwrite content");let n=e.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return ze.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?ze.fromReplace(e,this.from,this.to,r):ze.fail("Content does not fit in gap")}getMap(){return new xt([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 Ft(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 Ft(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 Ft(n.from,n.to,n.gapFrom,n.gapTo,J.fromJSON(e,n.slice),n.insert,!!n.structure)}}function ql(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 Ga(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,h=r.matchType(u.type);if(h){r=h;for(let d=0;d<u.marks.length;d++)n.allowsMarkType(u.marks[d].type)||t.step(new pn(a,c,u.marks[d]));if(i&&u.isText&&n.whitespace!="pre"){let d,p,f=/\r?\n|\r/g;for(;d=f.exec(u.text);)p||(p=new J(X.from(n.schema.text(" ",n.allowedMarks(u.marks))),0,0)),s.push(new at(a+d.index,a+d.index+d[0].length,p))}}else s.push(new at(a,c,J.empty));a=c}if(!r.validEnd){let l=r.fillBefore(X.empty,!0);t.replace(a,a,new J(l,0,0))}for(let l=s.length-1;l>=0;l--)t.step(s[l])}function pS(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function su(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||!pS(o,s,a))break;s&&(r=1),a<o.childCount&&(i=1)}return null}function eh(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 th(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 Es(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 h=i.node(u),d=i.index(u);if(h.type.spec.isolating)return!1;let p=h.content.cutByIndex(d,h.childCount),f=r&&r[c+1];f&&(p=p.replaceChild(0,f.type.create(f.attrs)));let m=r&&r[c]||h;if(!h.canReplace(d+1,h.childCount)||!m.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 nh(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 h=a.child(c),d=h.type==u?s.type.schema.nodes.text:h.type;if(l=l.matchType(d),!l||!s.type.allowsMarks(h.marks))return!1}return l.validEnd}(i,o))}(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function au(t,e,n=e,r=J.empty){if(e==n&&!r.size)return null;let i=t.resolve(e),o=t.resolve(n);return sE(i,o,r)?new at(e,n,r):new fS(i,o,r).fit()}function sE(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}mt.jsonID("replaceAround",Ft);class fS{constructor(e,n,r){this.$from=e,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=X.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=X.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 J(o,s,a);return e>-1?new Ft(r.pos,e,this.$to.pos,this.$to.end(),l,n):l.size||r.pos!=this.$to.pos?new at(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=Wa(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],h=null;if(n==1&&(s?c.matchType(s.type)||(h=c.fillBefore(X.from(s),!1)):o&&u.compatibleContent(o.type)))return{sliceDepth:r,frontierDepth:a,parent:o,inject:h};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=Wa(e,n);return!(!i.childCount||i.firstChild.isLeaf)&&(this.unplaced=new J(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=Wa(e,n);if(i.childCount<=1&&n>0){let o=e.size-n<=n+i.size;this.unplaced=new J(Yi(e,n-1,1),n-1,o?n-1:r)}else this.unplaced=new J(Yi(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 m=0;m<o.length;m++)this.openFrontierNode(o[m]);let s=this.unplaced,a=r?r.content:s.content,l=s.openStart-e,u=0,c=[],{match:h,type:d}=this.frontier[n];if(i){for(let m=0;m<i.childCount;m++)c.push(i.child(m));h=h.matchFragment(i)}let p=a.size+e-(s.content.size-s.openEnd);for(;u<a.childCount;){let m=a.child(u),E=h.matchType(m.type);if(!E)break;u++,(u>1||l==0||m.content.size)&&(h=E,c.push(aE(m.mark(d.allowedMarks(m.marks)),u==1?l:0,u==a.childCount?p:-1)))}let f=u==a.childCount;f||(p=-1),this.placed=Gi(this.placed,n,X.from(c)),this.frontier[n].match=h,f&&p<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let m=0,E=a;m<p;m++){let A=E.lastChild;this.frontier.push({type:A.type,match:A.contentMatchAt(A.childCount)}),E=A.content}this.unplaced=f?e==0?J.empty:new J(Yi(s.content,e-1,1),e-1,p<0?s.openEnd:e-1):new J(Yi(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||!Xa(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=Xa(e,n,i,r,o);if(s){for(let a=n-1;a>=0;a--){let{match:l,type:u}=this.frontier[a],c=Xa(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=Gi(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=Gi(this.placed,this.depth,X.from(e.create(n,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let e=this.frontier.pop().match.fillBefore(X.empty,!0);e.childCount&&(this.placed=Gi(this.placed,this.frontier.length,e))}}function Yi(t,e,n){return e==0?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(Yi(t.firstChild.content,e-1,n)))}function Gi(t,e,n){return e==0?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(Gi(t.lastChild.content,e-1,n)))}function Wa(t,e){for(let n=0;n<e;n++)t=t.firstChild.content;return t}function aE(t,e,n){if(e<=0)return t;let r=t.content;return e>1&&(r=r.replaceChild(0,aE(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(X.empty,!0)))),t.copy(r)}function Xa(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 h=c;h<u.childCount;h++)if(!l.allowsMarks(u.child(h).marks))return!0;return!1}(n,o.content,s)?a:null}function mS(t){return t.spec.defining||t.spec.definingForContent}function lE(t,e,n,r,i){if(e<n){let o=t.firstChild;t=t.replaceChild(0,o.copy(lE(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(X.empty,!0))}return t}function rh(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 pi extends mt{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 ze.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 ze.fromReplace(e,this.pos,this.pos+1,new J(X.from(i),0,n.isLeaf?0:1))}getMap(){return xt.empty}invert(e){return new pi(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 pi(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 pi(n.pos,n.attr,n.value)}}mt.jsonID("attr",pi);class So extends mt{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 ze.ok(r)}getMap(){return xt.empty}invert(e){return new So(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 So(n.attr,n.value)}}mt.jsonID("docAttr",So);let Wi=class extends Error{};Wi=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n},(Wi.prototype=Object.create(Error.prototype)).constructor=Wi,Wi.prototype.name="TransformError";class ES{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new go}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let n=this.maybeStep(e);if(n.failed)throw new Wi(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=J.empty){let i=au(this.doc,e,n,r);return i&&this.step(i),this}replaceWith(e,n,r){return this.replace(e,n,new J(X.from(r),0,0))}delete(e,n){return this.replace(e,n,J.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(sE(l,u,a))return i.step(new at(o,s,a));let c=rh(l,u);c[c.length-1]==0&&c.pop();let h=-(l.depth+1);c.unshift(h);for(let E=l.depth,A=l.pos-1;E>0;E--,A--){let _=l.node(E).type.spec;if(_.defining||_.definingAsContext||_.isolating)break;c.indexOf(E)>-1?h=E:l.before(E)==A&&c.splice(1,0,-E)}let d=c.indexOf(h),p=[],f=a.openStart;for(let E=a.content,A=0;;A++){let _=E.firstChild;if(p.push(_),A==a.openStart)break;E=_.content}for(let E=f-1;E>=0;E--){let A=p[E],_=mS(A.type);if(_&&!A.sameMarkup(l.node(Math.abs(h)-1)))f=E;else if(_||!A.type.isTextblock)break}for(let E=a.openStart;E>=0;E--){let A=(E+f+1)%(a.openStart+1),_=p[A];if(_)for(let g=0;g<c.length;g++){let O=c[(g+d)%c.length],D=!0;O<0&&(D=!1,O=-O);let R=l.node(O-1),T=l.index(O-1);if(R.canReplaceWith(T,T,_.type,_.marks))return i.replace(l.before(O),D?u.after(O):s,new J(lE(a.content,0,a.openStart,A),A,a.openEnd))}}let m=i.steps.length;for(let E=c.length-1;E>=0&&(i.replace(o,s,a),!(i.steps.length>m));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,h){let d=u.resolve(c);if(d.parent.canReplaceWith(d.index(),d.index(),h))return c;if(d.parentOffset==0)for(let p=d.depth-1;p>=0;p--){let f=d.index(p);if(d.node(p).canReplaceWith(f,f,h))return d.before(p+1);if(f>0)return null}if(d.parentOffset==d.parent.content.size)for(let p=d.depth-1;p>=0;p--){let f=d.indexAfter(p);if(d.node(p).canReplaceWith(f,f,h))return d.after(p+1);if(f<d.node(p).childCount)return null}return null}(i.doc,o,a.type);l!=null&&(o=s=l)}i.replaceRange(o,s,new J(X.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=rh(s,a);for(let u=0;u<l.length;u++){let c=l[u],h=u==l.length-1;if(h&&c==0||s.node(c).type.contentMatch.validEnd)return r.delete(s.start(c),a.end(c));if(c>0&&(h||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),h=u,d=c,p=X.empty,f=0;for(let A=l,_=!1;A>o;A--)_||s.index(A)>0?(_=!0,p=X.from(s.node(A).copy(p)),f++):h--;let m=X.empty,E=0;for(let A=l,_=!1;A>o;A--)_||a.after(A+1)<a.end(A)?(_=!0,m=X.from(a.node(A).copy(m)),E++):d++;r.step(new Ft(h,d,u,c,new J(p.append(m),f,E),p.size-f,!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",f=!!u.contentMatch.matchType(a);p&&!f?s=!1:!p&&f&&(s=!0)}let c=r.steps.length;if(s===!1){let p=r.doc.resolve(i+o);th(r,p.node(),p.before(),c)}u.inlineContent&&Ga(r,i+o-1,u,l.node().contentMatchAt(l.index()),s==null);let h=r.mapping.slice(c),d=h.map(i-o);if(r.step(new at(d,h.map(i+o,-1),J.empty,!0)),s===!0){let p=r.doc.resolve(d);eh(r,p.node(),p.before(),r.steps.length)}}(this,e,n),this}wrap(e,n){return function(r,i,o){let s=X.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=X.from(o[u].type.create(o[u].attrs,s))}let a=i.start,l=i.end;r.step(new Ft(a,l,a,l,new J(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,(h,d)=>{let p=typeof u=="function"?u(h):u;if(h.isTextblock&&!h.hasMarkup(l,p)&&function(f,m,E){let A=f.resolve(m),_=A.index();return A.parent.canReplaceWith(_,_+1,E)}(o.doc,o.mapping.slice(c).map(d),l)){let f=null;if(l.schema.linebreakReplacement){let _=l.whitespace=="pre",g=!!l.contentMatch.matchType(l.schema.linebreakReplacement);_&&!g?f=!1:!_&&g&&(f=!0)}f===!1&&th(o,h,d,c),Ga(o,o.mapping.slice(c).map(d,1),l,void 0,f===null);let m=o.mapping.slice(c),E=m.map(d,1),A=m.map(d+h.nodeSize,1);return o.step(new Ft(E,A,E+1,A-1,new J(X.from(l.create(p,null,h.marks)),0,0),1,!0)),f===!0&&eh(o,h,d,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 h=a.create(l,null,u||c.marks);if(c.isLeaf)return o.replaceWith(s,s+c.nodeSize,h);if(!a.validContent(c.content))throw new RangeError("Invalid content for node type "+a.name);o.step(new Ft(s,s+c.nodeSize,s+1,s+c.nodeSize-1,new J(X.from(h),0,0),1,!0))}(this,e,n,r,i),this}setNodeAttribute(e,n,r){return this.step(new pi(e,n,r)),this}setDocAttribute(e,n){return this.step(new So(e,n)),this}addNodeMark(e,n){return this.step(new Qn(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 ge)n.isInSet(r.marks)&&this.step(new Pr(e,n));else{let i,o=r.marks,s=[];for(;i=n.isInSet(o);)s.push(new Pr(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=X.empty,c=X.empty;for(let h=l.depth,d=l.depth-s,p=s-1;h>d;h--,p--){u=X.from(l.node(h).copy(u));let f=a&&a[p];c=X.from(f?f.type.create(f.attrs,c):l.node(h).copy(c))}i.step(new at(o,o,new J(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=[],h=[];i.doc.nodesBetween(o,s,(d,p,f)=>{if(!d.isInline)return;let m=d.marks;if(!a.isInSet(m)&&f.type.allowsMarkType(a.type)){let E=Math.max(p,o),A=Math.min(p+d.nodeSize,s),_=a.addToSet(m);for(let g=0;g<m.length;g++)m[g].isInSet(_)||(l&&l.to==E&&l.mark.eq(m[g])?l.to=A:c.push(l=new pn(E,A,m[g])));u&&u.to==E?u.to=A:h.push(u=new Zn(E,A,a))}}),c.forEach(d=>i.step(d)),h.forEach(d=>i.step(d))}(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,h)=>{if(!c.isInline)return;u++;let d=null;if(a instanceof ma){let p,f=c.marks;for(;p=a.isInSet(f);)(d||(d=[])).push(p),f=p.removeFromSet(f)}else a?a.isInSet(c.marks)&&(d=[a]):d=c.marks;if(d&&d.length){let p=Math.min(h+c.nodeSize,s);for(let f=0;f<d.length;f++){let m,E=d[f];for(let A=0;A<l.length;A++){let _=l[A];_.step==u-1&&E.eq(l[A].style)&&(m=_)}m?(m.to=p,m.step=u):l.push({style:E,from:Math.max(h,o),to:p,step:u})}}}),l.forEach(c=>i.step(new pn(c.from,c.to,c.style)))}(this,e,n,r),this}clearIncompatible(e,n,r){return Ga(this,e,n,r),this}}const Ka=Object.create(null);class Ae{constructor(e,n,r){this.$anchor=e,this.$head=n,this.ranges=r||[new _S(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=J.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?J.empty:n),a==0&&sh(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),sh(e,r,n.isInline?-1:1))}}static findFrom(e,n,r=!1){let i=e.parent.inlineContent?new Ee(e):ei(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?ei(e.node(0),e.node(o),e.before(o+1),e.index(o),n,r):ei(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 Bt(e.node(0))}static atStart(e){return ei(e,e,0,0,1)||new Bt(e)}static atEnd(e){return ei(e,e,e.content.size,e.childCount,-1)||new Bt(e)}static fromJSON(e,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=Ka[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 Ka)throw new RangeError("Duplicate use of selection JSON ID "+e);return Ka[e]=n,n.prototype.jsonID=e,n}getBookmark(){return Ee.between(this.$anchor,this.$head).getBookmark()}}Ae.prototype.visible=!0;class _S{constructor(e,n){this.$from=e,this.$to=n}}let ih=!1;function oh(t){ih||t.parent.inlineContent||(ih=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class Ee extends Ae{constructor(e,n=e){oh(e),oh(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 Ae.near(r);let i=e.resolve(n.map(this.anchor));return new Ee(i.parent.inlineContent?i:r,r)}replace(e,n=J.empty){if(super.replace(e,n),n==J.empty){let r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}eq(e){return e instanceof Ee&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new Ea(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 Ee(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=Ae.findFrom(n,r,!0)||Ae.findFrom(n,-r,!0);if(!o)return Ae.near(n,r);n=o.$head}return e.parent.inlineContent||(i==0||(e=(Ae.findFrom(e,-r,!0)||Ae.findFrom(e,r,!0)).$anchor).pos<n.pos!=i<0)&&(e=n),new Ee(e,n)}}Ae.jsonID("text",Ee);class Ea{constructor(e,n){this.anchor=e,this.head=n}map(e){return new Ea(e.map(this.anchor),e.map(this.head))}resolve(e){return Ee.between(e.resolve(this.anchor),e.resolve(this.head))}}class re extends Ae{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?Ae.near(o):new re(o)}content(){return new J(X.from(this.node),0,0)}eq(e){return e instanceof re&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new lu(this.anchor)}static fromJSON(e,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new re(e.resolve(n.anchor))}static create(e,n){return new re(e.resolve(n))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}re.prototype.visible=!1,Ae.jsonID("node",re);class lu{constructor(e){this.anchor=e}map(e){let{deleted:n,pos:r}=e.mapResult(this.anchor);return n?new Ea(r,r):new lu(r)}resolve(e){let n=e.resolve(this.anchor),r=n.nodeAfter;return r&&re.isSelectable(r)?new re(n):Ae.near(n)}}class Bt extends Ae{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,n=J.empty){if(n==J.empty){e.delete(0,e.doc.content.size);let r=Ae.atStart(e.doc);r.eq(e.selection)||e.setSelection(r)}else super.replace(e,n)}toJSON(){return{type:"all"}}static fromJSON(e){return new Bt(e)}map(e){return new Bt(e)}eq(e){return e instanceof Bt}getBookmark(){return AS}}Ae.jsonID("all",Bt);const AS={map(){return this},resolve:t=>new Bt(t)};function ei(t,e,n,r,i,o=!1){if(e.inlineContent)return Ee.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&&re.isSelectable(a))return re.create(t,n-(i<0?a.nodeSize:0))}else{let l=ei(t,a,n+i,i<0?a.childCount:0,i,o);if(l)return l}n+=a.nodeSize*i}return null}function sh(t,e,n){let r=t.steps.length-1;if(r<e)return;let i,o=t.steps[r];(o instanceof at||o instanceof Ft)&&(t.mapping.maps[r].forEach((s,a,l,u)=>{i==null&&(i=u)}),t.setSelection(Ae.near(t.doc.resolve(i),n)))}class gS extends ES{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 ge.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)||ge.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(Ae.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 ah(t,e){return e&&t?t.bind(e):t}class Xi{constructor(e,n,r){this.name=e,this.init=ah(n.init,r),this.apply=ah(n.apply,r)}}const SS=[new Xi("doc",{init:t=>t.doc||t.schema.topNodeType.createAndFill(),apply:t=>t.doc}),new Xi("selection",{init:(t,e)=>t.selection||Ae.atStart(e.doc),apply:t=>t.selection}),new Xi("storedMarks",{init:t=>t.storedMarks||null,apply:(t,e,n,r)=>r.selection.$cursor?t.storedMarks:null}),new Xi("scrollToSelection",{init:()=>0,apply:(t,e)=>t.scrolledIntoView?e+1:e})];class qa{constructor(e,n){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=SS.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 Xi(r.key,r.spec.state,r))})}}class ai{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 h=0;h<this.config.plugins.length;h++)i.push(h<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 ai(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 gS(this)}static create(e){let n=new qa(e.doc?e.doc.type.schema:e.schema,e.plugins),r=new ai(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 qa(this.schema,e.plugins),r=n.fields,i=new ai(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 qa(e.schema,e.plugins),o=new ai(i);return i.fields.forEach(s=>{if(s.name=="doc")o.doc=Nr.fromJSON(e.schema,n.doc);else if(s.name=="selection")o.selection=Ae.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 cE(t,e,n){for(let r in t){let i=t[r];i instanceof Function?i=i.bind(e):r=="handleDOMEvents"&&(i=cE(i,e,{})),n[r]=i}return n}class _a{constructor(e){this.spec=e,this.props={},e.props&&cE(e.props,this,this.props),this.key=e.key?e.key.key:uE("plugin")}getState(e){return e[this.key]}}const Ja=Object.create(null);function uE(t){return t in Ja?t+"$"+ ++Ja[t]:(Ja[t]=0,t+"$")}class Aa{constructor(e="key"){this.key=uE(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const lt=function(t){for(var e=0;;e++)if(!(t=t.previousSibling))return e},Ii=function(t){let e=t.assignedSlot||t.parentNode;return e&&e.nodeType==11?e.host:e};let Jl=null;const kn=function(t,e,n){let r=Jl||(Jl=document.createRange());return r.setEnd(t,n==null?t.nodeValue.length:n),r.setStart(t,e||0),r},xr=function(t,e,n,r){return n&&(lh(t,e,n,r,-1)||lh(t,e,n,r,1))},OS=/^(img|br|input|textarea|hr)$/i;function lh(t,e,n,r,i){for(var o;;){if(t==n&&e==r)return!0;if(e==(i<0?0:Gt(t))){let s=t.parentNode;if(!s||s.nodeType!=1||Oo(t)||OS.test(t.nodeName)||t.contentEditable=="false")return!1;e=lt(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?Gt(t):0}}}}function Gt(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function Oo(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 ga=function(t){return t.focusNode&&xr(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function Dr(t,e){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}const Sn=typeof navigator!="undefined"?navigator:null,ch=typeof document!="undefined"?document:null,cr=Sn&&Sn.userAgent||"",Zl=/Edge\/(\d+)/.exec(cr),dE=/MSIE \d/.exec(cr),Ql=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(cr),bt=!!(dE||Ql||Zl),rr=dE?document.documentMode:Ql?+Ql[1]:Zl?+Zl[1]:0,Kt=!bt&&/gecko\/(\d+)/i.test(cr);Kt&&(/Firefox\/(\d+)/.exec(cr)||[0,0])[1];const ec=!bt&&/Chrome\/(\d+)/.exec(cr),et=!!ec,hE=ec?+ec[1]:0,ct=!bt&&!!Sn&&/Apple Computer/.test(Sn.vendor),yi=ct&&(/Mobile\/\w+/.test(cr)||!!Sn&&Sn.maxTouchPoints>2),Yt=yi||!!Sn&&/Mac/.test(Sn.platform),pE=!!Sn&&/Win/.test(Sn.platform),Mn=/Android \d/.test(cr),Fo=!!ch&&"webkitFontSmoothing"in ch.documentElement.style,DS=Fo?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function vS(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 Nn(t,e){return typeof t=="number"?t:t[e]}function TS(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 uh(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=Ii(s);continue}let a=s,l=a==o.body,u=l?vS(o):TS(a),c=0,h=0;if(e.top<u.top+Nn(r,"top")?h=-(u.top-e.top+Nn(i,"top")):e.bottom>u.bottom-Nn(r,"bottom")&&(h=e.bottom-e.top>u.bottom-u.top?e.top+Nn(i,"top")-u.top:e.bottom-u.bottom+Nn(i,"bottom")),e.left<u.left+Nn(r,"left")?c=-(u.left-e.left+Nn(i,"left")):e.right>u.right-Nn(r,"right")&&(c=e.right-u.right+Nn(i,"right")),c||h)if(l)o.defaultView.scrollBy(c,h);else{let p=a.scrollLeft,f=a.scrollTop;h&&(a.scrollTop+=h),c&&(a.scrollLeft+=c);let m=a.scrollLeft-p,E=a.scrollTop-f;e={left:e.left-m,top:e.top-E,right:e.right-m,bottom:e.bottom-E}}let d=l?"fixed":getComputedStyle(s).position;if(/^(fixed|sticky)$/.test(d))break;s=d=="absolute"?s.offsetParent:Ii(s)}}function dh(t){let e=[],n=t.ownerDocument;for(let r=t;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),t!=n);r=Ii(r));return e}function hh(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 Jr=null;function fE(t,e){let n,r,i,o,s=2e8,a=0,l=e.top,u=e.top;for(let c=t.firstChild,h=0;c;c=c.nextSibling,h++){let d;if(c.nodeType==1)d=c.getClientRects();else{if(c.nodeType!=3)continue;d=kn(c).getClientRects()}for(let p=0;p<d.length;p++){let f=d[p];if(f.top<=l&&f.bottom>=u){l=Math.max(f.bottom,l),u=Math.min(f.top,u);let m=f.left>e.left?f.left-e.left:f.right<e.left?e.left-f.right:0;if(m<s){n=c,s=m,r=m&&n.nodeType==3?{left:f.right<e.left?f.right:f.left,top:e.top}:e,c.nodeType==1&&m&&(a=h+(e.left>=(f.left+f.right)/2?1:0));continue}}else f.top>e.top&&!i&&f.left<=e.left&&f.right>=e.left&&(i=c,o={left:Math.max(f.left,Math.min(f.right,e.left)),top:f.top});!n&&(e.left>=f.right&&e.top>=f.top||e.left>=f.left&&e.top>=f.bottom)&&(a=h+1)}}return!n&&i&&(n=i,r=o,s=0),n&&n.nodeType==3?function(c,h){let d,p=c.nodeValue.length,f=document.createRange();for(let m=0;m<p;m++){f.setEnd(c,m+1),f.setStart(c,m);let E=Yn(f,1);if(E.top!=E.bottom&&cu(h,E)){d={node:c,offset:m+(h.left>=(E.left+E.right)/2?1:0)};break}}return f.detach(),d||{node:c,offset:0}}(n,r):!n||s&&n.nodeType==1?{node:t,offset:a}:fE(n,r)}function cu(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function mE(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(cu(e,u))return mE(s,e,u)}}if((o=(o+1)%r)==i)break}return t}function RS(t,e){let n,r=t.dom.ownerDocument,i=0,o=function(u,c,h){if(u.caretPositionFromPoint)try{let d=u.caretPositionFromPoint(c,h);if(d)return{node:d.offsetNode,offset:Math.min(Gt(d.offsetNode),d.offset)}}catch(d){}if(u.caretRangeFromPoint){let d=u.caretRangeFromPoint(c,h);if(d)return{node:d.startContainer,offset:Math.min(Gt(d.startContainer),d.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(!cu(e,u)||(a=mE(t.dom,e,u),!a))return null}if(ct)for(let u=a;n&&u;u=Ii(u))u.draggable&&(n=void 0);if(a=function(u,c){let h=u.parentNode;return h&&/^li$/i.test(h.nodeName)&&c.left<u.getBoundingClientRect().left?h:u}(a,e),n){if(Kt&&n.nodeType==1&&(i=Math.min(i,n.childNodes.length),i<n.childNodes.length)){let c,h=n.childNodes[i];h.nodeName=="IMG"&&(c=h.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,h,d,p){let f=-1;for(let m=h,E=!1;m!=c.dom;){let A,_=c.docView.nearestDesc(m,!0);if(!_)return null;if(_.dom.nodeType==1&&(_.node.isBlock&&_.parent||!_.contentDOM)&&((A=_.dom.getBoundingClientRect()).width||A.height)&&(_.node.isBlock&&_.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(_.dom.nodeName)&&(!E&&A.left>p.left||A.top>p.top?f=_.posBefore:(!E&&A.right<p.left||A.bottom<p.top)&&(f=_.posAfter),E=!0),!_.contentDOM&&f<0&&!_.node.isText))return(_.node.isBlock?p.top<(A.top+A.bottom)/2:p.left<(A.left+A.right)/2)?_.posBefore:_.posAfter;m=_.dom.parentNode}return f>-1?f:c.docView.posFromDOM(h,d,-1)}(t,n,i,e))}s==null&&(s=function(u,c,h){let{node:d,offset:p}=fE(c,h),f=-1;if(d.nodeType==1&&!d.firstChild){let m=d.getBoundingClientRect();f=m.left!=m.right&&h.left>(m.left+m.right)/2?1:-1}return u.docView.posFromDOM(d,p,f)}(t,a,e));let l=t.docView.nearestDesc(a,!0);return{pos:s,inside:l?l.posAtStart-l.border:-1}}function ph(t){return t.top<t.bottom||t.left<t.right}function Yn(t,e){let n=t.getClientRects();if(n.length){let r=n[e<0?0:n.length-1];if(ph(r))return r}return Array.prototype.find.call(n,ph)||t.getBoundingClientRect()}const CS=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function EE(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||!CS.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++,ji(Yn(kn(r,a,l),u),u<0)}{let a=Yn(kn(r,i,i),n);if(Kt&&i&&/\s/.test(r.nodeValue[i-1])&&i<r.nodeValue.length){let l=Yn(kn(r,i-1,i-1),-1);if(l.top==a.top){let u=Yn(kn(r,i,i+1),-1);if(u.top!=a.top)return ji(u,u.left<l.left)}}return a}}if(!t.state.doc.resolve(e-(o||0)).parent.inlineContent){if(o==null&&i&&(n<0||i==Gt(r))){let a=r.childNodes[i-1];if(a.nodeType==1)return Za(a.getBoundingClientRect(),!1)}if(o==null&&i<Gt(r)){let a=r.childNodes[i];if(a.nodeType==1)return Za(a.getBoundingClientRect(),!0)}return Za(r.getBoundingClientRect(),n>=0)}if(o==null&&i&&(n<0||i==Gt(r))){let a=r.childNodes[i-1],l=a.nodeType==3?kn(a,Gt(a)-(s?0:1)):a.nodeType!=1||a.nodeName=="BR"&&a.nextSibling?null:a;if(l)return ji(Yn(l,1),!1)}if(o==null&&i<Gt(r)){let a=r.childNodes[i];for(;a.pmViewDesc&&a.pmViewDesc.ignoreForCoords;)a=a.nextSibling;let l=a?a.nodeType==3?kn(a,0,s?0:1):a.nodeType==1?a:null:null;if(l)return ji(Yn(l,-1),!0)}return ji(Yn(r.nodeType==3?kn(r):r,-n),n>=0)}function ji(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 Za(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 fh(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 IS=/[\u0590-\u08ac]/;let mh=null,Eh=null,_h=!1;function yS(t,e,n){return mh==e&&Eh==n?_h:(mh=e,Eh=n,_h=n=="up"||n=="down"?function(r,i,o){let s=i.selection,a=o=="up"?s.$from:s.$to;return fh(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=EE(r,a.pos,1);for(let c=l.firstChild;c;c=c.nextSibling){let h;if(c.nodeType==1)h=c.getClientRects();else{if(c.nodeType!=3)continue;h=kn(c,0,c.nodeValue.length).getClientRects()}for(let d=0;d<h.length;d++){let p=h[d];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?IS.test(s.parent.textContent)&&c.modify?fh(r,i,()=>{let{focusNode:h,focusOffset:d,anchorNode:p,anchorOffset:f}=r.domSelectionRange(),m=c.caretBidiLevel;c.modify("move",o,"character");let E=s.depth?r.docView.domAfterPos(s.before()):r.dom,{focusNode:A,focusOffset:_}=r.domSelectionRange(),g=A&&!E.contains(A.nodeType==1?A:A.parentNode)||h==A&&d==_;try{c.collapse(p,f),h&&(h!=p||d!=f)&&c.extend&&c.extend(h,d)}catch(O){}return m!=null&&(c.caretBidiLevel=m),g}):o=="left"||o=="backward"?l:u:s.pos==s.start()||s.pos==s.end()}(t,e,n))}class Ho{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>lt(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 AE){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 _E&&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?lt(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?lt(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 h=a;h>0;h--){let d=this.children[h-1];if(d.size&&d.dom.parentNode==this.contentDOM&&!d.emptyChildAt(1)){i=lt(d.dom)+1;break}e-=d.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 h=this.children[c];if(h.size&&h.dom.parentNode==this.contentDOM&&!h.emptyChildAt(-1)){o=lt(h.dom);break}n+=h.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,f=0;p<this.children.length;p++){let m=this.children[p],E=f+m.size;if(o>f&&s<E)return m.setSelection(e-f-m.border,n-f-m.border,r,i);f=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(),h=!1;if((Kt||ct)&&e==n){let{node:p,offset:f}=a;if(p.nodeType==3){if(h=!(!f||p.nodeValue[f-1]!=`
12
+ `),h&&f==p.nodeValue.length)for(let m,E=p;E;E=E.parentNode){if(m=E.nextSibling){m.nodeName=="BR"&&(a=l={node:m.parentNode,offset:lt(m)+1});break}let A=E.pmViewDesc;if(A&&A.node&&A.node.isBlock)break}}else{let m=p.childNodes[f-1];h=m&&(m.nodeName=="BR"||m.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||h&&ct)&&xr(a.node,a.offset,c.anchorNode,c.anchorOffset)&&xr(l.node,l.offset,c.focusNode,c.focusOffset))return;let d=!1;if((u.extend||e==n)&&(!h||!Kt)){u.collapse(a.node,a.offset);try{e!=n&&u.extend(l.node,l.offset),d=!0}catch(p){}}if(!d){if(e>n){let f=a;a=l,l=f}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 _E extends Ho{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 NS extends Ho{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 br extends Ho{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=Pi.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new br(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=br.create(this.parent,this.mark,!0,r),o=this.children,s=this.size;n<s&&(o=nc(o,n,s,r)),e>0&&(o=nc(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 ir extends Ho{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,h=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:h}=Pi.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));h||n.isText||c.nodeName=="BR"||(c.hasAttribute("contenteditable")||(c.contentEditable="false"),n.type.spec.draggable&&(c.draggable=!0));let d=c;return c=OE(c,r,n),u?a=new bS(e,n,r,i,c,h||null,d,u,o,s+1):n.isText?new Sa(e,n,r,i,c,d,o):new ir(e,n,r,i,c,h||null,d,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=()=>X.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)&&Fs(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 LS(this,s&&s.node,e);(function(u,c,h,d){let p=c.locals(u),f=0;if(p.length==0){for(let _=0;_<u.childCount;_++){let g=u.child(_);d(g,p,c.forChild(f,g),_),f+=g.nodeSize}return}let m=0,E=[],A=null;for(let _=0;;){let g,O,D,R;for(;m<p.length&&p[m].to==f;){let S=p[m++];S.widget&&(g?(O||(O=[g])).push(S):g=S)}if(g)if(O){O.sort(wS);for(let S=0;S<O.length;S++)h(O[S],_,!!A)}else h(g,_,!!A);if(A)R=-1,D=A,A=null;else{if(!(_<u.childCount))break;R=_,D=u.child(_++)}for(let S=0;S<E.length;S++)E[S].to<=f&&E.splice(S--,1);for(;m<p.length&&p[m].from<=f&&p[m].to>f;)E.push(p[m++]);let T=f+D.nodeSize;if(D.isText){let S=T;m<p.length&&p[m].from<S&&(S=p[m].from);for(let v=0;v<E.length;v++)E[v].to<S&&(S=E[v].to);S<T&&(A=D.cut(S-f),D=D.cut(0,S-f),T=S,R=-1)}else for(;m<p.length&&p[m].to<T;)m++;let I=D.isInline&&!D.isLeaf?E.filter(S=>!S.inline):E.slice();d(D,I,c.forChild(f,D),R),f=T}})(this.node,this.innerDeco,(u,c,h)=>{u.spec.marks?l.syncToMarks(u.spec.marks,r,e,c):u.type.side>=0&&!h&&l.syncToMarks(c==this.node.childCount?ge.none:this.node.child(c).marks,r,e,c),l.placeWidget(u,e,i)},(u,c,h,d)=>{let p;l.syncToMarks(u.marks,r,e,d),l.findNodeMatch(u,c,h,d)||a&&e.state.selection.from>i&&e.state.selection.to<i+u.nodeSize&&(p=l.findIndexWithChild(o.node))>-1&&l.updateNodeAt(u,c,h,p,e)||l.updateNextNode(u,c,h,e,d,i)||l.addNode(u,c,h,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),gE(this.contentDOM,this.children,e),yi&&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 Ee)||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,h){for(let d=0,p=0;d<l.childCount&&p<=h;){let f=l.child(d++),m=p;if(p+=f.nodeSize,!f.isText)continue;let E=f.text;for(;d<l.childCount;){let A=l.child(d++);if(p+=A.nodeSize,!A.isText)break;E+=A.text}if(p>=c){if(p>=h&&E.slice(h-u.length-m,h-m)==u)return h-u.length;let A=m<h?E.lastIndexOf(u,h-m-1):-1;if(A>=0&&A+u.length+m>=c)return m+A;if(c==h&&E.length>=h+u.length-m&&E.slice(h-m,h-m+u.length)==u)return h}}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 NS(this,o,n,i);e.input.compositionNodes.push(s),this.children=nc(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(Fs(e,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=SE(this.dom,this.nodeDOM,tc(this.outerDeco,this.node,n),tc(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){OE(r,e,t);let o=new ir(void 0,t,e,n,r,r,r,i,0);return o.contentDOM&&o.updateChildren(i,0),o}class Sa extends ir{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 Sa(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 AE extends Ho{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 ir{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 gE(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=gh(r),i=!0;r=r.nextSibling}else i=!0,t.insertBefore(a,r);if(s instanceof br){let l=r?r.previousSibling:t.lastChild;gE(s.contentDOM,s.children,n),r=l?l.nextSibling:t.firstChild}}for(;r;)r=gh(r),i=!0;i&&n.trackWrites==t&&(n.trackWrites=null)}const no=function(t){t&&(this.nodeName=t)};no.prototype=Object.create(null);const Tr=[new no];function tc(t,e,n){if(t.length==0)return Tr;let r=n?Tr[0]:new no,i=[r];for(let o=0;o<t.length;o++){let s=t[o].type.attrs;if(s){s.nodeName&&i.push(r=new no(s.nodeName));for(let a in s){let l=s[a];l!=null&&(n&&i.length==1&&i.push(r=new no(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 SE(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}kS(i,a||Tr[0],s)}return i}function kS(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 OE(t,e,n){return SE(t,t,Tr,tc(e,n,t.nodeType!=1))}function Fs(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 gh(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class LS{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 h;for(;;)if(a){let p=s.children[a-1];if(!(p instanceof br)){h=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 d=h.node;if(d){if(d!=i.child(l-1))break;--l,u.set(h,l),c.push(h)}}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 h=this.top.children[c];if(h.matchesMark(e[s])&&!this.isLocked(h.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=br.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 ir){let u=this.preMatch.matched.get(l);if(u!=null&&u!=o)return!1;let c,h=l.dom,d=this.isLocked(h)&&!(e.isText&&l.node&&l.node.isText&&l.nodeDOM.nodeValue==e.text&&l.dirty!=3&&Fs(n,l.outerDeco));if(!d&&l.update(e,n,r,i))return this.destroyBetween(this.index,a),l.dom!=h&&(this.changed=!0),this.index++,!0;if(!d&&(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)||!Fs(r,e.outerDeco)||!i.eq(e.innerDeco))return null;let a=ir.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=ir.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 _E(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 br;)n=e,e=n.children[n.children.length-1];(!e||!(e instanceof Sa)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((ct||et)&&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 AE(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 wS(t,e){return t.type.side-e.type.side}function nc(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 uu(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(ga(n)){for(a=s;i&&!i.node;)i=i.parent;let h=i.node;if(i&&h.isAtom&&re.isSelectable(h)&&i.parent&&(!h.isInline||!function(d,p,f){for(let m=p==0,E=p==Gt(d);m||E;){if(d==f)return!0;let A=lt(d);if(!(d=d.parentNode))return!1;m=m&&A==0,E=E&&A==Gt(d)}}(n.focusNode,n.focusOffset,i.dom))){let d=i.posBefore;l=new re(s==d?u:r.resolve(d))}}else{if(n instanceof t.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let h=s,d=s;for(let p=0;p<n.rangeCount;p++){let f=n.getRangeAt(p);h=Math.min(h,t.docView.posFromDOM(f.startContainer,f.startOffset,1)),d=Math.max(d,t.docView.posFromDOM(f.endContainer,f.endOffset,-1))}if(h<0)return null;[a,s]=d==t.state.selection.anchor?[d,h]:[h,d],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=du(t,c,u,e=="pointer"||t.state.selection.head<u.pos&&!o?1:-1)),l}function Sh(t){return t.editable?t.hasFocus():vE(t)&&document.activeElement&&document.activeElement.contains(t.dom)}function Fn(t,e=!1){let n=t.state.selection;if(DE(t,n),Sh(t)){if(!e&&t.input.mouseDown&&t.input.mouseDown.allowDefault&&et){let r=t.domSelectionRange(),i=t.domObserver.currentSelection;if(r.anchorNode&&i.anchorNode&&xr(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,lt(o)+1):i.collapse(o,0),!s&&!r.state.selection.visible&&bt&&rr<=11&&(o.disabled=!0,o.disabled=!1)})(t);else{let r,i,{anchor:o,head:s}=n;!Oh||n instanceof Ee||(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&&vh(r),i&&vh(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,h=u.anchorOffset;l.addEventListener("selectionchange",a.input.hideSelectionGuard=()=>{u.anchorNode==c&&u.anchorOffset==h||(l.removeEventListener("selectionchange",a.input.hideSelectionGuard),setTimeout(()=>{Sh(a)&&!a.state.selection.visible||a.dom.classList.remove("ProseMirror-hideselection")},20))})}(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}const Oh=ct||et&&hE<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(ct&&i&&i.contentEditable=="false")return Qa(i);if(!(i&&i.contentEditable!="false"||o&&o.contentEditable!="false")){if(i)return Qa(i);if(o)return Qa(o)}}function Qa(t){return t.contentEditable="true",ct&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function vh(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function DE(t,e){if(e instanceof re){let n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(Th(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else Th(t)}function Th(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function du(t,e,n,r){return t.someProp("createSelectionBetween",i=>i(t,e,n))||Ee.between(e,n,r)}function Rh(t){return!(t.editable&&!t.hasFocus())&&vE(t)}function vE(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 rc(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&&Ae.findFrom(o,e)}function Wn(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function Ch(t,e,n){let r=t.state.selection;if(!(r instanceof Ee)){if(r instanceof re&&r.node.isInline)return Wn(t,new Ee(e>0?r.$to:r.$from));{let i=rc(t.state,e);return!!i&&Wn(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 Wn(t,new Ee(r.$anchor,s))}if(!r.empty)return!1;if(t.endOfTextblock(e>0?"forward":"backward")){let i=rc(t.state,e);return!!(i&&i instanceof re)&&Wn(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)&&(re.isSelectable(s)?Wn(t,new re(e<0?t.state.doc.resolve(o.pos-s.nodeSize):o)):!!Fo&&Wn(t,new Ee(t.state.doc.resolve(e<0?a:a+s.nodeSize))))}}function es(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function $i(t,e){let n=t.pmViewDesc;return n&&n.size==0&&(e<0||t.nextSibling||t.nodeName!="BR")}function Zr(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<es(i)&&$i(i.childNodes[o],-1)&&(l=!0);;)if(o>0){if(i.nodeType!=1)break;{let u=i.childNodes[o-1];if($i(u,-1))s=i,a=--o;else{if(u.nodeType!=3)break;i=u,o=i.nodeValue.length}}}else{if(Ih(i))break;{let u=i.previousSibling;for(;u&&$i(u,-1);)s=i.parentNode,a=lt(u),u=u.previousSibling;if(u)i=u,o=es(i);else{if(i=i.parentNode,i==n.dom)break;o=0}}}l?el(n,i,o):s&&el(n,s,a)}(t):function(n){let r=n.domSelectionRange(),i=r.focusNode,o=r.focusOffset;if(!i)return;let s,a,l=es(i);for(;;)if(o<l){if(i.nodeType!=1||!$i(i.childNodes[o],1))break;s=i,a=++o}else{if(Ih(i))break;{let u=i.nextSibling;for(;u&&$i(u,1);)s=u.parentNode,a=lt(u)+1,u=u.nextSibling;if(u)i=u,o=0,l=es(i);else{if(i=i.parentNode,i==n.dom)break;o=l=0}}}s&&el(n,s,a)}(t)}function Ih(t){let e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function el(t,e,n){if(e.nodeType!=3){let o,s;(s=function(a,l){for(;a&&l==a.childNodes.length&&!Oo(a);)l=lt(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&&!Oo(a);)l=lt(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(ga(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&&Fn(t)},50)}function yh(t,e){let n=t.state.doc.resolve(e);if(!et&&!pE&&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 Nh(t,e,n){let r=t.state.selection;if(r instanceof Ee&&!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=rc(t.state,e);if(s&&s instanceof re)return Wn(t,s)}if(!i.parent.inlineContent){let s=e<0?i:o,a=r instanceof Bt?Ae.near(s,e):Ae.findFrom(s,e);return!!a&&Wn(t,a)}return!1}function bh(t,e){if(!(t.state.selection instanceof Ee))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 MS(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 bh(t,-1)||Zr(t,-1);if(n==46&&!e.shiftKey||Yt&&n==68&&r=="c")return bh(t,1)||Zr(t,1);if(n==13||n==27)return!0;if(n==37||Yt&&n==66&&r=="c"){let i=n==37?yh(t,t.state.selection.from)=="ltr"?-1:1:-1;return Ch(t,i,r)||Zr(t,i)}if(n==39||Yt&&n==70&&r=="c"){let i=n==39?yh(t,t.state.selection.from)=="ltr"?1:-1:1;return Ch(t,i,r)||Zr(t,i)}return n==38||Yt&&n==80&&r=="c"?Nh(t,-1,r)||Zr(t,-1):n==40||Yt&&n==78&&r=="c"?function(i){if(!ct||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)||Nh(t,1,r)||Zr(t,1):r==(Yt?"m":"c")&&(n==66||n==73||n==89||n==90)}function hu(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")||Pi.fromSchema(t.state.schema),a=NE(),l=a.createElement("div");l.appendChild(s.serializeFragment(r,{document:a}));let u,c=l.firstChild,h=0;for(;c&&c.nodeType==1&&(u=yE[c.nodeName.toLowerCase()]);){for(let p=u.length-1;p>=0;p--){let f=a.createElement(u[p]);for(;l.firstChild;)f.appendChild(l.firstChild);l.appendChild(f),h++}c=l.firstChild}c&&c.nodeType==1&&c.setAttribute("data-pm-slice",`${i} ${o}${h?` -${h}`:""} ${JSON.stringify(n)}`);let d=t.someProp("clipboardTextSerializer",p=>p(e,t))||e.content.textBetween(0,e.content.size,`
13
13
 
14
- `);return{dom:l,text:d,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",d=>{e=d(e,a||r,t)}),a)return s=new J(W.from(t.state.schema.text(e.replace(/\r\n?/g,`
15
- `))),0,0),t.someProp("transformPasted",d=>{s=d(s,t,!0)}),s;let h=t.someProp("clipboardTextParser",d=>d(e,i,r,t));if(h)s=h;else{let d=i.marks(),{schema:p}=t.state,f=Mi.fromSchema(p);o=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(m=>{let E=o.appendChild(document.createElement("p"));m&&E.appendChild(f.serializeNode(p.text(m,d)))})}}else t.someProp("transformPastedHTML",h=>{n=h(n,t)}),o=function(h){let d=/^(\s*<meta [^>]*>)*/.exec(h);d&&(h=h.slice(d[0].length));let p,f=yE().createElement("div"),m=/<([a-z][^>\s]+)/i.exec(h);if((p=m&&IE[m[1].toLowerCase()])&&(h=p.map(E=>"<"+E+">").join("")+h+p.map(E=>"</"+E+">").reverse().join("")),f.innerHTML=function(E){let A=window.trustedTypes;return A?(el||(el=A.defaultPolicy||A.createPolicy("ProseMirrorClipboard",{createHTML:_=>_})),el.createHTML(E)):E}(h),p)for(let E=0;E<p.length;E++)f=f.querySelector(p[E])||f;return f}(n),Fo&&function(h){let d=h.querySelectorAll(tt?"span:not([class]):not([style])":"span.Apple-converted-space");for(let p=0;p<d.length;p++){let f=d[p];f.childNodes.length==1&&f.textContent==" "&&f.parentNode&&f.parentNode.replaceChild(h.ownerDocument.createTextNode(" "),f)}}(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 h=+c[3];h>0;h--){let d=o.firstChild;for(;d&&d.nodeType!=1;)d=d.nextSibling;if(!d)break;o=d}if(s||(s=(t.someProp("clipboardParser")||t.someProp("domParser")||_o.fromSchema(t.state.schema)).parseSlice(o,{preserveWhitespace:!(!l&&!c),context:i,ruleFromNode:d=>d.nodeName!="BR"||d.nextSibling||!d.parentNode||NS.test(d.parentNode.nodeName)?null:{ignore:!0}})),c)s=function(h,d){if(!h.size)return h;let p,f=h.content.firstChild.type.schema;try{p=JSON.parse(d)}catch(_){return h}let{content:m,openStart:E,openEnd:A}=h;for(let _=p.length-2;_>=0;_-=2){let g=f.nodes[p[_]];if(!g||g.hasRequiredAttrs())break;m=W.from(g.create(p[_+1],m)),E++,A++}return new J(m,E,A)}(Lh(s,+c[1],+c[2]),c[4]);else if(s=J.maxOpen(function(h,d){if(h.childCount<2)return h;for(let p=d.depth;p>=0;p--){let f,m=d.node(p).contentMatchAt(d.index(p)),E=[];if(h.forEach(A=>{if(!E)return;let _,g=m.findWrapping(A.type);if(!g)return E=null;if(_=E.length&&f.length&&RE(g,f,A,E[E.length-1],0))E[E.length-1]=_;else{E.length&&(E[E.length-1]=CE(E[E.length-1],f.length));let O=TE(A,g);E.push(O),m=m.matchType(O.type),f=g}}),E)return W.from(E)}return h}(s.content,i),!0),s.openStart||s.openEnd){let h=0,d=0;for(let p=s.content.firstChild;h<s.openStart&&!p.type.spec.isolating;h++,p=p.firstChild);for(let p=s.content.lastChild;d<s.openEnd&&!p.type.spec.isolating;d++,p=p.lastChild);s=Lh(s,h,d)}return t.someProp("transformPasted",h=>{s=h(s,t,l)}),s}const NS=/^(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 TE(t,e,n=0){for(let r=e.length-1;r>=n;r--)t=e[r].create(null,W.from(t));return t}function RE(t,e,n,r,i){if(i<t.length&&i<e.length&&t[i]==e[i]){let o=RE(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(W.from(TE(n,t,i+1))))}}function CE(t,e){if(e==0)return t;let n=t.content.replaceChild(t.childCount-1,CE(t.lastChild,e-1)),r=t.contentMatchAt(t.childCount).fillBefore(W.empty,!0);return t.copy(n.append(r))}function rc(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=rc(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(W.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,s.copy(a))}function Lh(t,e,n){return e<t.openStart&&(t=new J(rc(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new J(rc(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}const IE={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 wh=null;function yE(){return wh||(wh=document.implementation.createHTMLDocument("title"))}let el=null;const Tt={},Ct={},bS={touchstart:!0,touchmove:!0};class kS{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 tr(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function tl(t){t.someProp("handleDOMEvents",e=>{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=r=>ic(t,r))})}function ic(t,e){return t.someProp("handleDOMEvents",n=>{let r=n[e.type];return!!r&&(r(t,e)||e.defaultPrevented)})}function LS(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 Fs(t){return{left:t.clientX,top:t.clientY}}function hu(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 pi(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 wS(t,e,n,r,i){return hu(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 se&&(a=u.node);let c=o.state.doc.resolve(s);for(let h=c.depth+1;h>0;h--){let d=h>c.depth?c.nodeAfter:c.node(h);if(se.isSelectable(d)){l=a&&u.$from.depth>0&&h>=u.$from.depth&&c.before(u.$from.depth+1)==u.$from.pos?c.before(u.$from.depth):c.before(h);break}}return l!=null&&(pi(o,se.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&&se.isSelectable(l))&&(pi(o,new se(a)),!0)}(t,n))}function MS(t,e,n,r){return hu(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",i=>i(t,e,r))}function PS(t,e,n,r){return hu(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&&(pi(i,Se.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),h=l.before(u);if(c.inlineContent)pi(i,Se.create(a,h+1,h+1+c.content.size));else{if(!se.isSelectable(c))continue;pi(i,se.create(a,h))}return!0}}(t,n,r)}function oc(t){return Hs(t)}Ct.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=n.keyCode==16||n.shiftKey,!Mh(t,n)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!Pn||!tt||n.keyCode!=13))if(n.keyCode!=229&&t.domObserver.forceFlush(),!Ii||n.keyCode!=13||n.ctrlKey||n.altKey||n.metaKey)t.someProp("handleKeyDown",r=>r(t,n))||yS(t,n)?n.preventDefault():tr(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,Or(13,"Enter"))),t.input.lastIOSEnter=0)},200)}},Ct.keyup=(t,e)=>{e.keyCode==16&&(t.input.shiftKey=!1)},Ct.keypress=(t,e)=>{let n=e;if(Mh(t,n)||!n.charCode||n.ctrlKey&&!n.altKey||Kt&&n.metaKey)return;if(t.someProp("handleKeyPress",i=>i(t,n)))return void n.preventDefault();let r=t.state.selection;if(!(r instanceof Se&&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 NE=Kt?"metaKey":"ctrlKey";Tt.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let r=oc(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[NE]&&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(Fs(n));s&&(o=="singleClick"?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new xS(t,s,n,!!r)):(o=="doubleClick"?MS:PS)(t,s.pos,s.inside,n)?n.preventDefault():tr(t,"pointer"))};class xS{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[NE],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 se&&u.from<=s&&u.to>s)&&(this.mightDrag={node:o,pos:s,addAttr:!(!this.target||this.target.draggable),setUneditable:!(!this.target||!Qt||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)),tr(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(()=>Hn(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(Fs(e))),this.updateAllowDefault(e),this.allowDefault||!n?tr(this.view,"pointer"):wS(this.view,n.pos,n.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||ut&&this.mightDrag&&!this.mightDrag.node.isAtom||tt&&!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)?(pi(this.view,Oe.near(this.view.state.doc.resolve(n.pos))),e.preventDefault()):tr(this.view,"pointer")}move(e){this.updateAllowDefault(e),tr(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 Mh(t,e){return!!t.composing||!!(ut&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500)&&(t.input.compositionEndedAt=-2e8,!0)}Tt.touchstart=t=>{t.input.lastTouch=Date.now(),oc(t),tr(t,"pointer")},Tt.touchmove=t=>{t.input.lastTouch=Date.now(),tr(t,"pointer")},Tt.contextmenu=t=>oc(t);const FS=Pn?5e3:-1;function Ph(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>Hs(t),e))}function bE(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 HS(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=qt(i=i.childNodes[o-1])}else{if(!i.parentNode||So(i))return null;o=ct(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||So(i))return null;o=ct(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 Hs(t,e=!1){if(!(Pn&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),bE(t),e||t.docView&&t.docView.dirty){let n=cu(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}}Ct.compositionstart=Ct.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,n=e.selection.$to;if(e.selection instanceof Se&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)||tt&&hE&&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(),Hs(t,!0),t.markCursor=null;else if(Hs(t,!e.selection.empty),Qt&&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}Ph(t,FS)},Ct.compositionend=(t,e)=>{t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=e.timeStamp,t.input.compositionPendingChanges=t.domObserver.pendingRecords().length?t.input.compositionID:0,t.input.compositionNode=null,t.input.badSafariComposition?t.domObserver.forceFlush():t.input.compositionPendingChanges&&Promise.resolve().then(()=>t.domObserver.flush()),t.input.compositionID++,Ph(t,20))};const no=wt&&rr<15||Ii&&ES<604;function ro(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||J.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 kE(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," "):""}Tt.copy=Ct.cut=(t,e)=>{let n=e,r=t.state.selection,i=n.type=="cut";if(r.empty)return;let o=no?null:n.clipboardData,s=r.content(),{dom:a,text:l}=du(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 h=u.dom.parentNode.appendChild(document.createElement("div"));h.appendChild(c),h.style.cssText="position: fixed; left: -10000px; top: 10px";let d=getSelection(),p=document.createRange();p.selectNodeContents(c),u.dom.blur(),d.removeAllRanges(),d.addRange(p),setTimeout(()=>{h.parentNode&&h.parentNode.removeChild(h),u.focus()},50)}(t,a),i&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))},Ct.paste=(t,e)=>{let n=e;if(t.composing&&!Pn)return;let r=no?null:n.clipboardData,i=t.input.shiftKey&&t.input.lastKeyCode!=45;r&&ro(t,kE(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?ro(o,l.value,null,u,s):ro(o,l.textContent,l.innerHTML,u,s)},50)}(t,n)};class LE{constructor(e,n,r){this.slice=e,this.move=n,this.node=r}}const US=Kt?"altKey":"ctrlKey";function xh(t,e){let n=t.someProp("dragCopies",r=>!r(e));return n!=null?n:!e[US]}Tt.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(Fs(n));if(!(s&&s.pos>=o.from&&s.pos<=(o instanceof se?o.to-1:o.to))){if(r&&r.mightDrag)i=se.create(t.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let h=t.docView.nearestDesc(n.target,!0);h&&h.node.type.spec.draggable&&h!=t.docView&&(i=se.create(t.state.doc,h.posBefore))}}let a=(i||t.state.selection).content(),{dom:l,text:u,slice:c}=du(t,a);(!n.dataTransfer.files.length||!tt||dE>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(no?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",no||n.dataTransfer.setData("text/plain",u),t.dragging=new LE(c,xh(t,n),i)},Tt.dragend=t=>{let e=t.dragging;window.setTimeout(()=>{t.dragging==e&&(t.dragging=null)},50)},Ct.dragover=Ct.dragenter=(t,e)=>e.preventDefault(),Ct.drop=(t,e)=>{try{(function(n,r,i){if(!r.dataTransfer)return;let o=n.posAtCoords(Fs(r));if(!o)return;let s=n.state.doc.resolve(o.pos),a=i&&i.slice;a?n.someProp("transformPasted",m=>{a=m(a,n,!1)}):a=vE(n,kE(r.dataTransfer),no?null:r.dataTransfer.getData("text/html"),!1,s);let l=!(!i||!xh(n,r));if(n.someProp("handleDrop",m=>m(n,r,a||J.empty,l)))return void r.preventDefault();if(!a)return;r.preventDefault();let u=a?function(m,E,A){let _=m.resolve(E);if(!A.content.size)return E;let g=A.content;for(let O=0;O<A.openStart;O++)g=g.firstChild.content;for(let O=1;O<=(A.openStart==0&&A.size?2:1);O++)for(let D=_.depth;D>=0;D--){let C=D==_.depth?0:_.pos<=(_.start(D+1)+_.end(D+1))/2?-1:1,T=_.index(D)+(C>0?1:0),I=_.node(D),S=!1;if(O==1)S=I.canReplace(T,T,g);else{let v=I.contentMatchAt(T).findWrapping(g.firstChild.type);S=v&&I.canReplaceWith(T,T,v[0])}if(S)return C==0?_.pos:C<0?_.before(D+1):_.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:m}=i;m?m.replace(c):c.deleteSelection()}let h=c.mapping.map(u),d=a.openStart==0&&a.openEnd==0&&a.content.childCount==1,p=c.doc;if(d?c.replaceRangeWith(h,h,a.content.firstChild):c.replaceRange(h,h,a),c.doc.eq(p))return;let f=c.doc.resolve(h);if(d&&se.isSelectable(a.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(a.content.firstChild))c.setSelection(new se(f));else{let m=c.mapping.map(u);c.mapping.maps[c.mapping.maps.length-1].forEach((E,A,_,g)=>m=g),c.setSelection(uu(n,f,c.doc.resolve(m)))}n.focus(),n.dispatch(c.setMeta("uiEvent","drop"))})(t,e,t.dragging)}finally{t.dragging=null}},Tt.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())&&Hn(t)},20))},Tt.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)},Tt.beforeinput=(t,e)=>{if(tt&&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,Or(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 Ct)Tt[t]=Ct[t];function Oo(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 Us{constructor(e,n){this.toDOM=e,this.spec=n||kr,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 jt(o-r,o-r,this)}valid(){return!0}eq(e){return this==e||e instanceof Us&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Oo(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class or{constructor(e,n){this.attrs=e,this.spec=n||kr}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 jt(o,s,this)}valid(e,n){return n.from<n.to}eq(e){return this==e||e instanceof or&&Oo(this.attrs,e.attrs)&&Oo(this.spec,e.spec)}static is(e){return e.type instanceof or}destroy(){}}class pu{constructor(e,n){this.attrs=e,this.spec=n||kr}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 jt(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 pu&&Oo(this.attrs,e.attrs)&&Oo(this.spec,e.spec)}destroy(){}}class jt{constructor(e,n,r){this.from=e,this.to=n,this.type=r}copy(e,n){return new jt(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 jt(e,e,new Us(n,r))}static inline(e,n,r,i){return new jt(e,n,new or(r,i))}static node(e,n,r,i){return new jt(e,n,new pu(r,i))}get spec(){return this.type.spec}get inline(){return this.type instanceof or}get widget(){return this.type instanceof Us}}const ei=[],kr={};class Ye{constructor(e,n){this.local=e.length?e:ei,this.children=n.length?n:ei}static create(e,n){return n.length?Es(n,e,0,kr):pt}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==pt||e.maps.length==0?this:this.mapInner(e,n,0,0,r||kr)}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,h,d,p){let f=a.slice();for(let E=0,A=d;E<u.maps.length;E++){let _=0;u.maps[E].forEach((g,O,D,C)=>{let T=C-D-(O-g);for(let I=0;I<f.length;I+=3){let S=f[I+1];if(S<0||g>S+A-_)continue;let v=f[I]+A-_;O>=v?f[I+1]=g<=v?-2:-1:g>=A&&T&&(f[I]+=T,f[I+1]+=T)}_+=T}),A=u.maps[E].map(A,-1)}let m=!1;for(let E=0;E<f.length;E+=3)if(f[E+1]<0){if(f[E+1]==-2){m=!0,f[E+1]=-1;continue}let A=u.map(a[E]+d),_=A-h;if(_<0||_>=c.content.size){m=!0;continue}let g=u.map(a[E+1]+d,-1)-h,{index:O,offset:D}=c.content.findIndex(_),C=c.maybeChild(O);if(C&&D==_&&D+C.nodeSize==g){let T=f[E+2].mapInner(u,C,A+1,a[E]+d+1,p);T!=pt?(f[E]=_,f[E+1]=g,f[E+2]=T):(f[E+1]=-2,m=!0)}else m=!0}if(m){let E=function(_,g,O,D,C,T,I){function S(v,y){for(let b=0;b<v.local.length;b++){let M=v.local[b].map(D,C,y);M?O.push(M):I.onRemove&&I.onRemove(v.local[b].spec)}for(let b=0;b<v.children.length;b+=3)S(v.children[b+2],v.children[b]+y+1)}for(let v=0;v<_.length;v+=3)_[v+1]==-1&&S(_[v+2],g[v]+T+1);return O}(f,a,l,u,h,d,p),A=Es(E,c,0,p);l=A.local;for(let _=0;_<f.length;_+=3)f[_+1]<0&&(f.splice(_,3),_-=3);for(let _=0,g=0;_<A.children.length;_+=3){let O=A.children[_];for(;g<f.length&&f[g]<O;)g+=3;f.splice(g,0,A.children[_],A.children[_+1],A.children[_+2])}}return new Ye(l.sort(Tr),f)}(this.children,s||[],e,n,r,i,o):s?new Ye(s.sort(Tr),ei):pt}add(e,n){return n.length?this==pt?Ye.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=ME(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,Es(u,a,c+1,kr)),o+=3}});let s=wE(o?PE(n):n,-r);for(let a=0;a<s.length;a++)s[a].type.valid(e,s[a])||s.splice(a--,1);return new Ye(s.length?this.local.concat(s).sort(Tr):this.local,i||this.children)}remove(e){return e.length==0||this==pt?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,h=0;h<e.length;h++)(c=e[h])&&c.from>a&&c.to<l&&(e[h]=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!=pt?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 Ye(i,r):pt}forChild(e,n){if(this==pt)return this;if(n.isLeaf)return Ye.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 or){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 Ye(i.sort(Tr),ei);return r?new Jn([a,r]):a}return r||pt}eq(e){if(this==e)return!0;if(!(e instanceof Ye)||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 fu(this.localsInner(e))}localsInner(e){if(this==pt)return ei;if(e.inlineContent||!this.local.some(or.is))return this.local;let n=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof or||n.push(this.local[r]);return n}forEachSet(e){e(this)}}Ye.empty=new Ye([],[]),Ye.removeOverlap=fu;const pt=Ye.empty;class Jn{constructor(e){this.members=e}map(e,n){const r=this.members.map(i=>i.map(e,n,kr));return Jn.from(r)}forChild(e,n){if(n.isLeaf)return Ye.empty;let r=[];for(let i=0;i<this.members.length;i++){let o=this.members[i].forChild(e,n);o!=pt&&(o instanceof Jn?r=r.concat(o.members):r.push(o))}return Jn.from(r)}eq(e){if(!(e instanceof Jn)||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?fu(r?n:n.sort(Tr)):ei}static from(e){switch(e.length){case 0:return pt;case 1:return e[0];default:return new Jn(e.every(n=>n instanceof Ye)?e:e.reduce((n,r)=>n.concat(r instanceof Ye?r:r.members),[]))}}forEachSet(e){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(e)}}function wE(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 jt(i.from+e,i.to+e,i.type))}return n}function ME(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 PE(t){let e=[];for(let n=0;n<t.length;n++)t[n]!=null&&e.push(t[n]);return e}function Es(t,e,n,r){let i=[],o=!1;e.forEach((a,l)=>{let u=ME(t,a,l+n);if(u){o=!0;let c=Es(u,a,n+l+1,r);c!=pt&&i.push(l,l+a.nodeSize,c)}});let s=wE(o?PE(t):t,-n).sort(Tr);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 Ye(s,i):pt}function Tr(t,e){return t.from-e.from||t.to-e.to}function fu(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),Fh(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),Fh(e,i+1,o.copy(r.to,o.to)))}}return e}function Fh(t,e,n){for(;e<t.length&&Tr(n,t[e])>0;)e++;t.splice(e,0,n)}function nl(t){let e=[];return t.someProp("decorations",n=>{let r=n(t.state);r&&r!=pt&&e.push(r)}),t.cursorWrapper&&e.push(Ye.create(t.state.doc,[t.cursorWrapper.deco])),Jn.from(e)}const BS={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},jS=wt&&rr<=11;class $S{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 VS{constructor(e,n){this.view=e,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new $S,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]);wt&&rr<=11&&r.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():ut&&e.composing&&r.some(i=>i.type=="childList"&&i.target.nodeName=="TR")?(e.input.badSafariComposition=!0,this.flushSoon()):this.flush()}),jS&&(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,BS)),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(Rh(this.view)){if(this.suppressingSelectionUpdates)return Hn(this.view);if(wt&&rr<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&xr(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=Ci(o))r.add(o);for(let o=e.anchorNode;o;o=Ci(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)&&Rh(e)&&!this.ignoreSelectionChange(r),o=-1,s=-1,a=!1,l=[];if(e.editable)for(let c=0;c<n.length;c++){let h=this.registerMutation(n[c],l);h&&(o=o<0?h.from:Math.min(h.from,o),s=s<0?h.to:Math.max(h.to,s),h.typeOver&&(a=!0))}if(Qt&&l.length){let c=l.filter(h=>h.nodeName=="BR");if(c.length==2){let[h,d]=c;h.parentNode&&h.parentNode.parentNode==d.parentNode?d.remove():h.remove()}else{let{focusNode:h}=this.currentSelection;for(let d of c){let p=d.parentNode;!p||p.nodeName!="LI"||h&&zS(e,h)==p||d.remove()}}}else if((tt||ut)&&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 h=c.nextSibling;h&&h.nodeType==1&&h.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&&Aa(r)&&(u=cu(e))&&u.eq(Oe.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,Hn(e),this.currentSelection.set(r),e.scrollToSelection()):(o>-1||i)&&(o>-1&&(e.docView.markDirty(o,s),function(c){if(!Hh.has(c)&&(Hh.set(c,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(c.dom).whiteSpace)!==-1)){if(c.requiresGeckoHackNode=Qt,Uh)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."),Uh=!0}}(e)),e.input.badSafariComposition&&(e.input.badSafariComposition=!1,function(c,h){var d;let{focusNode:p,focusOffset:f}=c.domSelectionRange();for(let m of h)if(((d=m.parentNode)===null||d===void 0?void 0:d.nodeName)=="TR"){let E=m.nextSibling;for(;E&&E.nodeName!="TD"&&E.nodeName!="TH";)E=E.nextSibling;if(E){let A=E;for(;;){let _=A.firstChild;if(!_||_.nodeType!=1||_.contentEditable=="false"||/^(BR|IMG)$/.test(_.nodeName))break;A=_}A.insertBefore(m,A.firstChild),p==m&&c.domSelection().collapse(m,f)}else m.parentNode.removeChild(m)}}(e,l)),this.handleDOMChange(o,s,a,l),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(r)||Hn(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(wt&&rr<=11&&e.addedNodes.length)for(let u=0;u<e.addedNodes.length;u++){let{previousSibling:c,nextSibling:h}=e.addedNodes[u];(!c||Array.prototype.indexOf.call(e.addedNodes,c)<0)&&(i=c),(!h||Array.prototype.indexOf.call(e.addedNodes,h)<0)&&(o=h)}let s=i&&i.parentNode==e.target?ct(i)+1:0,a=r.localPosFromDOM(e.target,s,-1),l=o&&o.parentNode==e.target?ct(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 Hh=new WeakMap,Uh=!1;function Bh(t,e){let n=e.startContainer,r=e.startOffset,i=e.endContainer,o=e.endOffset,s=t.domAtPos(t.state.selection.anchor);return xr(s.node,s.offset,i,o)&&([n,r,i,o]=[i,o,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:o}}function zS(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 YS(t){let e=t.pmViewDesc;if(e)return e.parseRule();if(t.nodeName=="BR"&&t.parentNode){if(ut&&/^(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||ut&&/^(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 GS=/^(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 WS(t,e,n,r,i){let o=t.input.compositionPendingChanges||(t.composing?t.input.compositionID:0);if(t.input.compositionPendingChanges=0,e<0){let T=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,I=cu(t,T);if(I&&!t.state.selection.eq(I)){if(tt&&Pn&&t.input.lastKeyCode===13&&Date.now()-100<t.input.lastKeyCodeTime&&t.someProp("handleKeyDown",v=>v(t,Or(13,"Enter"))))return;let S=t.state.tr.setSelection(I);T=="pointer"?S.setMeta("pointer",!0):T=="key"&&S.scrollIntoView(),o&&S.setMeta("composition",o),t.dispatch(S)}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,h=function(T,I,S){let v,{node:y,fromOffset:b,toOffset:M,from:k,to:P}=T.docView.parseRange(I,S),B=T.domSelectionRange(),F=B.anchorNode;if(F&&T.dom.contains(F.nodeType==1?F:F.parentNode)&&(v=[{node:F,offset:B.anchorOffset}],Aa(B)||v.push({node:B.focusNode,offset:B.focusOffset})),tt&&T.input.lastKeyCode===8)for(let ee=M;ee>b;ee--){let ie=y.childNodes[ee-1],ne=ie.pmViewDesc;if(ie.nodeName=="BR"&&!ne){M=ee;break}if(!ne||ne.size)break}let X=T.state.doc,G=T.someProp("domParser")||_o.fromSchema(T.state.schema),z=X.resolve(k),K=null,me=G.parse(y,{topNode:z.parent,topMatch:z.parent.contentMatchAt(z.index()),topOpen:!0,from:b,to:M,preserveWhitespace:z.parent.type.whitespace!="pre"||"full",findPositions:v,ruleFromNode:YS,context:z});if(v&&v[0].pos!=null){let ee=v[0].pos,ie=v[1]&&v[1].pos;ie==null&&(ie=ee),K={anchor:ee+k,head:ie+k}}return{doc:me,sel:K,from:k,to:P}}(t,e,n),d=t.state.doc,p=d.slice(h.from,h.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 f=function(T,I,S,v,y){let b=T.findDiffStart(I,S);if(b==null)return null;let{a:M,b:k}=T.findDiffEnd(I,S+T.size,S+I.size);if(y=="end"&&(v-=M+Math.max(0,b-Math.min(M,k))-b),M<b&&T.size<I.size){let P=v<=b&&v>=M?b-v:0;b-=P,b&&b<I.size&&$h(I.textBetween(b-1,b+1))&&(b+=P?1:-1),k=b+(k-M),M=b}else if(k<b){let P=v<=b&&v>=k?b-v:0;b-=P,b&&b<T.size&&$h(T.textBetween(b-1,b+1))&&(b+=P?1:-1),M=b+(M-k),k=b}return{start:b,endA:M,endB:k}}(p.content,h.doc.content,h.from,l,u);if(f&&t.input.domChangeCount++,(Ii&&t.input.lastIOSEnter>Date.now()-225||Pn)&&i.some(T=>T.nodeType==1&&!GS.test(T.nodeName))&&(!f||f.endA>=f.endB)&&t.someProp("handleKeyDown",T=>T(t,Or(13,"Enter"))))return void(t.input.lastIOSEnter=0);if(!f){if(!(r&&c instanceof Se&&!c.empty&&c.$head.sameParent(c.$anchor))||t.composing||h.sel&&h.sel.anchor!=h.sel.head){if(h.sel){let T=jh(t,t.state.doc,h.sel);if(T&&!T.eq(t.state.selection)){let I=t.state.tr.setSelection(T);o&&I.setMeta("composition",o),t.dispatch(I)}}return}f={start:c.from,endA:c.to,endB:c.to}}t.state.selection.from<t.state.selection.to&&f.start==f.endB&&t.state.selection instanceof Se&&(f.start>t.state.selection.from&&f.start<=t.state.selection.from+2&&t.state.selection.from>=h.from?f.start=t.state.selection.from:f.endA<t.state.selection.to&&f.endA>=t.state.selection.to-2&&t.state.selection.to<=h.to&&(f.endB+=t.state.selection.to-f.endA,f.endA=t.state.selection.to)),wt&&rr<=11&&f.endB==f.start+1&&f.endA==f.start&&f.start>h.from&&h.doc.textBetween(f.start-h.from-1,f.start-h.from+1)=="  "&&(f.start--,f.endA--,f.endB--);let m=h.doc.resolveNoCache(f.start-h.from),E=h.doc.resolveNoCache(f.endB-h.from),A=d.resolve(f.start),_=m.sameParent(E)&&m.parent.inlineContent&&A.end()>=f.endA;if((Ii&&t.input.lastIOSEnter>Date.now()-225&&(!_||i.some(T=>T.nodeName=="DIV"||T.nodeName=="P"))||!_&&m.pos<h.doc.content.size&&(!m.sameParent(E)||!m.parent.inlineContent)&&m.pos<E.pos&&!/\S/.test(h.doc.textBetween(m.pos,E.pos,"","")))&&t.someProp("handleKeyDown",T=>T(t,Or(13,"Enter"))))return void(t.input.lastIOSEnter=0);if(t.state.selection.anchor>f.start&&function(T,I,S,v,y){if(S-I<=y.pos-v.pos||rl(v,!0,!1)<y.pos)return!1;let b=T.resolve(I);if(!v.parent.isTextblock){let k=b.nodeAfter;return k!=null&&S==I+k.nodeSize}if(b.parentOffset<b.parent.content.size||!b.parent.isTextblock)return!1;let M=T.resolve(rl(b,!0,!0));return!(!M.parent.isTextblock||M.pos>S||rl(M,!0,!1)<S)&&v.parent.content.cut(v.parentOffset).eq(M.parent.content)}(d,f.start,f.endA,m,E)&&t.someProp("handleKeyDown",T=>T(t,Or(8,"Backspace"))))return void(Pn&&tt&&t.domObserver.suppressSelectionUpdates());tt&&f.endB==f.start&&(t.input.lastChromeDelete=Date.now()),Pn&&!_&&m.start()!=E.start()&&E.parentOffset==0&&m.depth==E.depth&&h.sel&&h.sel.anchor==h.sel.head&&h.sel.head==f.endA&&(f.endB-=2,E=h.doc.resolveNoCache(f.endB-h.from),setTimeout(()=>{t.someProp("handleKeyDown",function(T){return T(t,Or(13,"Enter"))})},20));let g,O=f.start,D=f.endA,C=T=>{let I=T||t.state.tr.replace(O,D,h.doc.slice(f.start-h.from,f.endB-h.from));if(h.sel){let S=jh(t,I.doc,h.sel);S&&!(tt&&t.composing&&S.empty&&(f.start!=f.endB||t.input.lastChromeDelete<Date.now()-100)&&(S.head==O||S.head==I.mapping.map(D)-1)||wt&&S.empty&&S.head==O)&&I.setSelection(S)}return o&&I.setMeta("composition",o),I.scrollIntoView()};if(_)if(m.pos==E.pos){wt&&rr<=11&&m.parentOffset==0&&(t.domObserver.suppressSelectionUpdates(),setTimeout(()=>Hn(t),20));let T=C(t.state.tr.delete(O,D)),I=d.resolve(f.start).marksAcross(d.resolve(f.endA));I&&T.ensureMarks(I),t.dispatch(T)}else if(f.endA==f.endB&&(g=function(T,I){let S,v,y,b=T.firstChild.marks,M=I.firstChild.marks,k=b,P=M;for(let F=0;F<M.length;F++)k=M[F].removeFromSet(k);for(let F=0;F<b.length;F++)P=b[F].removeFromSet(P);if(k.length==1&&P.length==0)v=k[0],S="add",y=F=>F.mark(v.addToSet(F.marks));else{if(k.length!=0||P.length!=1)return null;v=P[0],S="remove",y=F=>F.mark(v.removeFromSet(F.marks))}let B=[];for(let F=0;F<I.childCount;F++)B.push(y(I.child(F)));if(W.from(B).eq(T))return{mark:v,type:S}}(m.parent.content.cut(m.parentOffset,E.parentOffset),A.parent.content.cut(A.parentOffset,f.endA-A.start())))){let T=C(t.state.tr);g.type=="add"?T.addMark(O,D,g.mark):T.removeMark(O,D,g.mark),t.dispatch(T)}else if(m.parent.child(m.index()).isText&&m.index()==E.index()-(E.textOffset?0:1)){let T=m.parent.textBetween(m.parentOffset,E.parentOffset),I=()=>C(t.state.tr.insertText(T,O,D));t.someProp("handleTextInput",S=>S(t,O,D,T,I))||t.dispatch(I())}else t.dispatch(C());else t.dispatch(C())}function jh(t,e,n){return Math.max(n.anchor,n.head)>e.content.size?null:uu(t,e.resolve(n.anchor),e.resolve(n.head))}function rl(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 $h(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 xE{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 kS,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(Wh),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=Yh(this),zh(this),this.nodeViews=Gh(this),this.docView=Ah(this.state.doc,Vh(this),nl(this),this.dom,this),this.domObserver=new VS(this,(r,i,o,s)=>WS(this,r,i,o,s)),this.domObserver.start(),function(r){for(let i in Tt){let o=Tt[i];r.dom.addEventListener(i,r.input.eventHandlers[i]=s=>{!LS(r,s)||ic(r,s)||!r.editable&&s.type in Ct||o(r,s)},bS[i]?{passive:!0}:void 0)}ut&&r.dom.addEventListener("input",()=>null),tl(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&&tl(this);let n=this._props;this._props=e,e.plugins&&(e.plugins.forEach(Wh),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&&(bE(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=Gh(this);(function(f,m){let E=0,A=0;for(let _ in f){if(f[_]!=m[_])return!0;E++}for(let _ in m)A++;return E!=A})(p,this.nodeViews)&&(this.nodeViews=p,o=!0)}(a||n.handleDOMEvents!=this._props.handleDOMEvents)&&tl(this),this.editable=Yh(this),zh(this);let l=nl(this),u=Vh(this),c=i.plugins==e.plugins||i.doc.eq(e.doc)?e.scrollToSelection>i.scrollToSelection?"to selection":"preserve":"reset",h=o||!this.docView.matchesNode(e.doc,u,l);!h&&e.selection.eq(i.selection)||(s=!0);let d=c=="preserve"&&s&&this.dom.style.overflowAnchor==null&&function(p){let f,m,E=p.dom.getBoundingClientRect(),A=Math.max(0,E.top);for(let _=(E.left+E.right)/2,g=A+1;g<Math.min(innerHeight,E.bottom);g+=5){let O=p.root.elementFromPoint(_,g);if(!O||O==p.dom||!p.dom.contains(O))continue;let D=O.getBoundingClientRect();if(D.top>=A-20){f=O,m=D.top;break}}return{refDOM:f,refTop:m,stack:dh(p.dom)}}(this);if(s){this.domObserver.stop();let p=h&&(wt||tt)&&!this.composing&&!i.selection.empty&&!e.selection.empty&&function(f,m){let E=Math.min(f.$anchor.sharedDepth(f.head),m.$anchor.sharedDepth(m.head));return f.$anchor.start(E)!=m.$anchor.start(E)}(i.selection,e.selection);if(h){let f=tt?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=HS(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)),!f||this.trackWrites&&this.dom.contains(this.trackWrites)||(p=!0)}p||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&function(f){let m=f.docView.domFromPos(f.state.selection.anchor,0),E=f.domSelectionRange();return xr(m.node,m.offset,E.anchorNode,E.anchorOffset)}(this))?Hn(this,p):(OE(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():d&&function({refDOM:p,refTop:f,stack:m}){let E=p?p.getBoundingClientRect().top:0;hh(m,E==0?0:E-f)}(d)}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 se){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&uh(this,n.getBoundingClientRect(),e)}else uh(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 LE(e.slice,e.move,i<0?void 0:se.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(wt){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(qr)return e.focus(qr);let n=dh(e);e.focus(qr==null?{get preventScroll(){return qr={preventScroll:!0},!0}}:void 0),qr||(qr=!1,hh(n,0))}(this.dom),Hn(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 gS(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 DS(this,n||this.state,e)}pasteHTML(e,n){return ro(this,"",e,!1,n||new ClipboardEvent("paste"))}pasteText(e,n){return ro(this,e,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(e){return du(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,[],nl(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,ql=null)}get isDestroyed(){return this.docView==null}dispatchEvent(e){return function(n,r){ic(n,r)||!Tt[r.type]||!n.editable&&r.type in Ct||Tt[r.type](n,r)}(this,e)}domSelectionRange(){let e=this.domSelection();return e?ut&&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 Bh(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?Bh(n,i):null}(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}function Vh(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"),[jt.node(0,t.state.doc.content.size,e)]}function zh(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:jt.widget(t.state.selection.from,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function Yh(t){return!t.someProp("editable",e=>e(t.state)===!1)}function Gh(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 Wh(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")}xE.prototype.dispatch=function(t){let e=this._props.dispatchTransaction;e?e.call(this,t):this.updateState(this.state.apply(t))};const Ze=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=st.from(t.nodes),e.marks=st.from(t.marks||{}),this.nodes=zd.compile(this.spec.nodes,this),this.marks=fa.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]=Mr.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?Yd(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==""?[]:Yd(this,o.split(" "))}this.nodeFromJSON=r=>Nr.fromJSON(this,r),this.markFromJSON=r=>De.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 zd))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 Ps(n,n.defaultAttrs,t,De.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})}]}}}),il=new _a("placeholder"),Xh=new Ea({key:il,props:{decorations(t){if(FE(t.doc))return;const e=t.doc.firstChild,n=jt.node(0,e.nodeSize,{class:"empty-node","data-placeholder":il.getState(t)});return Ye.create(t.doc,[n])}},state:{init:()=>"",apply:(t,e)=>{var n;return(n=t.getMeta(il))!=null?n:e}}});function FE(t){return t.childCount!==1||t.firstChild.childCount!==0}for(var ar={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:"'"},Bs={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},XS=typeof navigator!="undefined"&&/Mac/.test(navigator.platform),KS=typeof navigator!="undefined"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),at=0;at<10;at++)ar[48+at]=ar[96+at]=String(at);for(at=1;at<=24;at++)ar[at+111]="F"+at;for(at=65;at<=90;at++)ar[at]=String.fromCharCode(at+32),Bs[at]=String.fromCharCode(at);for(var ol in ar)Bs.hasOwnProperty(ol)||(Bs[ol]=ar[ol]);const qS=typeof navigator!="undefined"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function JS(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);qS?i=!0:n=!0}}return e&&(s="Alt-"+s),n&&(s="Ctrl-"+s),i&&(s="Meta-"+s),r&&(s="Shift-"+s),s}function sl(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 Kh(t){return new Ea({props:{handleKeyDown:ZS(t)}})}function ZS(t){let e=function(n){let r=Object.create(null);for(let i in n)r[JS(i)]=n[i];return r}(t);return function(n,r){let i,o=function(a){var l=!(XS&&a.metaKey&&a.shiftKey&&!a.ctrlKey&&!a.altKey||KS&&a.shiftKey&&a.key&&a.key.length==1||a.key=="Unidentified")&&a.key||(a.shiftKey?Bs:ar)[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[sl(o,r)];if(s&&s(n.state,n.dispatch,n))return!0;if(o.length==1&&o!=" "){if(r.shiftKey){let a=e[sl(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=ar[r.keyCode])&&i!=o){let a=e[sl(i,r)];if(a&&a(n.state,n.dispatch,n))return!0}}return!1}}var js=200,et=function(){};et.prototype.append=function(t){return t.length?(t=et.from(t),!this.length&&t||t.length<js&&this.leafAppend(t)||this.length<js&&t.leafPrepend(this)||this.appendInner(t)):this},et.prototype.prepend=function(t){return t.length?et.from(t).append(this):this},et.prototype.appendInner=function(t){return new QS(this,t)},et.prototype.slice=function(t,e){return t===void 0&&(t=0),e===void 0&&(e=this.length),t>=e?et.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,e))},et.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)},et.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)},et.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},et.from=function(t){return t instanceof et?t:t&&t.length?new HE(t):et.empty};var HE=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<=js)return new e(this.values.concat(r.flatten()))},e.prototype.leafPrepend=function(r){if(this.length+r.length<=js)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}(et);et.empty=new HE([]);var QS=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}(et);class tn{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((h,d)=>{if(!h.step)return r||(r=this.remapping(o,d+1),i=r.maps.length),i--,void c.push(h);if(r){c.push(new hn(h.map));let p,f=h.step.map(r.slice(i));f&&l.maybeStep(f).doc&&(p=l.mapping.maps[l.mapping.maps.length-1],u.push(new hn(p,void 0,void 0,u.length+c.length))),i--,p&&r.appendMap(p,i)}else l.maybeStep(h.step);return h.selection?(s=r?h.selection.map(r.slice(i)):h.selection,a=new tn(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 h,d=e.steps[c].invert(e.docs[c]),p=new hn(e.mapping.maps[c],d,n);(h=l&&l.merge(p))&&(p=h,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,h){let d;return c.forEach((p,f)=>{if(p.selection&&h--==0)return d=f,!1}),c.slice(d)}(a,u),s-=u),new tn(a.append(o),s)}remapping(e,n){let r=new Ao;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 tn(this.items.append(e.map(n=>new hn(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(d=>{d.selection&&a--},i);let l=n;this.items.forEach(d=>{let p=o.getMirror(--l);if(p==null)return;s=Math.min(s,p);let f=o.maps[p];if(d.step){let m=e.steps[p].invert(e.docs[p]),E=d.selection&&d.selection.map(o.slice(l+1,p));E&&a++,r.push(new hn(f,m,E))}else r.push(new hn(f))},i);let u=[];for(let d=n;d<s;d++)u.push(new hn(o.maps[d]));let c=this.items.slice(0,i).append(u).append(r),h=new tn(c,a);return h.emptyItemCount()>500&&(h=h.compress(this.items.length-r.length)),h}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 h,d=new hn(u.invert(),l,c),p=i.length-1;(h=i.length&&i[p].merge(d))?i[p]=h:i.push(d)}}else s.map&&r--},this.items.length,0),new tn(et.from(i.reverse()),o)}}tn.empty=new tn(et.empty,0);class hn{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 hn(n.getMap().invert(),n,this.selection)}}}class Wn{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 qh(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 al(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 ll=!1,Jh=null;function _s(t){let e=t.plugins;if(Jh!=e){ll=!1,Jh=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){ll=!0;break}}return ll}const Rr=new _a("history"),tO=new _a("closeHistory");function nO(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new Ea({key:Rr,state:{init:()=>new Wn(tn.empty,tn.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(tO)&&(i=new Wn(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 Wn(i.done.addTransform(s,void 0,a,_s(o)),i.undone,qh(s.mapping.maps),i.prevTime,i.prevComposition):new Wn(i.done,i.undone.addTransform(s,void 0,a,_s(o)),null,i.prevTime,i.prevComposition);if(s.getMeta("addToHistory")===!1||c&&c.getMeta("addToHistory")===!1)return(l=s.getMeta("rebased"))?new Wn(i.done.rebased(s,l),i.undone.rebased(s,l),al(i.prevRanges,s.mapping),i.prevTime,i.prevComposition):new Wn(i.done.addMaps(s.mapping.maps),i.undone.addMaps(s.mapping.maps),al(i.prevRanges,s.mapping),i.prevTime,i.prevComposition);{let h=s.getMeta("composition"),d=i.prevTime==0||!c&&i.prevComposition!=h&&(i.prevTime<(s.time||0)-a.newGroupDelay||!function(f,m){if(!m)return!1;if(!f.docChanged)return!0;let E=!1;return f.mapping.maps[0].forEach((A,_)=>{for(let g=0;g<m.length;g+=2)A<=m[g+1]&&_>=m[g]&&(E=!0)}),E}(s,i.prevRanges)),p=c?al(i.prevRanges,s.mapping):qh(s.mapping.maps);return new Wn(i.done.addTransform(s,d?o.selection.getBookmark():void 0,a,_s(o)),tn.empty,p,s.time,h==null?i.prevComposition:h)}}(n,r,e,t)},config:t,props:{handleDOMEvents:{beforeinput(e,n){let r=n.inputType,i=r=="historyUndo"?BE:r=="historyRedo"?sc:null;return!(!i||!e.editable)&&(n.preventDefault(),i(e.state,e.dispatch))}}}})}function UE(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=_s(a),c=Rr.get(a).spec.config,h=(l?s.undone:s.done).popEvent(a,u);if(!h)return null;let d=h.selection.resolve(h.transform.doc),p=(l?s.done:s.undone).addTransform(h.transform,a.selection.getBookmark(),c,u),f=new Wn(l?p:h.remaining,l?h.remaining:p,null,0,-1);return h.transform.setSelection(d).setMeta(Rr,{redo:l,historyState:f})}(i,n,t);o&&r(e?o.scrollIntoView():o)}return!0}}const BE=UE(!1,!0),sc=UE(!0,!0),jE=(t,e)=>!t.selection.empty&&(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function yi(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 Zh(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 Qh(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 ac(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 rO=(t,e)=>{let{$from:n,$to:r}=t.selection;if(t.selection instanceof se&&t.selection.node.isBlock)return!(!n.parentOffset||!ms(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 Se||t.selection instanceof zt)&&o.deleteSelection();let s=n.depth==0?null:ac(n.node(-1).contentMatchAt(n.indexAfter(-1))),a=i&&s?[{type:s}]:void 0,l=ms(o.doc,o.mapping.map(n.pos),1,a);if(a||l||!ms(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 $E(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(h,d,p){let f=d.nodeBefore,m=d.nodeAfter,E=d.index();return!(!(f&&m&&f.type.compatibleContent(m.type))||(!f.content.size&&d.parent.canReplace(E-1,E)?(p&&p(h.tr.delete(d.pos-f.nodeSize,d.pos).scrollIntoView()),0):!d.parent.canReplace(E,E+1)||!m.isTextblock&&!nh(h.doc,d.pos)||(p&&p(h.tr.clearIncompatible(d.pos,f.type,f.contentMatchAt(f.childCount)).join(d.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 h=e.pos+s.nodeSize,d=W.empty;for(let m=r.length-1;m>=0;m--)d=W.from(r[m].create(null,d));d=W.from(o.copy(d));let p=t.tr.step(new Bt(e.pos-1,h,e.pos,h,new J(d,1,0),r.length,!0)),f=h+2*r.length;nh(p.doc,f)&&p.join(f),n(p.scrollIntoView())}return!0}let l=Oe.findFrom(e,1),u=l&&l.$from.blockRange(l.$to),c=u&&ou(u);if(c!=null&&c>=e.depth)return n&&n(t.tr.lift(u,c).scrollIntoView()),!0;if(a&&yi(s,"start",!0)&&yi(o,"end")){let h=o,d=[];for(;d.push(h),!h.isTextblock;)h=h.lastChild;let p=s,f=1;for(;!p.isTextblock;p=p.firstChild)f++;if(h.canReplace(h.childCount,h.childCount,p.content)){if(n){let m=W.empty;for(let E=d.length-1;E>=0;E--)m=W.from(d[E].copy(m));n(t.tr.step(new Bt(e.pos-d.length,e.pos+s.nodeSize,e.pos+f,e.pos+s.nodeSize-f,new J(m,d.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function VE(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(Se.create(e.doc,t<0?i.start(o):i.end(o)))),!0)}}const iO=VE(-1),oO=VE(1);function mu(...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 cl=mu(jE,(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=Zh(r);if(!i){let s=r.blockRange(),a=s&&ou(s);return a!=null&&(e&&e(t.tr.lift(s,a).scrollIntoView()),!0)}let o=i.nodeBefore;if(!o.type.spec.isolating&&$E(t,i,e))return!0;if(r.parent.content.size==0&&(yi(o,"end")||se.isSelectable(o))){let s=su(t.doc,r.before(),r.after(),J.empty);if(s&&s.slice.size<s.to-s.from){if(e){let a=t.tr.step(s);a.setSelection(yi(o,"end")?Oe.findFrom(a.doc.resolve(a.mapping.map(i.pos,-1)),-1):se.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=Zh(r)}let s=o&&o.nodeBefore;return!(!s||!se.isSelectable(s))&&(e&&e(t.tr.setSelection(se.create(t.doc,o.pos-s.nodeSize)).scrollIntoView()),!0)}),ep=mu(jE,(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=Qh(r);if(!i)return!1;let o=i.nodeAfter;if($E(t,i,e))return!0;if(r.parent.content.size==0&&(yi(o,"start")||se.isSelectable(o))){let s=su(t.doc,r.before(),r.after(),J.empty);if(s&&s.slice.size<s.to-s.from){if(e){let a=t.tr.step(s);a.setSelection(yi(o,"start")?Oe.findFrom(a.doc.resolve(a.mapping.map(i.pos)),1):se.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=Qh(r)}let s=o&&o.nodeAfter;return!(!s||!se.isSelectable(s))&&(e&&e(t.tr.setSelection(se.create(t.doc,o.pos)).scrollIntoView()),!0)});const wn={Enter:mu((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 zt||r.parent.inlineContent||i.parent.inlineContent)return!1;let o=ac(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(Se.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(ms(t.doc,o))return e&&e(t.tr.split(o).scrollIntoView()),!0}let r=n.blockRange(),i=r&&ou(r);return i!=null&&(e&&e(t.tr.lift(r,i).scrollIntoView()),!0)},rO),"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=ac(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(Oe.near(l.doc.resolve(a),1)),e(l.scrollIntoView())}return!0},Backspace:cl,"Mod-Backspace":cl,"Shift-Backspace":cl,Delete:ep,"Mod-Delete":ep,"Mod-a":(t,e)=>(e&&e(t.tr.setSelection(new zt(t.doc))),!0)},zE={"Ctrl-h":wn.Backspace,"Alt-Backspace":wn["Mod-Backspace"],"Ctrl-d":wn.Delete,"Ctrl-Alt-Backspace":wn["Mod-Delete"],"Alt-Delete":wn["Mod-Delete"],"Alt-d":wn["Mod-Delete"],"Ctrl-a":iO,"Ctrl-e":oO};for(let t in wn)zE[t]=wn[t];const es=(typeof navigator!="undefined"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!(typeof os=="undefined"||!os.platform)&&os.platform()=="darwin")?zE:wn;function Eu(t,e){return t.reduce((n,r,i)=>n.concat(e(r,i)),[])}var _u={};function sO(t){return String.fromCharCode(parseInt(t.slice(1),16))}Object.defineProperty(_u,"__esModule",{value:!0});var aO=_u.encode=function(t){return btoa(encodeURIComponent(t).replace(/%[0-9A-F]{2}/g,sO))};function lO(t){return`%${`00${t.charCodeAt(0).toString(16)}`.slice(-2)}`}_u.decode=function(t){return decodeURIComponent(Array.from(atob(t),lO).join(""))};const cO=/[^a-zA-Z\u00C0-\u024F\u1E00-\u1EFF\u0400-\u044f\u0300-\u036e]+/,uO=t=>t.split(cO).filter(e=>e).map(e=>e[0]).join("")||t[Symbol.iterator]().next().value||"";function YE(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)%rp.length;return rp[e]}function Sa(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 lc(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 GE(t){try{return new URL(t).hostname}catch(e){return}}const dO=13;function tp(t){return t.keyCode===dO&&!t.shiftKey}function ts(t){const e=t.replace(/%2F/g,"/").replace(/^.*?\/([^/]+?)(?:\?.*)?$/,"$1");return decodeURIComponent(e)}function np(t,e){return t.localeCompare(e,void 0,{usage:"search",sensitivity:"base"})===0}function hO(t){return[...t.matchAll(/^|\s+/g)].map(n=>n.index+n[0].length).map(n=>t.substring(n))}const rp=["#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"],io=(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:io(r.children,e,r.type)}];case"link":return[{type:r.type,url:r.url,children:io(r.children,e,r.type)}];case"actionlink":case"actionLink":case"actionbutton":case"actionButton":return[{type:r.type,action:r.action,params:r.params,children:io(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 Sa(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 WE(t){return t.replace(/<!!mention:.*?\|([^>]*)>/gim,"@$1").replace(/<!!customemoji:(.*?)>/gim,"$1")}const ip="’'()[]{}<>:,‒–—―…!.«»-‐?‘’“”;/⁄␠·&@*\\•^¤¢$€£¥₩₪†‡°¡¿¬#№%‰‱¶′§~¨_|¦⁂☞∴‽※".replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");var cc=(t=>(t[t.italic=1]="italic",t[t.strikethrough=2]="strikethrough",t[t.bold=4]="bold",t))(cc||{});const pO=[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")}),fO={_:1,"*":4,"~":2};function mO(t){return XE(t,0)}function XE(t,e=0){const n=pO[e],r=n?function(i){const o=EO.getOrCompute(i,()=>new RegExp(`(?:^|[\\s${ip}])(?:${i.source})(?=[\\s${ip}]|$)`,"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:cc[fO[l]],children:[u]}]});return a=>{const[l,...u]=s(" "+a);return l.length>1&&u.unshift(l.substring(1)),u}}(n):()=>[t];return io(r(t),(i,o)=>o==="bold"||o==="italic"||o==="strikethrough"?XE(i,e|cc[o]):[i])}const EO=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 uc=function(t,e){return uc=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])},uc(t,e)};function Uo(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}uc(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var Je=function(){return Je=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},Je.apply(this,arguments)};var _O=Object.prototype.hasOwnProperty;function Xt(t){return typeof t=="boolean"}function Er(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 ns=/\s+/,KE=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(ns):[],o=e.split(ns);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(ns):[],o=e.split(ns);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)_O.call(e,r)&&n.push(r+'="'+e[r]+'"');return n.join(" ")},t}();function op(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 ul(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 AO=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 KE({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,h=function(_){var g={},O=_,D=O.match(/^([a-z]+):\/\//i);return D&&(g.scheme=D[1],O=O.slice(D[0].length)),(D=O.match(/^(.*?)(?=(\?|#|\/|$))/i))&&(g.host=D[1],O=O.slice(D[0].length)),(D=O.match(/^\/(.*?)(?=(\?|#|$))/i))&&(g.path=D[1],O=O.slice(D[0].length)),(D=O.match(/^\?(.*?)(?=(#|$))/i))&&(g.query=D[1],O=O.slice(D[0].length)),(D=O.match(/^#(.*?)$/i))&&(g.fragment=D[1]),g}(o);if(h.query){var d=h.query.match(/^(.*?)(?=(\?|#))(.*?)$/i);d&&(h.query=h.query.substr(0,d[1].length),o=op(h))}if(o.length<=s||(h.host&&(h.host=h.host.replace(/^www\./,""),o=op(h)),o.length<=s))return o;var p="";if(h.host&&(p+=h.host),p.length>=c)return h.host.length===s?(h.host.substr(0,s-u)+a).substr(0,c+l):ul(p,c,a).substr(0,c+l);var f="";if(h.path&&(f+="/"+h.path),h.query&&(f+="?"+h.query),f){if((p+f).length>=c)return(p+f).length==s?(p+f).substr(0,s):(p+ul(f,c-p.length,a)).substr(0,c+l);p+=f}if(h.fragment){var m="#"+h.fragment;if((p+m).length>=c)return(p+m).length==s?(p+m).substr(0,s):(p+ul(m,c-p.length,a)).substr(0,c+l);p+=m}if(h.scheme&&h.host){var E=h.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,h="";return c>0&&(h=o.substr(-1*Math.floor(c/2))),(o.substr(0,Math.ceil(c/2))+a+h).substr(0,c+l)}(e,r):function(o,s,a){return function(l,u,c){var h;return l.length>u&&(c==null?(c="&hellip;",h=3):h=c.length,l=l.substring(0,u-h)+c),l}(o,s,a)}(e,r)},t}(),Bo=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 Pi(t){return t>=65&&t<=90||t>=97&&t<=122}function dt(t){return t>=48&&t<=57}function Au(t){return t==34||t==39}function Yr(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 Gr(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 qE(t){return t<58?t<44?t==33:t==44||t==46:t<63?t>=58&&t<=59:t==63||t==94}function gO(t){return t<91?t==40:t==91||t==123}function sp(t){return t<93?t==41:t==93||t==125}var SO=/^(?: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|ελ|ευ|бг|ею|рф|გე|닷넷|닷컴|삼성|한국|コム|世界|中信|中国|中國|企业|佛山|信息|健康|八卦|公司|公益|台湾|台灣|商城|商店|商标|嘉里|在线|大拿|娱乐|家電|广东|微博|慈善|手机|招聘|政务|政府|新闻|时尚|書籍|机构|游戏|澳門|点看|移动|网址|网店|网站|网络|联通|谷歌|购物|通販|集团|食品|餐厅|香港)$/,JE=/https?:\/\//i,OO=new RegExp("^"+JE.source,"i"),DO=/^(javascript|vbscript):/i,vO=/^[A-Za-z][-.+A-Za-z0-9]*:(\/\/)?([^:/]*)/,TO=/^(?:\/\/)?([^/#?:]+)/,Do=Pi;function ZE(t){return Pi(t)||dt(t)||t===43||t===45||t===46}var ur=Gr;function gu(t){return t===95||ur(t)}function QE(t){return Gr(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)||qE(t)}function Su(t){return t===47||t===63||t===35}function ap(t){return SO.test(t.toLowerCase())}var RO=/^(?:(?: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]?)$/,CO=/[:/?#]/,IO=/^(https?:\/\/)?(?:www\.)?/i,yO=/^\/\//,e_=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 Uo(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(yO,"")),this.stripPrefix.scheme&&(n=n.replace(OO,"")),this.stripPrefix.www&&(n=function(r){return r.includes("www.")?r.replace(IO,"$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}(Bo),NO=/^mailto:/i,t_=Gr;function Ou(t){return t_(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 n_=function(t){function e(n){var r=t.call(this,n)||this;return r.type="email",r.email="",r.email=n.email,r}return Uo(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}(Bo);function r_(t){return t===95||Gr(t)}var bO=["twitter","facebook","instagram","tiktok","youtube"],kO=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 Uo(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}(Bo),LO={twitter:/^@\w{1,15}$/,instagram:/^@[_\w]{1,30}$/,soundcloud:/^@[-a-z0-9_]{3,25}$/,tiktok:/^@[.\w]{1,23}[\w]$/,youtube:/^@[-.·\w]{3,30}$/};function i_(t){return t===45||t===46||t===95||Pi(t)||dt(t)}var wO=["twitter","instagram","soundcloud","tiktok","youtube"],MO=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 Uo(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}(Bo),PO=/[-. ()]/,xO=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 o_(t){return t===45||t===46||t===32}function Du(t){return t===44||t===59}var FO=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 Uo(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}(Bo),HO=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),cp(e)&&this.schemeUrlMachinesCount++},t.prototype.removeMachine=function(e){this._stateMachines=this._stateMachines.filter(function(n){return n!==e}),cp(e)&&this.schemeUrlMachinesCount--},t.prototype.hasSchemeUrlMachine=function(){return this.schemeUrlMachinesCount>0},t}();function Oa(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(dc(r,11));else if(n===43)t.addMachine(dl(r,37));else if(n===40)t.addMachine(dl(r,32));else{if(dt(n)&&(t.addMachine(dl(r,38)),t.addMachine(function(o,s){return{type:0,startIdx:o,state:s,acceptStateReached:!1,matchType:2,octetsEncountered:1}}(r,13))),t_(n)){var i=e.toLowerCase()==="m"?15:22;t.addMachine(function(o,s){return{type:1,startIdx:o,state:s,acceptStateReached:!1}}(r,i))}Do(n)&&t.addMachine(Da(r,0)),Gr(n)&&t.addMachine(dc(r,5))}}function UO(t,e,n){n===58?e.state=2:n===45?e.state=1:ZE(n)||t.removeMachine(e)}function BO(t,e,n){var r=t.charIdx;n===45||(n===47?(t.removeMachine(e),t.addMachine(dc(r,11))):ZE(n)?e.state=0:t.removeMachine(e))}function jO(t,e,n){var r=t.charIdx;n===47?e.state=3:n===46?t.removeMachine(e):ur(n)?(e.state=5,Do(n)&&t.addMachine(Da(r,0))):t.removeMachine(e)}function $O(t,e,n){n===47?e.state=4:QE(n)?(e.state=10,e.acceptStateReached=!0):Pe(t,e)}function VO(t,e,n,r){r===47?(e.state=10,e.acceptStateReached=!0):ur(r)?(e.state=5,e.acceptStateReached=!0):t.removeMachine(e)}function zO(t,e,n){n===47?e.state=12:t.removeMachine(e)}function YO(t,e,n){ur(n)?e.state=5:t.removeMachine(e)}function GO(t,e,n){n===46?e.state=7:n===45?e.state=6:n===58?e.state=8:Su(n)?e.state=10:gu(n)||Pe(t,e)}function WO(t,e,n,r){r===45||(r===46?Pe(t,e):ur(r)?e.state=5:Pe(t,e))}function XO(t,e,n,r){r===46?Pe(t,e):ur(r)?(e.state=5,e.acceptStateReached=!0):Pe(t,e)}function KO(t,e,n){n===46?e.state=14:n===58?e.state=8:dt(n)||(Su(n)?e.state=10:Gr(n)?t.removeMachine(e):Pe(t,e))}function qO(t,e,n){dt(n)?(e.octetsEncountered++,e.octetsEncountered===4&&(e.acceptStateReached=!0),e.state=13):Pe(t,e)}function JO(t,e,n){dt(n)?e.state=9:Pe(t,e)}function ZO(t,e,n){dt(n)||(Su(n)?e.state=10:Pe(t,e))}function QO(t,e,n){QE(n)||Pe(t,e)}function eD(t,e,n,r){n.toLowerCase()==="a"?e.state=16:Wr(t,e,r)}function tD(t,e,n,r){n.toLowerCase()==="i"?e.state=17:Wr(t,e,r)}function nD(t,e,n,r){n.toLowerCase()==="l"?e.state=18:Wr(t,e,r)}function rD(t,e,n,r){n.toLowerCase()==="t"?e.state=19:Wr(t,e,r)}function iD(t,e,n,r){n.toLowerCase()==="o"?e.state=20:Wr(t,e,r)}function oD(t,e,n){n===58?e.state=21:Wr(t,e,n)}function sD(t,e,n){Ou(n)?e.state=22:t.removeMachine(e)}function Wr(t,e,n){n===46?e.state=23:n===64?e.state=24:Ou(n)?e.state=22:t.removeMachine(e)}function aD(t,e,n){n===46||n===64?t.removeMachine(e):Ou(n)?e.state=22:t.removeMachine(e)}function lD(t,e,n){ur(n)?e.state=25:t.removeMachine(e)}function cD(t,e,n){n===46?e.state=27:n===45?e.state=26:gu(n)||Pe(t,e)}function uD(t,e,n){n===45||n===46?Pe(t,e):gu(n)?e.state=25:Pe(t,e)}function dD(t,e,n){n===46||n===45?Pe(t,e):ur(n)?(e.state=25,e.acceptStateReached=!0):Pe(t,e)}function hD(t,e,n){r_(n)?(e.state=29,e.acceptStateReached=!0):t.removeMachine(e)}function pD(t,e,n){r_(n)||Pe(t,e)}function fD(t,e,n){i_(n)?(e.state=31,e.acceptStateReached=!0):t.removeMachine(e)}function mD(t,e,n){i_(n)||(Gr(n)?t.removeMachine(e):Pe(t,e))}function ED(t,e,n,r){dt(r)?e.state=38:(t.removeMachine(e),Oa(t,n,r))}function _D(t,e,n,r){dt(r)?e.state=33:t.removeMachine(e),Oa(t,n,r)}function AD(t,e,n){dt(n)?e.state=34:t.removeMachine(e)}function gD(t,e,n){dt(n)?e.state=35:t.removeMachine(e)}function SD(t,e,n){n===41?e.state=36:t.removeMachine(e)}function OD(t,e,n,r){dt(r)?e.state=38:o_(r)?e.state=39:t.removeMachine(e)}function DD(t,e,n,r){var i=t.charIdx;e.acceptStateReached=!0,Du(r)?e.state=40:r===35?e.state=41:dt(r)||(r===40?e.state=32:o_(r)?e.state=39:(Pe(t,e),Do(r)&&t.addMachine(Da(i,0))))}function vD(t,e,n,r){dt(r)?e.state=38:r===40?e.state=32:(Pe(t,e),Oa(t,n,r))}function TD(t,e,n){Du(n)||(n===35?e.state=41:dt(n)?e.state=38:Pe(t,e))}function RD(t,e,n){Du(n)?e.state=40:dt(n)?t.removeMachine(e):Pe(t,e)}function Pe(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 h,d,p=e.startIdx,f=r.slice(e.startIdx,i);switch(f=function(A){for(var _={"(":0,"{":0,"[":0},g=0;g<A.length;g++){var O=A.charAt(g);gO(C=A.charCodeAt(g))?_[O]++:sp(C)&&_[lp[O]]--}for(var D=A.length-1;D>=0;){var C;if(O=A.charAt(D),sp(C=A.charCodeAt(D))){var T=lp[O];if(!(_[T]<0))break;_[T]++,D--}else{if(!qE(C))break;D--}}return A.slice(0,D+1)}(f),e.type){case 0:if(r.charCodeAt(e.startIdx-1)===64)return;switch(e.matchType){case 0:var m=JE.exec(f);if(m&&(p+=m.index,f=f.slice(m.index)),!function(A){if(DO.test(A))return!1;var _=A.match(vO);if(!_)return!1;var g=!!_[1],O=_[2];return!!g||!(O.indexOf(".")===-1||!/[A-Za-z]/.test(O))}(f))return;break;case 1:if(!function(A){var _=A.match(TO);if(!_)return!1;var g=_[0].split(".");return!(g.length<2||!ap(g[g.length-1]))}(f))return;break;case 2:if(d=f.split(CO,1)[0],!RO.test(d))return;break;default:Fr(e)}n.push(new e_({tagBuilder:o,matchedText:f,offset:p,urlMatchType:CD(e.matchType),url:f,protocolRelativeMatch:f.slice(0,2)==="//",stripPrefix:s,stripTrailingSlash:a,decodePercentEncoding:l}));break;case 1:ap(f.split(".").pop())&&n.push(new n_({tagBuilder:o,matchedText:f,offset:p,email:f.replace(NO,"")}));break;case 2:f.length<=140&&n.push(new kO({tagBuilder:o,matchedText:f,offset:p,serviceName:u,hashtag:f.slice(1)}));break;case 3:(function(A,_){return LO[_].test(A)})(f,c)&&n.push(new MO({tagBuilder:o,matchedText:f,offset:p,serviceName:c,mention:f.slice(1)}));break;case 4:if(f=f.replace(/ +$/g,""),((h=f).charAt(0)==="+"||PO.test(h))&&xO.test(h)){var E=f.replace(/[^0-9,;#]/g,"");n.push(new FO({tagBuilder:o,matchedText:f,offset:p,number:E,plusSign:f.charAt(0)==="+"}))}break;default:Fr(e)}}}function CD(t){switch(t){case 0:return"scheme";case 1:return"tld";case 2:return"ipV4";default:Fr(t)}}var lp={")":"(","}":"{","]":"["};function Da(t,e){return{type:0,startIdx:t,state:e,acceptStateReached:!1,matchType:0}}function dc(t,e){return{type:0,startIdx:t,state:e,acceptStateReached:!1,matchType:1}}function dl(t,e){return{type:4,startIdx:t,state:e,acceptStateReached:!1}}function cp(t){return t.type===0&&t.matchType===0}var gn=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},vu=new gn,ID=function(t,e){this.charIdx=0,this.state=0,this.currentDataIdx=0,this.currentTag=vu,this.html=t,this.callbacks=e};function yD(t,e){e==="<"&&Rn(t)}function ND(t,e,n){e==="!"?t.state=13:e==="/"?(t.state=2,t.currentTag=new gn(Je(Je({},t.currentTag),{isClosing:!0}))):e==="<"?Rn(t):Pi(n)?(t.state=3,t.currentTag=new gn(Je(Je({},t.currentTag),{isOpening:!0}))):(t.state=0,t.currentTag=vu)}function bD(t,e,n){Yr(n)?(t.currentTag=new gn(Je(Je({},t.currentTag),{name:hl(t)})),t.state=4):e==="<"?Rn(t):e==="/"?(t.currentTag=new gn(Je(Je({},t.currentTag),{name:hl(t)})),t.state=12):e===">"?(t.currentTag=new gn(Je(Je({},t.currentTag),{name:hl(t)})),Cn(t)):Pi(n)||dt(n)||e===":"||en(t)}function kD(t,e,n){e===">"?en(t):Pi(n)?t.state=3:en(t)}function LD(t,e,n){Yr(n)||(e==="/"?t.state=12:e===">"?Cn(t):e==="<"?Rn(t):e==="="||Au(n)||function(r){return r>=0&&r<=31||r==127}(n)?en(t):t.state=5)}function wD(t,e,n){Yr(n)?t.state=6:e==="/"?t.state=12:e==="="?t.state=7:e===">"?Cn(t):e==="<"?Rn(t):Au(n)&&en(t)}function MD(t,e,n){Yr(n)||(e==="/"?t.state=12:e==="="?t.state=7:e===">"?Cn(t):e==="<"?Rn(t):Au(n)?en(t):t.state=5)}function PD(t,e,n){Yr(n)||(e==='"'?t.state=8:e==="'"?t.state=9:/[>=`]/.test(e)?en(t):e==="<"?Rn(t):t.state=10)}function xD(t,e){e==='"'&&(t.state=11)}function FD(t,e){e==="'"&&(t.state=11)}function HD(t,e,n){Yr(n)?t.state=4:e===">"?Cn(t):e==="<"&&Rn(t)}function UD(t,e,n){Yr(n)?t.state=4:e==="/"?t.state=12:e===">"?Cn(t):e==="<"?Rn(t):(t.state=4,function(r){r.charIdx--}(t))}function BD(t,e){e===">"?(t.currentTag=new gn(Je(Je({},t.currentTag),{isClosing:!0})),Cn(t)):en(t)}function jD(t){var e=t.html,n=t.charIdx;e.slice(n,n+2)==="--"?(t.charIdx++,t.currentTag=new gn(Je(Je({},t.currentTag),{type:"comment"})),t.state=14):e.slice(n,n+7).toUpperCase()==="DOCTYPE"?(t.charIdx+=6,t.currentTag=new gn(Je(Je({},t.currentTag),{type:"doctype"})),t.state=20):en(t)}function $D(t,e){e==="-"?t.state=15:e===">"?en(t):t.state=16}function VD(t,e){e==="-"?t.state=18:e===">"?en(t):t.state=16}function zD(t,e){e==="-"&&(t.state=17)}function YD(t,e){t.state=e==="-"?18:16}function GD(t,e){e===">"?Cn(t):e==="!"?t.state=19:e==="-"||(t.state=16)}function WD(t,e){e==="-"?t.state=17:e===">"?Cn(t):t.state=16}function XD(t,e){e===">"?Cn(t):e==="<"&&Rn(t)}function en(t){t.state=0,t.currentTag=vu}function Rn(t){t.state=1,t.currentTag=new gn({idx:t.charIdx})}function Cn(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)),en(t),t.currentDataIdx=t.charIdx+1}function hl(t){var e=t.currentTag.idx+(t.currentTag.isClosing?2:1);return t.html.slice(e,t.charIdx).toLowerCase()}var KD=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),Xt(o)?{schemeMatches:o,tldMatches:o,ipV4Matches:o}:{schemeMatches:!Xt(o.schemeMatches)||o.schemeMatches,tldMatches:!Xt(o.tldMatches)||o.tldMatches,ipV4Matches:!Xt(o.ipV4Matches)||o.ipV4Matches}}(e.urls),this.email=Xt(e.email)?e.email:this.email,this.phone=Xt(e.phone)?e.phone:this.phone,this.hashtag=e.hashtag||this.hashtag,this.mention=e.mention||this.mention,this.newWindow=Xt(e.newWindow)?e.newWindow:this.newWindow,this.stripPrefix=function(o){return o==null&&(o=!0),Xt(o)?{scheme:o,www:o}:{scheme:!Xt(o.scheme)||o.scheme,www:!Xt(o.www)||o.www}}(e.stripPrefix),this.stripTrailingSlash=Xt(e.stripTrailingSlash)?e.stripTrailingSlash:this.stripTrailingSlash,this.decodePercentEncoding=Xt(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&&bO.indexOf(i)===-1)throw new Error("invalid `hashtag` cfg '".concat(i,"' - see docs"));this.truncate=typeof(r=e.truncate)=="number"?{length:r,location:"end"}:Je({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 ID(s,a),u=s.length;l.charIdx<u;){var c=s.charAt(l.charIdx),h=s.charCodeAt(l.charIdx);switch(l.state){case 0:yD(l,c);break;case 1:ND(l,c,h);break;case 2:kD(l,c,h);break;case 3:bD(l,c,h);break;case 4:LD(l,c,h);break;case 5:wD(l,c,h);break;case 6:MD(l,c,h);break;case 7:PD(l,c,h);break;case 8:xD(l,c);break;case 9:FD(l,c);break;case 10:HD(l,c,h);break;case 11:UD(l,c,h);break;case 12:BD(l,c);break;case 13:jD(l);break;case 14:$D(l,c);break;case 15:VD(l,c);break;case 16:zD(l,c);break;case 17:YD(l,c);break;case 18:GD(l,c);break;case 19:WD(l,c);break;case 20:XD(l,c);break;default:Fr(l.state)}l.charIdx++}l.currentDataIdx<l.charIdx&&function(d){var p=d.html.slice(d.currentDataIdx,d.charIdx);d.callbacks.onText(p,d.currentDataIdx),d.currentDataIdx=d.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,h){if(h%2==0){var d=n.parseText(c,u);o.push.apply(o,function(p,f,m){if(m||arguments.length===2)for(var E,A=0,_=f.length;A<_;A++)!E&&A in f||(E||(E=Array.prototype.slice.call(f,0,A)),E[A]=f[A]);return p.concat(E||Array.prototype.slice.call(f))}([],function(p,f){var m=typeof Symbol=="function"&&p[Symbol.iterator];if(!m)return p;var E,A,_=m.call(p),g=[];try{for(;(f===void 0||f-- >0)&&!(E=_.next()).done;)g.push(E.value)}catch(O){A={error:O}}finally{try{E&&!E.done&&(m=_.return)&&m.call(_)}finally{if(A)throw A.error}}return g}(d),!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(qD);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||Er(e,function(n){return n.getType()==="hashtag"}),this.email||Er(e,function(n){return n.getType()==="email"}),this.phone||Er(e,function(n){return n.getType()==="phone"}),this.mention||Er(e,function(n){return n.getType()==="mention"}),this.urls.schemeMatches||Er(e,function(n){return n.getType()==="url"&&n.getUrlMatchType()==="scheme"}),this.urls.tldMatches||Er(e,function(n){return n.getType()==="url"&&n.getUrlMatchType()==="tld"}),this.urls.ipV4Matches||Er(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 HO(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)Oa(l,u,c);else{for(var h=l.stateMachines.length-1;h>=0;h--){var d=l.stateMachines[h];switch(d.state){case 11:zO(l,d,c);break;case 12:YO(l,d,c);break;case 0:UO(l,d,c);break;case 1:BO(l,d,c);break;case 2:jO(l,d,c);break;case 3:$O(l,d,c);break;case 4:VO(l,d,0,c);break;case 5:GO(l,d,c);break;case 6:WO(l,d,0,c);break;case 7:XO(l,d,0,c);break;case 13:KO(l,d,c);break;case 14:qO(l,d,c);break;case 8:JO(l,d,c);break;case 9:ZO(l,d,c);break;case 10:QO(l,d,c);break;case 15:eD(l,d,u,c);break;case 16:tD(l,d,u,c);break;case 17:nD(l,d,u,c);break;case 18:rD(l,d,u,c);break;case 19:iD(l,d,u,c);break;case 20:oD(l,d,c);break;case 21:sD(l,d,c);break;case 22:Wr(l,d,c);break;case 23:aD(l,d,c);break;case 24:lD(l,d,c);break;case 25:cD(l,d,c);break;case 26:uD(l,d,c);break;case 27:dD(l,d,c);break;case 28:hD(l,d,c);break;case 29:pD(l,d,c);break;case 30:fD(l,d,c);break;case 31:mD(l,d,c);break;case 32:_D(l,d,u,c);break;case 33:AD(l,d,c);break;case 34:gD(l,d,c);break;case 35:SD(l,d,c);break;case 36:OD(l,d,0,c);break;case 37:ED(l,d,u,c);break;case 38:DD(l,d,0,c);break;case 39:vD(l,d,u,c);break;case 40:TD(l,d,c);break;case 41:RD(l,d,c);break;default:Fr(d.state)}}if(!l.hasSchemeUrlMachine()&&l.charIdx>0&&Do(c)){var p=l.text.charCodeAt(l.charIdx-1);Do(p)||l.addMachine(Da(l.charIdx,0))}}}for(var f=l.stateMachines.length-1;f>=0;f--)l.stateMachines.forEach(function(m){return Pe(l,m)});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 KE?n.toAnchorString():e.buildTag().toAnchorString()},t.prototype.getTagBuilder=function(){var e=this.tagBuilder;return e||(e=this.tagBuilder=new AO({newWindow:this.newWindow,truncate:this.truncate,className:this.className})),e},t.version="4.1.5",t}();function qD(t,e){return t.getOffset()-e.getOffset()}function s_(t,e=t){return{type:"autolink",url:t,text:e}}const JD=()=>Vn(/```([^]+?)```/g,([t,e])=>({type:"codespan",text:WE(e)})),ZD=Vn(/<!!mention:([^>\s]*?)\|(.*?)>/gm,([t,e,n])=>function(r,i){return{type:"mention",id:r,text:i}}(decodeURIComponent(e),n)),QD=Vn(/<!!customemoji:(.*?)>/gm,([t,e])=>function(n){return{type:"customemoji",text:n}}(e)),a_=Vn(/<((?:https?|mailto):.*?)\|(.*?)>/gi,([t,e,n])=>function(r,i=[]){return{type:"link",url:r,children:i}}(e,[n])),ev=Vn(/<actionlink:([^|]+)[|]([^>]*)>/gi,([t,e,n])=>{const{action:r,params:i}=l_(e);return function(o,s,a=[]){return{type:"actionlink",action:o,params:s,children:a}}(r,i,[n])}),tv=Vn(/<actionbutton:([^|]+)[|]([^>]*)>/gi,([t,e,n])=>{const{action:r,params:i}=l_(e);return function(o,s,a=[]){return{type:"actionbutton",action:o,params:s,children:a}}(r,i,[n])});function l_(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 nv=Vn(/(?:^|\n)(?:\s*[-*+]\s+[^\n]+(?:\n|$))+/g,([t])=>function(e=[]){return{type:"bulletlist",children:e}}([t.startsWith(`
17
- `)?t.slice(1):t])),rv=Vn(/^\s*[-*+]\s+([^\n]+)(?:\n|$)/gm,([t,e])=>({type:"bulletpoint",children:[e]})),c_=t=>{const e=/(?:^|[^-:/\w])([(+]?[0-9](?:[-_+ ().]?[0-9]){5,11}[0-9])(?:[^-:/\w]|$)/g,n=/^(\d{4})-(\d{4})$/;let r=0;const i=[];for(const o of Sa(t,e)){const s=o[0],a=o[1],l=a.match(n);if(l&&Number(l[1])<Number(l[2]))continue;const u=s.startsWith(a)?o.index:o.index+1;u-r>0&&i.push(t.substring(r,u));const c=s_("tel:"+a.replace(/[^0-9+]/g,""),a);i.push(c),r=u+a.length}return r<t.length&&i.push(t.substring(r)),i},u_=t=>a_(t).flatMap(e=>typeof e=="string"?pl(e):["<",...pl(e.url),...pl("|"+e.children[0]+">")]),pl=t=>{const e=KD.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 n_?l="mailto:"+i.getEmail():i instanceof e_&&(l=i.getUrl()),o>r&&n.push(t.substring(r,o)),n.push(s_(l,s)),r=o+a}return r<t.length&&n.push(t.substring(r)),n},iv=["Codeblock","Codespan","FormattedLink","Wikitext","Autolink","Actions","Mention","Mention","BulletPoint","CustomEmoji"],ov=function(t){const e=RegExp(`[^${t}]+${t}?|${t}`,"g");return n=>Array.from(n.match(e)||[])}(`
18
- `);function d_(t,e={except:[]}){const n=function(i={except:[]}){var a;const o={multilineSteps:[],singlelineSteps:[]},s=(a=i.except)!=null?a:iv.filter(l=>!i.only.includes(l));return s.includes("BulletPoint")||o.multilineSteps.push(nv,rv),s.includes("Mention")||o.singlelineSteps.push(ZD),s.includes("CustomEmoji")||o.singlelineSteps.push(QD),s.includes("Codespan")||o.multilineSteps.push(JD()),s.includes("FormattedLink")||o.singlelineSteps.push(a_),s.includes("Actions")||(o.singlelineSteps.push(ev),o.singlelineSteps.push(tv)),s.includes("Wikitext")||o.singlelineSteps.push(mO),s.includes("Autolink")||o.singlelineSteps.push(u_,c_),o}(e);let r=p_(t,n);return r=f_(r,!1),r}function h_(t){return d_(t,{except:["FormattedLink","Actions"]})}function p_(t,e){let n=[t];return n=fl(n,e.multilineSteps),n=fl(n,[ov]),n=fl(n,e.singlelineSteps),n=Tu(n),n}function fl(t,e){return e.reduce((n,r)=>io(n,r),t)}function Tu(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:Tu(r.children)}:r;return e}function f_(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=f_(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 sv(){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,Ze.marks.bold),a=a.removeMark(0,a.doc.content.size,Ze.marks.italic),a=a.removeMark(0,a.doc.content.size,Ze.marks.strikethrough),a.doc.firstChild;const l=function(u){const c=[];let h,d="";return u.descendants((p,f)=>(p.isText?(d+=p.text,h!=null||(h=f)):d&&h!==void 0&&(c.push({text:d,pos:h}),d="",h=void 0),p.type!==Ze.nodes.mention)),d&&h!==void 0&&c.push({text:d,pos:h}),c}(a.doc);for(const{text:u,pos:c}of l){const h=d_(u,{only:["Wikitext"]});[a]=m_(a,c,h)}return a}(n.state.tr);n.dispatch(s)},i=Date.now();i-e<300?t||(t=window.setTimeout(r,300)):r(i)}}function m_(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=Ze.marks[o.type],a=[...i,s];[t,r]=m_(t,e,o.children,r,a),r+=1}else de.unreachable();return[t,r]}function up(t){return(e,n)=>{if(!n)return!0;let r=e.tr;const i=Se.between(e.selection.$from,e.selection.$to);return r=r.replaceRangeWith(i.from,i.from,Ze.text(t,r.storedMarks)),r=r.replaceRangeWith(i.to+1,i.to+1,Ze.text(t,r.storedMarks)),r=r.setSelection(Se.near(r.doc.resolve(i.to+1))),n(r),!0}}function av(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(h=>h.kind==="file"&&a[h.type]);if(l.length===0||o.types.includes("text/rtf"))return;const u=l[0];let c=u.getAsFile();if(!c.name){const h="image."+a[u.type];c=new File([c],h,{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 dp(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 Ea({key:new _a("suggestions"),view(){return{update:(l,u)=>{const c=this.key.getState(u),h=this.key.getState(l.state);if(!c||!h)return;const d=c.active&&h.active&&c.range.from!==h.range.from,p=!c.active&&h.active,f=c.active&&!h.active,m=!p&&!f&&c.text!==h.text;(f||d)&&o({view:l,range:c.range,text:c.text}),m&&!d&&i({view:l,range:h.range,text:h.text}),(p||d)&&r({view:l,range:h.range,text:h.text})}}},state:{init:()=>({active:!1,range:{from:0,to:0},text:null}),apply(l,u){const{selection:c}=l,h={...u};if(c.from===c.to){(c.from<u.range.from||c.from>u.range.to)&&(h.active=!1);const d=c.$from,p=e(d);p?(h.active=!0,h.range=p.range,h.text=p.text):h.active=!1}else h.active=!1;return h.active||(h.range={from:0,to:0},h.text=null),h}},props:{handleKeyDown(l,u){var h;const c=this.getState(l.state);return!!(c!=null&&c.active)&&((h=s({view:l,event:u}))!=null?h:!1)},decorations(l){const u=this.getState(l);return u!=null&&u.active?Ye.create(l.doc,[jt.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 hp=(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}},lv=/(^|\s)(:[^:\s]+:?)$/,cv=/(^|\s)(@[^@]*)$/;function E_({placeholder:t,disabled:e,className:n="",characterLimit:r,spellcheck:i}){const o=Po(),s=Q(),a=Q(null);return Z(()=>(s.current=function(l,u,c,h,d){const p=si.create({schema:Ze,plugins:[...d.filter(uv),nO(),Kh({...es,"Mod-z":BE,"Mod-y":sc,"Mod-Shift-z":sc,"Mod-b":up("*"),"Mod-i":up("_"),"Mod-Enter":es.Enter,"Shift-Enter":es.Enter,Enter:c}),Kh({Enter:es.Enter}),Xh]}),f=sv(),m=new xE(l,{handlePaste:(E,A,_)=>av(E,A,h),clipboardTextSerializer(E){const A=[];return E.content.forEach(_=>{_&&A.push(WE(_.textContent))}),A.join()},state:p,dispatchTransaction(E){E=(E=E.removeStoredMark(Ze.marks.literal)).removeStoredMark(Ze.marks.emoji);const A=m.state.apply(E);m.state.doc.eq(A.doc)||u(new $s(A.doc)),m.updateState(A),E.steps.some(_=>_ instanceof lt)&&f(m)}});return m}(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(()=>Dt(()=>{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(()=>Dt(()=>{var u;const l=s.current;l==null||l.dispatch(l.state.tr.setMeta(Xh,(u=o.placeholder$.get())!=null?u:t))}),[o,t]),Z(()=>{r&&Number.isInteger(r)&&o.setMaxLength(r)},[r,o]),L("div",{className:`t-editor ${n}`,ref:a})}function pp(t){if(t.startsWith(":"))throw new Error("Not implemented");{const e=Ze.marks.emoji.create({emoji:t});return Ze.text(t,[e])}}function fp(t,e){const n=encodeURIComponent(t);return Ze.nodes.mention.create({id:t,name:e},Ze.text(`<!!mention:${n}|${e}>`))}const na=class na{constructor(e){this.doc=e,this.size=this.doc.content.size,this.hasContent=FE(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," ")}};na.EMPTY=new na(Ze.topNodeType.create());let $s=na;function uv(t){return t!=null}function mp(t,e){let n=0;return(...r)=>{n&&(clearTimeout(n),n=0),n=setTimeout(()=>{t(...r)},e)}}class __{constructor(e,n,r){this.state$=e,this.device$=n,this.userPermissions$=r,this.currentDoc=$s.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$=Ae(),this.placeholder$=Ae()}setEditorView(e){this.editorView=e}emojiSuggesterPlugin(){if(this.device$.peek().supportsEmojiPicker)return dp({debug:!1,matcher:hp(lv,Ze),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(de.defined(e),e.canMention)return dp({debug:!1,matcher:hp(cv,Ze),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(){de.defined(this._suggestionRange),function(e,n){const{from:r,to:i}=n,o=e.state.tr.addMark(r,i,Ze.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){de.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 fp(u,c);const[h,d]=a.match(/<!!customemoji:(.*?)>/)||[null];return h&&d?pp(d):Ze.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){de.defined(this.editorView),function(n,r,i){const o=pp(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){de.defined(this.editorView),function(n,r,i){const o=fp(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 dv=Symbol("no_render");function ft(t){const e=Vt(!1),n=Q({_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 re(()=>{if(!e.get())return dv;const r=typeof t=="function"?t():t.get();return n.current.value=r,r}),n.current}function sn(){const t=xo(),e=pe(),n=Pm(),r=rt(),i=ft(e.app$.appMetadata),o=ft(e.currentUser$),s=ft(e.state$.currentConversation),a=ft(e.state$.currentConversationId),l=ft(e.t$),u=ft(e.device$),c=ft(e.themeCustom$),h=ft(e.chatSearchState$),d=ft(e.focusedMessage$),p=ft(()=>{var E;const m=e.state$.currentConversationId.get();return(E=m&&e.state$.typing.child(m).get())!=null?E:{many:!1,users:[]}}),f=ft(()=>{const m=e.state$.currentConversationId.get();return m&&e.state$.participants.child(m).get()});return le(()=>({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 f.value},get focusedMessage(){return d.value},get chatSearchState(){return h.value}}),[i,n,s,a,o,u,e,l,r,c,p,f,t,h,d])}function va(){const t=xo(),e=pe(),n=rt(),r=Pm(),i=ft(e.app$.appMetadata),o=ft(e.currentUser$),s=ft(e.t$),a=ft(e.device$),l=ft(e.themeCustom$);return le(()=>({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 hv=(()=>{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})(),Ot={};hv?(Ot.setItem=window.localStorage.setItem.bind(window.localStorage),Ot.getItem=window.localStorage.getItem.bind(window.localStorage),Ot.removeItem=window.localStorage.removeItem.bind(window.localStorage),Ot.isSupported=!0):(Ot.setItem=function(){},Ot.getItem=function(){return null},Ot.removeItem=function(){},Ot.isSupported=!1),Ot.set=(t,e)=>Ot.setItem(t,JSON.stringify(e)),Ot.get=t=>JSON.parse(Ot.getItem(t)||"null");const hc="talkjs_drafts",pv=function(t,e){let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>e(...r),t)}}(200,(t,e,n,r)=>{const i=A_(t,e,n),o=JSON.parse(Ot.getItem(hc)||"{}"),s=r();s.match(/^\s*$/)?delete o[i]:o[i]=s,Ot.setItem(hc,JSON.stringify(o))}),A_=(t,e,n)=>`draft_${t}_${e}_${n}`;function vt(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(h){h(c)})).then(s,a)}l((r=r.apply(t,e||[])).next())})}let jo=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 rs={decode:function(t,e){return vt(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 g_(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(g_(o,s));else r==="style"?Object.assign(n.style,i):r==="textContent"?n.textContent=i:n.setAttribute(r,i.toString());return n}function Ep(t,e,n){const r=g_(t,e||{});return n==null||n.appendChild(r),r}var fv=Object.freeze({__proto__:null,createElement:Ep,default:Ep});const mv={fetchBlob:function(t,e,n){return vt(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){vt(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 h=Math.round(l/a*100);o(h)};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 Ve(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 Dr(t,e){const n=Ve(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 Kn(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 Ev extends jo{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=Ve(!1),this._currentTime=Ve(0),this._duration=Ve(0),this._volume=Ve(this.media.volume),this._muted=Ve(this.media.muted),this._playbackRate=Ve(this.media.playbackRate||1),this._seeking=Ve(!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 vt(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 _v({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 Av({barAlign:t,halfHeight:e,topHeight:n,totalHeight:r,canvasHeight:i}){return t==="top"?0:t==="bottom"?i-r:e-n}function _p(t,e,n){const r=e-t.left,i=n-t.top;return[r/t.width,i/t.height]}function S_(t){return!!(t.barWidth||t.barGap||t.barAlign)}function Ap(t,e){if(!S_(e))return t;const n=e.barWidth||.5,r=n+(e.barGap||n/2);return r===0?t:Math.floor(t/r)*r}function gp({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 Sp(t){const e=t._cleanup;typeof e=="function"&&e()}class gv extends jo{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]=_p(r,n.clientX,n.clientY);this.emit("click",i,o)}),this.wrapper.addEventListener("dblclick",n=>{const r=this.wrapper.getBoundingClientRect(),[i,o]=_p(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=Ve({scrollLeft:n.scrollLeft,scrollWidth:n.scrollWidth,clientWidth:n.clientWidth}),i=Dr(()=>function(a){const{scrollLeft:l,scrollWidth:u,clientWidth:c}=a;if(u===0)return{startX:0,endX:1};const h=l/u,d=(l+c)/u;return{startX:Math.max(0,Math.min(1,h)),endX:Math.max(0,Math.min(1,d))}}(r.value),[r]),o=Dr(()=>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),Sp(r)}}}(this.scrollContainer);const e=Kn(()=>{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=Ve(null),l=new Map,u=matchMedia("(pointer: coarse)").matches;let c=()=>{};const h=d=>{if(d.button!==o||(l.set(d.pointerId,d),l.size>1))return;let p=d.clientX,f=d.clientY,m=!1;const E=Date.now(),A=n.getBoundingClientRect(),{left:_,top:g}=A,O=S=>{if(S.defaultPrevented||l.size>1||u&&Date.now()-E<s)return;const v=S.clientX,y=S.clientY,b=v-p,M=y-f;(m||Math.abs(b)>i||Math.abs(M)>i)&&(S.preventDefault(),S.stopPropagation(),m||(a.set({type:"start",x:p-_,y:f-g}),m=!0),a.set({type:"move",x:v-_,y:y-g,deltaX:b,deltaY:M}),p=v,f=y)},D=S=>{if(l.delete(S.pointerId),m){const v=S.clientX,y=S.clientY;a.set({type:"end",x:v-_,y:y-g})}c()},C=S=>{l.delete(S.pointerId),S.relatedTarget&&S.relatedTarget!==document.documentElement||D(S)},T=S=>{m&&(S.stopPropagation(),S.preventDefault())},I=S=>{S.defaultPrevented||l.size>1||m&&S.preventDefault()};document.addEventListener("pointermove",O),document.addEventListener("pointerup",D),document.addEventListener("pointerout",C),document.addEventListener("pointercancel",C),document.addEventListener("touchmove",I,{passive:!1}),document.addEventListener("click",T,{capture:!0}),c=()=>{document.removeEventListener("pointermove",O),document.removeEventListener("pointerup",D),document.removeEventListener("pointerout",C),document.removeEventListener("pointercancel",C),document.removeEventListener("touchmove",I),setTimeout(()=>{document.removeEventListener("click",T,{capture:!0})},10)}};return n.addEventListener("pointerdown",h),{signal:a,cleanup:()=>{c(),n.removeEventListener("pointerdown",h),l.clear(),Sp(a)}}}(this.wrapper);const e=Kn(()=>{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=`
14
+ `);return{dom:l,text:d,slice:e}}function TE(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",d=>{e=d(e,a||r,t)}),a)return s=new J(X.from(t.state.schema.text(e.replace(/\r\n?/g,`
15
+ `))),0,0),t.someProp("transformPasted",d=>{s=d(s,t,!0)}),s;let h=t.someProp("clipboardTextParser",d=>d(e,i,r,t));if(h)s=h;else{let d=i.marks(),{schema:p}=t.state,f=Pi.fromSchema(p);o=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(m=>{let E=o.appendChild(document.createElement("p"));m&&E.appendChild(f.serializeNode(p.text(m,d)))})}}else t.someProp("transformPastedHTML",h=>{n=h(n,t)}),o=function(h){let d=/^(\s*<meta [^>]*>)*/.exec(h);d&&(h=h.slice(d[0].length));let p,f=NE().createElement("div"),m=/<([a-z][^>\s]+)/i.exec(h);if((p=m&&yE[m[1].toLowerCase()])&&(h=p.map(E=>"<"+E+">").join("")+h+p.map(E=>"</"+E+">").reverse().join("")),f.innerHTML=function(E){let A=window.trustedTypes;return A?(tl||(tl=A.defaultPolicy||A.createPolicy("ProseMirrorClipboard",{createHTML:_=>_})),tl.createHTML(E)):E}(h),p)for(let E=0;E<p.length;E++)f=f.querySelector(p[E])||f;return f}(n),Fo&&function(h){let d=h.querySelectorAll(et?"span:not([class]):not([style])":"span.Apple-converted-space");for(let p=0;p<d.length;p++){let f=d[p];f.childNodes.length==1&&f.textContent==" "&&f.parentNode&&f.parentNode.replaceChild(h.ownerDocument.createTextNode(" "),f)}}(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 h=+c[3];h>0;h--){let d=o.firstChild;for(;d&&d.nodeType!=1;)d=d.nextSibling;if(!d)break;o=d}if(s||(s=(t.someProp("clipboardParser")||t.someProp("domParser")||Ao.fromSchema(t.state.schema)).parseSlice(o,{preserveWhitespace:!(!l&&!c),context:i,ruleFromNode:d=>d.nodeName!="BR"||d.nextSibling||!d.parentNode||PS.test(d.parentNode.nodeName)?null:{ignore:!0}})),c)s=function(h,d){if(!h.size)return h;let p,f=h.content.firstChild.type.schema;try{p=JSON.parse(d)}catch(_){return h}let{content:m,openStart:E,openEnd:A}=h;for(let _=p.length-2;_>=0;_-=2){let g=f.nodes[p[_]];if(!g||g.hasRequiredAttrs())break;m=X.from(g.create(p[_+1],m)),E++,A++}return new J(m,E,A)}(Lh(s,+c[1],+c[2]),c[4]);else if(s=J.maxOpen(function(h,d){if(h.childCount<2)return h;for(let p=d.depth;p>=0;p--){let f,m=d.node(p).contentMatchAt(d.index(p)),E=[];if(h.forEach(A=>{if(!E)return;let _,g=m.findWrapping(A.type);if(!g)return E=null;if(_=E.length&&f.length&&CE(g,f,A,E[E.length-1],0))E[E.length-1]=_;else{E.length&&(E[E.length-1]=IE(E[E.length-1],f.length));let O=RE(A,g);E.push(O),m=m.matchType(O.type),f=g}}),E)return X.from(E)}return h}(s.content,i),!0),s.openStart||s.openEnd){let h=0,d=0;for(let p=s.content.firstChild;h<s.openStart&&!p.type.spec.isolating;h++,p=p.firstChild);for(let p=s.content.lastChild;d<s.openEnd&&!p.type.spec.isolating;d++,p=p.lastChild);s=Lh(s,h,d)}return t.someProp("transformPasted",h=>{s=h(s,t,l)}),s}const PS=/^(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 RE(t,e,n=0){for(let r=e.length-1;r>=n;r--)t=e[r].create(null,X.from(t));return t}function CE(t,e,n,r,i){if(i<t.length&&i<e.length&&t[i]==e[i]){let o=CE(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(X.from(RE(n,t,i+1))))}}function IE(t,e){if(e==0)return t;let n=t.content.replaceChild(t.childCount-1,IE(t.lastChild,e-1)),r=t.contentMatchAt(t.childCount).fillBefore(X.empty,!0);return t.copy(n.append(r))}function ic(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=ic(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(X.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,s.copy(a))}function Lh(t,e,n){return e<t.openStart&&(t=new J(ic(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new J(ic(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}const yE={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 wh=null;function NE(){return wh||(wh=document.implementation.createHTMLDocument("title"))}let tl=null;const Ot={},Tt={},xS={touchstart:!0,touchmove:!0};class FS{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 er(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function nl(t){t.someProp("handleDOMEvents",e=>{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=r=>oc(t,r))})}function oc(t,e){return t.someProp("handleDOMEvents",n=>{let r=n[e.type];return!!r&&(r(t,e)||e.defaultPrevented)})}function HS(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 Hs(t){return{left:t.clientX,top:t.clientY}}function pu(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 fi(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 US(t,e,n,r,i){return pu(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 re&&(a=u.node);let c=o.state.doc.resolve(s);for(let h=c.depth+1;h>0;h--){let d=h>c.depth?c.nodeAfter:c.node(h);if(re.isSelectable(d)){l=a&&u.$from.depth>0&&h>=u.$from.depth&&c.before(u.$from.depth+1)==u.$from.pos?c.before(u.$from.depth):c.before(h);break}}return l!=null&&(fi(o,re.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&&re.isSelectable(l))&&(fi(o,new re(a)),!0)}(t,n))}function BS(t,e,n,r){return pu(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",i=>i(t,e,r))}function jS(t,e,n,r){return pu(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&&(fi(i,Ee.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),h=l.before(u);if(c.inlineContent)fi(i,Ee.create(a,h+1,h+1+c.content.size));else{if(!re.isSelectable(c))continue;fi(i,re.create(a,h))}return!0}}(t,n,r)}function sc(t){return Us(t)}Tt.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=n.keyCode==16||n.shiftKey,!Mh(t,n)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!Mn||!et||n.keyCode!=13))if(n.keyCode!=229&&t.domObserver.forceFlush(),!yi||n.keyCode!=13||n.ctrlKey||n.altKey||n.metaKey)t.someProp("handleKeyDown",r=>r(t,n))||MS(t,n)?n.preventDefault():er(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,Dr(13,"Enter"))),t.input.lastIOSEnter=0)},200)}},Tt.keyup=(t,e)=>{e.keyCode==16&&(t.input.shiftKey=!1)},Tt.keypress=(t,e)=>{let n=e;if(Mh(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 Ee&&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 bE=Yt?"metaKey":"ctrlKey";Ot.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let r=sc(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[bE]&&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(Hs(n));s&&(o=="singleClick"?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new $S(t,s,n,!!r)):(o=="doubleClick"?BS:jS)(t,s.pos,s.inside,n)?n.preventDefault():er(t,"pointer"))};class $S{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[bE],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 re&&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)),er(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(()=>Fn(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(Hs(e))),this.updateAllowDefault(e),this.allowDefault||!n?er(this.view,"pointer"):US(this.view,n.pos,n.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||ct&&this.mightDrag&&!this.mightDrag.node.isAtom||et&&!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)?(fi(this.view,Ae.near(this.view.state.doc.resolve(n.pos))),e.preventDefault()):er(this.view,"pointer")}move(e){this.updateAllowDefault(e),er(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 Mh(t,e){return!!t.composing||!!(ct&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500)&&(t.input.compositionEndedAt=-2e8,!0)}Ot.touchstart=t=>{t.input.lastTouch=Date.now(),sc(t),er(t,"pointer")},Ot.touchmove=t=>{t.input.lastTouch=Date.now(),er(t,"pointer")},Ot.contextmenu=t=>sc(t);const VS=Mn?5e3:-1;function Ph(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>Us(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 zS(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=Gt(i=i.childNodes[o-1])}else{if(!i.parentNode||Oo(i))return null;o=lt(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||Oo(i))return null;o=lt(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 Us(t,e=!1){if(!(Mn&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),kE(t),e||t.docView&&t.docView.dirty){let n=uu(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}}Tt.compositionstart=Tt.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,n=e.selection.$to;if(e.selection instanceof Ee&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)||et&&pE&&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(),Us(t,!0),t.markCursor=null;else if(Us(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}Ph(t,VS)},Tt.compositionend=(t,e)=>{t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=e.timeStamp,t.input.compositionPendingChanges=t.domObserver.pendingRecords().length?t.input.compositionID:0,t.input.compositionNode=null,t.input.badSafariComposition?t.domObserver.forceFlush():t.input.compositionPendingChanges&&Promise.resolve().then(()=>t.domObserver.flush()),t.input.compositionID++,Ph(t,20))};const ro=bt&&rr<15||yi&&DS<604;function io(t,e,n,r,i){let o=TE(t,e,n,r,t.state.selection.$from);if(t.someProp("handlePaste",l=>l(t,i,o||J.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 LE(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," "):""}Ot.copy=Tt.cut=(t,e)=>{let n=e,r=t.state.selection,i=n.type=="cut";if(r.empty)return;let o=ro?null:n.clipboardData,s=r.content(),{dom:a,text:l}=hu(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 h=u.dom.parentNode.appendChild(document.createElement("div"));h.appendChild(c),h.style.cssText="position: fixed; left: -10000px; top: 10px";let d=getSelection(),p=document.createRange();p.selectNodeContents(c),u.dom.blur(),d.removeAllRanges(),d.addRange(p),setTimeout(()=>{h.parentNode&&h.parentNode.removeChild(h),u.focus()},50)}(t,a),i&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))},Tt.paste=(t,e)=>{let n=e;if(t.composing&&!Mn)return;let r=ro?null:n.clipboardData,i=t.input.shiftKey&&t.input.lastKeyCode!=45;r&&io(t,LE(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?io(o,l.value,null,u,s):io(o,l.textContent,l.innerHTML,u,s)},50)}(t,n)};class wE{constructor(e,n,r){this.slice=e,this.move=n,this.node=r}}const YS=Yt?"altKey":"ctrlKey";function xh(t,e){let n=t.someProp("dragCopies",r=>!r(e));return n!=null?n:!e[YS]}Ot.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(Hs(n));if(!(s&&s.pos>=o.from&&s.pos<=(o instanceof re?o.to-1:o.to))){if(r&&r.mightDrag)i=re.create(t.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let h=t.docView.nearestDesc(n.target,!0);h&&h.node.type.spec.draggable&&h!=t.docView&&(i=re.create(t.state.doc,h.posBefore))}}let a=(i||t.state.selection).content(),{dom:l,text:u,slice:c}=hu(t,a);(!n.dataTransfer.files.length||!et||hE>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(ro?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",ro||n.dataTransfer.setData("text/plain",u),t.dragging=new wE(c,xh(t,n),i)},Ot.dragend=t=>{let e=t.dragging;window.setTimeout(()=>{t.dragging==e&&(t.dragging=null)},50)},Tt.dragover=Tt.dragenter=(t,e)=>e.preventDefault(),Tt.drop=(t,e)=>{try{(function(n,r,i){if(!r.dataTransfer)return;let o=n.posAtCoords(Hs(r));if(!o)return;let s=n.state.doc.resolve(o.pos),a=i&&i.slice;a?n.someProp("transformPasted",m=>{a=m(a,n,!1)}):a=TE(n,LE(r.dataTransfer),ro?null:r.dataTransfer.getData("text/html"),!1,s);let l=!(!i||!xh(n,r));if(n.someProp("handleDrop",m=>m(n,r,a||J.empty,l)))return void r.preventDefault();if(!a)return;r.preventDefault();let u=a?function(m,E,A){let _=m.resolve(E);if(!A.content.size)return E;let g=A.content;for(let O=0;O<A.openStart;O++)g=g.firstChild.content;for(let O=1;O<=(A.openStart==0&&A.size?2:1);O++)for(let D=_.depth;D>=0;D--){let R=D==_.depth?0:_.pos<=(_.start(D+1)+_.end(D+1))/2?-1:1,T=_.index(D)+(R>0?1:0),I=_.node(D),S=!1;if(O==1)S=I.canReplace(T,T,g);else{let v=I.contentMatchAt(T).findWrapping(g.firstChild.type);S=v&&I.canReplaceWith(T,T,v[0])}if(S)return R==0?_.pos:R<0?_.before(D+1):_.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:m}=i;m?m.replace(c):c.deleteSelection()}let h=c.mapping.map(u),d=a.openStart==0&&a.openEnd==0&&a.content.childCount==1,p=c.doc;if(d?c.replaceRangeWith(h,h,a.content.firstChild):c.replaceRange(h,h,a),c.doc.eq(p))return;let f=c.doc.resolve(h);if(d&&re.isSelectable(a.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(a.content.firstChild))c.setSelection(new re(f));else{let m=c.mapping.map(u);c.mapping.maps[c.mapping.maps.length-1].forEach((E,A,_,g)=>m=g),c.setSelection(du(n,f,c.doc.resolve(m)))}n.focus(),n.dispatch(c.setMeta("uiEvent","drop"))})(t,e,t.dragging)}finally{t.dragging=null}},Ot.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())&&Fn(t)},20))},Ot.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)},Ot.beforeinput=(t,e)=>{if(et&&Mn&&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,Dr(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 Tt)Ot[t]=Tt[t];function Do(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 Bs{constructor(e,n){this.toDOM=e,this.spec=n||kr,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 Ht(o-r,o-r,this)}valid(){return!0}eq(e){return this==e||e instanceof Bs&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Do(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class or{constructor(e,n){this.attrs=e,this.spec=n||kr}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 Ht(o,s,this)}valid(e,n){return n.from<n.to}eq(e){return this==e||e instanceof or&&Do(this.attrs,e.attrs)&&Do(this.spec,e.spec)}static is(e){return e.type instanceof or}destroy(){}}class fu{constructor(e,n){this.attrs=e,this.spec=n||kr}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 Ht(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 fu&&Do(this.attrs,e.attrs)&&Do(this.spec,e.spec)}destroy(){}}class Ht{constructor(e,n,r){this.from=e,this.to=n,this.type=r}copy(e,n){return new Ht(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 Ht(e,e,new Bs(n,r))}static inline(e,n,r,i){return new Ht(e,n,new or(r,i))}static node(e,n,r,i){return new Ht(e,n,new fu(r,i))}get spec(){return this.type.spec}get inline(){return this.type instanceof or}get widget(){return this.type instanceof Bs}}const ti=[],kr={};class je{constructor(e,n){this.local=e.length?e:ti,this.children=n.length?n:ti}static create(e,n){return n.length?_s(n,e,0,kr):ht}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==ht||e.maps.length==0?this:this.mapInner(e,n,0,0,r||kr)}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,h,d,p){let f=a.slice();for(let E=0,A=d;E<u.maps.length;E++){let _=0;u.maps[E].forEach((g,O,D,R)=>{let T=R-D-(O-g);for(let I=0;I<f.length;I+=3){let S=f[I+1];if(S<0||g>S+A-_)continue;let v=f[I]+A-_;O>=v?f[I+1]=g<=v?-2:-1:g>=A&&T&&(f[I]+=T,f[I+1]+=T)}_+=T}),A=u.maps[E].map(A,-1)}let m=!1;for(let E=0;E<f.length;E+=3)if(f[E+1]<0){if(f[E+1]==-2){m=!0,f[E+1]=-1;continue}let A=u.map(a[E]+d),_=A-h;if(_<0||_>=c.content.size){m=!0;continue}let g=u.map(a[E+1]+d,-1)-h,{index:O,offset:D}=c.content.findIndex(_),R=c.maybeChild(O);if(R&&D==_&&D+R.nodeSize==g){let T=f[E+2].mapInner(u,R,A+1,a[E]+d+1,p);T!=ht?(f[E]=_,f[E+1]=g,f[E+2]=T):(f[E+1]=-2,m=!0)}else m=!0}if(m){let E=function(_,g,O,D,R,T,I){function S(v,y){for(let b=0;b<v.local.length;b++){let M=v.local[b].map(D,R,y);M?O.push(M):I.onRemove&&I.onRemove(v.local[b].spec)}for(let b=0;b<v.children.length;b+=3)S(v.children[b+2],v.children[b]+y+1)}for(let v=0;v<_.length;v+=3)_[v+1]==-1&&S(_[v+2],g[v]+T+1);return O}(f,a,l,u,h,d,p),A=_s(E,c,0,p);l=A.local;for(let _=0;_<f.length;_+=3)f[_+1]<0&&(f.splice(_,3),_-=3);for(let _=0,g=0;_<A.children.length;_+=3){let O=A.children[_];for(;g<f.length&&f[g]<O;)g+=3;f.splice(g,0,A.children[_],A.children[_+1],A.children[_+2])}}return new je(l.sort(Rr),f)}(this.children,s||[],e,n,r,i,o):s?new je(s.sort(Rr),ti):ht}add(e,n){return n.length?this==ht?je.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=PE(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,_s(u,a,c+1,kr)),o+=3}});let s=ME(o?xE(n):n,-r);for(let a=0;a<s.length;a++)s[a].type.valid(e,s[a])||s.splice(a--,1);return new je(s.length?this.local.concat(s).sort(Rr):this.local,i||this.children)}remove(e){return e.length==0||this==ht?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,h=0;h<e.length;h++)(c=e[h])&&c.from>a&&c.to<l&&(e[h]=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!=ht?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 je(i,r):ht}forChild(e,n){if(this==ht)return this;if(n.isLeaf)return je.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 or){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 je(i.sort(Rr),ti);return r?new qn([a,r]):a}return r||ht}eq(e){if(this==e)return!0;if(!(e instanceof je)||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 mu(this.localsInner(e))}localsInner(e){if(this==ht)return ti;if(e.inlineContent||!this.local.some(or.is))return this.local;let n=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof or||n.push(this.local[r]);return n}forEachSet(e){e(this)}}je.empty=new je([],[]),je.removeOverlap=mu;const ht=je.empty;class qn{constructor(e){this.members=e}map(e,n){const r=this.members.map(i=>i.map(e,n,kr));return qn.from(r)}forChild(e,n){if(n.isLeaf)return je.empty;let r=[];for(let i=0;i<this.members.length;i++){let o=this.members[i].forChild(e,n);o!=ht&&(o instanceof qn?r=r.concat(o.members):r.push(o))}return qn.from(r)}eq(e){if(!(e instanceof qn)||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?mu(r?n:n.sort(Rr)):ti}static from(e){switch(e.length){case 0:return ht;case 1:return e[0];default:return new qn(e.every(n=>n instanceof je)?e:e.reduce((n,r)=>n.concat(r instanceof je?r:r.members),[]))}}forEachSet(e){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(e)}}function ME(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 Ht(i.from+e,i.to+e,i.type))}return n}function PE(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 xE(t){let e=[];for(let n=0;n<t.length;n++)t[n]!=null&&e.push(t[n]);return e}function _s(t,e,n,r){let i=[],o=!1;e.forEach((a,l)=>{let u=PE(t,a,l+n);if(u){o=!0;let c=_s(u,a,n+l+1,r);c!=ht&&i.push(l,l+a.nodeSize,c)}});let s=ME(o?xE(t):t,-n).sort(Rr);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 je(s,i):ht}function Rr(t,e){return t.from-e.from||t.to-e.to}function mu(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),Fh(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),Fh(e,i+1,o.copy(r.to,o.to)))}}return e}function Fh(t,e,n){for(;e<t.length&&Rr(n,t[e])>0;)e++;t.splice(e,0,n)}function rl(t){let e=[];return t.someProp("decorations",n=>{let r=n(t.state);r&&r!=ht&&e.push(r)}),t.cursorWrapper&&e.push(je.create(t.state.doc,[t.cursorWrapper.deco])),qn.from(e)}const GS={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},WS=bt&&rr<=11;class XS{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 KS{constructor(e,n){this.view=e,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new XS,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]);bt&&rr<=11&&r.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():ct&&e.composing&&r.some(i=>i.type=="childList"&&i.target.nodeName=="TR")?(e.input.badSafariComposition=!0,this.flushSoon()):this.flush()}),WS&&(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,GS)),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(Rh(this.view)){if(this.suppressingSelectionUpdates)return Fn(this.view);if(bt&&rr<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&xr(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=Ii(o))r.add(o);for(let o=e.anchorNode;o;o=Ii(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)&&Rh(e)&&!this.ignoreSelectionChange(r),o=-1,s=-1,a=!1,l=[];if(e.editable)for(let c=0;c<n.length;c++){let h=this.registerMutation(n[c],l);h&&(o=o<0?h.from:Math.min(h.from,o),s=s<0?h.to:Math.max(h.to,s),h.typeOver&&(a=!0))}if(Kt&&l.length){let c=l.filter(h=>h.nodeName=="BR");if(c.length==2){let[h,d]=c;h.parentNode&&h.parentNode.parentNode==d.parentNode?d.remove():h.remove()}else{let{focusNode:h}=this.currentSelection;for(let d of c){let p=d.parentNode;!p||p.nodeName!="LI"||h&&qS(e,h)==p||d.remove()}}}else if((et||ct)&&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 h=c.nextSibling;h&&h.nodeType==1&&h.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&&ga(r)&&(u=uu(e))&&u.eq(Ae.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,Fn(e),this.currentSelection.set(r),e.scrollToSelection()):(o>-1||i)&&(o>-1&&(e.docView.markDirty(o,s),function(c){if(!Hh.has(c)&&(Hh.set(c,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(c.dom).whiteSpace)!==-1)){if(c.requiresGeckoHackNode=Kt,Uh)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."),Uh=!0}}(e)),e.input.badSafariComposition&&(e.input.badSafariComposition=!1,function(c,h){var d;let{focusNode:p,focusOffset:f}=c.domSelectionRange();for(let m of h)if(((d=m.parentNode)===null||d===void 0?void 0:d.nodeName)=="TR"){let E=m.nextSibling;for(;E&&E.nodeName!="TD"&&E.nodeName!="TH";)E=E.nextSibling;if(E){let A=E;for(;;){let _=A.firstChild;if(!_||_.nodeType!=1||_.contentEditable=="false"||/^(BR|IMG)$/.test(_.nodeName))break;A=_}A.insertBefore(m,A.firstChild),p==m&&c.domSelection().collapse(m,f)}else m.parentNode.removeChild(m)}}(e,l)),this.handleDOMChange(o,s,a,l),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(r)||Fn(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(bt&&rr<=11&&e.addedNodes.length)for(let u=0;u<e.addedNodes.length;u++){let{previousSibling:c,nextSibling:h}=e.addedNodes[u];(!c||Array.prototype.indexOf.call(e.addedNodes,c)<0)&&(i=c),(!h||Array.prototype.indexOf.call(e.addedNodes,h)<0)&&(o=h)}let s=i&&i.parentNode==e.target?lt(i)+1:0,a=r.localPosFromDOM(e.target,s,-1),l=o&&o.parentNode==e.target?lt(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 Hh=new WeakMap,Uh=!1;function Bh(t,e){let n=e.startContainer,r=e.startOffset,i=e.endContainer,o=e.endOffset,s=t.domAtPos(t.state.selection.anchor);return xr(s.node,s.offset,i,o)&&([n,r,i,o]=[i,o,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:o}}function qS(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 JS(t){let e=t.pmViewDesc;if(e)return e.parseRule();if(t.nodeName=="BR"&&t.parentNode){if(ct&&/^(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||ct&&/^(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 ZS=/^(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 QS(t,e,n,r,i){let o=t.input.compositionPendingChanges||(t.composing?t.input.compositionID:0);if(t.input.compositionPendingChanges=0,e<0){let T=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,I=uu(t,T);if(I&&!t.state.selection.eq(I)){if(et&&Mn&&t.input.lastKeyCode===13&&Date.now()-100<t.input.lastKeyCodeTime&&t.someProp("handleKeyDown",v=>v(t,Dr(13,"Enter"))))return;let S=t.state.tr.setSelection(I);T=="pointer"?S.setMeta("pointer",!0):T=="key"&&S.scrollIntoView(),o&&S.setMeta("composition",o),t.dispatch(S)}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,h=function(T,I,S){let v,{node:y,fromOffset:b,toOffset:M,from:k,to:P}=T.docView.parseRange(I,S),B=T.domSelectionRange(),F=B.anchorNode;if(F&&T.dom.contains(F.nodeType==1?F:F.parentNode)&&(v=[{node:F,offset:B.anchorOffset}],ga(B)||v.push({node:B.focusNode,offset:B.focusOffset})),et&&T.input.lastKeyCode===8)for(let ie=M;ie>b;ie--){let ue=y.childNodes[ie-1],le=ue.pmViewDesc;if(ue.nodeName=="BR"&&!le){M=ie;break}if(!le||le.size)break}let V=T.state.doc,G=T.someProp("domParser")||Ao.fromSchema(T.state.schema),z=V.resolve(k),K=null,_e=G.parse(y,{topNode:z.parent,topMatch:z.parent.contentMatchAt(z.index()),topOpen:!0,from:b,to:M,preserveWhitespace:z.parent.type.whitespace!="pre"||"full",findPositions:v,ruleFromNode:JS,context:z});if(v&&v[0].pos!=null){let ie=v[0].pos,ue=v[1]&&v[1].pos;ue==null&&(ue=ie),K={anchor:ie+k,head:ue+k}}return{doc:_e,sel:K,from:k,to:P}}(t,e,n),d=t.state.doc,p=d.slice(h.from,h.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 f=function(T,I,S,v,y){let b=T.findDiffStart(I,S);if(b==null)return null;let{a:M,b:k}=T.findDiffEnd(I,S+T.size,S+I.size);if(y=="end"&&(v-=M+Math.max(0,b-Math.min(M,k))-b),M<b&&T.size<I.size){let P=v<=b&&v>=M?b-v:0;b-=P,b&&b<I.size&&$h(I.textBetween(b-1,b+1))&&(b+=P?1:-1),k=b+(k-M),M=b}else if(k<b){let P=v<=b&&v>=k?b-v:0;b-=P,b&&b<T.size&&$h(T.textBetween(b-1,b+1))&&(b+=P?1:-1),M=b+(M-k),k=b}return{start:b,endA:M,endB:k}}(p.content,h.doc.content,h.from,l,u);if(f&&t.input.domChangeCount++,(yi&&t.input.lastIOSEnter>Date.now()-225||Mn)&&i.some(T=>T.nodeType==1&&!ZS.test(T.nodeName))&&(!f||f.endA>=f.endB)&&t.someProp("handleKeyDown",T=>T(t,Dr(13,"Enter"))))return void(t.input.lastIOSEnter=0);if(!f){if(!(r&&c instanceof Ee&&!c.empty&&c.$head.sameParent(c.$anchor))||t.composing||h.sel&&h.sel.anchor!=h.sel.head){if(h.sel){let T=jh(t,t.state.doc,h.sel);if(T&&!T.eq(t.state.selection)){let I=t.state.tr.setSelection(T);o&&I.setMeta("composition",o),t.dispatch(I)}}return}f={start:c.from,endA:c.to,endB:c.to}}t.state.selection.from<t.state.selection.to&&f.start==f.endB&&t.state.selection instanceof Ee&&(f.start>t.state.selection.from&&f.start<=t.state.selection.from+2&&t.state.selection.from>=h.from?f.start=t.state.selection.from:f.endA<t.state.selection.to&&f.endA>=t.state.selection.to-2&&t.state.selection.to<=h.to&&(f.endB+=t.state.selection.to-f.endA,f.endA=t.state.selection.to)),bt&&rr<=11&&f.endB==f.start+1&&f.endA==f.start&&f.start>h.from&&h.doc.textBetween(f.start-h.from-1,f.start-h.from+1)=="  "&&(f.start--,f.endA--,f.endB--);let m=h.doc.resolveNoCache(f.start-h.from),E=h.doc.resolveNoCache(f.endB-h.from),A=d.resolve(f.start),_=m.sameParent(E)&&m.parent.inlineContent&&A.end()>=f.endA;if((yi&&t.input.lastIOSEnter>Date.now()-225&&(!_||i.some(T=>T.nodeName=="DIV"||T.nodeName=="P"))||!_&&m.pos<h.doc.content.size&&(!m.sameParent(E)||!m.parent.inlineContent)&&m.pos<E.pos&&!/\S/.test(h.doc.textBetween(m.pos,E.pos,"","")))&&t.someProp("handleKeyDown",T=>T(t,Dr(13,"Enter"))))return void(t.input.lastIOSEnter=0);if(t.state.selection.anchor>f.start&&function(T,I,S,v,y){if(S-I<=y.pos-v.pos||il(v,!0,!1)<y.pos)return!1;let b=T.resolve(I);if(!v.parent.isTextblock){let k=b.nodeAfter;return k!=null&&S==I+k.nodeSize}if(b.parentOffset<b.parent.content.size||!b.parent.isTextblock)return!1;let M=T.resolve(il(b,!0,!0));return!(!M.parent.isTextblock||M.pos>S||il(M,!0,!1)<S)&&v.parent.content.cut(v.parentOffset).eq(M.parent.content)}(d,f.start,f.endA,m,E)&&t.someProp("handleKeyDown",T=>T(t,Dr(8,"Backspace"))))return void(Mn&&et&&t.domObserver.suppressSelectionUpdates());et&&f.endB==f.start&&(t.input.lastChromeDelete=Date.now()),Mn&&!_&&m.start()!=E.start()&&E.parentOffset==0&&m.depth==E.depth&&h.sel&&h.sel.anchor==h.sel.head&&h.sel.head==f.endA&&(f.endB-=2,E=h.doc.resolveNoCache(f.endB-h.from),setTimeout(()=>{t.someProp("handleKeyDown",function(T){return T(t,Dr(13,"Enter"))})},20));let g,O=f.start,D=f.endA,R=T=>{let I=T||t.state.tr.replace(O,D,h.doc.slice(f.start-h.from,f.endB-h.from));if(h.sel){let S=jh(t,I.doc,h.sel);S&&!(et&&t.composing&&S.empty&&(f.start!=f.endB||t.input.lastChromeDelete<Date.now()-100)&&(S.head==O||S.head==I.mapping.map(D)-1)||bt&&S.empty&&S.head==O)&&I.setSelection(S)}return o&&I.setMeta("composition",o),I.scrollIntoView()};if(_)if(m.pos==E.pos){bt&&rr<=11&&m.parentOffset==0&&(t.domObserver.suppressSelectionUpdates(),setTimeout(()=>Fn(t),20));let T=R(t.state.tr.delete(O,D)),I=d.resolve(f.start).marksAcross(d.resolve(f.endA));I&&T.ensureMarks(I),t.dispatch(T)}else if(f.endA==f.endB&&(g=function(T,I){let S,v,y,b=T.firstChild.marks,M=I.firstChild.marks,k=b,P=M;for(let F=0;F<M.length;F++)k=M[F].removeFromSet(k);for(let F=0;F<b.length;F++)P=b[F].removeFromSet(P);if(k.length==1&&P.length==0)v=k[0],S="add",y=F=>F.mark(v.addToSet(F.marks));else{if(k.length!=0||P.length!=1)return null;v=P[0],S="remove",y=F=>F.mark(v.removeFromSet(F.marks))}let B=[];for(let F=0;F<I.childCount;F++)B.push(y(I.child(F)));if(X.from(B).eq(T))return{mark:v,type:S}}(m.parent.content.cut(m.parentOffset,E.parentOffset),A.parent.content.cut(A.parentOffset,f.endA-A.start())))){let T=R(t.state.tr);g.type=="add"?T.addMark(O,D,g.mark):T.removeMark(O,D,g.mark),t.dispatch(T)}else if(m.parent.child(m.index()).isText&&m.index()==E.index()-(E.textOffset?0:1)){let T=m.parent.textBetween(m.parentOffset,E.parentOffset),I=()=>R(t.state.tr.insertText(T,O,D));t.someProp("handleTextInput",S=>S(t,O,D,T,I))||t.dispatch(I())}else t.dispatch(R());else t.dispatch(R())}function jh(t,e,n){return Math.max(n.anchor,n.head)>e.content.size?null:du(t,e.resolve(n.anchor),e.resolve(n.head))}function il(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 $h(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 FE{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 FS,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(Wh),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=Yh(this),zh(this),this.nodeViews=Gh(this),this.docView=Ah(this.state.doc,Vh(this),rl(this),this.dom,this),this.domObserver=new KS(this,(r,i,o,s)=>QS(this,r,i,o,s)),this.domObserver.start(),function(r){for(let i in Ot){let o=Ot[i];r.dom.addEventListener(i,r.input.eventHandlers[i]=s=>{!HS(r,s)||oc(r,s)||!r.editable&&s.type in Tt||o(r,s)},xS[i]?{passive:!0}:void 0)}ct&&r.dom.addEventListener("input",()=>null),nl(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&&nl(this);let n=this._props;this._props=e,e.plugins&&(e.plugins.forEach(Wh),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=Gh(this);(function(f,m){let E=0,A=0;for(let _ in f){if(f[_]!=m[_])return!0;E++}for(let _ in m)A++;return E!=A})(p,this.nodeViews)&&(this.nodeViews=p,o=!0)}(a||n.handleDOMEvents!=this._props.handleDOMEvents)&&nl(this),this.editable=Yh(this),zh(this);let l=rl(this),u=Vh(this),c=i.plugins==e.plugins||i.doc.eq(e.doc)?e.scrollToSelection>i.scrollToSelection?"to selection":"preserve":"reset",h=o||!this.docView.matchesNode(e.doc,u,l);!h&&e.selection.eq(i.selection)||(s=!0);let d=c=="preserve"&&s&&this.dom.style.overflowAnchor==null&&function(p){let f,m,E=p.dom.getBoundingClientRect(),A=Math.max(0,E.top);for(let _=(E.left+E.right)/2,g=A+1;g<Math.min(innerHeight,E.bottom);g+=5){let O=p.root.elementFromPoint(_,g);if(!O||O==p.dom||!p.dom.contains(O))continue;let D=O.getBoundingClientRect();if(D.top>=A-20){f=O,m=D.top;break}}return{refDOM:f,refTop:m,stack:dh(p.dom)}}(this);if(s){this.domObserver.stop();let p=h&&(bt||et)&&!this.composing&&!i.selection.empty&&!e.selection.empty&&function(f,m){let E=Math.min(f.$anchor.sharedDepth(f.head),m.$anchor.sharedDepth(m.head));return f.$anchor.start(E)!=m.$anchor.start(E)}(i.selection,e.selection);if(h){let f=et?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=zS(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)),!f||this.trackWrites&&this.dom.contains(this.trackWrites)||(p=!0)}p||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&function(f){let m=f.docView.domFromPos(f.state.selection.anchor,0),E=f.domSelectionRange();return xr(m.node,m.offset,E.anchorNode,E.anchorOffset)}(this))?Fn(this,p):(DE(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():d&&function({refDOM:p,refTop:f,stack:m}){let E=p?p.getBoundingClientRect().top:0;hh(m,E==0?0:E-f)}(d)}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 re){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&uh(this,n.getBoundingClientRect(),e)}else uh(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 wE(e.slice,e.move,i<0?void 0:re.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(bt){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(Jr)return e.focus(Jr);let n=dh(e);e.focus(Jr==null?{get preventScroll(){return Jr={preventScroll:!0},!0}}:void 0),Jr||(Jr=!1,hh(n,0))}(this.dom),Fn(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 RS(this,e)}coordsAtPos(e,n=1){return EE(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 yS(this,n||this.state,e)}pasteHTML(e,n){return io(this,"",e,!1,n||new ClipboardEvent("paste"))}pasteText(e,n){return io(this,e,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(e){return hu(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,[],rl(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,Jl=null)}get isDestroyed(){return this.docView==null}dispatchEvent(e){return function(n,r){oc(n,r)||!Ot[r.type]||!n.editable&&r.type in Tt||Ot[r.type](n,r)}(this,e)}domSelectionRange(){let e=this.domSelection();return e?ct&&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 Bh(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?Bh(n,i):null}(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}function Vh(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"),[Ht.node(0,t.state.doc.content.size,e)]}function zh(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:Ht.widget(t.state.selection.from,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function Yh(t){return!t.someProp("editable",e=>e(t.state)===!1)}function Gh(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 Wh(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")}FE.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=ot.from(t.nodes),e.marks=ot.from(t.marks||{}),this.nodes=zd.compile(this.spec.nodes,this),this.marks=ma.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]=Mr.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?Yd(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==""?[]:Yd(this,o.split(" "))}this.nodeFromJSON=r=>Nr.fromJSON(this,r),this.markFromJSON=r=>ge.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 zd))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 xs(n,n.defaultAttrs,t,ge.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})}]}}}),ol=new Aa("placeholder"),Xh=new _a({key:ol,props:{decorations(t){if(HE(t.doc))return;const e=t.doc.firstChild,n=Ht.node(0,e.nodeSize,{class:"empty-node","data-placeholder":ol.getState(t)});return je.create(t.doc,[n])}},state:{init:()=>"",apply:(t,e)=>{var n;return(n=t.getMeta(ol))!=null?n:e}}});function HE(t){return t.childCount!==1||t.firstChild.childCount!==0}for(var ar={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:"'"},js={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},eO=typeof navigator!="undefined"&&/Mac/.test(navigator.platform),tO=typeof navigator!="undefined"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),st=0;st<10;st++)ar[48+st]=ar[96+st]=String(st);for(st=1;st<=24;st++)ar[st+111]="F"+st;for(st=65;st<=90;st++)ar[st]=String.fromCharCode(st+32),js[st]=String.fromCharCode(st);for(var sl in ar)js.hasOwnProperty(sl)||(js[sl]=ar[sl]);const nO=typeof navigator!="undefined"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function rO(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);nO?i=!0:n=!0}}return e&&(s="Alt-"+s),n&&(s="Ctrl-"+s),i&&(s="Meta-"+s),r&&(s="Shift-"+s),s}function al(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 Kh(t){return new _a({props:{handleKeyDown:iO(t)}})}function iO(t){let e=function(n){let r=Object.create(null);for(let i in n)r[rO(i)]=n[i];return r}(t);return function(n,r){let i,o=function(a){var l=!(eO&&a.metaKey&&a.shiftKey&&!a.ctrlKey&&!a.altKey||tO&&a.shiftKey&&a.key&&a.key.length==1||a.key=="Unidentified")&&a.key||(a.shiftKey?js:ar)[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[al(o,r)];if(s&&s(n.state,n.dispatch,n))return!0;if(o.length==1&&o!=" "){if(r.shiftKey){let a=e[al(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=ar[r.keyCode])&&i!=o){let a=e[al(i,r)];if(a&&a(n.state,n.dispatch,n))return!0}}return!1}}var $s=200,Qe=function(){};Qe.prototype.append=function(t){return t.length?(t=Qe.from(t),!this.length&&t||t.length<$s&&this.leafAppend(t)||this.length<$s&&t.leafPrepend(this)||this.appendInner(t)):this},Qe.prototype.prepend=function(t){return t.length?Qe.from(t).append(this):this},Qe.prototype.appendInner=function(t){return new oO(this,t)},Qe.prototype.slice=function(t,e){return t===void 0&&(t=0),e===void 0&&(e=this.length),t>=e?Qe.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,e))},Qe.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)},Qe.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)},Qe.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},Qe.from=function(t){return t instanceof Qe?t:t&&t.length?new UE(t):Qe.empty};var UE=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<=$s)return new e(this.values.concat(r.flatten()))},e.prototype.leafPrepend=function(r){if(this.length+r.length<=$s)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}(Qe);Qe.empty=new UE([]);var oO=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}(Qe);class Zt{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((h,d)=>{if(!h.step)return r||(r=this.remapping(o,d+1),i=r.maps.length),i--,void c.push(h);if(r){c.push(new un(h.map));let p,f=h.step.map(r.slice(i));f&&l.maybeStep(f).doc&&(p=l.mapping.maps[l.mapping.maps.length-1],u.push(new un(p,void 0,void 0,u.length+c.length))),i--,p&&r.appendMap(p,i)}else l.maybeStep(h.step);return h.selection?(s=r?h.selection.map(r.slice(i)):h.selection,a=new Zt(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 h,d=e.steps[c].invert(e.docs[c]),p=new un(e.mapping.maps[c],d,n);(h=l&&l.merge(p))&&(p=h,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>sO&&(a=function(c,h){let d;return c.forEach((p,f)=>{if(p.selection&&h--==0)return d=f,!1}),c.slice(d)}(a,u),s-=u),new Zt(a.append(o),s)}remapping(e,n){let r=new go;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 Zt(this.items.append(e.map(n=>new un(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(d=>{d.selection&&a--},i);let l=n;this.items.forEach(d=>{let p=o.getMirror(--l);if(p==null)return;s=Math.min(s,p);let f=o.maps[p];if(d.step){let m=e.steps[p].invert(e.docs[p]),E=d.selection&&d.selection.map(o.slice(l+1,p));E&&a++,r.push(new un(f,m,E))}else r.push(new un(f))},i);let u=[];for(let d=n;d<s;d++)u.push(new un(o.maps[d]));let c=this.items.slice(0,i).append(u).append(r),h=new Zt(c,a);return h.emptyItemCount()>500&&(h=h.compress(this.items.length-r.length)),h}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 h,d=new un(u.invert(),l,c),p=i.length-1;(h=i.length&&i[p].merge(d))?i[p]=h:i.push(d)}}else s.map&&r--},this.items.length,0),new Zt(Qe.from(i.reverse()),o)}}Zt.empty=new Zt(Qe.empty,0);class un{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 un(n.getMap().invert(),n,this.selection)}}}class Gn{constructor(e,n,r,i,o){this.done=e,this.undone=n,this.prevRanges=r,this.prevTime=i,this.prevComposition=o}}const sO=20;function qh(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 ll(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 cl=!1,Jh=null;function As(t){let e=t.plugins;if(Jh!=e){cl=!1,Jh=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){cl=!0;break}}return cl}const Cr=new Aa("history"),aO=new Aa("closeHistory");function lO(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new _a({key:Cr,state:{init:()=>new Gn(Zt.empty,Zt.empty,null,0,-1),apply:(e,n,r)=>function(i,o,s,a){let l,u=s.getMeta(Cr);if(u)return u.historyState;s.getMeta(aO)&&(i=new Gn(i.done,i.undone,null,0,-1));let c=s.getMeta("appendedTransaction");if(s.steps.length==0)return i;if(c&&c.getMeta(Cr))return c.getMeta(Cr).redo?new Gn(i.done.addTransform(s,void 0,a,As(o)),i.undone,qh(s.mapping.maps),i.prevTime,i.prevComposition):new Gn(i.done,i.undone.addTransform(s,void 0,a,As(o)),null,i.prevTime,i.prevComposition);if(s.getMeta("addToHistory")===!1||c&&c.getMeta("addToHistory")===!1)return(l=s.getMeta("rebased"))?new Gn(i.done.rebased(s,l),i.undone.rebased(s,l),ll(i.prevRanges,s.mapping),i.prevTime,i.prevComposition):new Gn(i.done.addMaps(s.mapping.maps),i.undone.addMaps(s.mapping.maps),ll(i.prevRanges,s.mapping),i.prevTime,i.prevComposition);{let h=s.getMeta("composition"),d=i.prevTime==0||!c&&i.prevComposition!=h&&(i.prevTime<(s.time||0)-a.newGroupDelay||!function(f,m){if(!m)return!1;if(!f.docChanged)return!0;let E=!1;return f.mapping.maps[0].forEach((A,_)=>{for(let g=0;g<m.length;g+=2)A<=m[g+1]&&_>=m[g]&&(E=!0)}),E}(s,i.prevRanges)),p=c?ll(i.prevRanges,s.mapping):qh(s.mapping.maps);return new Gn(i.done.addTransform(s,d?o.selection.getBookmark():void 0,a,As(o)),Zt.empty,p,s.time,h==null?i.prevComposition:h)}}(n,r,e,t)},config:t,props:{handleDOMEvents:{beforeinput(e,n){let r=n.inputType,i=r=="historyUndo"?jE:r=="historyRedo"?ac:null;return!(!i||!e.editable)&&(n.preventDefault(),i(e.state,e.dispatch))}}}})}function BE(t,e){return(n,r)=>{let i=Cr.getState(n);if(!i||(t?i.undone:i.done).eventCount==0)return!1;if(r){let o=function(s,a,l){let u=As(a),c=Cr.get(a).spec.config,h=(l?s.undone:s.done).popEvent(a,u);if(!h)return null;let d=h.selection.resolve(h.transform.doc),p=(l?s.done:s.undone).addTransform(h.transform,a.selection.getBookmark(),c,u),f=new Gn(l?p:h.remaining,l?h.remaining:p,null,0,-1);return h.transform.setSelection(d).setMeta(Cr,{redo:l,historyState:f})}(i,n,t);o&&r(e?o.scrollIntoView():o)}return!0}}const jE=BE(!1,!0),ac=BE(!0,!0),$E=(t,e)=>!t.selection.empty&&(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function Ni(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 Zh(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 Qh(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 lc(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 cO=(t,e)=>{let{$from:n,$to:r}=t.selection;if(t.selection instanceof re&&t.selection.node.isBlock)return!(!n.parentOffset||!Es(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 Ee||t.selection instanceof Bt)&&o.deleteSelection();let s=n.depth==0?null:lc(n.node(-1).contentMatchAt(n.indexAfter(-1))),a=i&&s?[{type:s}]:void 0,l=Es(o.doc,o.mapping.map(n.pos),1,a);if(a||l||!Es(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 VE(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(h,d,p){let f=d.nodeBefore,m=d.nodeAfter,E=d.index();return!(!(f&&m&&f.type.compatibleContent(m.type))||(!f.content.size&&d.parent.canReplace(E-1,E)?(p&&p(h.tr.delete(d.pos-f.nodeSize,d.pos).scrollIntoView()),0):!d.parent.canReplace(E,E+1)||!m.isTextblock&&!nh(h.doc,d.pos)||(p&&p(h.tr.clearIncompatible(d.pos,f.type,f.contentMatchAt(f.childCount)).join(d.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 h=e.pos+s.nodeSize,d=X.empty;for(let m=r.length-1;m>=0;m--)d=X.from(r[m].create(null,d));d=X.from(o.copy(d));let p=t.tr.step(new Ft(e.pos-1,h,e.pos,h,new J(d,1,0),r.length,!0)),f=h+2*r.length;nh(p.doc,f)&&p.join(f),n(p.scrollIntoView())}return!0}let l=Ae.findFrom(e,1),u=l&&l.$from.blockRange(l.$to),c=u&&su(u);if(c!=null&&c>=e.depth)return n&&n(t.tr.lift(u,c).scrollIntoView()),!0;if(a&&Ni(s,"start",!0)&&Ni(o,"end")){let h=o,d=[];for(;d.push(h),!h.isTextblock;)h=h.lastChild;let p=s,f=1;for(;!p.isTextblock;p=p.firstChild)f++;if(h.canReplace(h.childCount,h.childCount,p.content)){if(n){let m=X.empty;for(let E=d.length-1;E>=0;E--)m=X.from(d[E].copy(m));n(t.tr.step(new Ft(e.pos-d.length,e.pos+s.nodeSize,e.pos+f,e.pos+s.nodeSize-f,new J(m,d.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function zE(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(Ee.create(e.doc,t<0?i.start(o):i.end(o)))),!0)}}const uO=zE(-1),dO=zE(1);function Eu(...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 ul=Eu($E,(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=Zh(r);if(!i){let s=r.blockRange(),a=s&&su(s);return a!=null&&(e&&e(t.tr.lift(s,a).scrollIntoView()),!0)}let o=i.nodeBefore;if(!o.type.spec.isolating&&VE(t,i,e))return!0;if(r.parent.content.size==0&&(Ni(o,"end")||re.isSelectable(o))){let s=au(t.doc,r.before(),r.after(),J.empty);if(s&&s.slice.size<s.to-s.from){if(e){let a=t.tr.step(s);a.setSelection(Ni(o,"end")?Ae.findFrom(a.doc.resolve(a.mapping.map(i.pos,-1)),-1):re.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=Zh(r)}let s=o&&o.nodeBefore;return!(!s||!re.isSelectable(s))&&(e&&e(t.tr.setSelection(re.create(t.doc,o.pos-s.nodeSize)).scrollIntoView()),!0)}),ep=Eu($E,(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=Qh(r);if(!i)return!1;let o=i.nodeAfter;if(VE(t,i,e))return!0;if(r.parent.content.size==0&&(Ni(o,"start")||re.isSelectable(o))){let s=au(t.doc,r.before(),r.after(),J.empty);if(s&&s.slice.size<s.to-s.from){if(e){let a=t.tr.step(s);a.setSelection(Ni(o,"start")?Ae.findFrom(a.doc.resolve(a.mapping.map(i.pos)),1):re.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=Qh(r)}let s=o&&o.nodeAfter;return!(!s||!re.isSelectable(s))&&(e&&e(t.tr.setSelection(re.create(t.doc,o.pos)).scrollIntoView()),!0)});const Ln={Enter:Eu((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 Bt||r.parent.inlineContent||i.parent.inlineContent)return!1;let o=lc(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(Ee.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(Es(t.doc,o))return e&&e(t.tr.split(o).scrollIntoView()),!0}let r=n.blockRange(),i=r&&su(r);return i!=null&&(e&&e(t.tr.lift(r,i).scrollIntoView()),!0)},cO),"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=lc(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(Ae.near(l.doc.resolve(a),1)),e(l.scrollIntoView())}return!0},Backspace:ul,"Mod-Backspace":ul,"Shift-Backspace":ul,Delete:ep,"Mod-Delete":ep,"Mod-a":(t,e)=>(e&&e(t.tr.setSelection(new Bt(t.doc))),!0)},YE={"Ctrl-h":Ln.Backspace,"Alt-Backspace":Ln["Mod-Backspace"],"Ctrl-d":Ln.Delete,"Ctrl-Alt-Backspace":Ln["Mod-Delete"],"Alt-Delete":Ln["Mod-Delete"],"Alt-d":Ln["Mod-Delete"],"Ctrl-a":uO,"Ctrl-e":dO};for(let t in Ln)YE[t]=Ln[t];const ts=(typeof navigator!="undefined"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!(typeof os=="undefined"||!os.platform)&&os.platform()=="darwin")?YE:Ln;function _u(t,e){return t.reduce((n,r,i)=>n.concat(e(r,i)),[])}var Au={};function hO(t){return String.fromCharCode(parseInt(t.slice(1),16))}Object.defineProperty(Au,"__esModule",{value:!0});var pO=Au.encode=function(t){return btoa(encodeURIComponent(t).replace(/%[0-9A-F]{2}/g,hO))};function fO(t){return`%${`00${t.charCodeAt(0).toString(16)}`.slice(-2)}`}Au.decode=function(t){return decodeURIComponent(Array.from(atob(t),fO).join(""))};const mO=/[^a-zA-Z\u00C0-\u024F\u1E00-\u1EFF\u0400-\u044f\u0300-\u036e]+/,EO=t=>t.split(mO).filter(e=>e).map(e=>e[0]).join("")||t[Symbol.iterator]().next().value||"";function GE(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)%rp.length;return rp[e]}function Oa(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 cc(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 WE(t){try{return new URL(t).hostname}catch(e){return}}const _O=13;function tp(t){return t.keyCode===_O&&!t.shiftKey}function ns(t){const e=t.replace(/%2F/g,"/").replace(/^.*?\/([^/]+?)(?:\?.*)?$/,"$1");return decodeURIComponent(e)}function np(t,e){return t.localeCompare(e,void 0,{usage:"search",sensitivity:"base"})===0}function AO(t){return[...t.matchAll(/^|\s+/g)].map(n=>n.index+n[0].length).map(n=>t.substring(n))}const rp=["#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"],oo=(t,e,n=void 0)=>_u(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:oo(r.children,e,r.type)}];case"link":return[{type:r.type,url:r.url,children:oo(r.children,e,r.type)}];case"actionlink":case"actionLink":case"actionbutton":case"actionButton":return[{type:r.type,action:r.action,params:r.params,children:oo(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 $n(t,e){return n=>{const r=n;let i=0;const o=[];for(const s of Oa(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 XE(t){return t.replace(/<!!mention:.*?\|([^>]*)>/gim,"@$1").replace(/<!!customemoji:(.*?)>/gim,"$1")}const ip="’'()[]{}<>:,‒–—―…!.«»-‐?‘’“”;/⁄␠·&@*\\•^¤¢$€£¥₩₪†‡°¡¿¬#№%‰‱¶′§~¨_|¦⁂☞∴‽※".replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");var uc=(t=>(t[t.italic=1]="italic",t[t.strikethrough=2]="strikethrough",t[t.bold=4]="bold",t))(uc||{});const gO=[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")}),SO={_:1,"*":4,"~":2};function OO(t){return KE(t,0)}function KE(t,e=0){const n=gO[e],r=n?function(i){const o=DO.getOrCompute(i,()=>new RegExp(`(?:^|[\\s${ip}])(?:${i.source})(?=[\\s${ip}]|$)`,"g")),s=$n(o,a=>{const l=a[0][1],u=a[1]||a[2]||a[3]||a[4]||a[5]||a[6];return[" ",{type:uc[SO[l]],children:[u]}]});return a=>{const[l,...u]=s(" "+a);return l.length>1&&u.unshift(l.substring(1)),u}}(n):()=>[t];return oo(r(t),(i,o)=>o==="bold"||o==="italic"||o==="strikethrough"?KE(i,e|uc[o]):[i])}const DO=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 dc=function(t,e){return dc=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])},dc(t,e)};function Uo(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}dc(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var We=function(){return We=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},We.apply(this,arguments)};var vO=Object.prototype.hasOwnProperty;function zt(t){return typeof t=="boolean"}function _r(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 rs=/\s+/,qE=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(rs):[],o=e.split(rs);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(rs):[],o=e.split(rs);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)vO.call(e,r)&&n.push(r+'="'+e[r]+'"');return n.join(" ")},t}();function op(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 dl(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 TO=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 qE({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,h=function(_){var g={},O=_,D=O.match(/^([a-z]+):\/\//i);return D&&(g.scheme=D[1],O=O.slice(D[0].length)),(D=O.match(/^(.*?)(?=(\?|#|\/|$))/i))&&(g.host=D[1],O=O.slice(D[0].length)),(D=O.match(/^\/(.*?)(?=(\?|#|$))/i))&&(g.path=D[1],O=O.slice(D[0].length)),(D=O.match(/^\?(.*?)(?=(#|$))/i))&&(g.query=D[1],O=O.slice(D[0].length)),(D=O.match(/^#(.*?)$/i))&&(g.fragment=D[1]),g}(o);if(h.query){var d=h.query.match(/^(.*?)(?=(\?|#))(.*?)$/i);d&&(h.query=h.query.substr(0,d[1].length),o=op(h))}if(o.length<=s||(h.host&&(h.host=h.host.replace(/^www\./,""),o=op(h)),o.length<=s))return o;var p="";if(h.host&&(p+=h.host),p.length>=c)return h.host.length===s?(h.host.substr(0,s-u)+a).substr(0,c+l):dl(p,c,a).substr(0,c+l);var f="";if(h.path&&(f+="/"+h.path),h.query&&(f+="?"+h.query),f){if((p+f).length>=c)return(p+f).length==s?(p+f).substr(0,s):(p+dl(f,c-p.length,a)).substr(0,c+l);p+=f}if(h.fragment){var m="#"+h.fragment;if((p+m).length>=c)return(p+m).length==s?(p+m).substr(0,s):(p+dl(m,c-p.length,a)).substr(0,c+l);p+=m}if(h.scheme&&h.host){var E=h.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,h="";return c>0&&(h=o.substr(-1*Math.floor(c/2))),(o.substr(0,Math.ceil(c/2))+a+h).substr(0,c+l)}(e,r):function(o,s,a){return function(l,u,c){var h;return l.length>u&&(c==null?(c="&hellip;",h=3):h=c.length,l=l.substring(0,u-h)+c),l}(o,s,a)}(e,r)},t}(),Bo=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 xi(t){return t>=65&&t<=90||t>=97&&t<=122}function ut(t){return t>=48&&t<=57}function gu(t){return t==34||t==39}function Gr(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 Wr(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 JE(t){return t<58?t<44?t==33:t==44||t==46:t<63?t>=58&&t<=59:t==63||t==94}function RO(t){return t<91?t==40:t==91||t==123}function sp(t){return t<93?t==41:t==93||t==125}var CO=/^(?: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|ελ|ευ|бг|ею|рф|გე|닷넷|닷컴|삼성|한국|コム|世界|中信|中国|中國|企业|佛山|信息|健康|八卦|公司|公益|台湾|台灣|商城|商店|商标|嘉里|在线|大拿|娱乐|家電|广东|微博|慈善|手机|招聘|政务|政府|新闻|时尚|書籍|机构|游戏|澳門|点看|移动|网址|网店|网站|网络|联通|谷歌|购物|通販|集团|食品|餐厅|香港)$/,ZE=/https?:\/\//i,IO=new RegExp("^"+ZE.source,"i"),yO=/^(javascript|vbscript):/i,NO=/^[A-Za-z][-.+A-Za-z0-9]*:(\/\/)?([^:/]*)/,bO=/^(?:\/\/)?([^/#?:]+)/,vo=xi;function QE(t){return xi(t)||ut(t)||t===43||t===45||t===46}var ur=Wr;function Su(t){return t===95||ur(t)}function e_(t){return Wr(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)||JE(t)}function Ou(t){return t===47||t===63||t===35}function ap(t){return CO.test(t.toLowerCase())}var kO=/^(?:(?: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]?)$/,LO=/[:/?#]/,wO=/^(https?:\/\/)?(?:www\.)?/i,MO=/^\/\//,t_=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 Uo(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(MO,"")),this.stripPrefix.scheme&&(n=n.replace(IO,"")),this.stripPrefix.www&&(n=function(r){return r.includes("www.")?r.replace(wO,"$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}(Bo),PO=/^mailto:/i,n_=Wr;function Du(t){return n_(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 r_=function(t){function e(n){var r=t.call(this,n)||this;return r.type="email",r.email="",r.email=n.email,r}return Uo(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}(Bo);function i_(t){return t===95||Wr(t)}var xO=["twitter","facebook","instagram","tiktok","youtube"],FO=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 Uo(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}(Bo),HO={twitter:/^@\w{1,15}$/,instagram:/^@[_\w]{1,30}$/,soundcloud:/^@[-a-z0-9_]{3,25}$/,tiktok:/^@[.\w]{1,23}[\w]$/,youtube:/^@[-.·\w]{3,30}$/};function o_(t){return t===45||t===46||t===95||xi(t)||ut(t)}var UO=["twitter","instagram","soundcloud","tiktok","youtube"],BO=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 Uo(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}(Bo),jO=/[-. ()]/,$O=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 s_(t){return t===45||t===46||t===32}function vu(t){return t===44||t===59}var VO=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 Uo(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}(Bo),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),cp(e)&&this.schemeUrlMachinesCount++},t.prototype.removeMachine=function(e){this._stateMachines=this._stateMachines.filter(function(n){return n!==e}),cp(e)&&this.schemeUrlMachinesCount--},t.prototype.hasSchemeUrlMachine=function(){return this.schemeUrlMachinesCount>0},t}();function Da(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(hc(r,11));else if(n===43)t.addMachine(hl(r,37));else if(n===40)t.addMachine(hl(r,32));else{if(ut(n)&&(t.addMachine(hl(r,38)),t.addMachine(function(o,s){return{type:0,startIdx:o,state:s,acceptStateReached:!1,matchType:2,octetsEncountered:1}}(r,13))),n_(n)){var i=e.toLowerCase()==="m"?15:22;t.addMachine(function(o,s){return{type:1,startIdx:o,state:s,acceptStateReached:!1}}(r,i))}vo(n)&&t.addMachine(va(r,0)),Wr(n)&&t.addMachine(hc(r,5))}}function YO(t,e,n){n===58?e.state=2:n===45?e.state=1:QE(n)||t.removeMachine(e)}function GO(t,e,n){var r=t.charIdx;n===45||(n===47?(t.removeMachine(e),t.addMachine(hc(r,11))):QE(n)?e.state=0:t.removeMachine(e))}function WO(t,e,n){var r=t.charIdx;n===47?e.state=3:n===46?t.removeMachine(e):ur(n)?(e.state=5,vo(n)&&t.addMachine(va(r,0))):t.removeMachine(e)}function XO(t,e,n){n===47?e.state=4:e_(n)?(e.state=10,e.acceptStateReached=!0):Le(t,e)}function KO(t,e,n,r){r===47?(e.state=10,e.acceptStateReached=!0):ur(r)?(e.state=5,e.acceptStateReached=!0):t.removeMachine(e)}function qO(t,e,n){n===47?e.state=12:t.removeMachine(e)}function JO(t,e,n){ur(n)?e.state=5:t.removeMachine(e)}function ZO(t,e,n){n===46?e.state=7:n===45?e.state=6:n===58?e.state=8:Ou(n)?e.state=10:Su(n)||Le(t,e)}function QO(t,e,n,r){r===45||(r===46?Le(t,e):ur(r)?e.state=5:Le(t,e))}function eD(t,e,n,r){r===46?Le(t,e):ur(r)?(e.state=5,e.acceptStateReached=!0):Le(t,e)}function tD(t,e,n){n===46?e.state=14:n===58?e.state=8:ut(n)||(Ou(n)?e.state=10:Wr(n)?t.removeMachine(e):Le(t,e))}function nD(t,e,n){ut(n)?(e.octetsEncountered++,e.octetsEncountered===4&&(e.acceptStateReached=!0),e.state=13):Le(t,e)}function rD(t,e,n){ut(n)?e.state=9:Le(t,e)}function iD(t,e,n){ut(n)||(Ou(n)?e.state=10:Le(t,e))}function oD(t,e,n){e_(n)||Le(t,e)}function sD(t,e,n,r){n.toLowerCase()==="a"?e.state=16:Xr(t,e,r)}function aD(t,e,n,r){n.toLowerCase()==="i"?e.state=17:Xr(t,e,r)}function lD(t,e,n,r){n.toLowerCase()==="l"?e.state=18:Xr(t,e,r)}function cD(t,e,n,r){n.toLowerCase()==="t"?e.state=19:Xr(t,e,r)}function uD(t,e,n,r){n.toLowerCase()==="o"?e.state=20:Xr(t,e,r)}function dD(t,e,n){n===58?e.state=21:Xr(t,e,n)}function hD(t,e,n){Du(n)?e.state=22:t.removeMachine(e)}function Xr(t,e,n){n===46?e.state=23:n===64?e.state=24:Du(n)?e.state=22:t.removeMachine(e)}function pD(t,e,n){n===46||n===64?t.removeMachine(e):Du(n)?e.state=22:t.removeMachine(e)}function fD(t,e,n){ur(n)?e.state=25:t.removeMachine(e)}function mD(t,e,n){n===46?e.state=27:n===45?e.state=26:Su(n)||Le(t,e)}function ED(t,e,n){n===45||n===46?Le(t,e):Su(n)?e.state=25:Le(t,e)}function _D(t,e,n){n===46||n===45?Le(t,e):ur(n)?(e.state=25,e.acceptStateReached=!0):Le(t,e)}function AD(t,e,n){i_(n)?(e.state=29,e.acceptStateReached=!0):t.removeMachine(e)}function gD(t,e,n){i_(n)||Le(t,e)}function SD(t,e,n){o_(n)?(e.state=31,e.acceptStateReached=!0):t.removeMachine(e)}function OD(t,e,n){o_(n)||(Wr(n)?t.removeMachine(e):Le(t,e))}function DD(t,e,n,r){ut(r)?e.state=38:(t.removeMachine(e),Da(t,n,r))}function vD(t,e,n,r){ut(r)?e.state=33:t.removeMachine(e),Da(t,n,r)}function TD(t,e,n){ut(n)?e.state=34:t.removeMachine(e)}function RD(t,e,n){ut(n)?e.state=35:t.removeMachine(e)}function CD(t,e,n){n===41?e.state=36:t.removeMachine(e)}function ID(t,e,n,r){ut(r)?e.state=38:s_(r)?e.state=39:t.removeMachine(e)}function yD(t,e,n,r){var i=t.charIdx;e.acceptStateReached=!0,vu(r)?e.state=40:r===35?e.state=41:ut(r)||(r===40?e.state=32:s_(r)?e.state=39:(Le(t,e),vo(r)&&t.addMachine(va(i,0))))}function ND(t,e,n,r){ut(r)?e.state=38:r===40?e.state=32:(Le(t,e),Da(t,n,r))}function bD(t,e,n){vu(n)||(n===35?e.state=41:ut(n)?e.state=38:Le(t,e))}function kD(t,e,n){vu(n)?e.state=40:ut(n)?t.removeMachine(e):Le(t,e)}function Le(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 h,d,p=e.startIdx,f=r.slice(e.startIdx,i);switch(f=function(A){for(var _={"(":0,"{":0,"[":0},g=0;g<A.length;g++){var O=A.charAt(g);RO(R=A.charCodeAt(g))?_[O]++:sp(R)&&_[lp[O]]--}for(var D=A.length-1;D>=0;){var R;if(O=A.charAt(D),sp(R=A.charCodeAt(D))){var T=lp[O];if(!(_[T]<0))break;_[T]++,D--}else{if(!JE(R))break;D--}}return A.slice(0,D+1)}(f),e.type){case 0:if(r.charCodeAt(e.startIdx-1)===64)return;switch(e.matchType){case 0:var m=ZE.exec(f);if(m&&(p+=m.index,f=f.slice(m.index)),!function(A){if(yO.test(A))return!1;var _=A.match(NO);if(!_)return!1;var g=!!_[1],O=_[2];return!!g||!(O.indexOf(".")===-1||!/[A-Za-z]/.test(O))}(f))return;break;case 1:if(!function(A){var _=A.match(bO);if(!_)return!1;var g=_[0].split(".");return!(g.length<2||!ap(g[g.length-1]))}(f))return;break;case 2:if(d=f.split(LO,1)[0],!kO.test(d))return;break;default:Fr(e)}n.push(new t_({tagBuilder:o,matchedText:f,offset:p,urlMatchType:LD(e.matchType),url:f,protocolRelativeMatch:f.slice(0,2)==="//",stripPrefix:s,stripTrailingSlash:a,decodePercentEncoding:l}));break;case 1:ap(f.split(".").pop())&&n.push(new r_({tagBuilder:o,matchedText:f,offset:p,email:f.replace(PO,"")}));break;case 2:f.length<=140&&n.push(new FO({tagBuilder:o,matchedText:f,offset:p,serviceName:u,hashtag:f.slice(1)}));break;case 3:(function(A,_){return HO[_].test(A)})(f,c)&&n.push(new BO({tagBuilder:o,matchedText:f,offset:p,serviceName:c,mention:f.slice(1)}));break;case 4:if(f=f.replace(/ +$/g,""),((h=f).charAt(0)==="+"||jO.test(h))&&$O.test(h)){var E=f.replace(/[^0-9,;#]/g,"");n.push(new VO({tagBuilder:o,matchedText:f,offset:p,number:E,plusSign:f.charAt(0)==="+"}))}break;default:Fr(e)}}}function LD(t){switch(t){case 0:return"scheme";case 1:return"tld";case 2:return"ipV4";default:Fr(t)}}var lp={")":"(","}":"{","]":"["};function va(t,e){return{type:0,startIdx:t,state:e,acceptStateReached:!1,matchType:0}}function hc(t,e){return{type:0,startIdx:t,state:e,acceptStateReached:!1,matchType:1}}function hl(t,e){return{type:4,startIdx:t,state:e,acceptStateReached:!1}}function cp(t){return t.type===0&&t.matchType===0}var _n=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},Tu=new _n,wD=function(t,e){this.charIdx=0,this.state=0,this.currentDataIdx=0,this.currentTag=Tu,this.html=t,this.callbacks=e};function MD(t,e){e==="<"&&vn(t)}function PD(t,e,n){e==="!"?t.state=13:e==="/"?(t.state=2,t.currentTag=new _n(We(We({},t.currentTag),{isClosing:!0}))):e==="<"?vn(t):xi(n)?(t.state=3,t.currentTag=new _n(We(We({},t.currentTag),{isOpening:!0}))):(t.state=0,t.currentTag=Tu)}function xD(t,e,n){Gr(n)?(t.currentTag=new _n(We(We({},t.currentTag),{name:pl(t)})),t.state=4):e==="<"?vn(t):e==="/"?(t.currentTag=new _n(We(We({},t.currentTag),{name:pl(t)})),t.state=12):e===">"?(t.currentTag=new _n(We(We({},t.currentTag),{name:pl(t)})),Tn(t)):xi(n)||ut(n)||e===":"||qt(t)}function FD(t,e,n){e===">"?qt(t):xi(n)?t.state=3:qt(t)}function HD(t,e,n){Gr(n)||(e==="/"?t.state=12:e===">"?Tn(t):e==="<"?vn(t):e==="="||gu(n)||function(r){return r>=0&&r<=31||r==127}(n)?qt(t):t.state=5)}function UD(t,e,n){Gr(n)?t.state=6:e==="/"?t.state=12:e==="="?t.state=7:e===">"?Tn(t):e==="<"?vn(t):gu(n)&&qt(t)}function BD(t,e,n){Gr(n)||(e==="/"?t.state=12:e==="="?t.state=7:e===">"?Tn(t):e==="<"?vn(t):gu(n)?qt(t):t.state=5)}function jD(t,e,n){Gr(n)||(e==='"'?t.state=8:e==="'"?t.state=9:/[>=`]/.test(e)?qt(t):e==="<"?vn(t):t.state=10)}function $D(t,e){e==='"'&&(t.state=11)}function VD(t,e){e==="'"&&(t.state=11)}function zD(t,e,n){Gr(n)?t.state=4:e===">"?Tn(t):e==="<"&&vn(t)}function YD(t,e,n){Gr(n)?t.state=4:e==="/"?t.state=12:e===">"?Tn(t):e==="<"?vn(t):(t.state=4,function(r){r.charIdx--}(t))}function GD(t,e){e===">"?(t.currentTag=new _n(We(We({},t.currentTag),{isClosing:!0})),Tn(t)):qt(t)}function WD(t){var e=t.html,n=t.charIdx;e.slice(n,n+2)==="--"?(t.charIdx++,t.currentTag=new _n(We(We({},t.currentTag),{type:"comment"})),t.state=14):e.slice(n,n+7).toUpperCase()==="DOCTYPE"?(t.charIdx+=6,t.currentTag=new _n(We(We({},t.currentTag),{type:"doctype"})),t.state=20):qt(t)}function XD(t,e){e==="-"?t.state=15:e===">"?qt(t):t.state=16}function KD(t,e){e==="-"?t.state=18:e===">"?qt(t):t.state=16}function qD(t,e){e==="-"&&(t.state=17)}function JD(t,e){t.state=e==="-"?18:16}function ZD(t,e){e===">"?Tn(t):e==="!"?t.state=19:e==="-"||(t.state=16)}function QD(t,e){e==="-"?t.state=17:e===">"?Tn(t):t.state=16}function ev(t,e){e===">"?Tn(t):e==="<"&&vn(t)}function qt(t){t.state=0,t.currentTag=Tu}function vn(t){t.state=1,t.currentTag=new _n({idx:t.charIdx})}function Tn(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)),qt(t),t.currentDataIdx=t.charIdx+1}function pl(t){var e=t.currentTag.idx+(t.currentTag.isClosing?2:1);return t.html.slice(e,t.charIdx).toLowerCase()}var tv=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),zt(o)?{schemeMatches:o,tldMatches:o,ipV4Matches:o}:{schemeMatches:!zt(o.schemeMatches)||o.schemeMatches,tldMatches:!zt(o.tldMatches)||o.tldMatches,ipV4Matches:!zt(o.ipV4Matches)||o.ipV4Matches}}(e.urls),this.email=zt(e.email)?e.email:this.email,this.phone=zt(e.phone)?e.phone:this.phone,this.hashtag=e.hashtag||this.hashtag,this.mention=e.mention||this.mention,this.newWindow=zt(e.newWindow)?e.newWindow:this.newWindow,this.stripPrefix=function(o){return o==null&&(o=!0),zt(o)?{scheme:o,www:o}:{scheme:!zt(o.scheme)||o.scheme,www:!zt(o.www)||o.www}}(e.stripPrefix),this.stripTrailingSlash=zt(e.stripTrailingSlash)?e.stripTrailingSlash:this.stripTrailingSlash,this.decodePercentEncoding=zt(e.decodePercentEncoding)?e.decodePercentEncoding:this.decodePercentEncoding,this.sanitizeHtml=e.sanitizeHtml||!1;var n=this.mention;if(n!==!1&&UO.indexOf(n)===-1)throw new Error("invalid `mention` cfg '".concat(n,"' - see docs"));var r,i=this.hashtag;if(i!==!1&&xO.indexOf(i)===-1)throw new Error("invalid `hashtag` cfg '".concat(i,"' - see docs"));this.truncate=typeof(r=e.truncate)=="number"?{length:r,location:"end"}:We({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 wD(s,a),u=s.length;l.charIdx<u;){var c=s.charAt(l.charIdx),h=s.charCodeAt(l.charIdx);switch(l.state){case 0:MD(l,c);break;case 1:PD(l,c,h);break;case 2:FD(l,c,h);break;case 3:xD(l,c,h);break;case 4:HD(l,c,h);break;case 5:UD(l,c,h);break;case 6:BD(l,c,h);break;case 7:jD(l,c,h);break;case 8:$D(l,c);break;case 9:VD(l,c);break;case 10:zD(l,c,h);break;case 11:YD(l,c,h);break;case 12:GD(l,c);break;case 13:WD(l);break;case 14:XD(l,c);break;case 15:KD(l,c);break;case 16:qD(l,c);break;case 17:JD(l,c);break;case 18:ZD(l,c);break;case 19:QD(l,c);break;case 20:ev(l,c);break;default:Fr(l.state)}l.charIdx++}l.currentDataIdx<l.charIdx&&function(d){var p=d.html.slice(d.currentDataIdx,d.charIdx);d.callbacks.onText(p,d.currentDataIdx),d.currentDataIdx=d.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,h){if(h%2==0){var d=n.parseText(c,u);o.push.apply(o,function(p,f,m){if(m||arguments.length===2)for(var E,A=0,_=f.length;A<_;A++)!E&&A in f||(E||(E=Array.prototype.slice.call(f,0,A)),E[A]=f[A]);return p.concat(E||Array.prototype.slice.call(f))}([],function(p,f){var m=typeof Symbol=="function"&&p[Symbol.iterator];if(!m)return p;var E,A,_=m.call(p),g=[];try{for(;(f===void 0||f-- >0)&&!(E=_.next()).done;)g.push(E.value)}catch(O){A={error:O}}finally{try{E&&!E.done&&(m=_.return)&&m.call(_)}finally{if(A)throw A.error}}return g}(d),!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(nv);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||_r(e,function(n){return n.getType()==="hashtag"}),this.email||_r(e,function(n){return n.getType()==="email"}),this.phone||_r(e,function(n){return n.getType()==="phone"}),this.mention||_r(e,function(n){return n.getType()==="mention"}),this.urls.schemeMatches||_r(e,function(n){return n.getType()==="url"&&n.getUrlMatchType()==="scheme"}),this.urls.tldMatches||_r(e,function(n){return n.getType()==="url"&&n.getUrlMatchType()==="tld"}),this.urls.ipV4Matches||_r(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)Da(l,u,c);else{for(var h=l.stateMachines.length-1;h>=0;h--){var d=l.stateMachines[h];switch(d.state){case 11:qO(l,d,c);break;case 12:JO(l,d,c);break;case 0:YO(l,d,c);break;case 1:GO(l,d,c);break;case 2:WO(l,d,c);break;case 3:XO(l,d,c);break;case 4:KO(l,d,0,c);break;case 5:ZO(l,d,c);break;case 6:QO(l,d,0,c);break;case 7:eD(l,d,0,c);break;case 13:tD(l,d,c);break;case 14:nD(l,d,c);break;case 8:rD(l,d,c);break;case 9:iD(l,d,c);break;case 10:oD(l,d,c);break;case 15:sD(l,d,u,c);break;case 16:aD(l,d,u,c);break;case 17:lD(l,d,u,c);break;case 18:cD(l,d,u,c);break;case 19:uD(l,d,u,c);break;case 20:dD(l,d,c);break;case 21:hD(l,d,c);break;case 22:Xr(l,d,c);break;case 23:pD(l,d,c);break;case 24:fD(l,d,c);break;case 25:mD(l,d,c);break;case 26:ED(l,d,c);break;case 27:_D(l,d,c);break;case 28:AD(l,d,c);break;case 29:gD(l,d,c);break;case 30:SD(l,d,c);break;case 31:OD(l,d,c);break;case 32:vD(l,d,u,c);break;case 33:TD(l,d,c);break;case 34:RD(l,d,c);break;case 35:CD(l,d,c);break;case 36:ID(l,d,0,c);break;case 37:DD(l,d,u,c);break;case 38:yD(l,d,0,c);break;case 39:ND(l,d,u,c);break;case 40:bD(l,d,c);break;case 41:kD(l,d,c);break;default:Fr(d.state)}}if(!l.hasSchemeUrlMachine()&&l.charIdx>0&&vo(c)){var p=l.text.charCodeAt(l.charIdx-1);vo(p)||l.addMachine(va(l.charIdx,0))}}}for(var f=l.stateMachines.length-1;f>=0;f--)l.stateMachines.forEach(function(m){return Le(l,m)});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 qE?n.toAnchorString():e.buildTag().toAnchorString()},t.prototype.getTagBuilder=function(){var e=this.tagBuilder;return e||(e=this.tagBuilder=new TO({newWindow:this.newWindow,truncate:this.truncate,className:this.className})),e},t.version="4.1.5",t}();function nv(t,e){return t.getOffset()-e.getOffset()}function a_(t,e=t){return{type:"autolink",url:t,text:e}}const rv=()=>$n(/```([^]+?)```/g,([t,e])=>({type:"codespan",text:XE(e)})),iv=$n(/<!!mention:([^>\s]*?)\|(.*?)>/gm,([t,e,n])=>function(r,i){return{type:"mention",id:r,text:i}}(decodeURIComponent(e),n)),ov=$n(/<!!customemoji:(.*?)>/gm,([t,e])=>function(n){return{type:"customemoji",text:n}}(e)),l_=$n(/<((?:https?|mailto):.*?)\|(.*?)>/gi,([t,e,n])=>function(r,i=[]){return{type:"link",url:r,children:i}}(e,[n])),sv=$n(/<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])}),av=$n(/<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 lv=$n(/(?:^|\n)(?:\s*[-*+]\s+[^\n]+(?:\n|$))+/g,([t])=>function(e=[]){return{type:"bulletlist",children:e}}([t.startsWith(`
17
+ `)?t.slice(1):t])),cv=$n(/^\s*[-*+]\s+([^\n]+)(?:\n|$)/gm,([t,e])=>({type:"bulletpoint",children:[e]})),u_=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 Oa(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]),f=Number(c[2]),m=Number(c[3]),E=Number(c[4]);if(p<=23&&m<=23&&f<=59&&E<=59)continue}const h=a.startsWith(l)?s.index:s.index+1;h-i>0&&o.push(t.substring(i,h));const d=a_("tel:"+l.replace(/[^0-9+]/g,""),l);o.push(d),i=h+l.length}return i<t.length&&o.push(t.substring(i)),o},d_=t=>l_(t).flatMap(e=>typeof e=="string"?fl(e):["<",...fl(e.url),...fl("|"+e.children[0]+">")]),fl=t=>{const e=tv.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 r_?l="mailto:"+i.getEmail():i instanceof t_&&(l=i.getUrl()),o>r&&n.push(t.substring(r,o)),n.push(a_(l,s)),r=o+a}return r<t.length&&n.push(t.substring(r)),n},uv=["Codeblock","Codespan","FormattedLink","Wikitext","Autolink","Actions","Mention","Mention","BulletPoint","CustomEmoji"],dv=function(t){const e=RegExp(`[^${t}]+${t}?|${t}`,"g");return n=>Array.from(n.match(e)||[])}(`
18
+ `);function h_(t,e={except:[]}){const n=function(i={except:[]}){var a;const o={multilineSteps:[],singlelineSteps:[]},s=(a=i.except)!=null?a:uv.filter(l=>!i.only.includes(l));return s.includes("BulletPoint")||o.multilineSteps.push(lv,cv),s.includes("Mention")||o.singlelineSteps.push(iv),s.includes("CustomEmoji")||o.singlelineSteps.push(ov),s.includes("Codespan")||o.multilineSteps.push(rv()),s.includes("FormattedLink")||o.singlelineSteps.push(l_),s.includes("Actions")||(o.singlelineSteps.push(sv),o.singlelineSteps.push(av)),s.includes("Wikitext")||o.singlelineSteps.push(OO),s.includes("Autolink")||o.singlelineSteps.push(d_,u_),o}(e);let r=f_(t,n);return r=m_(r,!1),r}function p_(t){return h_(t,{except:["FormattedLink","Actions"]})}function f_(t,e){let n=[t];return n=ml(n,e.multilineSteps),n=ml(n,[dv]),n=ml(n,e.singlelineSteps),n=Ru(n),n}function ml(t,e){return e.reduce((n,r)=>oo(n,r),t)}function Ru(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:Ru(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 hv(){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 h,d="";return u.descendants((p,f)=>(p.isText?(d+=p.text,h!=null||(h=f)):d&&h!==void 0&&(c.push({text:d,pos:h}),d="",h=void 0),p.type!==Xe.nodes.mention)),d&&h!==void 0&&c.push({text:d,pos:h}),c}(a.doc);for(const{text:u,pos:c}of l){const h=h_(u,{only:["Wikitext"]});[a]=E_(a,c,h)}return a}(n.state.tr);n.dispatch(s)},i=Date.now();i-e<300?t||(t=window.setTimeout(r,300)):r(i)}}function E_(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]=E_(t,e,o.children,r,a),r+=1}else de.unreachable();return[t,r]}function up(t){return(e,n)=>{if(!n)return!0;let r=e.tr;const i=Ee.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(Ee.near(r.doc.resolve(i.to+1))),n(r),!0}}function pv(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(h=>h.kind==="file"&&a[h.type]);if(l.length===0||o.types.includes("text/rtf"))return;const u=l[0];let c=u.getAsFile();if(!c.name){const h="image."+a[u.type];c=new File([c],h,{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 dp(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 _a({key:new Aa("suggestions"),view(){return{update:(l,u)=>{const c=this.key.getState(u),h=this.key.getState(l.state);if(!c||!h)return;const d=c.active&&h.active&&c.range.from!==h.range.from,p=!c.active&&h.active,f=c.active&&!h.active,m=!p&&!f&&c.text!==h.text;(f||d)&&o({view:l,range:c.range,text:c.text}),m&&!d&&i({view:l,range:h.range,text:h.text}),(p||d)&&r({view:l,range:h.range,text:h.text})}}},state:{init:()=>({active:!1,range:{from:0,to:0},text:null}),apply(l,u){const{selection:c}=l,h={...u};if(c.from===c.to){(c.from<u.range.from||c.from>u.range.to)&&(h.active=!1);const d=c.$from,p=e(d);p?(h.active=!0,h.range=p.range,h.text=p.text):h.active=!1}else h.active=!1;return h.active||(h.range={from:0,to:0},h.text=null),h}},props:{handleKeyDown(l,u){var h;const c=this.getState(l.state);return!!(c!=null&&c.active)&&((h=s({view:l,event:u}))!=null?h:!1)},decorations(l){const u=this.getState(l);return u!=null&&u.active?je.create(l.doc,[Ht.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 hp=(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}},fv=/(^|\s)(:[^:\s]+:?)$/,mv=/(^|\s)(@[^@]*)$/;function __({placeholder:t,disabled:e,className:n="",characterLimit:r,spellcheck:i}){const o=xo(),s=Q(),a=Q(null);return Z(()=>(s.current=function(l,u,c,h,d){const p=ai.create({schema:Xe,plugins:[...d.filter(Ev),lO(),Kh({...ts,"Mod-z":jE,"Mod-y":ac,"Mod-Shift-z":ac,"Mod-b":up("*"),"Mod-i":up("_"),"Mod-Enter":ts.Enter,"Shift-Enter":ts.Enter,Enter:c}),Kh({Enter:ts.Enter}),Xh]}),f=hv(),m=new FE(l,{handlePaste:(E,A,_)=>pv(E,A,h),clipboardTextSerializer(E){const A=[];return E.content.forEach(_=>{_&&A.push(XE(_.textContent))}),A.join()},state:p,dispatchTransaction(E){E=(E=E.removeStoredMark(Xe.marks.literal)).removeStoredMark(Xe.marks.emoji);const A=m.state.apply(E);m.state.doc.eq(A.doc)||u(new Vs(A.doc)),m.updateState(A),E.steps.some(_=>_ instanceof at)&&f(m)}});return m}(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(()=>gt(()=>{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(()=>gt(()=>{var u;const l=s.current;l==null||l.dispatch(l.state.tr.setMeta(Xh,(u=o.placeholder$.get())!=null?u:t))}),[o,t]),Z(()=>{r&&Number.isInteger(r)&&o.setMaxLength(r)},[r,o]),L("div",{className:`t-editor ${n}`,ref:a})}function pp(t){if(t.startsWith(":"))throw new Error("Not implemented");{const e=Xe.marks.emoji.create({emoji:t});return Xe.text(t,[e])}}function fp(t,e){const n=encodeURIComponent(t);return Xe.nodes.mention.create({id:t,name:e},Xe.text(`<!!mention:${n}|${e}>`))}const ra=class ra{constructor(e){this.doc=e,this.size=this.doc.content.size,this.hasContent=HE(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," ")}};ra.EMPTY=new ra(Xe.topNodeType.create());let Vs=ra;function Ev(t){return t!=null}function mp(t,e){let n=0;return(...r)=>{n&&(clearTimeout(n),n=0),n=setTimeout(()=>{t(...r)},e)}}class A_{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$=me(),this.placeholder$=me()}setEditorView(e){this.editorView=e}emojiSuggesterPlugin(){if(this.device$.peek().supportsEmojiPicker)return dp({debug:!1,matcher:hp(fv,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(de.defined(e),e.canMention)return dp({debug:!1,matcher:hp(mv,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(){de.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){de.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 fp(u,c);const[h,d]=a.match(/<!!customemoji:(.*?)>/)||[null];return h&&d?pp(d):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){de.defined(this.editorView),function(n,r,i){const o=pp(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){de.defined(this.editorView),function(n,r,i){const o=fp(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 _v=Symbol("no_render");function pt(t){const e=vt(!1),n=Q({_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 te(()=>{if(!e.get())return _v;const r=typeof t=="function"?t():t.get();return n.current.value=r,r}),n.current}function nn(){const t=Mi(),e=he(),n=xm(),r=nt(),i=pt(e.app$.appMetadata),o=pt(e.currentUser$),s=pt(e.state$.currentConversation),a=pt(e.state$.currentConversationId),l=pt(e.t$),u=pt(e.device$),c=pt(e.themeCustom$),h=pt(e.chatSearchState$),d=pt(e.focusedMessage$),p=pt(()=>{var E;const m=e.state$.currentConversationId.get();return(E=m&&e.state$.typing.child(m).get())!=null?E:{many:!1,users:[]}}),f=pt(()=>{const m=e.state$.currentConversationId.get();return m&&e.state$.participants.child(m).get()});return se(()=>({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 f.value},get focusedMessage(){return d.value},get chatSearchState(){return h.value}}),[i,n,s,a,o,u,e,l,r,c,p,f,t,h,d])}function Ta(){const t=Mi(),e=he(),n=nt(),r=xm(),i=pt(e.app$.appMetadata),o=pt(e.currentUser$),s=pt(e.t$),a=pt(e.device$),l=pt(e.themeCustom$);return se(()=>({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 Av=(()=>{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})(),At={};Av?(At.setItem=window.localStorage.setItem.bind(window.localStorage),At.getItem=window.localStorage.getItem.bind(window.localStorage),At.removeItem=window.localStorage.removeItem.bind(window.localStorage),At.isSupported=!0):(At.setItem=function(){},At.getItem=function(){return null},At.removeItem=function(){},At.isSupported=!1),At.set=(t,e)=>At.setItem(t,JSON.stringify(e)),At.get=t=>JSON.parse(At.getItem(t)||"null");const pc="talkjs_drafts",gv=function(t,e){let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>e(...r),t)}}(200,(t,e,n,r)=>{const i=g_(t,e,n),o=JSON.parse(At.getItem(pc)||"{}"),s=r();s.match(/^\s*$/)?delete o[i]:o[i]=s,At.setItem(pc,JSON.stringify(o))}),g_=(t,e,n)=>`draft_${t}_${e}_${n}`;function St(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(h){h(c)})).then(s,a)}l((r=r.apply(t,e||[])).next())})}let jo=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 is={decode:function(t,e){return St(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 S_(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(S_(o,s));else r==="style"?Object.assign(n.style,i):r==="textContent"?n.textContent=i:n.setAttribute(r,i.toString());return n}function Ep(t,e,n){const r=S_(t,e||{});return n==null||n.appendChild(r),r}var Sv=Object.freeze({__proto__:null,createElement:Ep,default:Ep});const Ov={fetchBlob:function(t,e,n){return St(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){St(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 h=Math.round(l/a*100);o(h)};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 Ue(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 vr(t,e){const n=Ue(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 Xn(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 Dv extends jo{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=Ue(!1),this._currentTime=Ue(0),this._duration=Ue(0),this._volume=Ue(this.media.volume),this._muted=Ue(this.media.muted),this._playbackRate=Ue(this.media.playbackRate||1),this._seeking=Ue(!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 St(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 vv({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 Tv({barAlign:t,halfHeight:e,topHeight:n,totalHeight:r,canvasHeight:i}){return t==="top"?0:t==="bottom"?i-r:e-n}function _p(t,e,n){const r=e-t.left,i=n-t.top;return[r/t.width,i/t.height]}function O_(t){return!!(t.barWidth||t.barGap||t.barAlign)}function Ap(t,e){if(!O_(e))return t;const n=e.barWidth||.5,r=n+(e.barGap||n/2);return r===0?t:Math.floor(t/r)*r}function gp({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 Sp(t){const e=t._cleanup;typeof e=="function"&&e()}class Rv extends jo{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]=_p(r,n.clientX,n.clientY);this.emit("click",i,o)}),this.wrapper.addEventListener("dblclick",n=>{const r=this.wrapper.getBoundingClientRect(),[i,o]=_p(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=Ue({scrollLeft:n.scrollLeft,scrollWidth:n.scrollWidth,clientWidth:n.clientWidth}),i=vr(()=>function(a){const{scrollLeft:l,scrollWidth:u,clientWidth:c}=a;if(u===0)return{startX:0,endX:1};const h=l/u,d=(l+c)/u;return{startX:Math.max(0,Math.min(1,h)),endX:Math.max(0,Math.min(1,d))}}(r.value),[r]),o=vr(()=>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),Sp(r)}}}(this.scrollContainer);const e=Xn(()=>{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=Ue(null),l=new Map,u=matchMedia("(pointer: coarse)").matches;let c=()=>{};const h=d=>{if(d.button!==o||(l.set(d.pointerId,d),l.size>1))return;let p=d.clientX,f=d.clientY,m=!1;const E=Date.now(),A=n.getBoundingClientRect(),{left:_,top:g}=A,O=S=>{if(S.defaultPrevented||l.size>1||u&&Date.now()-E<s)return;const v=S.clientX,y=S.clientY,b=v-p,M=y-f;(m||Math.abs(b)>i||Math.abs(M)>i)&&(S.preventDefault(),S.stopPropagation(),m||(a.set({type:"start",x:p-_,y:f-g}),m=!0),a.set({type:"move",x:v-_,y:y-g,deltaX:b,deltaY:M}),p=v,f=y)},D=S=>{if(l.delete(S.pointerId),m){const v=S.clientX,y=S.clientY;a.set({type:"end",x:v-_,y:y-g})}c()},R=S=>{l.delete(S.pointerId),S.relatedTarget&&S.relatedTarget!==document.documentElement||D(S)},T=S=>{m&&(S.stopPropagation(),S.preventDefault())},I=S=>{S.defaultPrevented||l.size>1||m&&S.preventDefault()};document.addEventListener("pointermove",O),document.addEventListener("pointerup",D),document.addEventListener("pointerout",R),document.addEventListener("pointercancel",R),document.addEventListener("touchmove",I,{passive:!1}),document.addEventListener("click",T,{capture:!0}),c=()=>{document.removeEventListener("pointermove",O),document.removeEventListener("pointerup",D),document.removeEventListener("pointerout",R),document.removeEventListener("pointercancel",R),document.removeEventListener("touchmove",I),setTimeout(()=>{document.removeEventListener("click",T,{capture:!0})},10)}};return n.addEventListener("pointerdown",h),{signal:a,cleanup:()=>{c(),n.removeEventListener("pointerdown",h),l.clear(),Sp(a)}}}(this.wrapper);const e=Xn(()=>{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
19
  <style${r?` nonce="${r}"`:""}>
20
20
  :host {
21
21
  user-select: none;
@@ -88,21 +88,21 @@
88
88
  <div class="cursor" part="cursor"></div>
89
89
  </div>
90
90
  </div>
91
- `,[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 h=a||u;return s!=null&&s.every(d=>!d.overlay)?h/l:h}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((h,d)=>{u.addColorStop(d*c,h)}),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:h,barMinHeight:d}=function({width:f,height:m,length:E,options:A,pixelRatio:_}){const g=m/2,O=A.barWidth?A.barWidth*_:1,D=A.barGap?A.barGap*_:A.barWidth?O/2:0,C=O+D||1;return{halfHeight:g,barWidth:O,barGap:D,barRadius:A.barRadius||0,barMinHeight:A.barMinHeight?A.barMinHeight*_:0,barIndexScale:E>0?f/C/E:0,barSpacing:C}}({width:o,height:s,length:(e[0]||[]).length,options:n,pixelRatio:this.getPixelRatio()}),p=function({channelData:f,barIndexScale:m,barSpacing:E,barWidth:A,halfHeight:_,vScale:g,canvasHeight:O,barAlign:D,barMinHeight:C}){const T=f[0]||[],I=f[1]||T,S=T.length,v=[];let y=0,b=0,M=0;for(let k=0;k<=S;k++){const P=Math.round(k*m);if(P>y){const{topHeight:X,totalHeight:G}=_v({maxTop:b,maxBottom:M,halfHeight:_,vScale:g,barMinHeight:C,barAlign:D}),z=Av({barAlign:D,halfHeight:_,topHeight:X,totalHeight:G,canvasHeight:O});v.push({x:y*E,y:z,width:A,height:G}),y=P,b=0,M=0}const B=Math.abs(T[k]||0),F=Math.abs(I[k]||0);B>b&&(b=B),F>M&&(M=F)}return v}({channelData:e,barIndexScale:c,barSpacing:h,barWidth:l,halfHeight:a,vScale:i,canvasHeight:s,barAlign:n.barAlign,barMinHeight:d});r.beginPath();for(const f of p)u&&"roundRect"in r?r.roundRect(f.x,f.y,f.width,f.height,u):r.rect(f.x,f.y,f.width,f.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:h}){const d=c/2,p=l[0]||[];return[p,l[1]||p].map((f,m)=>{const E=f.length,A=E?u/E:0,_=d,g=m===0?-1:1,O=[{x:0,y:_}];let D=0,C=0;for(let T=0;T<=E;T++){const I=Math.round(T*A);if(I>D){const v=_+(Math.round(C*d*h)||1)*g;O.push({x:D,y:v}),D=I,C=0}const S=Math.abs(f[T]||0);S>C&&(C=S)}return O.push({x:D,y:_}),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 h=o[0];if(!h||h.length===0)return c;let d=l!=null?l:0;if(!l)for(let p=0;p<h.length;p++){const f=(u=h[p])!==null&&u!==void 0?u:0,m=Math.abs(f);m>d&&(d=m)}return d?c/d:c}({channelData:e,barHeight:n.barHeight,normalize:n.normalize,maxPeak:n.maxPeak});S_(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 h=u.cloneNode(),d=h.getContext("2d");d.drawImage(u,0,0),d.globalCompositeOperation="source-in",d.fillStyle=this.convertColorValues(n.progressColor,d),d.fillRect(0,0,u.width,u.height),a.appendChild(h)}}renderMultiCanvas(e,n,r,i,o,s){const a=this.getPixelRatio(),{clientWidth:l}=this.scrollContainer,u=r/a,c=function({clientWidth:f,totalWidth:m,options:E}){return Ap(Math.min(8e3,f,m),E)}({clientWidth:l,totalWidth:u,options:n});let h={};if(c===0)return;const d=f=>{if(f<0||f>=p||h[f])return;h[f]=!0;const m=f*c;let E=Math.min(u-m,c);if(E=Ap(E,n),E<=0)return;const A=function({channelData:_,offset:g,clampedWidth:O,totalWidth:D}){return _.map(C=>{const T=Math.floor(g/D*C.length),I=Math.floor((g+O)/D*C.length);return C.slice(T,I)})}({channelData:e,offset:m,clampedWidth:E,totalWidth:u});this.renderSingleCanvas(A,n,E,i,m,o,s)},p=Math.ceil(u/c);if(this.isScrollable){if(gp({scrollLeft:this.scrollContainer.scrollLeft,totalWidth:u,numCanvases:p}).forEach(f=>d(f)),p>1){const f=this.on("scroll",()=>{const{scrollLeft:m}=this.scrollContainer;Object.keys(h).length>10&&(o.innerHTML="",s.innerHTML="",h={}),gp({scrollLeft:m,totalWidth:u,numCanvases:p}).forEach(E=>d(E))});this.unsubscribeOnScroll.push(f)}}else for(let f=0;f<p;f++)d(f)}renderChannel(e,n,r,i){var{overlay:o}=n,s=function(c,h){var d={};for(var p in c)Object.prototype.hasOwnProperty.call(c,p)&&h.indexOf(p)<0&&(d[p]=c[p]);if(c!=null&&typeof Object.getOwnPropertySymbols=="function"){var f=0;for(p=Object.getOwnPropertySymbols(c);f<p.length;f++)h.indexOf(p[f])<0&&Object.prototype.propertyIsEnumerable.call(c,p[f])&&(d[p[f]]=c[p[f]])}return d}(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 vt(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:h,fillParent:d,pixelRatio:p}){const f=Math.ceil(u*c),m=f>h,E=!!(d&&!m);return{scrollWidth:f,isScrollable:m,useParentWidth:E,width:(E?h:f)*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 vt(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 Sv extends jo{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 ml extends jo{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 vt(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 vt(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 vt(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 Ov={waveColor:"#999",progressColor:"#555",cursorWidth:1,minPxPerSec:0,fillParent:!0,interact:!0,dragToSeek:!1,autoScroll:!0,autoCenter:!0,sampleRate:8e3};class vo extends Ev{static create(e){return new vo(e)}getState(){return this.wavesurferState}getRenderer(){return this.renderer}constructor(e){const n=e.media||(e.backend==="WebAudio"?new ml: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({},Ov,e);const{state:r,actions:i}=function(a){var l,u,c,h,d,p;const f=(l=a==null?void 0:a.currentTime)!==null&&l!==void 0?l:Ve(0),m=(u=a==null?void 0:a.duration)!==null&&u!==void 0?u:Ve(0),E=(c=a==null?void 0:a.isPlaying)!==null&&c!==void 0?c:Ve(!1),A=(h=a==null?void 0:a.isSeeking)!==null&&h!==void 0?h:Ve(!1),_=(d=a==null?void 0:a.volume)!==null&&d!==void 0?d:Ve(1),g=(p=a==null?void 0:a.playbackRate)!==null&&p!==void 0?p:Ve(1),O=Ve(null),D=Ve(null),C=Ve(""),T=Ve(0),I=Ve(0),S=Dr(()=>!E.value,[E]),v=Dr(()=>O.value!==null,[O]),y=Dr(()=>v.value&&m.value>0,[v,m]),b=Dr(()=>f.value,[f]),M=Dr(()=>m.value>0?f.value/m.value:0,[f,m]);return{state:{currentTime:f,duration:m,isPlaying:E,isPaused:S,isSeeking:A,volume:_,playbackRate:g,audioBuffer:O,peaks:D,url:C,zoom:T,scrollPosition:I,canPlay:v,isReady:y,progress:b,progressPercent:M},actions:{setCurrentTime:k=>{const P=Math.max(0,Math.min(m.value||1/0,k));f.set(P)},setDuration:k=>{m.set(Math.max(0,k))},setPlaying:k=>{E.set(k)},setSeeking:k=>{A.set(k)},setVolume:k=>{const P=Math.max(0,Math.min(1,k));_.set(P)},setPlaybackRate:k=>{const P=Math.max(.1,Math.min(16,k));g.set(P)},setAudioBuffer:k=>{O.set(k),k&&m.set(k.duration)},setPeaks:k=>{D.set(k)},setUrl:k=>{C.set(k)},setZoom:k=>{T.set(Math.max(0,k))},setScrollPosition:k=>{I.set(Math.max(0,k))}}}}({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 Sv;const o=n?void 0:this.getMediaElement();this.renderer=new gv(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(Kn(()=>{const s=e.isPlaying.value;n.emit(s?"play":"pause")},[e.isPlaying])),r.push(Kn(()=>{const s=e.currentTime.value;n.emit("timeupdate",s),e.isPlaying.value&&n.emit("audioprocess",s)},[e.currentTime,e.isPlaying])),r.push(Kn(()=>{e.isSeeking.value&&n.emit("seeking",e.currentTime.value)},[e.isSeeking,e.currentTime]));let i=!1;r.push(Kn(()=>{e.isReady.value&&!i&&(i=!0,n.emit("ready",e.duration.value))},[e.isReady,e.duration]));let o=!1;return r.push(Kn(()=>{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(Kn(()=>{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=rs.createBuffer(this.exportPeaks(),e.duration)),e.peaks&&e.duration&&(this.decodedData=rs.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 vt(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 mv.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 ml&&(a.duration=s)}if(r)this.decodedData=rs.createBuffer(r,s||0);else if(n){const a=yield n.arrayBuffer();this.decodedData=yield rs.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 vt(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 vt(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 h=a.slice(Math.floor(c*u),Math.ceil((c+1)*u));let d=0;for(let p=0;p<h.length;p++){const f=h[p];Math.abs(f)>Math.abs(d)&&(d=f)}l.push(Math.round(d*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 vt(this,void 0,void 0,function*(){e!=null&&this.setTime(e);const i=yield r.play.call(this);return n!=null&&(this.media instanceof ml?this.media.stopAt(n):this.stopAtPosition=n),i})}playPause(){return vt(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 vt(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()}}vo.BasePlugin=class extends jo{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}},vo.dom=fv;var O_=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,O_(t,a,n,["",null])),r.push(i),a[0]?e[0]|=2:(e[o-2]=0,e[o]=i)):r.push(a)}return r},Op=new Map;function Dv(t){var e=Op.get(this);return e||(e=new Map,Op.set(this,e)),(e=O_(this,e.get(t)||(e.set(t,e=function(n){for(var r,i,o=1,s="",a="",l=[0],u=function(d){o===1&&(d||(s=s.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?l.push(0,d,s):o===3&&(d||s)?(l.push(3,d,s),o=2):o===2&&s==="..."&&d?l.push(4,d,0):o===2&&s&&!d?l.push(5,0,!0,s):o>=5&&((s||!d&&o===5)&&(l.push(o,0,s,i),o=6),d&&(l.push(o,d,0,i),o=6)),s=""},c=0;c<n.length;c++){c&&(o===1&&u(),u(c));for(var h=0;h<n[c].length;h++)r=n[c][h],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][h+1]===">")?(u(),o===3&&(l=l[0]),o=l,(l=l[0]).push(2,0,o),o=0):r===" "||r===" "||r===`
92
- `||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 vv={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,TALK_GMK:"AIzaSyAs_WXNLlj31EHJI_Lw8siO2B3ZJLUzBH0"},Tv=function(t){return vv[t]}("TALK_GMK");function Ru(t,e=10){const n=lr(nu),[r,i]=ue([]);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 D_=/^\/.*[^\\]\/[im]*$/;function Dp(t){return D_.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 Rv(t,e){const n=GE(e),r=v_(t);return n!==void 0&&r.test(n)}const Cv=/^[]/g;function T_(t){return t.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}function pc(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){}})(pc||(pc={}));const fi=pc,Iv=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"),yv=/\uFE0F/g,Nv="‍";function bv(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(Nv)<0?n.replace(yv,""):n);var n;return`https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/svg/${e}.svg`}class R_{constructor({mode:e,allowedHostnames:n,allowedPhoneNrs:r,allowedMatches:i,forbiddenMatches:o,forbiddenWords:s,suppressLinks:a,suppressEmailAddresses:l,suppressPhoneNumbers:u,replacement:c}){if(fi.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(h=>h).map(h=>h.replace(/[^0-9]/g,"")),this.allowedMatches=(i||[]).filter(Dp).map(h=>Vs(h)),this.forbiddenMatches=(o||[]).filter(Dp).map(h=>Vs(h)),s){const h=s.split(`
93
- `).map(d=>d.trim().toLowerCase()).filter(d=>d.length>0&&!d.startsWith("#")).map(d=>T_(d));h.length&&this.forbiddenMatches.push(new RegExp(`\\b(${h.join("|")})\\b`,"gi"))}fi(()=>this.allowedMatches.every(h=>h.flags.includes("g")),"All regexes in `suppressContactInfo.allowedMatches` must be global. Check `allowedMatches`!"),fi(()=>this.forbiddenMatches.every(h=>h.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 Cu(t){var n,r,i,o,s,a,l,u,c,h,d,p,f,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 R_({mode:"off"}),contactInfoHiddenText:(p=(d=t.contactInfoHiddenText)!=null?d:(h=t.suppression)==null?void 0:h.replacement)!=null?p:e,customEmojiUrls:(f=t.customEmojiUrls)!=null?f:{},enableActions:(m=t.enableActions)!=null?m:!0}}function kv({id:t,text:e}){var i;const n=pe(),r=re(()=>{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 L("span",{className:"t-mention","t-is-current-user":re(n.extUserId$)===t?"":void 0,children:`@${(i=r==null?void 0:r.name)!=null?i:e}`})}function Lv({message:t,type:e,action:n,params:r,children:i}){const o=zr(),s=te(l=>{l.preventDefault(),o.triggerMessageAction(t,n,r)},[o,t,n,r]),a={"t-action":n,onClick:s};return e==="actionButton"?L("button",{...a,type:"button",children:i}):L("a",{...a,href:"#",children:i})}function C_(t,e={},n){return Hr(t,{...Cu(e),message:n})}function Hr(t,e){const n=t.flatMap(r=>{if(typeof r=="string")return El(r,e.highlight,e.highlightFromWordBeginnings);switch(r.type){case"bold":case"italic":case"strikethrough":case"blockquote":case"bulletpoint":case"bulletPoint":return wv(r,e);case"bulletlist":case"bulletList":return[Te("ul",null,...Hr(r.children,e))];case"autolink":case"autoLink":case"link":return Pv(r,e);case"codeblock":case"codeBlock":return[L("code",{"data-language":r.language,children:El(r.text,e.highlight,e.highlightFromWordBeginnings)})];case"codespan":case"codeSpan":return L("code",{children:El((i=r.text,i.replace(/^\s*\n/m,"").replace(/\n\s*$/m,"")),e.highlight,e.highlightFromWordBeginnings)});case"mention":return fi.falsy(e.useFallbackMentions),L(kv,{id:r.id,text:r.text},r.id);case"suppressed":return[L("i",{children:e.contactInfoHiddenText})];case"emoji":return e.enableEmojiImageFallback?[L(Mv,{unicode:r.text})]:[r.text];case"actionlink":case"actionLink":case"actionbutton":case"actionButton":return xv(r,e);case"customemoji":case"customEmoji":return r.text;default:fi.never(r)}var i});return n.every(r=>typeof r=="string")?[n.join("")]:n}function is(t){return t.normalize("NFKC").normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase()}function El(t,e,n=!1){if(!t||!e.length)return[t];const r=is(t),i=t.toLowerCase()!==r,o=e.map(l=>is(l).trim()).filter(l=>l.length),s=function(l){const u=l.map(h=>h.trim()).filter(h=>h).sort((h,d)=>d.length-h.length);if(u.length===0)return Cv;const c=u.map(T_).join("|");return new RegExp(c,"gi")}(o),a=Sa(r,n?new RegExp(`(?<=^|\\s)(${s.source})`,s.flags):s).map(l=>({offset:l.index,matchedText:l[0],index:l.index}));return lc(t,a,({index:l,matchedText:u})=>[L("mark",{className:"t-highlighted-text",children:i?function(c,h,d){let p=0,f=0;for(;f<h&&p<c.length;)f+=is(c[p]).length,p+=1;let m=p;for(;f<h+d&&m<c.length;)f+=is(c[m]).length,m+=1;return c.substring(p,m)}(t,l,u.length):t.slice(l,l+u.length)})])}const wv=(t,e)=>[Te({bold:"strong",italic:"em",strikethrough:"del",blockquote:"blockquote",bulletpoint:"li",bulletPoint:"li"}[t.type],null,...Hr(t.children,e))];function Mv({unicode:t}){const[e,n]=ue(()=>t!==":arslan:");return Z(()=>{e&&!Hm(t)&&n(!1)},[]),e?L("span",{className:"t-emoji",children:t}):L("img",{className:"t-emoji",src:bv(t),alt:t})}const Pv=(t,e)=>{const n="children"in t?t.children:[t.text];switch(e.formattedLinks){case"link":return[Te("a",{target:function(r,i){for(const o of r)if(D_.test(o)){if(Vs(o).test(i))return"_top"}else if(Rv(o,i))return"_top";return"_blank"}(e.sameTabLinkRules,t.url),href:t.url,rel:"noreferrer"},...Hr(n,e))];case"plaintext":return"children"in t&&t.children.every(r=>typeof r=="string")?[t.children.join("")]:[Te(Ue,null,...Hr(n,e))];default:fi.never(e.formattedLinks)}},xv=(t,e)=>e.enableActions?[Te(Lv,{type:t.type==="actionlink"?"actionLink":t.type==="actionbutton"?"actionButton":t.type,action:t.action,params:t.params,message:e.message},...Hr(t.children,e))]:"children"in t&&t.children.every(n=>typeof n=="string")?[t.children.join("")]:[Te(Ue,null,...Hr(t.children,e))];function Fv(t,e){return As(t,Cu(e))}function As(t,e){return t.flatMap(n=>{if(typeof n=="string"){let r=[n];return r=_l(r,i=>function(o,s){const{suppression:{forbiddenMatches:a,allowedMatches:l}}=s,u=Eu(a,c=>Sa(o,c)).filter(([c])=>!l.some(h=>c.match(h)!==null)).map(c=>({offset:c.index,matchedText:c[0]}));return lc(o,u,()=>[{type:"suppressed",text:"CONTACT_INFORMATION_HIDDEN"}])}(i,e)),r=_l(r,i=>function(o){return lc(o,function(s){const a=[];let l;for(;l=Iv.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=_l(r,i=>function(o,s){if(s.contactInfo!=="suppress")return[o];const a=[];if((s.suppression.suppressEmailAddresses||s.suppression.suppressLinks)&&a.push(u_),s.suppression.suppressPhoneNumbers&&a.push(c_),a.length===0)return[o];const l=p_(o,{multilineSteps:[],singlelineSteps:a}),u=l.map(c=>typeof c=="string"?c:vp(c.url,s.suppression)?c.text:{type:"suppressed",text:"CONTACT_INFORMATION_HIDDEN"});return Tu(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:As(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"?vp(r.url,i.suppression)?r:{type:"suppressed",text:"CONTACT_INFORMATION_HIDDEN"}:r.text}(n,e);case"link":return{type:"link",url:n.url,children:As(n.children,e)};case"actionlink":case"actionLink":case"actionbutton":case"actionButton":return{type:n.type,action:n.action,params:n.params,children:As(n.children,e)}}})}function _l(t,e){return Eu(t,n=>typeof n=="string"?e(n):[n])}function vp(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||Tp(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=GE(t);return!e.suppressLinks||!n||Tp(e.allowedHostnames,n)}}function Tp(t,e){for(const n of t)if(v_(n).test(e))return!0;return!1}function Iu({block:t,nonInteractive:e,message:n,className:r=""}){const i=pe(),o=!e,s=re(i.highlightedStrings$),a=i.type==="ConversationListStore",{nodes:l,roleOptions:u}=function(c,h){var O;const d=pe(),p=re(d.app$.role);de.defined(p);const f=h.type==="UserMessage",m=((O=h.sender)==null?void 0:O.id)===d.extUserId$.peek(),E=p.suppressContactInfo,A=f&&E.shouldSuppress({isContentBySender:m}),_=Fv(c.children,{contactInfo:A?"suppress":"link",suppression:E}),g={sameTabLinkRules:p.sameTabLinkRules,contactInfoHiddenText:p.suppressContactInfo.replacement||`(${d.t$.peek().CONTACT_INFORMATION_HIDDEN})`};return{nodes:_,roleOptions:g}}(t,n);return Te("span",{className:`t-text ${r}`},...C_(l,{enableEmojiImageFallback:!0,formattedLinks:o?"link":"plaintext",enableActions:o,highlight:s,highlightFromWordBeginnings:a,...u},n))}function Ur({text:t,className:e=""}){const n=pe();return Te("span",{className:`t-highlightable ${e}`},...C_([t],{enableEmojiImageFallback:!0,formattedLinks:"plaintext",enableActions:!1,highlight:re(n.highlightedStrings$),highlightFromWordBeginnings:n.type==="ConversationListStore"},null))}function I_(t){const e=rt(),n=pe(),{className:r="",...i}=t,o=re(()=>n.state$.messages.child(t.common.conversation.id).lookup.child(t.message.id).content.child(0).url.get());return L("div",{className:`t-message-content ${r}`,children:t.message.content.map(s=>{var a;return L(Hv,{block:s,theme:e,downloadUrl:o,...i},t.message.createdAt+((a=t.message.editedAt)!=null?a:0))})})}function Hv({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:de.never(a)}}(r,e);return L(o,{block:e,common:t,message:n,downloadUrl:i})}const Uv=27;function $o(t,e,n=!0){const r=te(o=>{o.keyCode===Uv&&t()},[t]),i=te(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 Bv=".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)}";function zs(t){return L(pe()instanceof jm?jv:$v,{...t})}function jv(t){const e=rt(),n=sn();return L(e.Icon,{common:n,...t})}function $v(t){const e=rt(),n=va();return L(e.Icon,{common:n,...t})}function yu(){return L(zs,{type:"spinner","aria-label":re(pe().t$).LOADING,className:"t-loading-icon"})}const y_={"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 Vv(t,e){if(typeof window=="undefined"||window.document===void 0)return new Promise(()=>{});try{const n=t!=null?t:di.emojiPickerTranslationUrl,r=y_["emoji-picker-element"],[i,o]=await Promise.all([fc(r),fc(n)]),s=e!=null?e:di.emojiDataUrl,a={...i,i18n:o.default,dataSource:s};return await new a.Database({dataSource:s}).ready(),a}catch(n){return zl.error("Failed to load emoji picker:",n),new Promise(()=>{})}}async function fc(t){return import(t).catch(()=>new Function("url","return import(url)")(t)).catch(()=>{throw new Error("Cannot dynamically import module in this environment")})}function Nu(){const t=pe(),[e,n]=ue();return function(r,i,o,s){let a;ce(i)?a=i:Array.isArray(i)?(s=i,o=void 0):o=i,a&&Array.isArray(o)&&(s=o,o=void 0);const l=(s=s||(o==null?void 0:o.deps))?Vt(s):void 0,u=Q({});u.current.selector=r,u.current.reaction=a,l&&l.set(s),u.current.dispose||(u.current.dispose=Dt(c=>{var h;return l==null||l.get(),_n((h=u.current)==null?void 0:h.selector,void 0,c)},c=>{var h,d;return(d=(h=u.current).reaction)==null?void 0:d.call(h,c)},o)),Hg(()=>{var c,h;(h=(c=u.current)==null?void 0:c.dispose)==null||h.call(c)}),u.current.dispose}(()=>{const r=t.translationData$.get();t.app$.get()&&t.currentUser$.get()&&r&&function(i,o){const s=JSON.stringify([i,o]);if(Al[s])return Al[s];const a=Vv(i,o);return Al[s]=a,a}(r.emojiPickerTranslationUrl,r.emojiDataUrl).then(i=>n({value:i}))},[]),e}const Al={};function bu(t){const{onClose:e,onEmojiSelected:n}=$g(),r=Q(null),i=re(pe().t$),o=Nu();return Z(()=>{if(!o)return;de.defined(r.current);const s=r.current,a=s.shadowRoot;(function(c,h){const d=document.createElement("style");d.textContent=h,c.appendChild(d)})(a,Bv);const l=c=>{var d;const h=(d=c.detail.unicode)!=null?d:c.detail.name;n(h)};function u(c){c.pointerType==="mouse"&&(a.querySelector("section").dataset.hasMouse="true")}return s.addEventListener("emoji-click",l),s.addEventListener("pointermove",u,{once:!0}),s.i18n=o.value.i18n,()=>{s.removeEventListener("emoji-click",l),s.removeEventListener("pointermove",u)}},[o,n]),Z(()=>{var s;o&&r.current&&((s=r.current.shadowRoot.getElementById("search"))==null||s.focus())},[o]),$o(()=>e(),".t-emoji-picker"),L("div",o?{className:"t-emoji-picker",children:L("emoji-picker",{locale:i.locale,ref:r,class:t.colorScheme,"data-source":o.value.dataSource})}:{className:"t-emoji-picker","t-loading":"",children:L(yu,{})})}function N_({messageId:t,colorScheme:e}){const{closePopover:n}=ru(),r=zr();return L("div",{className:"t-reaction-picker",children:L(xm.Provider,{value:{onClose:n,onEmojiSelected:i=>{r.addReaction(t,i),n()}},children:L(bu,{colorScheme:e})})})}function mc(){return mc=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},mc.apply(null,arguments)}function b_(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 Ec(t,e){return Ec=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Ec(t,e)}function k_(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Ec(t,e)}function L_(){}function w_(){}w_.resetWarningCache=L_;function Rp(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}(function(){function t(r,i,o,s,a,l){if(l!=="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"){var u=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 u.name="Invariant Violation",u}}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:w_,resetWarningCache:L_};n.PropTypes=n})();const Cp=!1,M_=Ft.createContext(null);var Xi="unmounted",_r="exited",Ar="entering",ti="entered",_c="exiting",kn=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=_r,o.appearStatus=Ar):s=ti:s=r.unmountOnExit||r.mountOnEnter?Xi:_r,o.state={status:s},o.nextCallback=null,o}k_(e,t),e.getDerivedStateFromProps=function(r,i){return r.in&&i.status===Xi?{status:_r}: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!==Ar&&o!==ti&&(i=Ar):o!==Ar&&o!==ti||(i=_c)}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===Ar?this.performEnter(r):this.performExit()):this.props.unmountOnExit&&this.state.status===_r&&this.setState({status:Xi})},n.performEnter=function(r){var i=this,o=this.props.enter,s=this.context?this.context.isMounting:r,a=this.props.nodeRef?[s]:[Ft.findDOMNode(this),s],l=a[0],u=a[1],c=this.getTimeouts(),h=s?c.appear:c.enter;!r&&!o||Cp?this.safeSetState({status:ti},function(){i.props.onEntered(l)}):(this.props.onEnter(l,u),this.safeSetState({status:Ar},function(){i.props.onEntering(l,u),i.onTransitionEnd(h,function(){i.safeSetState({status:ti},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:Ft.findDOMNode(this);i&&!Cp?(this.props.onExit(s),this.safeSetState({status:_c},function(){r.props.onExiting(s),r.onTransitionEnd(o.exit,function(){r.safeSetState({status:_r},function(){r.props.onExited(s)})})})):this.safeSetState({status:_r},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:Ft.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===Xi)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=b_(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Ft.createElement(M_.Provider,{value:null},typeof o=="function"?o(r,s):Ft.cloneElement(Ft.Children.only(o),s))},e}(Ft.Component);function Zr(){}kn.contextType=M_,kn.propTypes={},kn.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Zr,onEntering:Zr,onEntered:Zr,onExit:Zr,onExiting:Zr,onExited:Zr},kn.UNMOUNTED=Xi,kn.EXITED=_r,kn.ENTERING=Ar,kn.ENTERED=ti,kn.EXITING=_c;var gl=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=Rp(r.className,i):r.setAttribute("class",Rp(r.className&&r.className.baseVal||"",i)));var r,i})},Ac=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],h=u[1];r.removeClasses(c,"exit"),r.addClass(c,h?"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],h=u[1]?"appear":"enter";r.addClass(c,h,"active"),r.props.onEntering&&r.props.onEntering(a,l)},r.onEntered=function(a,l){var u=r.resolveArguments(a,l),c=u[0],h=u[1]?"appear":"enter";r.removeClasses(c,h),r.addClass(c,h,"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}k_(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 d=c,void((h=l).classList?h.classList.add(d):function(p,f){return p.classList?!!f&&p.classList.contains(f):(" "+(p.className.baseVal||p.className)+" ").indexOf(" "+f+" ")!==-1}(h,d)||(typeof h.className=="string"?h.className=h.className+" "+d:h.setAttribute("class",(h.className&&h.className.baseVal||"")+" "+d)));var h,d})}(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&&gl(r,s),a&&gl(r,a),l&&gl(r,l)},n.render=function(){var r=this.props;r.classNames;var i=b_(r,["classNames"]);return Ft.createElement(kn,mc({},i,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},e}(Ft.Component);Ac.defaultProps={classNames:""},Ac.propTypes={};const zv={ltr:["ArrowLeft","ArrowRight"],rtl:["ArrowRight","ArrowLeft"],ttb:["ArrowUp","ArrowDown"]};function P_(t,{focused:e,setFocused:n,itemCount:r,dir:i,onConfirm:o,onSpace:s}){if(r===0)return!1;const a=c=>{var h,d,p;h=0,d=c,p=r-1,c=Math.max(h,Math.min(d,p)),n(c)},[l,u]=zv[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 x_({focused:t,setFocused:e,buttonId:n}){mt(()=>{var a;const s=n(t);s&&((a=document.getElementById(s))==null||a.scrollIntoView({block:"nearest"}))},[t,n]);const r=te(s=>{const a=s.currentTarget.dataset.index;e(+a)},[e]),i=le(()=>({role:"menu","aria-activedescendant":n(t)}),[t,n]),o=te(s=>({onMouseMove:r,id:n(s),"data-index":s}),[r,n]);return{containerProps:i,itemProps:o}}function F_(t){const[e,n]=ue([]),[r,i]=ue([]),[o,s]=ue(0),[a,l]=ue(0),u=Nu(),c=le(()=>(u==null?void 0:u.value)&&new u.value.Database({dataSource:u.value.dataSource}),[u]),h=Po(),d=re(h.state$.suggestEmojiQuery);Z(()=>{c&&(d?async function(){const _=await c.getPreferredSkinTone();l(_);let g=await c.getEmojiBySearchQuery(d);if(g=g.filter(O=>O.url||function(D){return D.version<=Um&&!Gv.includes(D.unicode)}(O)),function(O,D){D.sort((C,T)=>{var v,y;const I=(v=C.shortcodes)==null?void 0:v.find(b=>b.startsWith(O)),S=(y=T.shortcodes)==null?void 0:y.find(b=>b.startsWith(O));return I&&!S?-1:!I&&S?1:I&&S?I.length-S.length:0})}(d.substring(1),g),s(0),n(g),g.length>0&&i(g),d.endsWith(":")){const O=d.slice(1,-1),D=g.find(C=>{var T;return(T=C.shortcodes)==null?void 0:T.includes(O)});D&&h.selectEmoji(Ki(D,_))}}():n([]))},[d,h,c]);const p=te(_=>{const g=e[_];return g&&"emoji-button-"+Ki(g,a)},[e,a]),{containerProps:f,itemProps:m}=x_({focused:o,setFocused:s,buttonId:p}),E=e.length>0;$o(()=>h.closeSuggester(),".t-emoji-suggest-bar",E),Z(()=>{if(E)return h.listenKeydown("emoji",_=>P_(_,{dir:"ltr",focused:o,setFocused:s,itemCount:e.length,onConfirm(){const g=e[o];de.defined(g),h.selectEmoji(Ki(g,a))}})),()=>{h.listenKeydown("emoji",void 0)};h.listenKeydown("emoji",void 0)},[h,e,o,E,a]);const A=Q(null);return L(Ac,{in:E,timeout:100,classNames:"slide",mountOnEnter:!0,unmountOnExit:!0,nodeRef:A,children:L("div",{className:"t-emoji-suggest-bar",ref:A,...f,children:r.map((_,g)=>L(Yv,{emoji:_,skinTone:a,focused:g===o,onSelect:O=>h.selectEmoji(O),...m(g)},Ki(_,a)))})})}function Ki(t,e){return gc(t)?H_(t,e):t.name}function gc(t){return!!t.unicode}function Yv(t){var l;const{emoji:e,focused:n,skinTone:r,onSelect:i,...o}=t,s=((l=e.shortcodes)!=null?l:[]).join(", "),a=gc(e)?[e.unicode,s].join(", "):s;return L("button",{"t-focused":n?"":void 0,title:s,"aria-label":a,onClick:()=>i(Ki(e,r)),...o,children:gc(e)?H_(e,r):null})}function H_(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 Gv=["🏻","🏼","🏽","🏾","🏿"],Wv=["top","right","bottom","left"],Ys=Math.min,Lr=Math.max,Gs=Math.round,ss=Math.floor,Sn=t=>({x:t,y:t}),Xv={left:"right",right:"left",bottom:"top",top:"bottom"},Kv={start:"end",end:"start"};function Ip(t,e,n){return Lr(t,Ys(e,n))}function Ta(t,e){return typeof t=="function"?t(e):t}function Ni(t){return t.split("-")[0]}function ku(t){return t.split("-")[1]}function U_(t){return t==="x"?"y":"x"}function B_(t){return t==="y"?"height":"width"}const qv=new Set(["top","bottom"]);function Cr(t){return qv.has(Ni(t))?"y":"x"}function j_(t){return U_(Cr(t))}function Sc(t){return t.replace(/start|end/g,e=>Kv[e])}const yp=["left","right"],Np=["right","left"],Jv=["top","bottom"],Zv=["bottom","top"];function Qv(t,e,n,r){const i=ku(t);let o=function(s,a,l){switch(s){case"top":case"bottom":return l?a?Np:yp:a?yp:Np;case"left":case"right":return a?Jv:Zv;default:return[]}}(Ni(t),n==="start",r);return i&&(o=o.map(s=>s+"-"+i),e&&(o=o.concat(o.map(Sc)))),o}function as(t){return t.replace(/left|right|bottom|top/g,e=>Xv[e])}function Ws(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 bp(t,e,n){let{reference:r,floating:i}=t;const o=Cr(e),s=j_(e),a=B_(s),l=Ni(e),u=o==="y",c=r.x+r.width/2-i.width/2,h=r.y+r.height/2-i.height/2,d=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:h};break;case"left":p={x:r.x-i.width,y:h};break;default:p={x:r.x,y:r.y}}switch(ku(e)){case"start":p[s]-=d*(n&&u?-1:1);break;case"end":p[s]+=d*(n&&u?-1:1)}return p}async function Xs(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:h="floating",altBoundary:d=!1,padding:p=0}=Ta(e,t),f=function(D){return typeof D!="number"?function(C){return{top:0,right:0,bottom:0,left:0,...C}}(D):{top:D,right:D,bottom:D,left:D}}(p),m=a[d?h==="floating"?"reference":"floating":h],E=Ws(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(m)))==null||n?m:m.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),A=h==="floating"?{x:r,y:i,width:s.floating.width,height:s.floating.height}:s.reference,_=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),g=await(o.isElement==null?void 0:o.isElement(_))&&await(o.getScale==null?void 0:o.getScale(_))||{x:1,y:1},O=Ws(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:A,offsetParent:_,strategy:l}):A);return{top:(E.top-O.top+f.top)/g.y,bottom:(O.bottom-E.bottom+f.bottom)/g.y,left:(E.left-O.left+f.left)/g.x,right:(O.right-E.right+f.right)/g.x}}function kp(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Lp(t){return Wv.some(e=>t[e]>=0)}function Ra(){return typeof window!="undefined"}function bi(t){return Lu(t)?(t.nodeName||"").toLowerCase():"#document"}function $t(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function On(t){var e;return(e=(Lu(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Lu(t){return!!Ra()&&(t instanceof Node||t instanceof $t(t).Node)}function nn(t){return!!Ra()&&(t instanceof Element||t instanceof $t(t).Element)}function vn(t){return!!Ra()&&(t instanceof HTMLElement||t instanceof $t(t).HTMLElement)}function Oc(t){return!(!Ra()||typeof ShadowRoot=="undefined")&&(t instanceof ShadowRoot||t instanceof $t(t).ShadowRoot)}const e0=new Set(["inline","contents"]);function To(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=rn(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!e0.has(i)}const t0=new Set(["table","td","th"]);function n0(t){return t0.has(bi(t))}const r0=[":popover-open",":modal"];function Ks(t){return r0.some(e=>{try{return t.matches(e)}catch(n){return!1}})}const i0=["transform","translate","scale","rotate","perspective"],o0=["transform","translate","scale","rotate","perspective","filter"],s0=["paint","layout","strict","content"];function Dc(t){const e=wu(),n=nn(t)?rn(t):t;return i0.some(r=>!!n[r]&&n[r]!=="none")||!!n.containerType&&n.containerType!=="normal"||!e&&!!n.backdropFilter&&n.backdropFilter!=="none"||!e&&!!n.filter&&n.filter!=="none"||o0.some(r=>(n.willChange||"").includes(r))||s0.some(r=>(n.contain||"").includes(r))}function wu(){return!(typeof CSS=="undefined"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const a0=new Set(["html","body","#document"]);function mi(t){return a0.has(bi(t))}function rn(t){return $t(t).getComputedStyle(t)}function Ca(t){return nn(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function nr(t){if(bi(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Oc(t)&&t.host||On(t);return Oc(e)?e.host:e}function $_(t){const e=nr(t);return mi(e)?t.ownerDocument?t.ownerDocument.body:t.body:vn(e)&&To(e)?e:$_(e)}function Ro(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=$_(t),o=i===((r=t.ownerDocument)==null?void 0:r.body),s=$t(i);if(o){const a=vc(s);return e.concat(s,s.visualViewport||[],To(i)?i:[],a&&n?Ro(a):[])}return e.concat(i,Ro(i,[],n))}function vc(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function V_(t){const e=rn(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=vn(t),o=i?t.offsetWidth:n,s=i?t.offsetHeight:r,a=Gs(n)!==o||Gs(r)!==s;return a&&(n=o,r=s),{width:n,height:r,$:a}}function Mu(t){return nn(t)?t:t.contextElement}function Ei(t){const e=Mu(t);if(!vn(e))return Sn(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:o}=V_(e);let s=(o?Gs(n.width):n.width)/r,a=(o?Gs(n.height):n.height)/i;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const l0=Sn(0);function z_(t){const e=$t(t);return wu()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:l0}function Br(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),o=Mu(t);let s=Sn(1);e&&(r?nn(r)&&(s=Ei(r)):s=Ei(t));const a=function(d,p,f){return p===void 0&&(p=!1),!(!f||p&&f!==$t(d))&&p}(o,n,r)?z_(o):Sn(0);let l=(i.left+a.x)/s.x,u=(i.top+a.y)/s.y,c=i.width/s.x,h=i.height/s.y;if(o){const d=$t(o),p=r&&nn(r)?$t(r):r;let f=d,m=vc(f);for(;m&&r&&p!==f;){const E=Ei(m),A=m.getBoundingClientRect(),_=rn(m),g=A.left+(m.clientLeft+parseFloat(_.paddingLeft))*E.x,O=A.top+(m.clientTop+parseFloat(_.paddingTop))*E.y;l*=E.x,u*=E.y,c*=E.x,h*=E.y,l+=g,u+=O,f=$t(m),m=vc(f)}}return Ws({width:c,height:h,x:l,y:u})}function qs(t,e){const n=Ca(t).scrollLeft;return e?e.left+n:Br(On(t)).left+n}function Y_(t,e){const n=t.getBoundingClientRect();return{x:n.left+e.scrollLeft-qs(t,n),y:n.top+e.scrollTop}}const c0=new Set(["absolute","fixed"]);function wp(t,e,n){let r;if(e==="viewport")r=function(i,o){const s=$t(i),a=On(i),l=s.visualViewport;let u=a.clientWidth,c=a.clientHeight,h=0,d=0;if(l){u=l.width,c=l.height;const f=wu();(!f||f&&o==="fixed")&&(h=l.offsetLeft,d=l.offsetTop)}const p=qs(a);if(p<=0){const f=a.ownerDocument,m=f.body,E=getComputedStyle(m),A=f.compatMode==="CSS1Compat"&&parseFloat(E.marginLeft)+parseFloat(E.marginRight)||0,_=Math.abs(a.clientWidth-m.clientWidth-A);_<=25&&(u-=_)}else p<=25&&(u+=p);return{width:u,height:c,x:h,y:d}}(t,n);else if(e==="document")r=function(i){const o=On(i),s=Ca(i),a=i.ownerDocument.body,l=Lr(o.scrollWidth,o.clientWidth,a.scrollWidth,a.clientWidth),u=Lr(o.scrollHeight,o.clientHeight,a.scrollHeight,a.clientHeight);let c=-s.scrollLeft+qs(i);const h=-s.scrollTop;return rn(a).direction==="rtl"&&(c+=Lr(o.clientWidth,a.clientWidth)-l),{width:l,height:u,x:c,y:h}}(On(t));else if(nn(e))r=function(i,o){const s=Br(i,!0,o==="fixed"),a=s.top+i.clientTop,l=s.left+i.clientLeft,u=vn(i)?Ei(i):Sn(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=z_(t);r={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return Ws(r)}function G_(t,e){const n=nr(t);return!(n===e||!nn(n)||mi(n))&&(rn(n).position==="fixed"||G_(n,e))}function u0(t,e,n){const r=vn(e),i=On(e),o=n==="fixed",s=Br(t,!0,o,e);let a={scrollLeft:0,scrollTop:0};const l=Sn(0);function u(){l.x=qs(i)}if(r||!r&&!o)if((bi(e)!=="body"||To(i))&&(a=Ca(e)),r){const h=Br(e,!0,o,e);l.x=h.x+e.clientLeft,l.y=h.y+e.clientTop}else i&&u();o&&!r&&i&&u();const c=!i||r||o?Sn(0):Y_(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 Sl(t){return rn(t).position==="static"}function Mp(t,e){if(!vn(t)||rn(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return On(t)===n&&(n=n.ownerDocument.body),n}function Pp(t,e){const n=$t(t);if(Ks(t))return n;if(!vn(t)){let i=nr(t);for(;i&&!mi(i);){if(nn(i)&&!Sl(i))return i;i=nr(i)}return n}let r=Mp(t,e);for(;r&&n0(r)&&Sl(r);)r=Mp(r,e);return r&&mi(r)&&Sl(r)&&!Dc(r)?n:r||function(i){let o=nr(i);for(;vn(o)&&!mi(o);){if(Dc(o))return o;if(Ks(o))return null;o=nr(o)}return null}(t)||n}const d0={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:r,strategy:i}=t;const o=i==="fixed",s=On(r),a=!!e&&Ks(e.floating);if(r===s||a&&o)return n;let l={scrollLeft:0,scrollTop:0},u=Sn(1);const c=Sn(0),h=vn(r);if((h||!h&&!o)&&((bi(r)!=="body"||To(s))&&(l=Ca(r)),vn(r))){const p=Br(r);u=Ei(r),c.x=p.x+r.clientLeft,c.y=p.y+r.clientTop}const d=!s||h||o?Sn(0):Y_(s,l);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x+d.x,y:n.y*u.y-l.scrollTop*u.y+c.y+d.y}},getDocumentElement:On,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:r,strategy:i}=t;const o=n==="clippingAncestors"?Ks(e)?[]:function(u,c){const h=c.get(u);if(h)return h;let d=Ro(u,[],!1).filter(E=>nn(E)&&bi(E)!=="body"),p=null;const f=rn(u).position==="fixed";let m=f?nr(u):u;for(;nn(m)&&!mi(m);){const E=rn(m),A=Dc(m);A||E.position!=="fixed"||(p=null),(f?!A&&!p:!A&&E.position==="static"&&p&&c0.has(p.position)||To(m)&&!A&&G_(u,m))?d=d.filter(_=>_!==m):p=E,m=nr(m)}return c.set(u,d),d}(e,this._c):[].concat(n),s=[...o,r],a=s[0],l=s.reduce((u,c)=>{const h=wp(e,c,i);return u.top=Lr(h.top,u.top),u.right=Ys(h.right,u.right),u.bottom=Ys(h.bottom,u.bottom),u.left=Lr(h.left,u.left),u},wp(e,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:Pp,getElementRects:async function(t){const e=this.getOffsetParent||Pp,n=this.getDimensions,r=await n(t.floating);return{reference:u0(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}=V_(t);return{width:e,height:n}},getScale:Ei,isElement:nn,isRTL:function(t){return rn(t).direction==="rtl"}};function xp(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function h0(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=Mu(t),c=i||o?[...u?Ro(u):[],...Ro(e)]:[];c.forEach(E=>{i&&E.addEventListener("scroll",n,{passive:!0}),o&&E.addEventListener("resize",n)});const h=u&&a?function(E,A){let _,g=null;const O=On(E);function D(){var C;clearTimeout(_),(C=g)==null||C.disconnect(),g=null}return function C(T,I){T===void 0&&(T=!1),I===void 0&&(I=1),D();const S=E.getBoundingClientRect(),{left:v,top:y,width:b,height:M}=S;if(T||A(),!b||!M)return;const k={rootMargin:-ss(y)+"px "+-ss(O.clientWidth-(v+b))+"px "+-ss(O.clientHeight-(y+M))+"px "+-ss(v)+"px",threshold:Lr(0,Ys(1,I))||1};let P=!0;function B(F){const X=F[0].intersectionRatio;if(X!==I){if(!P)return C();X?C(!1,X):_=setTimeout(()=>{C(!1,1e-7)},1e3)}X!==1||xp(S,E.getBoundingClientRect())||C(),P=!1}try{g=new IntersectionObserver(B,{...k,root:O.ownerDocument})}catch(F){g=new IntersectionObserver(B,k)}g.observe(E)}(!0),D}(u,n):null;let d,p=-1,f=null;s&&(f=new ResizeObserver(E=>{let[A]=E;A&&A.target===u&&f&&(f.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var _;(_=f)==null||_.observe(e)})),n()}),u&&!l&&f.observe(u),f.observe(e));let m=l?Br(t):null;return l&&function E(){const A=Br(t);m&&!xp(m,A)&&n(),m=A,d=requestAnimationFrame(E)}(),n(),()=>{var E;c.forEach(A=>{i&&A.removeEventListener("scroll",n),o&&A.removeEventListener("resize",n)}),h==null||h(),(E=f)==null||E.disconnect(),f=null,l&&cancelAnimationFrame(d)}}const p0=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:_}=E;return{x:A,y:_}}},...l}=Ta(t,e),u={x:n,y:r},c=await Xs(e,l),h=Cr(Ni(i)),d=U_(h);let p=u[d],f=u[h];if(o){const E=d==="y"?"bottom":"right";p=Ip(p+c[d==="y"?"top":"left"],p,p-c[E])}if(s){const E=h==="y"?"bottom":"right";f=Ip(f+c[h==="y"?"top":"left"],f,f-c[E])}const m=a.fn({...e,[d]:p,[h]:f});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[d]:o,[h]:s}}}}}},f0=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:h=!0,fallbackPlacements:d,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:m=!0,...E}=Ta(t,e);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const A=Ni(i),_=Cr(a),g=Ni(a)===a,O=await(l.isRTL==null?void 0:l.isRTL(u.floating)),D=d||(g||!m?[as(a)]:function(k){const P=as(k);return[Sc(k),P,Sc(P)]}(a)),C=f!=="none";!d&&C&&D.push(...Qv(a,m,f,O));const T=[a,...D],I=await Xs(e,E),S=[];let v=((r=o.flip)==null?void 0:r.overflows)||[];if(c&&S.push(I[A]),h){const k=function(P,B,F){F===void 0&&(F=!1);const X=ku(P),G=j_(P),z=B_(G);let K=G==="x"?X===(F?"end":"start")?"right":"left":X==="start"?"bottom":"top";return B.reference[z]>B.floating[z]&&(K=as(K)),[K,as(K)]}(i,s,O);S.push(I[k[0]],I[k[1]])}if(v=[...v,{placement:i,overflows:S}],!S.every(k=>k<=0)){var y,b;const k=(((y=o.flip)==null?void 0:y.index)||0)+1,P=T[k];if(P&&(!(h==="alignment"&&_!==Cr(P))||v.every(F=>Cr(F.placement)!==_||F.overflows[0]>0)))return{data:{index:k,overflows:v},reset:{placement:P}};let B=(b=v.filter(F=>F.overflows[0]<=0).sort((F,X)=>F.overflows[1]-X.overflows[1])[0])==null?void 0:b.placement;if(!B)switch(p){case"bestFit":{var M;const F=(M=v.filter(X=>{if(C){const G=Cr(X.placement);return G===_||G==="y"}return!0}).map(X=>[X.placement,X.overflows.filter(G=>G>0).reduce((G,z)=>G+z,0)]).sort((X,G)=>X[1]-G[1])[0])==null?void 0:M[0];F&&(B=F);break}case"initialPlacement":B=a}if(i!==B)return{reset:{placement:B}}}return{}}}},m0=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:r="referenceHidden",...i}=Ta(t,e);switch(r){case"referenceHidden":{const o=kp(await Xs(e,{...i,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Lp(o)}}}case"escaped":{const o=kp(await Xs(e,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:o,escaped:Lp(o)}}}default:return{}}}}},E0=(t,e,n)=>{const r=new Map,i={platform:d0,...n},o={...i.platform,_c:r};return(async(s,a,l)=>{const{placement:u="bottom",strategy:c="absolute",middleware:h=[],platform:d}=l,p=h.filter(Boolean),f=await(d.isRTL==null?void 0:d.isRTL(a));let m=await d.getElementRects({reference:s,floating:a,strategy:c}),{x:E,y:A}=bp(m,u,f),_=u,g={},O=0;for(let D=0;D<p.length;D++){const{name:C,fn:T}=p[D],{x:I,y:S,data:v,reset:y}=await T({x:E,y:A,initialPlacement:u,placement:_,strategy:c,middlewareData:g,rects:m,platform:d,elements:{reference:s,floating:a}});E=I!=null?I:E,A=S!=null?S:A,g={...g,[C]:{...g[C],...v}},y&&O<=50&&(O++,typeof y=="object"&&(y.placement&&(_=y.placement),y.rects&&(m=y.rects===!0?await d.getElementRects({reference:s,floating:a,strategy:c}):y.rects),{x:E,y:A}=bp(m,_,f)),D=-1)}return{x:E,y:A,placement:_,strategy:c,middlewareData:g}})(t,e,{...i,platform:o})};var gs=typeof document!="undefined"?mt:function(){};function Js(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(!Js(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)&&!Js(t[o],e[o]))return!1}return!0}return t!=t&&e!=e}function W_(t){return typeof window=="undefined"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Fp(t,e){const n=W_(t);return Math.round(e*n)/n}function Ol(t){const e=Q(t);return gs(()=>{e.current=t}),e}const _0=(t,e)=>({...p0(t),options:[t,e]}),A0=(t,e)=>({...f0(t),options:[t,e]}),g0=(t,e)=>({...m0(t),options:[t,e]});var X_=["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])"],Zs=X_.join(","),K_=typeof Element=="undefined",jr=K_?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ss=!K_&&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},Co=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&&Co(t.parentNode)},q_=function(t,e,n){if(Co(t))return[];var r=Array.prototype.slice.apply(t.querySelectorAll(Zs));return e&&jr.call(t,Zs)&&r.unshift(t),r=r.filter(n)},Qs=function(t,e,n){for(var r=[],i=Array.from(t);i.length;){var o=i.shift();if(!Co(o,!1))if(o.tagName==="SLOT"){var s=o.assignedElements(),a=s.length?s:o.children,l=Qs(a,!0,n);n.flatten?r.push.apply(r,l):r.push({scopeParent:o,candidates:l})}else{jr.call(o,Zs)&&n.filter(o)&&(e||!t.includes(o))&&r.push(o);var u=o.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(o),c=!Co(u,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(o));if(u&&c){var h=Qs(u===!0?o.children:u.children,!0,n);n.flatten?r.push.apply(r,h):r.push({scopeParent:o,candidates:h})}else i.unshift.apply(i,o.children)}}return r},J_=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Zn=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))&&!J_(t)?0:t.tabIndex},S0=function(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex},Z_=function(t){return t.tagName==="INPUT"},O0=function(t){return function(e){return Z_(e)&&e.type==="radio"}(t)&&!function(e){if(!e.name)return!0;var n,r=e.form||Ss(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)},Hp=function(t){var e=t.getBoundingClientRect(),n=e.width,r=e.height;return n===0&&r===0},D0=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=jr.call(t,"details>summary:first-of-type")?t.parentElement:t;if(jr.call(i,"details:not([open]) *"))return!0;if(n&&n!=="full"&&n!=="full-native"&&n!=="legacy-full"){if(n==="non-zero-area")return Hp(t)}else{if(typeof r=="function"){for(var o=t;t;){var s=t.parentElement,a=Ss(t);if(s&&!s.shadowRoot&&r(s)===!0)return Hp(t);t=t.assignedSlot?t.assignedSlot:s||a===t.ownerDocument?s:a.host}t=o}if(function(l){var u,c,h,d,p=l&&Ss(l),f=(u=p)===null||u===void 0?void 0:u.host,m=!1;if(p&&p!==l)for(m=!!((c=f)!==null&&c!==void 0&&(h=c.ownerDocument)!==null&&h!==void 0&&h.contains(f)||l!=null&&(d=l.ownerDocument)!==null&&d!==void 0&&d.contains(l));!m&&f;){var E,A,_;m=!((A=f=(E=p=Ss(f))===null||E===void 0?void 0:E.host)===null||A===void 0||(_=A.ownerDocument)===null||_===void 0||!_.contains(f))}return m}(t))return!t.getClientRects().length;if(n!=="legacy-full")return!0}return!1},ea=function(t,e){return!(e.disabled||Co(e)||function(n){return Z_(n)&&n.type==="hidden"}(e)||D0(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!!jr.call(r,"fieldset[disabled] *")||!o.contains(n)}return!0}r=r.parentElement}return!1}(e))},Tc=function(t,e){return!(O0(e)||Zn(e)<0||!ea(t,e))},v0=function(t){var e=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(e)||e>=0)},Q_=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 h=Zn(u);return h<0&&c&&!J_(u)?0:h}(s,o),l=o?Q_(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(S0).reduce(function(r,i){return i.isScope?r.push.apply(r,i.content):r.push(i.content),r},[]).concat(e)},Ia=function(t,e){var n;return n=(e=e||{}).getShadowRoot?Qs([t],e.includeContainer,{filter:Tc.bind(null,e),flatten:!1,getShadowRoot:e.getShadowRoot,shadowRootFilter:v0}):q_(t,e.includeContainer,Tc.bind(null,e)),Q_(n)},Pu=function(t,e){return(e=e||{}).getShadowRoot?Qs([t],e.includeContainer,{filter:ea.bind(null,e),flatten:!0,getShadowRoot:e.getShadowRoot}):q_(t,e.includeContainer,ea.bind(null,e))},gr=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return jr.call(t,Zs)!==!1&&Tc(e,t)},T0=X_.concat("iframe").join(","),Os=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return jr.call(t,T0)!==!1&&ea(e,t)};const R0=Object.freeze(Object.defineProperty({__proto__:null,focusable:Pu,getTabIndex:Zn,isFocusable:Os,isTabbable:gr,tabbable:Ia},Symbol.toStringTag,{value:"Module"}));function Rc(t){return(t==null?void 0:t.ownerDocument)||document}var oo=typeof document!="undefined"?mt:function(){};const eA=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Up(t,e){const n=Ia(t,eA()),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}(Rc(t)),o=n.indexOf(i);return n[o===-1?e===1?0:r-1:o+e]}function Dl(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&&Oc(s)){let a=o;for(;a;){if(i===a)return!0;a=a.parentNode||a.host}}return!1}(n,r)}function C0(t){Ia(t,eA()).forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")})}function Bp(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 I0={...Gc};let jp=!1,y0=0;const $p=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+y0++,N0=I0.useId||function(){const[t,e]=ue(()=>jp?$p():void 0);return oo(()=>{t==null&&e($p())},[]),Z(()=>{jp=!0},[]),t};function tA(t){return"data-floating-ui-"+t}const nA={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},Vp=Yt(function(t,e){const[n,r]=ue();return oo(()=>{/apple/i.test(navigator.vendor)&&r("button")},[]),L("span",{...t,ref:e,tabIndex:0,role:n,"aria-hidden":!n||void 0,[tA("focus-guard")]:"",style:nA})}),rA=ki(null),zp=tA("portal");function b0(t){const{children:e,id:n,root:r,preserveTabOrder:i=!0}=t,o=function(m){m===void 0&&(m={});const{id:E,root:A}=m,_=N0(),g=k0(),[O,D]=ue(null),C=Q(null);return oo(()=>()=>{O==null||O.remove(),queueMicrotask(()=>{C.current=null})},[O]),oo(()=>{if(!_||C.current)return;const T=E?document.getElementById(E):null;if(!T)return;const I=document.createElement("div");I.id=_,I.setAttribute(zp,""),T.appendChild(I),C.current=I,D(I)},[E,_]),oo(()=>{if(A===null||!_||C.current)return;let T=A||(g==null?void 0:g.portalNode);T&&!Lu(T)&&(T=T.current),T=T||document.body;let I=null;E&&(I=document.createElement("div"),I.id=E,T.appendChild(I));const S=document.createElement("div");S.id=_,S.setAttribute(zp,""),T=I||T,T.appendChild(S),C.current=S,D(S)},[E,A,_,g]),O}({id:n,root:r}),[s,a]=ue(null),l=Q(null),u=Q(null),c=Q(null),h=Q(null),d=s==null?void 0:s.modal,p=s==null?void 0:s.open,f=!!s&&!s.modal&&s.open&&i&&!(!r&&!o);return Z(()=>{if(o&&i&&!d)return o.addEventListener("focusin",m,!0),o.addEventListener("focusout",m,!0),()=>{o.removeEventListener("focusin",m,!0),o.removeEventListener("focusout",m,!0)};function m(E){o&&Dl(E)&&(E.type==="focusin"?Bp:C0)(o)}},[o,i,d]),Z(()=>{o&&(p||Bp(o))},[p,o]),L(rA.Provider,{value:le(()=>({preserveTabOrder:i,beforeOutsideRef:l,afterOutsideRef:u,beforeInsideRef:c,afterInsideRef:h,portalNode:o,setFocusManagerState:a}),[i,o]),children:[f&&o&&L(Vp,{"data-type":"outside",ref:l,onFocus:m=>{if(Dl(m,o)){var E;(E=c.current)==null||E.focus()}else{const _=s?s.domReference:null,g=Up(Rc(A=_).body,-1)||A;g==null||g.focus()}var A}}),f&&o&&L("span",{"aria-owns":o.id,style:nA}),o&&$c(e,o),f&&o&&L(Vp,{"data-type":"outside",ref:u,onFocus:m=>{if(Dl(m,o)){var E;(E=h.current)==null||E.focus()}else{const _=s?s.domReference:null,g=Up(Rc(A=_).body,1)||A;g==null||g.focus(),s!=null&&s.closeOnFocusOut&&(s==null||s.onOpenChange(!1,m.nativeEvent,"focus-out"))}var A}})]})}const k0=()=>lr(rA);var iA={exports:{}};function Cc(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 Yp(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.
94
- 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 L0(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 Gp(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 Wp(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Gp(Object(n),!0).forEach(function(r){L0(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Gp(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function w0(t){return function(e){if(Array.isArray(e))return Cc(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.
95
- 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 Cc(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)?Cc(t,e):void 0}}var Mn={getActiveTrap:function(t){return(t==null?void 0:t.length)>0?t[t.length-1]:null},activateTrap:function(t,e){e!==Mn.getActiveTrap(t)&&Mn.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),Mn.unpauseTrap(t)},pauseTrap:function(t){var e=Mn.getActiveTrap(t);e==null||e._setPausedState(!0)},unpauseTrap:function(t){var e=Mn.getActiveTrap(t);e&&!e._isManuallyPaused()&&e._setPausedState(!1)}},so=function(t){return(t==null?void 0:t.key)==="Tab"||(t==null?void 0:t.keyCode)===9},M0=function(t){return so(t)&&!t.shiftKey},P0=function(t){return so(t)&&t.shiftKey},Xp=function(t){return setTimeout(t,0)},$i=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},ls=function(t){return t.target.shadowRoot&&typeof t.composedPath=="function"?t.composedPath()[0]:t.target},x0=[];const F0=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)||x0,o=Wp({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isolateSubtrees:!1,isKeyForward:M0,isKeyBackward:P0},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(S,v,y){return S&&S[v]!==void 0?S[v]:o[y||v]},l=function(S,v){var y=typeof(v==null?void 0:v.composedPath)=="function"?v.composedPath():void 0;return s.containerGroups.findIndex(function(b){var M=b.container,k=b.tabbableNodes;return M.contains(S)||(y==null?void 0:y.includes(M))||k.find(function(P){return P===S})})},u=function(S){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},y=v.hasFallback,b=y!==void 0&&y,M=v.params,k=M===void 0?[]:M,P=o[S];if(typeof P=="function"&&(P=P.apply(void 0,w0(k))),P===!0&&(P=void 0),!P){if(P===void 0||P===!1)return P;throw new Error("`".concat(S,"` was specified but was not a node, or did not return a node"))}var B=P;if(typeof P=="string"){try{B=r.querySelector(P)}catch(F){throw new Error("`".concat(S,'` appears to be an invalid selector; error="').concat(F.message,'"'))}if(!B&&!b)throw new Error("`".concat(S,"` as selector refers to no known node"))}return B},c=function(){var S=u("initialFocus",{hasFallback:!0});if(S===!1)return!1;if(S===void 0||S&&!Os(S,o.tabbableOptions))if(l(r.activeElement)>=0)S=r.activeElement;else{var v=s.tabbableGroups[0];S=v&&v.firstTabbableNode||u("fallbackFocus")}else S===null&&(S=u("fallbackFocus"));if(!S)throw new Error("Your focus-trap needs to have at least one focusable element");return S},h=function(){if(s.containerGroups=s.containers.map(function(S){var v=Ia(S,o.tabbableOptions),y=Pu(S,o.tabbableOptions),b=v.length>0?v[0]:void 0,M=v.length>0?v[v.length-1]:void 0,k=y.find(function(F){return gr(F)}),P=y.slice().reverse().find(function(F){return gr(F)}),B=!!v.find(function(F){return Zn(F)>0});return{container:S,tabbableNodes:v,focusableNodes:y,posTabIndexesFound:B,firstTabbableNode:b,lastTabbableNode:M,firstDomTabbableNode:k,lastDomTabbableNode:P,nextTabbableNode:function(F){var X=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],G=v.indexOf(F);return G<0?X?y.slice(y.indexOf(F)+1).find(function(z){return gr(z)}):y.slice(0,y.indexOf(F)).reverse().find(function(z){return gr(z)}):v[G+(X?1:-1)]}}}),s.tabbableGroups=s.containerGroups.filter(function(S){return S.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(S){return S.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.")},d=function(S){var v=S.activeElement;if(v)return v.shadowRoot&&v.shadowRoot.activeElement!==null?d(v.shadowRoot):v},p=function(S){S!==!1&&S!==d(document)&&(S&&S.focus?(S.focus({preventScroll:!!o.preventScroll}),s.mostRecentlyFocusedNode=S,function(v){return v.tagName&&v.tagName.toLowerCase()==="input"&&typeof v.select=="function"}(S)&&S.select()):p(c()))},f=function(S){var v=u("setReturnFocus",{params:[S]});return v||v!==!1&&S},m=function(S){var v=S.target,y=S.event,b=S.isBackward,M=b!==void 0&&b;v=v||ls(y),h();var k=null;if(s.tabbableGroups.length>0){var P=l(v,y),B=P>=0?s.containerGroups[P]:void 0;if(P<0)k=M?s.tabbableGroups[s.tabbableGroups.length-1].lastTabbableNode:s.tabbableGroups[0].firstTabbableNode;else if(M){var F=s.tabbableGroups.findIndex(function(ee){var ie=ee.firstTabbableNode;return v===ie});if(F<0&&(B.container===v||Os(v,o.tabbableOptions)&&!gr(v,o.tabbableOptions)&&!B.nextTabbableNode(v,!1))&&(F=P),F>=0){var X=F===0?s.tabbableGroups.length-1:F-1,G=s.tabbableGroups[X];k=Zn(v)>=0?G.lastTabbableNode:G.lastDomTabbableNode}else so(y)||(k=B.nextTabbableNode(v,!1))}else{var z=s.tabbableGroups.findIndex(function(ee){var ie=ee.lastTabbableNode;return v===ie});if(z<0&&(B.container===v||Os(v,o.tabbableOptions)&&!gr(v,o.tabbableOptions)&&!B.nextTabbableNode(v))&&(z=P),z>=0){var K=z===s.tabbableGroups.length-1?0:z+1,me=s.tabbableGroups[K];k=Zn(v)>=0?me.firstTabbableNode:me.firstDomTabbableNode}else so(y)||(k=B.nextTabbableNode(v))}}else k=u("fallbackFocus");return k},E=function(S){var v=ls(S);l(v,S)>=0||($i(o.clickOutsideDeactivates,S)?n.deactivate({returnFocus:o.returnFocusOnDeactivate}):$i(o.allowOutsideClick,S)||S.preventDefault())},A=function(S){var v=ls(S),y=l(v,S)>=0;if(y||v instanceof Document)y&&(s.mostRecentlyFocusedNode=v);else{var b;S.stopImmediatePropagation();var M=!0;if(s.mostRecentlyFocusedNode)if(Zn(s.mostRecentlyFocusedNode)>0){var k=l(s.mostRecentlyFocusedNode),P=s.containerGroups[k].tabbableNodes;if(P.length>0){var B=P.findIndex(function(F){return F===s.mostRecentlyFocusedNode});B>=0&&(o.isKeyForward(s.recentNavEvent)?B+1<P.length&&(b=P[B+1],M=!1):B-1>=0&&(b=P[B-1],M=!1))}}else s.containerGroups.some(function(F){return F.tabbableNodes.some(function(X){return Zn(X)>0})})||(M=!1);else M=!1;M&&(b=m({target:s.mostRecentlyFocusedNode,isBackward:o.isKeyBackward(s.recentNavEvent)})),p(b||s.mostRecentlyFocusedNode||c())}s.recentNavEvent=void 0},_=function(S){(o.isKeyForward(S)||o.isKeyBackward(S))&&function(v){var y=arguments.length>1&&arguments[1]!==void 0&&arguments[1];s.recentNavEvent=v;var b=m({event:v,isBackward:y});b&&(so(v)&&v.preventDefault(),p(b))}(S,o.isKeyBackward(S))},g=function(S){(function(v){return(v==null?void 0:v.key)==="Escape"||(v==null?void 0:v.key)==="Esc"||(v==null?void 0:v.keyCode)===27})(S)&&$i(o.escapeDeactivates,S)!==!1&&(S.preventDefault(),n.deactivate())},O=function(S){var v=ls(S);l(v,S)>=0||$i(o.clickOutsideDeactivates,S)||$i(o.allowOutsideClick,S)||(S.preventDefault(),S.stopImmediatePropagation())},D=function(){if(s.active)return Mn.activateTrap(i,n),s.delayInitialFocusTimer=o.delayInitialFocus?Xp(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",_,{capture:!0,passive:!1}),r.addEventListener("keydown",g),n},C=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",_,!0),r.removeEventListener("keydown",g),n},T=typeof window!="undefined"&&"MutationObserver"in window?new MutationObserver(function(S){S.some(function(v){return Array.from(v.removedNodes).some(function(y){return y===s.mostRecentlyFocusedNode})})&&p(c())}):void 0,I=function(){T&&(T.disconnect(),s.active&&!s.paused&&s.containers.map(function(S){T.observe(S,{subtree:!0,childList:!0})}))};return n={get active(){return s.active},get paused(){return s.paused},activate:function(S){if(s.active)return this;var v=a(S,"onActivate"),y=a(S,"onPostActivate"),b=a(S,"checkCanFocusTrap"),M=Mn.getActiveTrap(i),k=!1;M&&!M.paused&&(M._setSubtreeIsolation(!1),k=!0);try{b||h(),s.active=!0,s.paused=!1,s.nodeFocusedBeforeActivation=d(r),v==null||v();var P=function(){b&&h(),D(),I(),o.isolateSubtrees&&n._setSubtreeIsolation(!0),y==null||y()};if(b)return b(s.containers.concat()).then(P,P),this;P()}catch(B){throw M===Mn.getActiveTrap(i)&&k&&M._setSubtreeIsolation(!0),B}return this},deactivate:function(S){if(!s.active)return this;var v=Wp({onDeactivate:o.onDeactivate,onPostDeactivate:o.onPostDeactivate,checkCanReturnFocus:o.checkCanReturnFocus},S);clearTimeout(s.delayInitialFocusTimer),s.delayInitialFocusTimer=void 0,s.paused||n._setSubtreeIsolation(!1),s.alreadyInert.clear(),C(),s.active=!1,s.paused=!1,I(),Mn.deactivateTrap(i,n);var y=a(v,"onDeactivate"),b=a(v,"onPostDeactivate"),M=a(v,"checkCanReturnFocus"),k=a(v,"returnFocus","returnFocusOnDeactivate");y==null||y();var P=function(){Xp(function(){k&&p(f(s.nodeFocusedBeforeActivation)),b==null||b()})};return k&&M?(M(f(s.nodeFocusedBeforeActivation)).then(P,P),this):(P(),this)},pause:function(S){return s.active?(s.manuallyPaused=!0,this._setPausedState(!0,S)):this},unpause:function(S){return s.active?(s.manuallyPaused=!1,i[i.length-1]!==this?this:this._setPausedState(!1,S)):this},updateContainerElements:function(S){var v=[].concat(S).filter(Boolean);return s.containers=v.map(function(y){return typeof y=="string"?r.querySelector(y):y}),o.isolateSubtrees&&function(y){s.active&&!s.paused&&n._setSubtreeIsolation(!1),s.adjacentElements.clear(),s.alreadyInert.clear();var b,M=new Set,k=new Set,P=Yp(y);try{for(P.s();!(b=P.n()).done;){var B=b.value;M.add(B);for(var F=typeof ShadowRoot!="undefined"&&B.getRootNode()instanceof ShadowRoot,X=B;X;){M.add(X);var G=X.parentElement,z=[];G?z=G.children:!G&&F&&(z=X.getRootNode().children,G=X.getRootNode().host,F=typeof ShadowRoot!="undefined"&&G.getRootNode()instanceof ShadowRoot);var K,me=Yp(z);try{for(me.s();!(K=me.n()).done;){var ee=K.value;k.add(ee)}}catch(ie){me.e(ie)}finally{me.f()}X=G}}}catch(ie){P.e(ie)}finally{P.f()}M.forEach(function(ie){k.delete(ie)}),s.adjacentElements=k}(s.containers),s.active&&(h(),o.isolateSubtrees&&!s.paused&&n._setSubtreeIsolation(!0)),I(),this}},Object.defineProperties(n,{_isManuallyPaused:{value:function(){return s.manuallyPaused}},_setPausedState:{value:function(S,v){if(s.paused===S)return this;if(s.paused=S,S){var y=a(v,"onPause"),b=a(v,"onPostPause");y==null||y(),C(),I(),n._setSubtreeIsolation(!1),b==null||b()}else{var M=a(v,"onUnpause"),k=a(v,"onPostUnpause");M==null||M(),n._setSubtreeIsolation(!0),h(),D(),I(),k==null||k()}return this}},_setSubtreeIsolation:{value:function(S){o.isolateSubtrees&&s.adjacentElements.forEach(function(v){S?((v.inert||v.hasAttribute("inert"))&&s.alreadyInert.add(v),v.inert=!0):s.alreadyInert.has(v)||(v.inert=!1)})}}}),n.updateContainerElements(t),n}},Symbol.toStringTag,{value:"Module"})),H0=tu(F0),U0=tu(R0);function _i(t){return _i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_i(t)}var vl,Tl;function B0(t,e,n){return e&&function(r,i){for(var o=0;o<i.length;o++){var s=i[o];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(r,aA(s.key),s)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function j0(t,e,n){return e=ta(e),function(r,i){if(i&&(_i(i)=="object"||typeof i=="function"))return i;if(i!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}(r)}(t,sA()?Reflect.construct(e,n||[],ta(t).constructor):e.apply(t,n))}function sA(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(sA=function(){return!!t})()}function ta(t){return ta=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ta(t)}function Ic(t,e){return Ic=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Ic(t,e)}function aA(t){var e=function(n,r){if(_i(n)!="object"||!n)return n;var i=n[Symbol.toPrimitive];if(i!==void 0){var o=i.call(n,r);if(_i(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(n)}(t,"string");return _i(e)=="symbol"?e:e+""}var qi=Tm,$0=H0.createFocusTrap,V0=U0.isFocusable,z0=parseInt((vl=(Tl=/^(\d+)\./.exec(qi.version))===null||Tl===void 0?void 0:Tl[1])!==null&&vl!==void 0?vl:0,10),yc=function(){function t(e){var n;(function(o,s){if(!(o instanceof s))throw new TypeError("Cannot call a class as a function")})(this,t),function(o,s,a){(s=aA(s))in o?Object.defineProperty(o,s,{value:a,enumerable:!0,configurable:!0,writable:!0}):o[s]=a}(n=j0(this,t,[e]),"getNodeForOption",function(o){var s,a=(s=this.internalOptions[o])!==null&&s!==void 0?s:this.originalOptions[o];if(typeof a=="function"){for(var l=arguments.length,u=new Array(l>1?l-1:0),c=1;c<l;c++)u[c-1]=arguments[c];a=a.apply(void 0,u)}if(a===!0&&(a=void 0),!a){if(a===void 0||a===!1)return a;throw new Error("`".concat(o,"` was specified but was not a node, or did not return a node"))}var h,d=a;if(typeof a=="string"&&!(d=(h=this.getDocument())===null||h===void 0?void 0:h.querySelector(a)))throw new Error("`".concat(o,"` as selector refers to no known node"));return d}),n.handleDeactivate=n.handleDeactivate.bind(n),n.handlePostDeactivate=n.handlePostDeactivate.bind(n),n.handleClickOutsideDeactivates=n.handleClickOutsideDeactivates.bind(n),n.internalOptions={returnFocusOnDeactivate:!1,checkCanReturnFocus:null,onDeactivate:n.handleDeactivate,onPostDeactivate:n.handlePostDeactivate,clickOutsideDeactivates:n.handleClickOutsideDeactivates},n.originalOptions={returnFocusOnDeactivate:!0,onDeactivate:null,onPostDeactivate:null,checkCanReturnFocus:null,clickOutsideDeactivates:!1};var r=e.focusTrapOptions;for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(i!=="returnFocusOnDeactivate"&&i!=="onDeactivate"&&i!=="onPostDeactivate"&&i!=="checkCanReturnFocus"&&i!=="clickOutsideDeactivates"?n.internalOptions[i]=r[i]:n.originalOptions[i]=r[i]);return n.outsideClick=null,n.focusTrapElements=e.containerElements||[],n.updatePreviousElement(),n}return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&Ic(e,n)}(t,qi.Component),B0(t,[{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 n=typeof this.originalOptions.clickOutsideDeactivates=="function"?this.originalOptions.clickOutsideDeactivates.call(null,e):this.originalOptions.clickOutsideDeactivates;return n&&(this.outsideClick={target:e.target,allowDeactivation:n}),n}},{key:"handleDeactivate",value:function(){this.originalOptions.onDeactivate&&this.originalOptions.onDeactivate.call(null),this.deactivateTrap()}},{key:"handlePostDeactivate",value:function(){var e=this,n=function(){var r=e.getReturnFocusNode(),i=!(!e.originalOptions.returnFocusOnDeactivate||r==null||!r.focus||e.outsideClick&&(!e.outsideClick.allowDeactivation||V0(e.outsideClick.target,e.internalOptions.tabbableOptions))),o=e.internalOptions.preventScroll,s=o!==void 0&&o;i&&r.focus({preventScroll:s}),e.originalOptions.onPostDeactivate&&e.originalOptions.onPostDeactivate.call(null),e.outsideClick=null};this.originalOptions.checkCanReturnFocus?this.originalOptions.checkCanReturnFocus.call(null,this.getReturnFocusNode()).then(n,n):n()}},{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 n=!e.active&&this.props.active,r=e.active&&!this.props.active,i=!e.paused&&this.props.paused,o=e.paused&&!this.props.paused;if(n&&(this.updatePreviousElement(),this.focusTrap.activate()),r)return void this.deactivateTrap();i&&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,n=this.props.children?qi.Children.only(this.props.children):void 0;if(n){if(n.type&&n.type===qi.Fragment)throw new Error("A focus-trap cannot use a Fragment as its child container. Try replacing it with a <div> element.");return qi.cloneElement(n,{ref:function(r){var i=e.props.containerElements;n&&(z0>=19?typeof n.props.ref=="function"?n.props.ref(r):n.props.ref&&(n.props.ref.current=r):typeof n.ref=="function"?n.ref(r):n.ref&&(n.ref.current=r)),e.focusTrapElements=i||[r]}})}return null}}])}();yc.defaultProps={active:!0,paused:!1,focusTrapOptions:{},_createFocusTrap:$0},iA.exports=yc;var Y0=iA.exports.FocusTrap=yc;function lA(t){var 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}=le(()=>({anchor:Kp(r),boundary:i?Kp(i):void 0}),[r,i]);let h=[];c&&(h=[A0({boundary:c,fallbackPlacements:["top-start","top-end","bottom-start","bottom-end","top","bottom"]}),_0({boundary:c,padding:8}),g0({boundary:c})]);const{refs:d,floatingStyles:p,middlewareData:f}=function(g){g===void 0&&(g={});const{placement:O="bottom",strategy:D="absolute",middleware:C=[],platform:T,elements:{reference:I,floating:S}={},transform:v=!0,whileElementsMounted:y,open:b}=g,[M,k]=ue({x:0,y:0,strategy:D,placement:O,middlewareData:{},isPositioned:!1}),[P,B]=ue(C);Js(P,C)||B(C);const[F,X]=ue(null),[G,z]=ue(null),K=te(he=>{he!==ne.current&&(ne.current=he,X(he))},[]),me=te(he=>{he!==ge.current&&(ge.current=he,z(he))},[]),ee=I||F,ie=S||G,ne=Q(null),ge=Q(null),it=Q(M),qe=y!=null,Re=Ol(y),xe=Ol(T),It=Ol(b),_e=te(()=>{if(!ne.current||!ge.current)return;const he={placement:O,strategy:D,middleware:P};xe.current&&(he.platform=xe.current),E0(ne.current,ge.current,he).then(At=>{const ye={...At,isPositioned:It.current!==!1};Fe.current&&!Js(it.current,ye)&&(it.current=ye,sa(()=>{k(ye)}))})},[P,O,D,xe,It]);gs(()=>{b===!1&&it.current.isPositioned&&(it.current.isPositioned=!1,k(he=>({...he,isPositioned:!1})))},[b]);const Fe=Q(!1);gs(()=>(Fe.current=!0,()=>{Fe.current=!1}),[]),gs(()=>{if(ee&&(ne.current=ee),ie&&(ge.current=ie),ee&&ie){if(Re.current)return Re.current(ee,ie,_e);_e()}},[ee,ie,_e,Re,qe]);const Ie=le(()=>({reference:ne,floating:ge,setReference:K,setFloating:me}),[K,me]),_t=le(()=>({reference:ee,floating:ie}),[ee,ie]),Gt=le(()=>{const he={position:D,left:0,top:0};if(!_t.floating)return he;const At=Fp(_t.floating,M.x),ye=Fp(_t.floating,M.y);return v?{...he,transform:"translate("+At+"px, "+ye+"px)",...W_(_t.floating)>=1.5&&{willChange:"transform"}}:{position:D,left:At,top:ye}},[D,v,_t.floating,M.x,M.y]);return le(()=>({...M,update:_e,refs:Ie,elements:_t,floatingStyles:Gt}),[M,_e,Ie,_t,Gt])}({placement:n,middleware:h,whileElementsMounted:h0});mt(()=>{u&&d.setReference(u)},[d,u]);const m=o?L(Y0,{focusTrapOptions:{initialFocus:s,fallbackFocus:".t-fallback-focus",tabbableOptions:{getShadowRoot:!0}},children:L("div",{children:[e,L("span",{className:"t-fallback-focus",tabIndex:-1})]})}):e,E=L("div",{ref:d.setFloating,style:{...p,zIndex:1e3,visibility:(A=f.hide)!=null&&A.referenceHidden?"hidden":"visible"},...l,children:m});if(a){const g=(_=c||u)==null?void 0:_.closest("[t-menu-boundary='root']");return L(b0,{root:g,children:E})}return E}function Kp(t){return typeof t=="string"?document.querySelector(t):t}function cA(t){const e=pe(),n=Po(),r=re(n.state$.suggestMentionQuery),i=Ru(re(e.state$.currentConversationId),r?1e3:0),o=le(()=>(i!=null?i:[]).map(E=>E.user),[i]),[s,a]=ue(0),l=le(()=>Object.fromEntries(o.map(E=>[E.id,hO(E.name)])),[o]),u=le(()=>{if(!r)return[];const E=qp(r);return E===""?o:o.filter(A=>l[A.id].some(_=>function(g,O){return np(g.substring(0,O.length),O)}(_,E)))},[r,o,l]),c=Q(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 h=te(E=>{var _;const A=(_=u[E])==null?void 0:_.id;return A&&"mention-button-"+A},[u]),{containerProps:d,itemProps:p}=x_({focused:s,setFocused:a,buttonId:h});if(Z(()=>{if(u.length!==0)return n.listenKeydown("mention",E=>P_(E,{dir:"ttb",focused:s,setFocused:a,itemCount:u.length,onSpace(){if(r){const A=u[s];if(np(A.name,qp(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]),$o(()=>n.closeSuggester(),".t-mention-suggest-list",u.length>0),u.length===0)return null;const f=document.querySelector(".ProseMirror-suggestion");let m;if(f){let E=f.getBoundingClientRect();m={getBoundingClientRect(){const A=f.getBoundingClientRect();return A.width>0&&(E=A),E}}}return L(lA,{className:"t-mention-suggest-list",...d,anchorElement:m,children:u.map((E,A)=>L(G0,{user:E,isFocused:A===s,onSelect:()=>n.selectMention(E),...p(A)},E.id))})}const G0=Bn(function(t){const{user:e,isFocused:n,onSelect:r,...i}=t;return L("button",{className:n?"focused":"",onClick:()=>r(e.id),...i,children:e.name})});function qp(t){return de(t[0]==="@"),t.substring(1)}function Jp(t,e,n){const r=Pu(t),i=r.indexOf(e);return i===-1?null:r[i+n]||null}const W0=Yt(function(t,e){const{children:n,triggerElement:r}=t,{closePopover:i}=ru(),o=Q(null);$n(e,()=>o.current),Z(()=>{var a;(a=o.current)==null||a.focus()},[]);const s=te(a=>{(function(l,u,c,h){var E;const d=u.querySelectorAll("[t-menu-item]"),p=document.activeElement;if(!p||!p.hasAttribute("t-menu-item")&&!p.hasAttribute("t-menu"))return;const f=Array.from(d).indexOf(p);let m;switch(l.key){case"ArrowDown":m=Math.min(f+1,d.length-1);break;case"ArrowUp":m=Math.max(f-1,0),f===-1&&(m=d.length-1);break;case"Home":m=0;break;case"End":m=d.length-1;break;case"Tab":{const A=c.closest("t-chatbox,t-conversation-list,.t-chatbox,.t-conversation-list"),_=l.shiftKey?Jp(A,c,-1):function(g,O){return Jp(g,O,1)}(A,c);return _==null||_.focus(),void h()}default:return}(E=d[m])==null||E.focus()})(a,o.current,r,i)},[i,r]);return L("div",{"t-menu":"",role:"menu",tabIndex:-1,ref:o,onKeyDown:s,children:n})});function ai(t){const{popoverComponent:e,popoverProps:n,children:r,type:i="popover",initialFocus:o,portal:s,...a}=t,[l,u]=ue(void 0),c=Q(null),[h,d]=ue(!1);$o(te(f=>{var m,E;f&&((m=c.current)!=null&&m.contains(f.target))||(d(!1),(E=c.current)==null||E.focus())},[]),"[t-popover-content]",h);const p=i==="menu"?L(W0,{triggerElement:c.current,children:L(e,{...n})}):L(e,{...n});return L(Vg.Provider,{value:{closePopover:()=>d(!1)},children:[L(X0,{...a,"aria-haspopup":i==="menu"?"menu":"true","aria-expanded":h,onTrigger:()=>d(f=>!f),ref:f=>(m=>{var A;const E=(A=m==null?void 0:m.closest("[t-menu-boundary]"))!=null?A:void 0;c.current=m,u(E)})(f),children:r}),h&&L(lA,{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 X0=Yt(function(t,e){const{onTrigger:n,...r}=t,i=te(o=>{o.key!=="Enter"&&o.key!==" "||n()},[n]);return L("button",{...r,ref:e,onClick:n,onKeyDown:i})});function qn(t){const{onSelect:e,...n}=t,{closePopover:r}=ru(),i=te(o=>{o.key!=="Enter"&&o.key!==" "||(r(),e==null||e())},[e,r]);return L("div",{tabIndex:-1,role:"menuitem",onClick:te(()=>{r(),e==null||e()},[r,e]),onKeyDown:i,"t-menu-item":"",...n})}function xu(t){const e=pe(),n=zr(),r=Q(null);Z(()=>()=>{An(()=>{e.type==="ChatboxStore"&&(e.highlightedStrings$.set([]),e.focusedMessage$.set(null))})},[e]);const i=te(()=>{r.current.blur(),n.jumpToHighlight("up")},[n]),o=te(s=>{e.type==="ChatboxStore"&&e.state$.enterSendsMessage.peek()&&tp(s)&&s.preventDefault()},[e]);return L("input",{type:"search",enterKeyHint:"search",autoComplete:"off",onKeyUp:te(s=>{e.type==="ChatboxStore"&&e.state$.enterSendsMessage.peek()&&tp(s)&&(s.preventDefault(),i())},[e,i]),onKeyDown:o,...t,ref:r})}const K0={barHeight:4,barRadius:2,barGap:2,barWidth:2,height:24},Rl={state:null,duration:0,recordingUrl:void 0,uploadState:"done",fileToken:void 0},uA=new WeakMap;function dA({className:t,voiceRecorder:e}){const n=uA.get(e);return n?L("div",{className:t,style:{shapeRendering:"crispEdges"},ref:n}):(Ge.warn("Can only use Waveform component if a voice recorder is active"),null)}function hA(t,e){return t.map(r=>function(i,o){if(i.type==="text")return function(s,a){const l=Cu(a);return Ds(s,l)}(i.children,o);if(i.type==="file"&&i.subtype==="video")return`🎥 ${ts(i.url)}`;if(i.type==="file"&&i.subtype==="image")return`📷 ${ts(i.url)}`;if(i.type==="file"&&i.subtype==="audio")return`🎧 ${ts(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,`📎 ${ts(i.url)}`):i.type==="location"?"📍":""}(r,e)).join(`
91
+ `,[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 h=a||u;return s!=null&&s.every(d=>!d.overlay)?h/l:h}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((h,d)=>{u.addColorStop(d*c,h)}),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:h,barMinHeight:d}=function({width:f,height:m,length:E,options:A,pixelRatio:_}){const g=m/2,O=A.barWidth?A.barWidth*_:1,D=A.barGap?A.barGap*_:A.barWidth?O/2:0,R=O+D||1;return{halfHeight:g,barWidth:O,barGap:D,barRadius:A.barRadius||0,barMinHeight:A.barMinHeight?A.barMinHeight*_:0,barIndexScale:E>0?f/R/E:0,barSpacing:R}}({width:o,height:s,length:(e[0]||[]).length,options:n,pixelRatio:this.getPixelRatio()}),p=function({channelData:f,barIndexScale:m,barSpacing:E,barWidth:A,halfHeight:_,vScale:g,canvasHeight:O,barAlign:D,barMinHeight:R}){const T=f[0]||[],I=f[1]||T,S=T.length,v=[];let y=0,b=0,M=0;for(let k=0;k<=S;k++){const P=Math.round(k*m);if(P>y){const{topHeight:V,totalHeight:G}=vv({maxTop:b,maxBottom:M,halfHeight:_,vScale:g,barMinHeight:R,barAlign:D}),z=Tv({barAlign:D,halfHeight:_,topHeight:V,totalHeight:G,canvasHeight:O});v.push({x:y*E,y:z,width:A,height:G}),y=P,b=0,M=0}const B=Math.abs(T[k]||0),F=Math.abs(I[k]||0);B>b&&(b=B),F>M&&(M=F)}return v}({channelData:e,barIndexScale:c,barSpacing:h,barWidth:l,halfHeight:a,vScale:i,canvasHeight:s,barAlign:n.barAlign,barMinHeight:d});r.beginPath();for(const f of p)u&&"roundRect"in r?r.roundRect(f.x,f.y,f.width,f.height,u):r.rect(f.x,f.y,f.width,f.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:h}){const d=c/2,p=l[0]||[];return[p,l[1]||p].map((f,m)=>{const E=f.length,A=E?u/E:0,_=d,g=m===0?-1:1,O=[{x:0,y:_}];let D=0,R=0;for(let T=0;T<=E;T++){const I=Math.round(T*A);if(I>D){const v=_+(Math.round(R*d*h)||1)*g;O.push({x:D,y:v}),D=I,R=0}const S=Math.abs(f[T]||0);S>R&&(R=S)}return O.push({x:D,y:_}),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 h=o[0];if(!h||h.length===0)return c;let d=l!=null?l:0;if(!l)for(let p=0;p<h.length;p++){const f=(u=h[p])!==null&&u!==void 0?u:0,m=Math.abs(f);m>d&&(d=m)}return d?c/d:c}({channelData:e,barHeight:n.barHeight,normalize:n.normalize,maxPeak:n.maxPeak});O_(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 h=u.cloneNode(),d=h.getContext("2d");d.drawImage(u,0,0),d.globalCompositeOperation="source-in",d.fillStyle=this.convertColorValues(n.progressColor,d),d.fillRect(0,0,u.width,u.height),a.appendChild(h)}}renderMultiCanvas(e,n,r,i,o,s){const a=this.getPixelRatio(),{clientWidth:l}=this.scrollContainer,u=r/a,c=function({clientWidth:f,totalWidth:m,options:E}){return Ap(Math.min(8e3,f,m),E)}({clientWidth:l,totalWidth:u,options:n});let h={};if(c===0)return;const d=f=>{if(f<0||f>=p||h[f])return;h[f]=!0;const m=f*c;let E=Math.min(u-m,c);if(E=Ap(E,n),E<=0)return;const A=function({channelData:_,offset:g,clampedWidth:O,totalWidth:D}){return _.map(R=>{const T=Math.floor(g/D*R.length),I=Math.floor((g+O)/D*R.length);return R.slice(T,I)})}({channelData:e,offset:m,clampedWidth:E,totalWidth:u});this.renderSingleCanvas(A,n,E,i,m,o,s)},p=Math.ceil(u/c);if(this.isScrollable){if(gp({scrollLeft:this.scrollContainer.scrollLeft,totalWidth:u,numCanvases:p}).forEach(f=>d(f)),p>1){const f=this.on("scroll",()=>{const{scrollLeft:m}=this.scrollContainer;Object.keys(h).length>10&&(o.innerHTML="",s.innerHTML="",h={}),gp({scrollLeft:m,totalWidth:u,numCanvases:p}).forEach(E=>d(E))});this.unsubscribeOnScroll.push(f)}}else for(let f=0;f<p;f++)d(f)}renderChannel(e,n,r,i){var{overlay:o}=n,s=function(c,h){var d={};for(var p in c)Object.prototype.hasOwnProperty.call(c,p)&&h.indexOf(p)<0&&(d[p]=c[p]);if(c!=null&&typeof Object.getOwnPropertySymbols=="function"){var f=0;for(p=Object.getOwnPropertySymbols(c);f<p.length;f++)h.indexOf(p[f])<0&&Object.prototype.propertyIsEnumerable.call(c,p[f])&&(d[p[f]]=c[p[f]])}return d}(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 St(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:h,fillParent:d,pixelRatio:p}){const f=Math.ceil(u*c),m=f>h,E=!!(d&&!m);return{scrollWidth:f,isScrollable:m,useParentWidth:E,width:(E?h:f)*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 St(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 Cv extends jo{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 El extends jo{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 St(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 St(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 St(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 Iv={waveColor:"#999",progressColor:"#555",cursorWidth:1,minPxPerSec:0,fillParent:!0,interact:!0,dragToSeek:!1,autoScroll:!0,autoCenter:!0,sampleRate:8e3};class To extends Dv{static create(e){return new To(e)}getState(){return this.wavesurferState}getRenderer(){return this.renderer}constructor(e){const n=e.media||(e.backend==="WebAudio"?new El: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({},Iv,e);const{state:r,actions:i}=function(a){var l,u,c,h,d,p;const f=(l=a==null?void 0:a.currentTime)!==null&&l!==void 0?l:Ue(0),m=(u=a==null?void 0:a.duration)!==null&&u!==void 0?u:Ue(0),E=(c=a==null?void 0:a.isPlaying)!==null&&c!==void 0?c:Ue(!1),A=(h=a==null?void 0:a.isSeeking)!==null&&h!==void 0?h:Ue(!1),_=(d=a==null?void 0:a.volume)!==null&&d!==void 0?d:Ue(1),g=(p=a==null?void 0:a.playbackRate)!==null&&p!==void 0?p:Ue(1),O=Ue(null),D=Ue(null),R=Ue(""),T=Ue(0),I=Ue(0),S=vr(()=>!E.value,[E]),v=vr(()=>O.value!==null,[O]),y=vr(()=>v.value&&m.value>0,[v,m]),b=vr(()=>f.value,[f]),M=vr(()=>m.value>0?f.value/m.value:0,[f,m]);return{state:{currentTime:f,duration:m,isPlaying:E,isPaused:S,isSeeking:A,volume:_,playbackRate:g,audioBuffer:O,peaks:D,url:R,zoom:T,scrollPosition:I,canPlay:v,isReady:y,progress:b,progressPercent:M},actions:{setCurrentTime:k=>{const P=Math.max(0,Math.min(m.value||1/0,k));f.set(P)},setDuration:k=>{m.set(Math.max(0,k))},setPlaying:k=>{E.set(k)},setSeeking:k=>{A.set(k)},setVolume:k=>{const P=Math.max(0,Math.min(1,k));_.set(P)},setPlaybackRate:k=>{const P=Math.max(.1,Math.min(16,k));g.set(P)},setAudioBuffer:k=>{O.set(k),k&&m.set(k.duration)},setPeaks:k=>{D.set(k)},setUrl:k=>{R.set(k)},setZoom:k=>{T.set(Math.max(0,k))},setScrollPosition:k=>{I.set(Math.max(0,k))}}}}({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 Cv;const o=n?void 0:this.getMediaElement();this.renderer=new Rv(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(Xn(()=>{const s=e.isPlaying.value;n.emit(s?"play":"pause")},[e.isPlaying])),r.push(Xn(()=>{const s=e.currentTime.value;n.emit("timeupdate",s),e.isPlaying.value&&n.emit("audioprocess",s)},[e.currentTime,e.isPlaying])),r.push(Xn(()=>{e.isSeeking.value&&n.emit("seeking",e.currentTime.value)},[e.isSeeking,e.currentTime]));let i=!1;r.push(Xn(()=>{e.isReady.value&&!i&&(i=!0,n.emit("ready",e.duration.value))},[e.isReady,e.duration]));let o=!1;return r.push(Xn(()=>{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(Xn(()=>{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=is.createBuffer(this.exportPeaks(),e.duration)),e.peaks&&e.duration&&(this.decodedData=is.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 St(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 Ov.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 El&&(a.duration=s)}if(r)this.decodedData=is.createBuffer(r,s||0);else if(n){const a=yield n.arrayBuffer();this.decodedData=yield is.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 St(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 St(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 h=a.slice(Math.floor(c*u),Math.ceil((c+1)*u));let d=0;for(let p=0;p<h.length;p++){const f=h[p];Math.abs(f)>Math.abs(d)&&(d=f)}l.push(Math.round(d*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 St(this,void 0,void 0,function*(){e!=null&&this.setTime(e);const i=yield r.play.call(this);return n!=null&&(this.media instanceof El?this.media.stopAt(n):this.stopAtPosition=n),i})}playPause(){return St(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 St(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()}}To.BasePlugin=class extends jo{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}},To.dom=Sv;var D_=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,D_(t,a,n,["",null])),r.push(i),a[0]?e[0]|=2:(e[o-2]=0,e[o]=i)):r.push(a)}return r},Op=new Map;function yv(t){var e=Op.get(this);return e||(e=new Map,Op.set(this,e)),(e=D_(this,e.get(t)||(e.set(t,e=function(n){for(var r,i,o=1,s="",a="",l=[0],u=function(d){o===1&&(d||(s=s.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?l.push(0,d,s):o===3&&(d||s)?(l.push(3,d,s),o=2):o===2&&s==="..."&&d?l.push(4,d,0):o===2&&s&&!d?l.push(5,0,!0,s):o>=5&&((s||!d&&o===5)&&(l.push(o,0,s,i),o=6),d&&(l.push(o,d,0,i),o=6)),s=""},c=0;c<n.length;c++){c&&(o===1&&u(),u(c));for(var h=0;h<n[c].length;h++)r=n[c][h],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][h+1]===">")?(u(),o===3&&(l=l[0]),o=l,(l=l[0]).push(2,0,o),o=0):r===" "||r===" "||r===`
92
+ `||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 Nv={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,TALK_GMK:"AIzaSyAs_WXNLlj31EHJI_Lw8siO2B3ZJLUzBH0"},bv=function(t){return Nv[t]}("TALK_GMK");function Cu(t,e=10){const n=lr(ru),[r,i]=ae([]);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 v_=/^\/.*[^\\]\/[im]*$/;function Dp(t){return v_.test(t)?!zs(t).test(""):!1}function zs(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 T_(t){const e=t.replace(/\./g,"\\.").replace(/\*/g,".*");return new RegExp("^"+e+"$","i")}function kv(t,e){const n=WE(e),r=T_(t);return n!==void 0&&r.test(n)}const Lv=/^[]/g;function R_(t){return t.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}function fc(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){}})(fc||(fc={}));const mi=fc,wv=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"),Mv=/\uFE0F/g,Pv="‍";function xv(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(Pv)<0?n.replace(Mv,""):n);var n;return`https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/svg/${e}.svg`}class C_{constructor({mode:e,allowedHostnames:n,allowedPhoneNrs:r,allowedMatches:i,forbiddenMatches:o,forbiddenWords:s,suppressLinks:a,suppressEmailAddresses:l,suppressPhoneNumbers:u,replacement:c}){if(mi.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(h=>h).map(h=>h.replace(/[^0-9]/g,"")),this.allowedMatches=(i||[]).filter(Dp).map(h=>zs(h)),this.forbiddenMatches=(o||[]).filter(Dp).map(h=>zs(h)),s){const h=s.split(`
93
+ `).map(d=>d.trim().toLowerCase()).filter(d=>d.length>0&&!d.startsWith("#")).map(d=>R_(d));h.length&&this.forbiddenMatches.push(new RegExp(`\\b(${h.join("|")})\\b`,"gi"))}mi(()=>this.allowedMatches.every(h=>h.flags.includes("g")),"All regexes in `suppressContactInfo.allowedMatches` must be global. Check `allowedMatches`!"),mi(()=>this.forbiddenMatches.every(h=>h.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 Iu(t){var n,r,i,o,s,a,l,u,c,h,d,p,f,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 C_({mode:"off"}),contactInfoHiddenText:(p=(d=t.contactInfoHiddenText)!=null?d:(h=t.suppression)==null?void 0:h.replacement)!=null?p:e,customEmojiUrls:(f=t.customEmojiUrls)!=null?f:{},enableActions:(m=t.enableActions)!=null?m:!0}}function Fv({id:t,text:e}){var i;const n=he(),r=te(()=>{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 L("span",{className:"t-mention","t-is-current-user":te(n.extUserId$)===t?"":void 0,children:`@${(i=r==null?void 0:r.name)!=null?i:e}`})}function Hv({message:t,type:e,action:n,params:r,children:i}){const o=Yr(),s=ee(l=>{l.preventDefault(),o.triggerMessageAction(t,n,r)},[o,t,n,r]),a={"t-action":n,onClick:s};return e==="actionButton"?L("button",{...a,type:"button",children:i}):L("a",{...a,href:"#",children:i})}function I_(t,e={},n){return Hr(t,{...Iu(e),message:n})}function Hr(t,e){const n=t.flatMap(r=>{if(typeof r=="string")return _l(r,e.highlight,e.highlightFromWordBeginnings);switch(r.type){case"bold":case"italic":case"strikethrough":case"blockquote":case"bulletpoint":case"bulletPoint":return Uv(r,e);case"bulletlist":case"bulletList":return[Oe("ul",null,...Hr(r.children,e))];case"autolink":case"autoLink":case"link":return jv(r,e);case"codeblock":case"codeBlock":return[L("code",{"data-language":r.language,children:_l(r.text,e.highlight,e.highlightFromWordBeginnings)})];case"codespan":case"codeSpan":return L("code",{children:_l((i=r.text,i.replace(/^\s*\n/m,"").replace(/\n\s*$/m,"")),e.highlight,e.highlightFromWordBeginnings)});case"mention":return mi.falsy(e.useFallbackMentions),L(Fv,{id:r.id,text:r.text},r.id);case"suppressed":return[L("i",{children:e.contactInfoHiddenText})];case"emoji":return e.enableEmojiImageFallback?[L(Bv,{unicode:r.text})]:[r.text];case"actionlink":case"actionLink":case"actionbutton":case"actionButton":return $v(r,e);case"customemoji":case"customEmoji":return r.text;default:mi.never(r)}var i});return n.every(r=>typeof r=="string")?[n.join("")]:n}function ss(t){return t.normalize("NFKC").normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase()}function _l(t,e,n=!1){if(!t||!e.length)return[t];const r=ss(t),i=t.toLowerCase()!==r,o=e.map(l=>ss(l).trim()).filter(l=>l.length),s=function(l){const u=l.map(h=>h.trim()).filter(h=>h).sort((h,d)=>d.length-h.length);if(u.length===0)return Lv;const c=u.map(R_).join("|");return new RegExp(c,"gi")}(o),a=Oa(r,n?new RegExp(`(?<=^|\\s)(${s.source})`,s.flags):s).map(l=>({offset:l.index,matchedText:l[0],index:l.index}));return cc(t,a,({index:l,matchedText:u})=>[L("mark",{className:"t-highlighted-text",children:i?function(c,h,d){let p=0,f=0;for(;f<h&&p<c.length;)f+=ss(c[p]).length,p+=1;let m=p;for(;f<h+d&&m<c.length;)f+=ss(c[m]).length,m+=1;return c.substring(p,m)}(t,l,u.length):t.slice(l,l+u.length)})])}const Uv=(t,e)=>[Oe({bold:"strong",italic:"em",strikethrough:"del",blockquote:"blockquote",bulletpoint:"li",bulletPoint:"li"}[t.type],null,...Hr(t.children,e))];function Bv({unicode:t}){const[e,n]=ae(()=>t!==":arslan:");return Z(()=>{e&&!Um(t)&&n(!1)},[]),e?L("span",{className:"t-emoji",children:t}):L("img",{className:"t-emoji",src:xv(t),alt:t})}const jv=(t,e)=>{const n="children"in t?t.children:[t.text];switch(e.formattedLinks){case"link":return[Oe("a",{target:function(r,i){for(const o of r)if(v_.test(o)){if(zs(o).test(i))return"_top"}else if(kv(o,i))return"_top";return"_blank"}(e.sameTabLinkRules,t.url),href:t.url,rel:"noreferrer"},...Hr(n,e))];case"plaintext":return"children"in t&&t.children.every(r=>typeof r=="string")?[t.children.join("")]:[Oe(Pe,null,...Hr(n,e))];default:mi.never(e.formattedLinks)}},$v=(t,e)=>e.enableActions?[Oe(Hv,{type:t.type==="actionlink"?"actionLink":t.type==="actionbutton"?"actionButton":t.type,action:t.action,params:t.params,message:e.message},...Hr(t.children,e))]:"children"in t&&t.children.every(n=>typeof n=="string")?[t.children.join("")]:[Oe(Pe,null,...Hr(t.children,e))];function Vv(t,e){return gs(t,Iu(e))}function gs(t,e){return t.flatMap(n=>{if(typeof n=="string"){let r=[n];return r=Al(r,i=>function(o,s){const{suppression:{forbiddenMatches:a,allowedMatches:l}}=s,u=_u(a,c=>Oa(o,c)).filter(([c])=>!l.some(h=>c.match(h)!==null)).map(c=>({offset:c.index,matchedText:c[0]}));return cc(o,u,()=>[{type:"suppressed",text:"CONTACT_INFORMATION_HIDDEN"}])}(i,e)),r=Al(r,i=>function(o){return cc(o,function(s){const a=[];let l;for(;l=wv.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=Al(r,i=>function(o,s){if(s.contactInfo!=="suppress")return[o];const a=[];if((s.suppression.suppressEmailAddresses||s.suppression.suppressLinks)&&a.push(d_),s.suppression.suppressPhoneNumbers&&a.push(u_),a.length===0)return[o];const l=f_(o,{multilineSteps:[],singlelineSteps:a}),u=l.map(c=>typeof c=="string"?c:vp(c.url,s.suppression)?c.text:{type:"suppressed",text:"CONTACT_INFORMATION_HIDDEN"});return Ru(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:gs(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"?vp(r.url,i.suppression)?r:{type:"suppressed",text:"CONTACT_INFORMATION_HIDDEN"}:r.text}(n,e);case"link":return{type:"link",url:n.url,children:gs(n.children,e)};case"actionlink":case"actionLink":case"actionbutton":case"actionButton":return{type:n.type,action:n.action,params:n.params,children:gs(n.children,e)}}})}function Al(t,e){return _u(t,n=>typeof n=="string"?e(n):[n])}function vp(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||Tp(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=WE(t);return!e.suppressLinks||!n||Tp(e.allowedHostnames,n)}}function Tp(t,e){for(const n of t)if(T_(n).test(e))return!0;return!1}function yu({block:t,nonInteractive:e,message:n,className:r=""}){const i=he(),o=!e,s=te(i.highlightedStrings$),a=i.type==="ConversationListStore",{nodes:l,roleOptions:u}=function(c,h){var O;const d=he(),p=te(d.app$.role);de.defined(p);const f=h.type==="UserMessage",m=((O=h.sender)==null?void 0:O.id)===d.extUserId$.peek(),E=p.suppressContactInfo,A=f&&E.shouldSuppress({isContentBySender:m}),_=Vv(c.children,{contactInfo:A?"suppress":"link",suppression:E}),g={sameTabLinkRules:p.sameTabLinkRules,contactInfoHiddenText:p.suppressContactInfo.replacement||`(${d.t$.peek().CONTACT_INFORMATION_HIDDEN})`};return{nodes:_,roleOptions:g}}(t,n);return Oe("span",{className:`t-text ${r}`},...I_(l,{enableEmojiImageFallback:!0,formattedLinks:o?"link":"plaintext",enableActions:o,highlight:s,highlightFromWordBeginnings:a,...u},n))}function Ur({text:t,className:e=""}){const n=he();return Oe("span",{className:`t-highlightable ${e}`},...I_([t],{enableEmojiImageFallback:!0,formattedLinks:"plaintext",enableActions:!1,highlight:te(n.highlightedStrings$),highlightFromWordBeginnings:n.type==="ConversationListStore"},null))}function y_(t){const e=nt(),n=he(),{className:r="",...i}=t,o=te(()=>n.state$.messages.child(t.common.conversation.id).lookup.child(t.message.id).content.child(0).url.get());return L("div",{className:`t-message-content ${r}`,children:t.message.content.map(s=>{var a;return L(zv,{block:s,theme:e,downloadUrl:o,...i},t.message.createdAt+((a=t.message.editedAt)!=null?a:0))})})}function zv({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:de.never(a)}}(r,e);return L(o,{block:e,common:t,message:n,downloadUrl:i})}const Yv=27;function $o(t,e,n=!0){const r=ee(o=>{o.keyCode===Yv&&t()},[t]),i=ee(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 Gv=".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)}";function Ys(t){return L(he()instanceof $m?Wv:Xv,{...t})}function Wv(t){const e=nt(),n=nn();return L(e.Icon,{common:n,...t})}function Xv(t){const e=nt(),n=Ta();return L(e.Icon,{common:n,...t})}function Nu(){return L(Ys,{type:"spinner","aria-label":te(he().t$).LOADING,className:"t-loading-icon"})}const N_={"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 Kv(t,e){if(typeof window=="undefined"||window.document===void 0)return new Promise(()=>{});try{const n=t!=null?t:hi.emojiPickerTranslationUrl,r=N_["emoji-picker-element"],[i,o]=await Promise.all([mc(r),mc(n)]),s=e!=null?e:hi.emojiDataUrl,a={...i,i18n:o.default,dataSource:s};return await new a.Database({dataSource:s}).ready(),a}catch(n){return Yl.error("Failed to load emoji picker:",n),new Promise(()=>{})}}async function mc(t){return import(t).catch(()=>new Function("url","return import(url)")(t)).catch(()=>{throw new Error("Cannot dynamically import module in this environment")})}function bu(){const t=he(),[e,n]=ae();return ym(()=>{const r=t.translationData$.get();t.app$.get()&&t.currentUser$.get()&&r&&function(i,o){const s=JSON.stringify([i,o]);if(gl[s])return gl[s];const a=Kv(i,o);return gl[s]=a,a}(r.emojiPickerTranslationUrl,r.emojiDataUrl).then(i=>n({value:i}))},[]),e}const gl={};function ku(t){const{onClose:e,onEmojiSelected:n}=Xg(),r=Q(null),i=he(),o=te(i.t$),s=bu();return Z(()=>{if(!s)return;de.defined(r.current);const a=r.current,l=a.shadowRoot;(function(h,d){const p=document.createElement("style");p.textContent=d,h.appendChild(p)})(l,Gv);const u=h=>{var p;const d=(p=h.detail.unicode)!=null?p:h.detail.name;n(d)};function c(h){h.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]),$o(()=>e(),".t-emoji-picker"),L("div",s?{className:"t-emoji-picker",children:L("emoji-picker",{locale:o.locale,ref:r,class:t.colorScheme,"data-source":s.value.dataSource})}:{className:"t-emoji-picker","t-loading":"",children:L(Nu,{})})}function b_({messageId:t,colorScheme:e}){const{closePopover:n}=iu(),r=Yr();return L("div",{className:"t-reaction-picker",children:L(Fm.Provider,{value:{onClose:n,onEmojiSelected:i=>{r.addReaction(t,i),n()}},children:L(ku,{colorScheme:e})})})}function Ec(){return Ec=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},Ec.apply(null,arguments)}function k_(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 _c(t,e){return _c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},_c(t,e)}function L_(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,_c(t,e)}function w_(){}function M_(){}M_.resetWarningCache=w_;function Rp(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}(function(){function t(r,i,o,s,a,l){if(l!=="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"){var u=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 u.name="Invariant Violation",u}}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:M_,resetWarningCache:w_};n.PropTypes=n})();const Cp=!1,P_=Mt.createContext(null);var Ki="unmounted",Ar="exited",gr="entering",ni="entered",Ac="exiting",bn=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=Ar,o.appearStatus=gr):s=ni:s=r.unmountOnExit||r.mountOnEnter?Ki:Ar,o.state={status:s},o.nextCallback=null,o}L_(e,t),e.getDerivedStateFromProps=function(r,i){return r.in&&i.status===Ki?{status:Ar}: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!==gr&&o!==ni&&(i=gr):o!==gr&&o!==ni||(i=Ac)}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===gr?this.performEnter(r):this.performExit()):this.props.unmountOnExit&&this.state.status===Ar&&this.setState({status:Ki})},n.performEnter=function(r){var i=this,o=this.props.enter,s=this.context?this.context.isMounting:r,a=this.props.nodeRef?[s]:[Mt.findDOMNode(this),s],l=a[0],u=a[1],c=this.getTimeouts(),h=s?c.appear:c.enter;!r&&!o||Cp?this.safeSetState({status:ni},function(){i.props.onEntered(l)}):(this.props.onEnter(l,u),this.safeSetState({status:gr},function(){i.props.onEntering(l,u),i.onTransitionEnd(h,function(){i.safeSetState({status:ni},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:Mt.findDOMNode(this);i&&!Cp?(this.props.onExit(s),this.safeSetState({status:Ac},function(){r.props.onExiting(s),r.onTransitionEnd(o.exit,function(){r.safeSetState({status:Ar},function(){r.props.onExited(s)})})})):this.safeSetState({status:Ar},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:Mt.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===Ki)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=k_(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Mt.createElement(P_.Provider,{value:null},typeof o=="function"?o(r,s):Mt.cloneElement(Mt.Children.only(o),s))},e}(Mt.Component);function Qr(){}bn.contextType=P_,bn.propTypes={},bn.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Qr,onEntering:Qr,onEntered:Qr,onExit:Qr,onExiting:Qr,onExited:Qr},bn.UNMOUNTED=Ki,bn.EXITED=Ar,bn.ENTERING=gr,bn.ENTERED=ni,bn.EXITING=Ac;var Sl=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=Rp(r.className,i):r.setAttribute("class",Rp(r.className&&r.className.baseVal||"",i)));var r,i})},gc=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],h=u[1];r.removeClasses(c,"exit"),r.addClass(c,h?"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],h=u[1]?"appear":"enter";r.addClass(c,h,"active"),r.props.onEntering&&r.props.onEntering(a,l)},r.onEntered=function(a,l){var u=r.resolveArguments(a,l),c=u[0],h=u[1]?"appear":"enter";r.removeClasses(c,h),r.addClass(c,h,"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}L_(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 d=c,void((h=l).classList?h.classList.add(d):function(p,f){return p.classList?!!f&&p.classList.contains(f):(" "+(p.className.baseVal||p.className)+" ").indexOf(" "+f+" ")!==-1}(h,d)||(typeof h.className=="string"?h.className=h.className+" "+d:h.setAttribute("class",(h.className&&h.className.baseVal||"")+" "+d)));var h,d})}(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&&Sl(r,s),a&&Sl(r,a),l&&Sl(r,l)},n.render=function(){var r=this.props;r.classNames;var i=k_(r,["classNames"]);return Mt.createElement(bn,Ec({},i,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},e}(Mt.Component);gc.defaultProps={classNames:""},gc.propTypes={};const qv={ltr:["ArrowLeft","ArrowRight"],rtl:["ArrowRight","ArrowLeft"],ttb:["ArrowUp","ArrowDown"]};function x_(t,{focused:e,setFocused:n,itemCount:r,dir:i,onConfirm:o,onSpace:s}){if(r===0)return!1;const a=c=>{var h,d,p;h=0,d=c,p=r-1,c=Math.max(h,Math.min(d,p)),n(c)},[l,u]=qv[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 F_({focused:t,setFocused:e,buttonId:n}){ft(()=>{var a;const s=n(t);s&&((a=document.getElementById(s))==null||a.scrollIntoView({block:"nearest"}))},[t,n]);const r=ee(s=>{const a=s.currentTarget.dataset.index;e(+a)},[e]),i=se(()=>({role:"menu","aria-activedescendant":n(t)}),[t,n]),o=ee(s=>({onMouseMove:r,id:n(s),"data-index":s}),[r,n]);return{containerProps:i,itemProps:o}}function H_(t){const[e,n]=ae([]),[r,i]=ae([]),[o,s]=ae(0),[a,l]=ae(0),u=bu(),c=se(()=>(u==null?void 0:u.value)&&new u.value.Database({dataSource:u.value.dataSource}),[u]),h=xo(),d=te(h.state$.suggestEmojiQuery);Z(()=>{c&&(d?async function(){const _=await c.getPreferredSkinTone();l(_);let g=await c.getEmojiBySearchQuery(d);if(g=g.filter(O=>O.url||function(D){return D.version<=Bm&&!Zv.includes(D.unicode)}(O)),function(O,D){D.sort((R,T)=>{var v,y;const I=(v=R.shortcodes)==null?void 0:v.find(b=>b.startsWith(O)),S=(y=T.shortcodes)==null?void 0:y.find(b=>b.startsWith(O));return I&&!S?-1:!I&&S?1:I&&S?I.length-S.length:0})}(d.substring(1),g),s(0),n(g),g.length>0&&i(g),d.endsWith(":")){const O=d.slice(1,-1),D=g.find(R=>{var T;return(T=R.shortcodes)==null?void 0:T.includes(O)});D&&h.selectEmoji(qi(D,_))}}():n([]))},[d,h,c]);const p=ee(_=>{const g=e[_];return g&&"emoji-button-"+qi(g,a)},[e,a]),{containerProps:f,itemProps:m}=F_({focused:o,setFocused:s,buttonId:p}),E=e.length>0;$o(()=>h.closeSuggester(),".t-emoji-suggest-bar",E),Z(()=>{if(E)return h.listenKeydown("emoji",_=>x_(_,{dir:"ltr",focused:o,setFocused:s,itemCount:e.length,onConfirm(){const g=e[o];de.defined(g),h.selectEmoji(qi(g,a))}})),()=>{h.listenKeydown("emoji",void 0)};h.listenKeydown("emoji",void 0)},[h,e,o,E,a]);const A=Q(null);return L(gc,{in:E,timeout:100,classNames:"slide",mountOnEnter:!0,unmountOnExit:!0,nodeRef:A,children:L("div",{className:"t-emoji-suggest-bar",ref:A,...f,children:r.map((_,g)=>L(Jv,{emoji:_,skinTone:a,focused:g===o,onSelect:O=>h.selectEmoji(O),...m(g)},qi(_,a)))})})}function qi(t,e){return Sc(t)?U_(t,e):t.name}function Sc(t){return!!t.unicode}function Jv(t){var l;const{emoji:e,focused:n,skinTone:r,onSelect:i,...o}=t,s=((l=e.shortcodes)!=null?l:[]).join(", "),a=Sc(e)?[e.unicode,s].join(", "):s;return L("button",{"t-focused":n?"":void 0,title:s,"aria-label":a,onClick:()=>i(qi(e,r)),...o,children:Sc(e)?U_(e,r):null})}function U_(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 Zv=["🏻","🏼","🏽","🏾","🏿"],Qv=["top","right","bottom","left"],Gs=Math.min,Lr=Math.max,Ws=Math.round,as=Math.floor,An=t=>({x:t,y:t}),e0={left:"right",right:"left",bottom:"top",top:"bottom"},t0={start:"end",end:"start"};function Ip(t,e,n){return Lr(t,Gs(e,n))}function Vo(t,e){return typeof t=="function"?t(e):t}function Br(t){return t.split("-")[0]}function Ra(t){return t.split("-")[1]}function B_(t){return t==="x"?"y":"x"}function j_(t){return t==="y"?"height":"width"}const n0=new Set(["top","bottom"]);function tr(t){return n0.has(Br(t))?"y":"x"}function $_(t){return B_(tr(t))}function Oc(t){return t.replace(/start|end/g,e=>t0[e])}const yp=["left","right"],Np=["right","left"],r0=["top","bottom"],i0=["bottom","top"];function o0(t,e,n,r){const i=Ra(t);let o=function(s,a,l){switch(s){case"top":case"bottom":return l?a?Np:yp:a?yp:Np;case"left":case"right":return a?r0:i0;default:return[]}}(Br(t),n==="start",r);return i&&(o=o.map(s=>s+"-"+i),e&&(o=o.concat(o.map(Oc)))),o}function ls(t){return t.replace(/left|right|bottom|top/g,e=>e0[e])}function Xs(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 bp(t,e,n){let{reference:r,floating:i}=t;const o=tr(e),s=$_(e),a=j_(s),l=Br(e),u=o==="y",c=r.x+r.width/2-i.width/2,h=r.y+r.height/2-i.height/2,d=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:h};break;case"left":p={x:r.x-i.width,y:h};break;default:p={x:r.x,y:r.y}}switch(Ra(e)){case"start":p[s]-=d*(n&&u?-1:1);break;case"end":p[s]+=d*(n&&u?-1:1)}return p}async function Ks(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:h="floating",altBoundary:d=!1,padding:p=0}=Vo(e,t),f=function(D){return typeof D!="number"?function(R){return{top:0,right:0,bottom:0,left:0,...R}}(D):{top:D,right:D,bottom:D,left:D}}(p),m=a[d?h==="floating"?"reference":"floating":h],E=Xs(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(m)))==null||n?m:m.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),A=h==="floating"?{x:r,y:i,width:s.floating.width,height:s.floating.height}:s.reference,_=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),g=await(o.isElement==null?void 0:o.isElement(_))&&await(o.getScale==null?void 0:o.getScale(_))||{x:1,y:1},O=Xs(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:A,offsetParent:_,strategy:l}):A);return{top:(E.top-O.top+f.top)/g.y,bottom:(O.bottom-E.bottom+f.bottom)/g.y,left:(E.left-O.left+f.left)/g.x,right:(O.right-E.right+f.right)/g.x}}function kp(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Lp(t){return Qv.some(e=>t[e]>=0)}const s0=new Set(["left","top"]);function Ca(){return typeof window!="undefined"}function bi(t){return Lu(t)?(t.nodeName||"").toLowerCase():"#document"}function Ut(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function gn(t){var e;return(e=(Lu(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Lu(t){return!!Ca()&&(t instanceof Node||t instanceof Ut(t).Node)}function Qt(t){return!!Ca()&&(t instanceof Element||t instanceof Ut(t).Element)}function On(t){return!!Ca()&&(t instanceof HTMLElement||t instanceof Ut(t).HTMLElement)}function Dc(t){return!(!Ca()||typeof ShadowRoot=="undefined")&&(t instanceof ShadowRoot||t instanceof Ut(t).ShadowRoot)}const a0=new Set(["inline","contents"]);function Ro(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=en(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!a0.has(i)}const l0=new Set(["table","td","th"]);function c0(t){return l0.has(bi(t))}const u0=[":popover-open",":modal"];function qs(t){return u0.some(e=>{try{return t.matches(e)}catch(n){return!1}})}const d0=["transform","translate","scale","rotate","perspective"],h0=["transform","translate","scale","rotate","perspective","filter"],p0=["paint","layout","strict","content"];function vc(t){const e=wu(),n=Qt(t)?en(t):t;return d0.some(r=>!!n[r]&&n[r]!=="none")||!!n.containerType&&n.containerType!=="normal"||!e&&!!n.backdropFilter&&n.backdropFilter!=="none"||!e&&!!n.filter&&n.filter!=="none"||h0.some(r=>(n.willChange||"").includes(r))||p0.some(r=>(n.contain||"").includes(r))}function wu(){return!(typeof CSS=="undefined"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const f0=new Set(["html","body","#document"]);function Ei(t){return f0.has(bi(t))}function en(t){return Ut(t).getComputedStyle(t)}function Ia(t){return Qt(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function nr(t){if(bi(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Dc(t)&&t.host||gn(t);return Dc(e)?e.host:e}function V_(t){const e=nr(t);return Ei(e)?t.ownerDocument?t.ownerDocument.body:t.body:On(e)&&Ro(e)?e:V_(e)}function Co(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=V_(t),o=i===((r=t.ownerDocument)==null?void 0:r.body),s=Ut(i);if(o){const a=Tc(s);return e.concat(s,s.visualViewport||[],Ro(i)?i:[],a&&n?Co(a):[])}return e.concat(i,Co(i,[],n))}function Tc(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function z_(t){const e=en(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=On(t),o=i?t.offsetWidth:n,s=i?t.offsetHeight:r,a=Ws(n)!==o||Ws(r)!==s;return a&&(n=o,r=s),{width:n,height:r,$:a}}function Mu(t){return Qt(t)?t:t.contextElement}function _i(t){const e=Mu(t);if(!On(e))return An(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:o}=z_(e);let s=(o?Ws(n.width):n.width)/r,a=(o?Ws(n.height):n.height)/i;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const m0=An(0);function Y_(t){const e=Ut(t);return wu()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:m0}function jr(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),o=Mu(t);let s=An(1);e&&(r?Qt(r)&&(s=_i(r)):s=_i(t));const a=function(d,p,f){return p===void 0&&(p=!1),!(!f||p&&f!==Ut(d))&&p}(o,n,r)?Y_(o):An(0);let l=(i.left+a.x)/s.x,u=(i.top+a.y)/s.y,c=i.width/s.x,h=i.height/s.y;if(o){const d=Ut(o),p=r&&Qt(r)?Ut(r):r;let f=d,m=Tc(f);for(;m&&r&&p!==f;){const E=_i(m),A=m.getBoundingClientRect(),_=en(m),g=A.left+(m.clientLeft+parseFloat(_.paddingLeft))*E.x,O=A.top+(m.clientTop+parseFloat(_.paddingTop))*E.y;l*=E.x,u*=E.y,c*=E.x,h*=E.y,l+=g,u+=O,f=Ut(m),m=Tc(f)}}return Xs({width:c,height:h,x:l,y:u})}function Js(t,e){const n=Ia(t).scrollLeft;return e?e.left+n:jr(gn(t)).left+n}function G_(t,e){const n=t.getBoundingClientRect();return{x:n.left+e.scrollLeft-Js(t,n),y:n.top+e.scrollTop}}const E0=new Set(["absolute","fixed"]);function wp(t,e,n){let r;if(e==="viewport")r=function(i,o){const s=Ut(i),a=gn(i),l=s.visualViewport;let u=a.clientWidth,c=a.clientHeight,h=0,d=0;if(l){u=l.width,c=l.height;const f=wu();(!f||f&&o==="fixed")&&(h=l.offsetLeft,d=l.offsetTop)}const p=Js(a);if(p<=0){const f=a.ownerDocument,m=f.body,E=getComputedStyle(m),A=f.compatMode==="CSS1Compat"&&parseFloat(E.marginLeft)+parseFloat(E.marginRight)||0,_=Math.abs(a.clientWidth-m.clientWidth-A);_<=25&&(u-=_)}else p<=25&&(u+=p);return{width:u,height:c,x:h,y:d}}(t,n);else if(e==="document")r=function(i){const o=gn(i),s=Ia(i),a=i.ownerDocument.body,l=Lr(o.scrollWidth,o.clientWidth,a.scrollWidth,a.clientWidth),u=Lr(o.scrollHeight,o.clientHeight,a.scrollHeight,a.clientHeight);let c=-s.scrollLeft+Js(i);const h=-s.scrollTop;return en(a).direction==="rtl"&&(c+=Lr(o.clientWidth,a.clientWidth)-l),{width:l,height:u,x:c,y:h}}(gn(t));else if(Qt(e))r=function(i,o){const s=jr(i,!0,o==="fixed"),a=s.top+i.clientTop,l=s.left+i.clientLeft,u=On(i)?_i(i):An(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=Y_(t);r={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return Xs(r)}function W_(t,e){const n=nr(t);return!(n===e||!Qt(n)||Ei(n))&&(en(n).position==="fixed"||W_(n,e))}function _0(t,e,n){const r=On(e),i=gn(e),o=n==="fixed",s=jr(t,!0,o,e);let a={scrollLeft:0,scrollTop:0};const l=An(0);function u(){l.x=Js(i)}if(r||!r&&!o)if((bi(e)!=="body"||Ro(i))&&(a=Ia(e)),r){const h=jr(e,!0,o,e);l.x=h.x+e.clientLeft,l.y=h.y+e.clientTop}else i&&u();o&&!r&&i&&u();const c=!i||r||o?An(0):G_(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 Ol(t){return en(t).position==="static"}function Mp(t,e){if(!On(t)||en(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return gn(t)===n&&(n=n.ownerDocument.body),n}function Pp(t,e){const n=Ut(t);if(qs(t))return n;if(!On(t)){let i=nr(t);for(;i&&!Ei(i);){if(Qt(i)&&!Ol(i))return i;i=nr(i)}return n}let r=Mp(t,e);for(;r&&c0(r)&&Ol(r);)r=Mp(r,e);return r&&Ei(r)&&Ol(r)&&!vc(r)?n:r||function(i){let o=nr(i);for(;On(o)&&!Ei(o);){if(vc(o))return o;if(qs(o))return null;o=nr(o)}return null}(t)||n}const A0={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:r,strategy:i}=t;const o=i==="fixed",s=gn(r),a=!!e&&qs(e.floating);if(r===s||a&&o)return n;let l={scrollLeft:0,scrollTop:0},u=An(1);const c=An(0),h=On(r);if((h||!h&&!o)&&((bi(r)!=="body"||Ro(s))&&(l=Ia(r)),On(r))){const p=jr(r);u=_i(r),c.x=p.x+r.clientLeft,c.y=p.y+r.clientTop}const d=!s||h||o?An(0):G_(s,l);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x+d.x,y:n.y*u.y-l.scrollTop*u.y+c.y+d.y}},getDocumentElement:gn,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:r,strategy:i}=t;const o=n==="clippingAncestors"?qs(e)?[]:function(u,c){const h=c.get(u);if(h)return h;let d=Co(u,[],!1).filter(E=>Qt(E)&&bi(E)!=="body"),p=null;const f=en(u).position==="fixed";let m=f?nr(u):u;for(;Qt(m)&&!Ei(m);){const E=en(m),A=vc(m);A||E.position!=="fixed"||(p=null),(f?!A&&!p:!A&&E.position==="static"&&p&&E0.has(p.position)||Ro(m)&&!A&&W_(u,m))?d=d.filter(_=>_!==m):p=E,m=nr(m)}return c.set(u,d),d}(e,this._c):[].concat(n),s=[...o,r],a=s[0],l=s.reduce((u,c)=>{const h=wp(e,c,i);return u.top=Lr(h.top,u.top),u.right=Gs(h.right,u.right),u.bottom=Gs(h.bottom,u.bottom),u.left=Lr(h.left,u.left),u},wp(e,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:Pp,getElementRects:async function(t){const e=this.getOffsetParent||Pp,n=this.getDimensions,r=await n(t.floating);return{reference:_0(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}=z_(t);return{width:e,height:n}},getScale:_i,isElement:Qt,isRTL:function(t){return en(t).direction==="rtl"}};function xp(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function X_(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=Mu(t),c=i||o?[...u?Co(u):[],...Co(e)]:[];c.forEach(E=>{i&&E.addEventListener("scroll",n,{passive:!0}),o&&E.addEventListener("resize",n)});const h=u&&a?function(E,A){let _,g=null;const O=gn(E);function D(){var R;clearTimeout(_),(R=g)==null||R.disconnect(),g=null}return function R(T,I){T===void 0&&(T=!1),I===void 0&&(I=1),D();const S=E.getBoundingClientRect(),{left:v,top:y,width:b,height:M}=S;if(T||A(),!b||!M)return;const k={rootMargin:-as(y)+"px "+-as(O.clientWidth-(v+b))+"px "+-as(O.clientHeight-(y+M))+"px "+-as(v)+"px",threshold:Lr(0,Gs(1,I))||1};let P=!0;function B(F){const V=F[0].intersectionRatio;if(V!==I){if(!P)return R();V?R(!1,V):_=setTimeout(()=>{R(!1,1e-7)},1e3)}V!==1||xp(S,E.getBoundingClientRect())||R(),P=!1}try{g=new IntersectionObserver(B,{...k,root:O.ownerDocument})}catch(F){g=new IntersectionObserver(B,k)}g.observe(E)}(!0),D}(u,n):null;let d,p=-1,f=null;s&&(f=new ResizeObserver(E=>{let[A]=E;A&&A.target===u&&f&&(f.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var _;(_=f)==null||_.observe(e)})),n()}),u&&!l&&f.observe(u),f.observe(e));let m=l?jr(t):null;return l&&function E(){const A=jr(t);m&&!xp(m,A)&&n(),m=A,d=requestAnimationFrame(E)}(),n(),()=>{var E;c.forEach(A=>{i&&A.removeEventListener("scroll",n),o&&A.removeEventListener("resize",n)}),h==null||h(),(E=f)==null||E.disconnect(),f=null,l&&cancelAnimationFrame(d)}}const g0=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:h,platform:d,elements:p}=u,f=await(d.isRTL==null?void 0:d.isRTL(p.floating)),m=Br(h),E=Ra(h),A=tr(h)==="y",_=s0.has(m)?-1:1,g=f&&A?-1:1,O=Vo(c,u);let{mainAxis:D,crossAxis:R,alignmentAxis:T}=typeof O=="number"?{mainAxis:O,crossAxis:0,alignmentAxis:null}:{mainAxis:O.mainAxis||0,crossAxis:O.crossAxis||0,alignmentAxis:O.alignmentAxis};return E&&typeof T=="number"&&(R=E==="end"?-1*T:T),A?{x:R*g,y:D*_}:{x:D*_,y:R*g}}(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}}}}},S0=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:_}=E;return{x:A,y:_}}},...l}=Vo(t,e),u={x:n,y:r},c=await Ks(e,l),h=tr(Br(i)),d=B_(h);let p=u[d],f=u[h];if(o){const E=d==="y"?"bottom":"right";p=Ip(p+c[d==="y"?"top":"left"],p,p-c[E])}if(s){const E=h==="y"?"bottom":"right";f=Ip(f+c[h==="y"?"top":"left"],f,f-c[E])}const m=a.fn({...e,[d]:p,[h]:f});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[d]:o,[h]:s}}}}}},O0=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:h=!0,fallbackPlacements:d,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:m=!0,...E}=Vo(t,e);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const A=Br(i),_=tr(a),g=Br(a)===a,O=await(l.isRTL==null?void 0:l.isRTL(u.floating)),D=d||(g||!m?[ls(a)]:function(k){const P=ls(k);return[Oc(k),P,Oc(P)]}(a)),R=f!=="none";!d&&R&&D.push(...o0(a,m,f,O));const T=[a,...D],I=await Ks(e,E),S=[];let v=((r=o.flip)==null?void 0:r.overflows)||[];if(c&&S.push(I[A]),h){const k=function(P,B,F){F===void 0&&(F=!1);const V=Ra(P),G=$_(P),z=j_(G);let K=G==="x"?V===(F?"end":"start")?"right":"left":V==="start"?"bottom":"top";return B.reference[z]>B.floating[z]&&(K=ls(K)),[K,ls(K)]}(i,s,O);S.push(I[k[0]],I[k[1]])}if(v=[...v,{placement:i,overflows:S}],!S.every(k=>k<=0)){var y,b;const k=(((y=o.flip)==null?void 0:y.index)||0)+1,P=T[k];if(P&&(!(h==="alignment"&&_!==tr(P))||v.every(F=>tr(F.placement)!==_||F.overflows[0]>0)))return{data:{index:k,overflows:v},reset:{placement:P}};let B=(b=v.filter(F=>F.overflows[0]<=0).sort((F,V)=>F.overflows[1]-V.overflows[1])[0])==null?void 0:b.placement;if(!B)switch(p){case"bestFit":{var M;const F=(M=v.filter(V=>{if(R){const G=tr(V.placement);return G===_||G==="y"}return!0}).map(V=>[V.placement,V.overflows.filter(G=>G>0).reduce((G,z)=>G+z,0)]).sort((V,G)=>V[1]-G[1])[0])==null?void 0:M[0];F&&(B=F);break}case"initialPlacement":B=a}if(i!==B)return{reset:{placement:B}}}return{}}}},D0=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=kp(await Ks(e,{...i,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Lp(o)}}}case"escaped":{const o=kp(await Ks(e,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:o,escaped:Lp(o)}}}default:return{}}}}},v0=(t,e,n)=>{const r=new Map,i={platform:A0,...n},o={...i.platform,_c:r};return(async(s,a,l)=>{const{placement:u="bottom",strategy:c="absolute",middleware:h=[],platform:d}=l,p=h.filter(Boolean),f=await(d.isRTL==null?void 0:d.isRTL(a));let m=await d.getElementRects({reference:s,floating:a,strategy:c}),{x:E,y:A}=bp(m,u,f),_=u,g={},O=0;for(let D=0;D<p.length;D++){const{name:R,fn:T}=p[D],{x:I,y:S,data:v,reset:y}=await T({x:E,y:A,initialPlacement:u,placement:_,strategy:c,middlewareData:g,rects:m,platform:d,elements:{reference:s,floating:a}});E=I!=null?I:E,A=S!=null?S:A,g={...g,[R]:{...g[R],...v}},y&&O<=50&&(O++,typeof y=="object"&&(y.placement&&(_=y.placement),y.rects&&(m=y.rects===!0?await d.getElementRects({reference:s,floating:a,strategy:c}):y.rects),{x:E,y:A}=bp(m,_,f)),D=-1)}return{x:E,y:A,placement:_,strategy:c,middlewareData:g}})(t,e,{...i,platform:o})};var Ss=typeof document!="undefined"?ft:function(){};function Zs(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(!Zs(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)&&!Zs(t[o],e[o]))return!1}return!0}return t!=t&&e!=e}function K_(t){return typeof window=="undefined"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Fp(t,e){const n=K_(t);return Math.round(e*n)/n}function Dl(t){const e=Q(t);return Ss(()=>{e.current=t}),e}function q_(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,h]=ae({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[d,p]=ae(r);Zs(d,r)||p(r);const[f,m]=ae(null),[E,A]=ae(null),_=ee(V=>{V!==R.current&&(R.current=V,m(V))},[]),g=ee(V=>{V!==T.current&&(T.current=V,A(V))},[]),O=o||f,D=s||E,R=Q(null),T=Q(null),I=Q(c),S=l!=null,v=Dl(l),y=Dl(i),b=Dl(u),M=ee(()=>{if(!R.current||!T.current)return;const V={placement:e,strategy:n,middleware:d};y.current&&(V.platform=y.current),v0(R.current,T.current,V).then(G=>{const z={...G,isPositioned:b.current!==!1};k.current&&!Zs(I.current,z)&&(I.current=z,aa(()=>{h(z)}))})},[d,e,n,y,b]);Ss(()=>{u===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,h(V=>({...V,isPositioned:!1})))},[u]);const k=Q(!1);Ss(()=>(k.current=!0,()=>{k.current=!1}),[]),Ss(()=>{if(O&&(R.current=O),D&&(T.current=D),O&&D){if(v.current)return v.current(O,D,M);M()}},[O,D,M,v,S]);const P=se(()=>({reference:R,floating:T,setReference:_,setFloating:g}),[_,g]),B=se(()=>({reference:O,floating:D}),[O,D]),F=se(()=>{const V={position:n,left:0,top:0};if(!B.floating)return V;const G=Fp(B.floating,c.x),z=Fp(B.floating,c.y);return a?{...V,transform:"translate("+G+"px, "+z+"px)",...K_(B.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:G,top:z}},[n,a,B.floating,c.x,c.y]);return se(()=>({...c,update:M,refs:P,elements:B,floatingStyles:F}),[c,M,P,B,F])}const T0=(t,e)=>({...S0(t),options:[t,e]}),J_=(t,e)=>({...O0(t),options:[t,e]}),R0=(t,e)=>({...D0(t),options:[t,e]});var Z_=["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])"],Qs=Z_.join(","),Q_=typeof Element=="undefined",$r=Q_?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Os=!Q_&&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},Io=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&&Io(t.parentNode)},eA=function(t,e,n){if(Io(t))return[];var r=Array.prototype.slice.apply(t.querySelectorAll(Qs));return e&&$r.call(t,Qs)&&r.unshift(t),r=r.filter(n)},ea=function(t,e,n){for(var r=[],i=Array.from(t);i.length;){var o=i.shift();if(!Io(o,!1))if(o.tagName==="SLOT"){var s=o.assignedElements(),a=s.length?s:o.children,l=ea(a,!0,n);n.flatten?r.push.apply(r,l):r.push({scopeParent:o,candidates:l})}else{$r.call(o,Qs)&&n.filter(o)&&(e||!t.includes(o))&&r.push(o);var u=o.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(o),c=!Io(u,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(o));if(u&&c){var h=ea(u===!0?o.children:u.children,!0,n);n.flatten?r.push.apply(r,h):r.push({scopeParent:o,candidates:h})}else i.unshift.apply(i,o.children)}}return r},tA=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Jn=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))&&!tA(t)?0:t.tabIndex},C0=function(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex},nA=function(t){return t.tagName==="INPUT"},I0=function(t){return function(e){return nA(e)&&e.type==="radio"}(t)&&!function(e){if(!e.name)return!0;var n,r=e.form||Os(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)},Hp=function(t){var e=t.getBoundingClientRect(),n=e.width,r=e.height;return n===0&&r===0},y0=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=$r.call(t,"details>summary:first-of-type")?t.parentElement:t;if($r.call(i,"details:not([open]) *"))return!0;if(n&&n!=="full"&&n!=="full-native"&&n!=="legacy-full"){if(n==="non-zero-area")return Hp(t)}else{if(typeof r=="function"){for(var o=t;t;){var s=t.parentElement,a=Os(t);if(s&&!s.shadowRoot&&r(s)===!0)return Hp(t);t=t.assignedSlot?t.assignedSlot:s||a===t.ownerDocument?s:a.host}t=o}if(function(l){var u,c,h,d,p=l&&Os(l),f=(u=p)===null||u===void 0?void 0:u.host,m=!1;if(p&&p!==l)for(m=!!((c=f)!==null&&c!==void 0&&(h=c.ownerDocument)!==null&&h!==void 0&&h.contains(f)||l!=null&&(d=l.ownerDocument)!==null&&d!==void 0&&d.contains(l));!m&&f;){var E,A,_;m=!((A=f=(E=p=Os(f))===null||E===void 0?void 0:E.host)===null||A===void 0||(_=A.ownerDocument)===null||_===void 0||!_.contains(f))}return m}(t))return!t.getClientRects().length;if(n!=="legacy-full")return!0}return!1},ta=function(t,e){return!(e.disabled||Io(e)||function(n){return nA(n)&&n.type==="hidden"}(e)||y0(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!!$r.call(r,"fieldset[disabled] *")||!o.contains(n)}return!0}r=r.parentElement}return!1}(e))},Rc=function(t,e){return!(I0(e)||Jn(e)<0||!ta(t,e))},N0=function(t){var e=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(e)||e>=0)},rA=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 h=Jn(u);return h<0&&c&&!tA(u)?0:h}(s,o),l=o?rA(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(C0).reduce(function(r,i){return i.isScope?r.push.apply(r,i.content):r.push(i.content),r},[]).concat(e)},ya=function(t,e){var n;return n=(e=e||{}).getShadowRoot?ea([t],e.includeContainer,{filter:Rc.bind(null,e),flatten:!1,getShadowRoot:e.getShadowRoot,shadowRootFilter:N0}):eA(t,e.includeContainer,Rc.bind(null,e)),rA(n)},Pu=function(t,e){return(e=e||{}).getShadowRoot?ea([t],e.includeContainer,{filter:ta.bind(null,e),flatten:!0,getShadowRoot:e.getShadowRoot}):eA(t,e.includeContainer,ta.bind(null,e))},Sr=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return $r.call(t,Qs)!==!1&&Rc(e,t)},b0=Z_.concat("iframe").join(","),Ds=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return $r.call(t,b0)!==!1&&ta(e,t)};const k0=Object.freeze(Object.defineProperty({__proto__:null,focusable:Pu,getTabIndex:Jn,isFocusable:Ds,isTabbable:Sr,tabbable:ya},Symbol.toStringTag,{value:"Module"}));function Cc(t){return(t==null?void 0:t.ownerDocument)||document}var so=typeof document!="undefined"?ft:function(){};const iA=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Up(t,e){const n=ya(t,iA()),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}(Cc(t)),o=n.indexOf(i);return n[o===-1?e===1?0:r-1:o+e]}function vl(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&&Dc(s)){let a=o;for(;a;){if(i===a)return!0;a=a.parentNode||a.host}}return!1}(n,r)}function L0(t){ya(t,iA()).forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")})}function Bp(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 w0={...Wc};let jp=!1,M0=0;const $p=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+M0++,P0=w0.useId||function(){const[t,e]=ae(()=>jp?$p():void 0);return so(()=>{t==null&&e($p())},[]),Z(()=>{jp=!0},[]),t};function oA(t){return"data-floating-ui-"+t}const sA={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},Vp=jt(function(t,e){const[n,r]=ae();return so(()=>{/apple/i.test(navigator.vendor)&&r("button")},[]),L("span",{...t,ref:e,tabIndex:0,role:n,"aria-hidden":!n||void 0,[oA("focus-guard")]:"",style:sA})}),aA=ki(null),zp=oA("portal");function x0(t){const{children:e,id:n,root:r,preserveTabOrder:i=!0}=t,o=function(m){m===void 0&&(m={});const{id:E,root:A}=m,_=P0(),g=F0(),[O,D]=ae(null),R=Q(null);return so(()=>()=>{O==null||O.remove(),queueMicrotask(()=>{R.current=null})},[O]),so(()=>{if(!_||R.current)return;const T=E?document.getElementById(E):null;if(!T)return;const I=document.createElement("div");I.id=_,I.setAttribute(zp,""),T.appendChild(I),R.current=I,D(I)},[E,_]),so(()=>{if(A===null||!_||R.current)return;let T=A||(g==null?void 0:g.portalNode);T&&!Lu(T)&&(T=T.current),T=T||document.body;let I=null;E&&(I=document.createElement("div"),I.id=E,T.appendChild(I));const S=document.createElement("div");S.id=_,S.setAttribute(zp,""),T=I||T,T.appendChild(S),R.current=S,D(S)},[E,A,_,g]),O}({id:n,root:r}),[s,a]=ae(null),l=Q(null),u=Q(null),c=Q(null),h=Q(null),d=s==null?void 0:s.modal,p=s==null?void 0:s.open,f=!!s&&!s.modal&&s.open&&i&&!(!r&&!o);return Z(()=>{if(o&&i&&!d)return o.addEventListener("focusin",m,!0),o.addEventListener("focusout",m,!0),()=>{o.removeEventListener("focusin",m,!0),o.removeEventListener("focusout",m,!0)};function m(E){o&&vl(E)&&(E.type==="focusin"?Bp:L0)(o)}},[o,i,d]),Z(()=>{o&&(p||Bp(o))},[p,o]),L(aA.Provider,{value:se(()=>({preserveTabOrder:i,beforeOutsideRef:l,afterOutsideRef:u,beforeInsideRef:c,afterInsideRef:h,portalNode:o,setFocusManagerState:a}),[i,o]),children:[f&&o&&L(Vp,{"data-type":"outside",ref:l,onFocus:m=>{if(vl(m,o)){var E;(E=c.current)==null||E.focus()}else{const _=s?s.domReference:null,g=Up(Cc(A=_).body,-1)||A;g==null||g.focus()}var A}}),f&&o&&L("span",{"aria-owns":o.id,style:sA}),o&&Vc(e,o),f&&o&&L(Vp,{"data-type":"outside",ref:u,onFocus:m=>{if(vl(m,o)){var E;(E=h.current)==null||E.focus()}else{const _=s?s.domReference:null,g=Up(Cc(A=_).body,1)||A;g==null||g.focus(),s!=null&&s.closeOnFocusOut&&(s==null||s.onOpenChange(!1,m.nativeEvent,"focus-out"))}var A}})]})}const F0=()=>lr(aA);var lA={exports:{}};function Ic(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 Yp(t,e){var n=typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=cA(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.
94
+ 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 H0(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 Gp(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 Wp(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Gp(Object(n),!0).forEach(function(r){H0(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Gp(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function U0(t){return function(e){if(Array.isArray(e))return Ic(e)}(t)||function(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}(t)||cA(t)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
95
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function cA(t,e){if(t){if(typeof t=="string")return Ic(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)?Ic(t,e):void 0}}var wn={getActiveTrap:function(t){return(t==null?void 0:t.length)>0?t[t.length-1]:null},activateTrap:function(t,e){e!==wn.getActiveTrap(t)&&wn.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),wn.unpauseTrap(t)},pauseTrap:function(t){var e=wn.getActiveTrap(t);e==null||e._setPausedState(!0)},unpauseTrap:function(t){var e=wn.getActiveTrap(t);e&&!e._isManuallyPaused()&&e._setPausedState(!1)}},ao=function(t){return(t==null?void 0:t.key)==="Tab"||(t==null?void 0:t.keyCode)===9},B0=function(t){return ao(t)&&!t.shiftKey},j0=function(t){return ao(t)&&t.shiftKey},Xp=function(t){return setTimeout(t,0)},Vi=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},cs=function(t){return t.target.shadowRoot&&typeof t.composedPath=="function"?t.composedPath()[0]:t.target},$0=[];const V0=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)||$0,o=Wp({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isolateSubtrees:!1,isKeyForward:B0,isKeyBackward:j0},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(S,v,y){return S&&S[v]!==void 0?S[v]:o[y||v]},l=function(S,v){var y=typeof(v==null?void 0:v.composedPath)=="function"?v.composedPath():void 0;return s.containerGroups.findIndex(function(b){var M=b.container,k=b.tabbableNodes;return M.contains(S)||(y==null?void 0:y.includes(M))||k.find(function(P){return P===S})})},u=function(S){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},y=v.hasFallback,b=y!==void 0&&y,M=v.params,k=M===void 0?[]:M,P=o[S];if(typeof P=="function"&&(P=P.apply(void 0,U0(k))),P===!0&&(P=void 0),!P){if(P===void 0||P===!1)return P;throw new Error("`".concat(S,"` was specified but was not a node, or did not return a node"))}var B=P;if(typeof P=="string"){try{B=r.querySelector(P)}catch(F){throw new Error("`".concat(S,'` appears to be an invalid selector; error="').concat(F.message,'"'))}if(!B&&!b)throw new Error("`".concat(S,"` as selector refers to no known node"))}return B},c=function(){var S=u("initialFocus",{hasFallback:!0});if(S===!1)return!1;if(S===void 0||S&&!Ds(S,o.tabbableOptions))if(l(r.activeElement)>=0)S=r.activeElement;else{var v=s.tabbableGroups[0];S=v&&v.firstTabbableNode||u("fallbackFocus")}else S===null&&(S=u("fallbackFocus"));if(!S)throw new Error("Your focus-trap needs to have at least one focusable element");return S},h=function(){if(s.containerGroups=s.containers.map(function(S){var v=ya(S,o.tabbableOptions),y=Pu(S,o.tabbableOptions),b=v.length>0?v[0]:void 0,M=v.length>0?v[v.length-1]:void 0,k=y.find(function(F){return Sr(F)}),P=y.slice().reverse().find(function(F){return Sr(F)}),B=!!v.find(function(F){return Jn(F)>0});return{container:S,tabbableNodes:v,focusableNodes:y,posTabIndexesFound:B,firstTabbableNode:b,lastTabbableNode:M,firstDomTabbableNode:k,lastDomTabbableNode:P,nextTabbableNode:function(F){var V=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],G=v.indexOf(F);return G<0?V?y.slice(y.indexOf(F)+1).find(function(z){return Sr(z)}):y.slice(0,y.indexOf(F)).reverse().find(function(z){return Sr(z)}):v[G+(V?1:-1)]}}}),s.tabbableGroups=s.containerGroups.filter(function(S){return S.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(S){return S.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.")},d=function(S){var v=S.activeElement;if(v)return v.shadowRoot&&v.shadowRoot.activeElement!==null?d(v.shadowRoot):v},p=function(S){S!==!1&&S!==d(document)&&(S&&S.focus?(S.focus({preventScroll:!!o.preventScroll}),s.mostRecentlyFocusedNode=S,function(v){return v.tagName&&v.tagName.toLowerCase()==="input"&&typeof v.select=="function"}(S)&&S.select()):p(c()))},f=function(S){var v=u("setReturnFocus",{params:[S]});return v||v!==!1&&S},m=function(S){var v=S.target,y=S.event,b=S.isBackward,M=b!==void 0&&b;v=v||cs(y),h();var k=null;if(s.tabbableGroups.length>0){var P=l(v,y),B=P>=0?s.containerGroups[P]:void 0;if(P<0)k=M?s.tabbableGroups[s.tabbableGroups.length-1].lastTabbableNode:s.tabbableGroups[0].firstTabbableNode;else if(M){var F=s.tabbableGroups.findIndex(function(ie){var ue=ie.firstTabbableNode;return v===ue});if(F<0&&(B.container===v||Ds(v,o.tabbableOptions)&&!Sr(v,o.tabbableOptions)&&!B.nextTabbableNode(v,!1))&&(F=P),F>=0){var V=F===0?s.tabbableGroups.length-1:F-1,G=s.tabbableGroups[V];k=Jn(v)>=0?G.lastTabbableNode:G.lastDomTabbableNode}else ao(y)||(k=B.nextTabbableNode(v,!1))}else{var z=s.tabbableGroups.findIndex(function(ie){var ue=ie.lastTabbableNode;return v===ue});if(z<0&&(B.container===v||Ds(v,o.tabbableOptions)&&!Sr(v,o.tabbableOptions)&&!B.nextTabbableNode(v))&&(z=P),z>=0){var K=z===s.tabbableGroups.length-1?0:z+1,_e=s.tabbableGroups[K];k=Jn(v)>=0?_e.firstTabbableNode:_e.firstDomTabbableNode}else ao(y)||(k=B.nextTabbableNode(v))}}else k=u("fallbackFocus");return k},E=function(S){var v=cs(S);l(v,S)>=0||(Vi(o.clickOutsideDeactivates,S)?n.deactivate({returnFocus:o.returnFocusOnDeactivate}):Vi(o.allowOutsideClick,S)||S.preventDefault())},A=function(S){var v=cs(S),y=l(v,S)>=0;if(y||v instanceof Document)y&&(s.mostRecentlyFocusedNode=v);else{var b;S.stopImmediatePropagation();var M=!0;if(s.mostRecentlyFocusedNode)if(Jn(s.mostRecentlyFocusedNode)>0){var k=l(s.mostRecentlyFocusedNode),P=s.containerGroups[k].tabbableNodes;if(P.length>0){var B=P.findIndex(function(F){return F===s.mostRecentlyFocusedNode});B>=0&&(o.isKeyForward(s.recentNavEvent)?B+1<P.length&&(b=P[B+1],M=!1):B-1>=0&&(b=P[B-1],M=!1))}}else s.containerGroups.some(function(F){return F.tabbableNodes.some(function(V){return Jn(V)>0})})||(M=!1);else M=!1;M&&(b=m({target:s.mostRecentlyFocusedNode,isBackward:o.isKeyBackward(s.recentNavEvent)})),p(b||s.mostRecentlyFocusedNode||c())}s.recentNavEvent=void 0},_=function(S){(o.isKeyForward(S)||o.isKeyBackward(S))&&function(v){var y=arguments.length>1&&arguments[1]!==void 0&&arguments[1];s.recentNavEvent=v;var b=m({event:v,isBackward:y});b&&(ao(v)&&v.preventDefault(),p(b))}(S,o.isKeyBackward(S))},g=function(S){(function(v){return(v==null?void 0:v.key)==="Escape"||(v==null?void 0:v.key)==="Esc"||(v==null?void 0:v.keyCode)===27})(S)&&Vi(o.escapeDeactivates,S)!==!1&&(S.preventDefault(),n.deactivate())},O=function(S){var v=cs(S);l(v,S)>=0||Vi(o.clickOutsideDeactivates,S)||Vi(o.allowOutsideClick,S)||(S.preventDefault(),S.stopImmediatePropagation())},D=function(){if(s.active)return wn.activateTrap(i,n),s.delayInitialFocusTimer=o.delayInitialFocus?Xp(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",_,{capture:!0,passive:!1}),r.addEventListener("keydown",g),n},R=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",_,!0),r.removeEventListener("keydown",g),n},T=typeof window!="undefined"&&"MutationObserver"in window?new MutationObserver(function(S){S.some(function(v){return Array.from(v.removedNodes).some(function(y){return y===s.mostRecentlyFocusedNode})})&&p(c())}):void 0,I=function(){T&&(T.disconnect(),s.active&&!s.paused&&s.containers.map(function(S){T.observe(S,{subtree:!0,childList:!0})}))};return n={get active(){return s.active},get paused(){return s.paused},activate:function(S){if(s.active)return this;var v=a(S,"onActivate"),y=a(S,"onPostActivate"),b=a(S,"checkCanFocusTrap"),M=wn.getActiveTrap(i),k=!1;M&&!M.paused&&(M._setSubtreeIsolation(!1),k=!0);try{b||h(),s.active=!0,s.paused=!1,s.nodeFocusedBeforeActivation=d(r),v==null||v();var P=function(){b&&h(),D(),I(),o.isolateSubtrees&&n._setSubtreeIsolation(!0),y==null||y()};if(b)return b(s.containers.concat()).then(P,P),this;P()}catch(B){throw M===wn.getActiveTrap(i)&&k&&M._setSubtreeIsolation(!0),B}return this},deactivate:function(S){if(!s.active)return this;var v=Wp({onDeactivate:o.onDeactivate,onPostDeactivate:o.onPostDeactivate,checkCanReturnFocus:o.checkCanReturnFocus},S);clearTimeout(s.delayInitialFocusTimer),s.delayInitialFocusTimer=void 0,s.paused||n._setSubtreeIsolation(!1),s.alreadyInert.clear(),R(),s.active=!1,s.paused=!1,I(),wn.deactivateTrap(i,n);var y=a(v,"onDeactivate"),b=a(v,"onPostDeactivate"),M=a(v,"checkCanReturnFocus"),k=a(v,"returnFocus","returnFocusOnDeactivate");y==null||y();var P=function(){Xp(function(){k&&p(f(s.nodeFocusedBeforeActivation)),b==null||b()})};return k&&M?(M(f(s.nodeFocusedBeforeActivation)).then(P,P),this):(P(),this)},pause:function(S){return s.active?(s.manuallyPaused=!0,this._setPausedState(!0,S)):this},unpause:function(S){return s.active?(s.manuallyPaused=!1,i[i.length-1]!==this?this:this._setPausedState(!1,S)):this},updateContainerElements:function(S){var v=[].concat(S).filter(Boolean);return s.containers=v.map(function(y){return typeof y=="string"?r.querySelector(y):y}),o.isolateSubtrees&&function(y){s.active&&!s.paused&&n._setSubtreeIsolation(!1),s.adjacentElements.clear(),s.alreadyInert.clear();var b,M=new Set,k=new Set,P=Yp(y);try{for(P.s();!(b=P.n()).done;){var B=b.value;M.add(B);for(var F=typeof ShadowRoot!="undefined"&&B.getRootNode()instanceof ShadowRoot,V=B;V;){M.add(V);var G=V.parentElement,z=[];G?z=G.children:!G&&F&&(z=V.getRootNode().children,G=V.getRootNode().host,F=typeof ShadowRoot!="undefined"&&G.getRootNode()instanceof ShadowRoot);var K,_e=Yp(z);try{for(_e.s();!(K=_e.n()).done;){var ie=K.value;k.add(ie)}}catch(ue){_e.e(ue)}finally{_e.f()}V=G}}}catch(ue){P.e(ue)}finally{P.f()}M.forEach(function(ue){k.delete(ue)}),s.adjacentElements=k}(s.containers),s.active&&(h(),o.isolateSubtrees&&!s.paused&&n._setSubtreeIsolation(!0)),I(),this}},Object.defineProperties(n,{_isManuallyPaused:{value:function(){return s.manuallyPaused}},_setPausedState:{value:function(S,v){if(s.paused===S)return this;if(s.paused=S,S){var y=a(v,"onPause"),b=a(v,"onPostPause");y==null||y(),R(),I(),n._setSubtreeIsolation(!1),b==null||b()}else{var M=a(v,"onUnpause"),k=a(v,"onPostUnpause");M==null||M(),n._setSubtreeIsolation(!0),h(),D(),I(),k==null||k()}return this}},_setSubtreeIsolation:{value:function(S){o.isolateSubtrees&&s.adjacentElements.forEach(function(v){S?((v.inert||v.hasAttribute("inert"))&&s.alreadyInert.add(v),v.inert=!0):s.alreadyInert.has(v)||(v.inert=!1)})}}}),n.updateContainerElements(t),n}},Symbol.toStringTag,{value:"Module"})),z0=nu(V0),Y0=nu(k0);function Ai(t){return Ai=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ai(t)}var Tl,Rl;function G0(t,e,n){return e&&function(r,i){for(var o=0;o<i.length;o++){var s=i[o];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(r,dA(s.key),s)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function W0(t,e,n){return e=na(e),function(r,i){if(i&&(Ai(i)=="object"||typeof i=="function"))return i;if(i!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}(r)}(t,uA()?Reflect.construct(e,n||[],na(t).constructor):e.apply(t,n))}function uA(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(uA=function(){return!!t})()}function na(t){return na=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},na(t)}function yc(t,e){return yc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},yc(t,e)}function dA(t){var e=function(n,r){if(Ai(n)!="object"||!n)return n;var i=n[Symbol.toPrimitive];if(i!==void 0){var o=i.call(n,r);if(Ai(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(n)}(t,"string");return Ai(e)=="symbol"?e:e+""}var Ji=Tm,X0=z0.createFocusTrap,K0=Y0.isFocusable,q0=parseInt((Tl=(Rl=/^(\d+)\./.exec(Ji.version))===null||Rl===void 0?void 0:Rl[1])!==null&&Tl!==void 0?Tl:0,10),Nc=function(){function t(e){var n;(function(o,s){if(!(o instanceof s))throw new TypeError("Cannot call a class as a function")})(this,t),function(o,s,a){(s=dA(s))in o?Object.defineProperty(o,s,{value:a,enumerable:!0,configurable:!0,writable:!0}):o[s]=a}(n=W0(this,t,[e]),"getNodeForOption",function(o){var s,a=(s=this.internalOptions[o])!==null&&s!==void 0?s:this.originalOptions[o];if(typeof a=="function"){for(var l=arguments.length,u=new Array(l>1?l-1:0),c=1;c<l;c++)u[c-1]=arguments[c];a=a.apply(void 0,u)}if(a===!0&&(a=void 0),!a){if(a===void 0||a===!1)return a;throw new Error("`".concat(o,"` was specified but was not a node, or did not return a node"))}var h,d=a;if(typeof a=="string"&&!(d=(h=this.getDocument())===null||h===void 0?void 0:h.querySelector(a)))throw new Error("`".concat(o,"` as selector refers to no known node"));return d}),n.handleDeactivate=n.handleDeactivate.bind(n),n.handlePostDeactivate=n.handlePostDeactivate.bind(n),n.handleClickOutsideDeactivates=n.handleClickOutsideDeactivates.bind(n),n.internalOptions={returnFocusOnDeactivate:!1,checkCanReturnFocus:null,onDeactivate:n.handleDeactivate,onPostDeactivate:n.handlePostDeactivate,clickOutsideDeactivates:n.handleClickOutsideDeactivates},n.originalOptions={returnFocusOnDeactivate:!0,onDeactivate:null,onPostDeactivate:null,checkCanReturnFocus:null,clickOutsideDeactivates:!1};var r=e.focusTrapOptions;for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(i!=="returnFocusOnDeactivate"&&i!=="onDeactivate"&&i!=="onPostDeactivate"&&i!=="checkCanReturnFocus"&&i!=="clickOutsideDeactivates"?n.internalOptions[i]=r[i]:n.originalOptions[i]=r[i]);return n.outsideClick=null,n.focusTrapElements=e.containerElements||[],n.updatePreviousElement(),n}return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&yc(e,n)}(t,Ji.Component),G0(t,[{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 n=typeof this.originalOptions.clickOutsideDeactivates=="function"?this.originalOptions.clickOutsideDeactivates.call(null,e):this.originalOptions.clickOutsideDeactivates;return n&&(this.outsideClick={target:e.target,allowDeactivation:n}),n}},{key:"handleDeactivate",value:function(){this.originalOptions.onDeactivate&&this.originalOptions.onDeactivate.call(null),this.deactivateTrap()}},{key:"handlePostDeactivate",value:function(){var e=this,n=function(){var r=e.getReturnFocusNode(),i=!(!e.originalOptions.returnFocusOnDeactivate||r==null||!r.focus||e.outsideClick&&(!e.outsideClick.allowDeactivation||K0(e.outsideClick.target,e.internalOptions.tabbableOptions))),o=e.internalOptions.preventScroll,s=o!==void 0&&o;i&&r.focus({preventScroll:s}),e.originalOptions.onPostDeactivate&&e.originalOptions.onPostDeactivate.call(null),e.outsideClick=null};this.originalOptions.checkCanReturnFocus?this.originalOptions.checkCanReturnFocus.call(null,this.getReturnFocusNode()).then(n,n):n()}},{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 n=!e.active&&this.props.active,r=e.active&&!this.props.active,i=!e.paused&&this.props.paused,o=e.paused&&!this.props.paused;if(n&&(this.updatePreviousElement(),this.focusTrap.activate()),r)return void this.deactivateTrap();i&&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,n=this.props.children?Ji.Children.only(this.props.children):void 0;if(n){if(n.type&&n.type===Ji.Fragment)throw new Error("A focus-trap cannot use a Fragment as its child container. Try replacing it with a <div> element.");return Ji.cloneElement(n,{ref:function(r){var i=e.props.containerElements;n&&(q0>=19?typeof n.props.ref=="function"?n.props.ref(r):n.props.ref&&(n.props.ref.current=r):typeof n.ref=="function"?n.ref(r):n.ref&&(n.ref.current=r)),e.focusTrapElements=i||[r]}})}return null}}])}();Nc.defaultProps={active:!0,paused:!1,focusTrapOptions:{},_createFocusTrap:X0},lA.exports=Nc;var J0=lA.exports.FocusTrap=Nc;function hA(t){var 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}=se(()=>({anchor:Kp(r),boundary:i?Kp(i):void 0}),[r,i]);let h=[];c&&(h=[J_({boundary:c,fallbackPlacements:["top-start","top-end","bottom-start","bottom-end","top","bottom"]}),T0({boundary:c,padding:8}),R0({boundary:c})]);const{refs:d,floatingStyles:p,middlewareData:f}=q_({placement:n,middleware:h,whileElementsMounted:X_});ft(()=>{u&&d.setReference(u)},[d,u]);const m=o?L(J0,{focusTrapOptions:{initialFocus:s,fallbackFocus:".t-fallback-focus",allowOutsideClick:!0,tabbableOptions:{getShadowRoot:!0}},children:L("div",{children:[e,L("span",{className:"t-fallback-focus",tabIndex:-1})]})}):e,E=L("div",{ref:d.setFloating,style:{...p,zIndex:1e3,visibility:(A=f.hide)!=null&&A.referenceHidden?"hidden":"visible"},...l,children:m});if(a){const g=(_=c||u)==null?void 0:_.closest("[t-menu-boundary='root']");return L(x0,{root:g,children:E})}return E}function Kp(t){return typeof t=="string"?document.querySelector(t):t}function pA(t){const e=he(),n=xo(),r=te(n.state$.suggestMentionQuery),i=Cu(te(e.state$.currentConversationId),r?1e3:0),o=se(()=>(i!=null?i:[]).map(E=>E.user),[i]),[s,a]=ae(0),l=se(()=>Object.fromEntries(o.map(E=>[E.id,AO(E.name)])),[o]),u=se(()=>{if(!r)return[];const E=qp(r);return E===""?o:o.filter(A=>l[A.id].some(_=>function(g,O){return np(g.substring(0,O.length),O)}(_,E)))},[r,o,l]),c=Q(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 h=ee(E=>{var _;const A=(_=u[E])==null?void 0:_.id;return A&&"mention-button-"+A},[u]),{containerProps:d,itemProps:p}=F_({focused:s,setFocused:a,buttonId:h});if(Z(()=>{if(u.length!==0)return n.listenKeydown("mention",E=>x_(E,{dir:"ttb",focused:s,setFocused:a,itemCount:u.length,onSpace(){if(r){const A=u[s];if(np(A.name,qp(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]),$o(()=>n.closeSuggester(),".t-mention-suggest-list",u.length>0),u.length===0)return null;const f=document.querySelector(".ProseMirror-suggestion");let m;if(f){let E=f.getBoundingClientRect();m={getBoundingClientRect(){const A=f.getBoundingClientRect();return A.width>0&&(E=A),E}}}return L(hA,{className:"t-mention-suggest-list",...d,anchorElement:m,children:u.map((E,A)=>L(Z0,{user:E,isFocused:A===s,onSelect:()=>n.selectMention(E),...p(A)},E.id))})}const Z0=Un(function(t){const{user:e,isFocused:n,onSelect:r,...i}=t;return L("button",{className:n?"focused":"",onClick:()=>r(e.id),...i,children:e.name})});function qp(t){return de(t[0]==="@"),t.substring(1)}function Jp(t,e,n){const r=Pu(t),i=r.indexOf(e);return i===-1?null:r[i+n]||null}const Q0=jt(function(t,e){const{children:n,triggerElement:r}=t,{closePopover:i}=iu(),o=Q(null);jn(e,()=>o.current),Z(()=>{var a;(a=o.current)==null||a.focus()},[]);const s=ee(a=>{(function(l,u,c,h){var E;const d=u.querySelectorAll("[t-menu-item]"),p=document.activeElement;if(!p||!p.hasAttribute("t-menu-item")&&!p.hasAttribute("t-menu"))return;const f=Array.from(d).indexOf(p);let m;switch(l.key){case"ArrowDown":m=Math.min(f+1,d.length-1);break;case"ArrowUp":m=Math.max(f-1,0),f===-1&&(m=d.length-1);break;case"Home":m=0;break;case"End":m=d.length-1;break;case"Tab":{const A=c.closest("t-chatbox,t-conversation-list,.t-chatbox,.t-conversation-list"),_=l.shiftKey?Jp(A,c,-1):function(g,O){return Jp(g,O,1)}(A,c);return _==null||_.focus(),void h()}default:return}(E=d[m])==null||E.focus()})(a,o.current,r,i)},[i,r]);return L("div",{"t-menu":"",role:"menu",tabIndex:-1,ref:o,onKeyDown:s,children:n})});function li(t){const{popoverComponent:e,popoverProps:n,children:r,type:i="popover",initialFocus:o,portal:s,...a}=t,[l,u]=ae(void 0),c=Q(null),[h,d]=ae(!1);$o(ee(f=>{var m,E;f&&((m=c.current)!=null&&m.contains(f.target))||(d(!1),(E=c.current)==null||E.focus())},[]),"[t-popover-content]",h);const p=i==="menu"?L(Q0,{triggerElement:c.current,children:L(e,{...n})}):L(e,{...n});return L(Kg.Provider,{value:{closePopover:()=>d(!1)},children:[L(eT,{...a,"aria-haspopup":i==="menu"?"menu":"true","aria-expanded":h,onTrigger:()=>d(f=>!f),ref:f=>(m=>{var A;const E=(A=m==null?void 0:m.closest("[t-menu-boundary]"))!=null?A:void 0;c.current=m,u(E)})(f),children:r}),h&&L(hA,{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 eT=jt(function(t,e){const{onTrigger:n,...r}=t,i=ee(o=>{o.key!=="Enter"&&o.key!==" "||n()},[n]);return L("button",{...r,ref:e,onClick:n,onKeyDown:i})});function Kn(t){const{onSelect:e,...n}=t,{closePopover:r}=iu(),i=ee(o=>{o.key!=="Enter"&&o.key!==" "||(r(),e==null||e())},[e,r]);return L("div",{tabIndex:-1,role:"menuitem",onClick:ee(()=>{r(),e==null||e()},[r,e]),onKeyDown:i,"t-menu-item":"",...n})}function xu(t){const e=he(),n=Yr(),r=Q(null);Z(()=>()=>{En(()=>{e.type==="ChatboxStore"&&(e.highlightedStrings$.set([]),e.focusedMessage$.set(null))})},[e]);const i=ee(()=>{r.current.blur(),n.jumpToHighlight("up")},[n]),o=ee(s=>{e.type==="ChatboxStore"&&e.state$.enterSendsMessage.peek()&&tp(s)&&s.preventDefault()},[e]);return L("input",{type:"search",enterKeyHint:"search",autoComplete:"off",onKeyUp:ee(s=>{e.type==="ChatboxStore"&&e.state$.enterSendsMessage.peek()&&tp(s)&&(s.preventDefault(),i())},[e,i]),onKeyDown:o,...t,ref:r})}const tT={barHeight:4,barRadius:2,barGap:2,barWidth:2,height:24},Cl={state:null,duration:0,recordingUrl:void 0,uploadState:"done",fileToken:void 0},fA=new WeakMap;function mA({className:t,voiceRecorder:e}){const n=fA.get(e);return n?L("div",{className:t,style:{shapeRendering:"crispEdges"},ref:n}):($e.warn("Can only use Waveform component if a voice recorder is active"),null)}function EA(t,e){return t.map(r=>function(i,o){if(i.type==="text")return function(s,a){const l=Iu(a);return vs(s,l)}(i.children,o);if(i.type==="file"&&i.subtype==="video")return`🎥 ${ns(i.url)}`;if(i.type==="file"&&i.subtype==="image")return`📷 ${ns(i.url)}`;if(i.type==="file"&&i.subtype==="audio")return`🎧 ${ns(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,`📎 ${ns(i.url)}`):i.type==="location"?"📍":""}(r,e)).join(`
96
96
 
97
- `)}function Ds(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 Ds(n.children,e);case"bulletlist":case"bulletList":return`
98
- `+Ds(n.children,e);case"bulletpoint":case"bulletPoint":return"- "+Ds(n.children,e)+`
99
- `;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 pA(t){var h,d,p;const{sender:e}=t,n=xo(),r=sn(),i=rt(),[o,s]=ue(e&&typeof e=="object"?e:null);Z(()=>{typeof e=="string"&&n.user(e).get().then(s)},[n,e]);const a="virtual-message-"+oa(),[l,u]=le(()=>{var m,E;const f=(E=t.content)!=null?E:[{type:"text",children:h_((m=t.text)!=null?m:"")}];return[f,hA(f,{})]},[t.content,t.text]);if(e&&!o)return null;const c={id:a,type:o?"UserMessage":"SystemMessage",sender:o,custom:(h=t.custom)!=null?h:{},createdAt:(d=t.createdAt)!=null?d:-1,editedAt:null,referencedMessage:null,origin:"web",plaintext:u,content:l,reactions:[]};return L(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 fA(t){return YE(t)}function $r(t){var e;return(e=t.photoUrl)!=null?e:function(n,r){const i=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
100
- <rect x="0" y="0" width="100" height="100" fill="${YE(n)}"/>
97
+ `)}function vs(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 vs(n.children,e);case"bulletlist":case"bulletList":return`
98
+ `+vs(n.children,e);case"bulletpoint":case"bulletPoint":return"- "+vs(n.children,e)+`
99
+ `;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 _A(t){var h,d,p;const{sender:e}=t,n=Mi(),r=nn(),i=nt(),[o,s]=ae(e&&typeof e=="object"?e:null);Z(()=>{typeof e=="string"&&n.user(e).get().then(s)},[n,e]);const a="virtual-message-"+sa(),[l,u]=se(()=>{var m,E;const f=(E=t.content)!=null?E:[{type:"text",children:p_((m=t.text)!=null?m:"")}];return[f,EA(f,{})]},[t.content,t.text]);if(e&&!o)return null;const c={id:a,type:o?"UserMessage":"SystemMessage",sender:o,custom:(h=t.custom)!=null?h:{},createdAt:(d=t.createdAt)!=null?d:-1,editedAt:null,referencedMessage:null,origin:"web",plaintext:u,content:l,reactions:[]};return L(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 AA(t){return GE(t)}function Vr(t){var e;return(e=t.photoUrl)!=null?e:function(n,r){const i=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
100
+ <rect x="0" y="0" width="100" height="100" fill="${GE(n)}"/>
101
101
  <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">${r}</text>
102
- </svg>`.replace(/\s+/g," ");return"data:image/svg+xml;base64,"+aO(i)}(t.id,uO(t.name))}function Vo(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 Fu({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=${Tv}`,linkUrl:`https://maps.google.com/maps?q=${n}&z=15`}}function mA(t,e){const[n,r]=ue({long:"",short:""});return mt(()=>{let i,o=!0;const s=()=>{const l=Date.now(),u=function(c,h,d){const p=c-h;let f,m,E;const A=new Date(h),_={month:"short",day:"numeric"};if(p<Qp)return{changeTimeout:5e3,short:d.JUST_NOW,long:d.JUST_NOW};if(p<ef)f=Qp,m="MINUTES",E=d.MINUTES;else if(p<tf)f=ef,m="HOURS",E=d.HOURS;else{if(!(p<q0)){if(A.getFullYear()===new Date(c).getFullYear()){const O=A.toLocaleDateString(d.locale,_);return{changeTimeout:void 0,short:O,long:O}}{const O=A.toLocaleDateString(d.locale,{..._,year:"numeric"});return{changeTimeout:void 0,short:O,long:O}}}f=tf,m="DAYS",E=d.DAYS}const g=Math.floor(p/f);return{changeTimeout:f,short:g+E,long:J0(g,m.toLowerCase(),d.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 ya(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 Zp=864e5;function EA(t,e){const n=Date.now(),r=(i=t,o=n,Math.floor((o-i)/Zp));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,h){return Math.floor((h-c)/(365*Zp))}(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 Qp=6e4,ef=36e5,tf=864e5,q0=6048e5;function J0(t,e,n){return new Intl.RelativeTimeFormat(n).format(-t,e)}function U(t,...e){const n=Dv.bind(Te)(t,...e);return Array.isArray(n)?Te(Ue,{},...n):n}function zo(t,e=10){return Ru(t,Math.min(e,100))}function _A(t){var i,o,s,a,l,u,c,h;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 vo.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:(h=t.waveColor)!=null?h:r.toRgbaString()})}function Yo({src:t,onError:e,filename:n,className:r=""}){const i=Q(null),o=Q(),s=Q(),[a,l]=ue(!1),[u,c]=ue(0),[h,d]=ue(1),p=Q(),[f,m]=ue(!1),E=re(pe().t$),{audioUrl:A,audioName:_,height:g,isRecordingPreviewBlob:O}=le(()=>{const S=new URL(t),v=S.protocol==="blob:"&&S.searchParams.has("name");let y=n!=null?n:"";return v&&(y=S.searchParams.get("name"),S.searchParams.delete("name")),{audioUrl:S,audioName:y,height:v?24:50,isRecordingPreviewBlob:v}},[t,n]),[D,C]=ue(O);Z(()=>{let S;const v=i.current.closest("t-message-list"),y=new IntersectionObserver(function([b]){b.isIntersecting?S=setTimeout(()=>C(!0),500):clearTimeout(S)},{root:v});return y.observe(i.current),()=>{y.disconnect()}},[]),Z(()=>{if(!D)return;o.current=new Audio;const S={normalize:!0,height:g,container:i.current};function v(){const M=o.current;if(!M)return;const k=M.error;(k.message!=="Media failed to load"||M.paused)&&(k.message==="PIPELINE_ERROR_READ: FFmpegDemuxer: demuxer seek failed"?(M.load(),l(!1)):(m(!0),l(!1),e==null||e()))}const y=_.slice(_.lastIndexOf(".")+1);if(function(M){return/(?:^|\/)talkjs_audio_message_[0-9]+_([0-9]+)[.](?:mp3|webm)$/.test(M)}(_)&&y==="webm"&&!o.current.canPlayType("audio/webm;codecs=opus"))S.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 M=o.current;M.addEventListener("error",v),M.preservesPitch=!0,S.url=A.toString(),S.media=M}p.current=_A(S);const b=p.current;return b.on("finish",()=>{o.current.loop=!0,l(!1)}),b.on("ready",M=>c(Math.trunc(M))),b.on("timeupdate",M=>c(Math.trunc(M))),S.backend==="WebAudio"&&b.load(A.toString()).catch(()=>{m(!0),l(!1),e==null||e()}),()=>{var M,k;(M=o.current)==null||M.pause(),(k=o.current)==null||k.removeEventListener("error",v),o.current=void 0,b.destroy(),p.current=void 0}},[A,_,e,D,g]);const T=te(()=>{var S;if(p.current.options.backend==="WebAudio")p.current.isPlaying()||s.current.play(),p.current.playPause(),l((S=p.current.isPlaying())!=null?S:!1);else{const v=o.current;v.paused?v.play():v.pause(),v.loop=!1,!v.paused&&v.ended&&(v.load(),v.play()),l(!v.paused)}},[]),I=te(S=>{p.current.setPlaybackRate(S),d(S)},[]);return L("div",f?{}:{className:`t-audio-player ${r}`,children:[L("button",{onClick:T,children:L(zs,{className:"t-play-pause-icon",type:a?"pause":"play","aria-label":a?E.ARIA_PAUSE_AUDIO:E.ARIA_PLAY_AUDIO})}),L("div",{className:"t-waveform",ref:i,style:{height:g}}),L("div",{className:"t-duration",children:ya(u)}),L(ai,{type:"menu",portal:!0,popoverComponent:Q0,popoverProps:{playbackSpeed:h,selectPlaybackSpeed:I},className:"t-playback-speed","aria-label":E.ARIA_SET_PLAYBACK_SPEED,children:[h,"x",L(zs,{type:"updown",className:"t-up-down-icon","aria-hidden":!0})]})]})}const Z0=[.25,.5,.75,1,1.25,1.5,2];function Q0({playbackSpeed:t,selectPlaybackSpeed:e}){return L("div",{className:"t-playback-speed-menu",children:[L("div",{className:"t-heading",children:"Playback Speed"}),Z0.map(n=>L(qn,{className:"t-menu-item",onSelect:()=>e(n),children:[L("span",{className:"t-playback-checkmark",children:t===n?"✓ ":""}),n,"x"]},n))]})}const eT=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/,tT=/^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(eT))!=null?r:e.match(tT);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 Cl(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(h){h(c)})).then(s,a)}l((r=r.apply(t,[])).next())})}class AA{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 nT extends AA{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 rT extends AA{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 iT=["audio/webm","audio/wav","audio/mpeg","audio/mp4","audio/mp3"];class Hu extends nT{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 rT,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 Hu(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,h,d,p;if(!this.isWaveformPaused){if(o.getFloatTimeDomainData(a),this.options.scrollingWaveform){const f=Math.floor(100*(this.options.scrollingWaveformWindow||0));let m=0;for(let A=0;A<s;A++){const _=Math.abs(a[A]);_>m&&(m=_)}this.dataWindow||(this.dataWindow=new Float32Array(f));const E=new Float32Array(f);if(this.dataWindow&&this.dataWindow.length>0){const A=f-1,_=this.dataWindow.slice(-A);E.set(_,0)}E[f-1]=m,this.dataWindow=E}else if(this.options.continuousWaveform){if(!this.dataWindow){const m=this.options.continuousWaveformDuration?Math.round(100*this.options.continuousWaveformDuration):((h=(c=this.wavesurfer)===null||c===void 0?void 0:c.getWidth())!==null&&h!==void 0?h:0)*window.devicePixelRatio;this.dataWindow=new Float32Array(m)}let f=0;for(let m=0;m<s;m++){const E=Math.abs(a[m]);E>f&&(f=E)}if(l+1>this.dataWindow.length){const m=new Float32Array(2*this.dataWindow.length);m.set(this.dataWindow,0),this.dataWindow=m}this.dataWindow[l]=f,l++}else this.dataWindow=a;if(this.wavesurfer){const f=((p=(d=this.dataWindow)===null||d===void 0?void 0:d.length)!==null&&p!==void 0?p:0)/100;this.wavesurfer.load("",[this.dataWindow],this.options.scrollingWaveform?this.options.scrollingWaveformWindow:f).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(m=>{console.error("Error rendering real-time recording data:",m)})}}},10);return{onDestroy:()=>{clearInterval(u),i==null||i.disconnect(),r==null||r.close()},onEnd:()=>{this.isWaveformPaused=!0,this.stopMic()}}}startMic(e){return Cl(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 Cl(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||iT.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 Cl(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 gA={exports:{}};gA.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(C){if(Array.isArray(C))return C}(O)||function(C,T){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(C)){var I=[],S=!0,v=!1,y=void 0;try{for(var b,M=C[Symbol.iterator]();!(S=(b=M.next()).done)&&(I.push(b.value),!T||I.length!==T);S=!0);}catch(k){v=!0,y=k}finally{try{S||M.return==null||M.return()}finally{if(v)throw y}}return I}}(O,D)||function(C,T){if(C){if(typeof C=="string")return s(C,T);var I=Object.prototype.toString.call(C).slice(8,-1);return I==="Object"&&C.constructor&&(I=C.constructor.name),I==="Map"||I==="Set"?Array.from(C):I==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(I)?s(C,T):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 C=0,T=new Array(D);C<D;C++)T[C]=O[C];return T}function a(O,D){if(!(O instanceof D))throw new TypeError("Cannot call a class as a function")}function l(O,D){for(var C=0;C<D.length;C++){var T=D[C];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(O,T.key,T)}}function u(O,D){return(u=Object.setPrototypeOf||function(C,T){return C.__proto__=T,C})(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(C){return!1}}();return function(){var C,T=d(O);if(D){var I=d(this).constructor;C=Reflect.construct(T,arguments,I)}else C=T.apply(this,arguments);return h(this,C)}}function h(O,D){return!D||i(D)!=="object"&&typeof D!="function"?function(C){if(C===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return C}(O):D}function d(O){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(D){return D.__proto__||Object.getPrototypeOf(D)})(O)}var p,f=n(2),m=f.EventTarget,E=f.defineEventAttribute,A=(0,n(3).detect)(),_=r.AudioContext||r.webkitAudioContext,g=function(O){(function(v,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");v.prototype=Object.create(y&&y.prototype,{constructor:{value:v,writable:!0,configurable:!0}}),y&&u(v,y)})(S,O);var D,C,T,I=c(S);function S(v){var y,b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},M=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};a(this,S);var k=b.mimeType,P=b.audioBitsPerSecond,B=(b.videoBitsPerSecond,b.bitsPerSecond),F=M.encoderWorkerFactory,X=M.OggOpusEncoderWasmPath,G=M.WebMOpusEncoderWasmPath;if((y=I.call(this))._stream=v,y._state="inactive",y._mimeType=k||"",y._audioBitsPerSecond=P||B,y.workerState="inactive",!S.isTypeSupported(y._mimeType))throw new TypeError("invalid arguments, a MIME Type is not supported");switch(S._parseType(y._mimeType).subtype){case"wave":case"wav":y._mimeType="audio/wave";break;case"webm":y._mimeType="audio/webm";break;case"ogg":y._mimeType="audio/ogg";break;default:switch(A&&A.name){case"chrome":case"edge":default:y._mimeType="audio/webm";break;case"firefox":y._mimeType="audio/ogg";break;case"ios":case"safari":y._mimeType="audio/wave"}}switch(y._mimeType){case"audio/wave":y._wasmPath="";break;case"audio/webm":y._wasmPath=G||"";break;case"audio/ogg":y._wasmPath=X||"";break;default:throw new Error("Internal Error: Unexpected MIME Type: ".concat(y._mimeType))}var z="";return document.currentScript?z=document.currentScript.src:self.location&&(z=self.location.href),z=z.substr(0,z.lastIndexOf("/"))+"/encoderWorker.umd.js",typeof S.encoderWorker=="function"&&(z=URL.createObjectURL(new Blob(["(".concat(S.encoderWorker,")()")]))),y._workerFactory=typeof F=="function"?F:function(K){return new Worker(z)},y._spawnWorker(),y}return D=S,T=[{key:"isTypeSupported",value:function(v){if(typeof v=="string"&&!v)return!0;try{var y=S._parseType(v),b=y.type,M=y.subtype,k=y.codec}catch(P){return!1}if(b!=="audio"||M!=="ogg"&&M!=="webm"&&M!=="wave"&&M!=="wav")return!1;switch(M){case"ogg":case"webm":if(k!=="opus"&&k)return!1;break;case"wave":case"wav":if(k)return!1}return!0}},{key:"_parseType",value:function(v){try{var y=o(v.match(/^(\w+)\/(\w+)(;\s*codecs=(\w+))?$/),5),b=y[1],M=y[2],k=y[4]}catch(P){return typeof v!="string"||v?null:{type:"",subtype:"",codec:""}}return{type:b,subtype:M,codec:k}}}],(C=[{key:"_spawnWorker",value:function(){var v=this;this.worker=this._workerFactory(),this.worker.onmessage=function(y){return v._onmessageFromWorker(y)},this.worker.onerror=function(y){return v._onerrorFromWorker(y)},this._postMessageToWorker("loadEncoder",{mimeType:this._mimeType,wasmPath:this._wasmPath})}},{key:"_postMessageToWorker",value:function(v){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};switch(v){case"loadEncoder":var b=y.mimeType,M=y.wasmPath;this.worker.postMessage({command:v,mimeType:b,wasmPath:M});break;case"init":var k=y.sampleRate,P=y.channelCount,B=y.bitsPerSecond;this.worker.postMessage({command:v,sampleRate:k,channelCount:P,bitsPerSecond:B}),this.workerState="encoding",this.source.connect(this.processor),this.processor.connect(this.context.destination);var F=new r.Event("start");this.dispatchEvent(F);break;case"pushInputData":var X=y.channelBuffers,G=y.length,z=y.duration;this.worker.postMessage({command:v,channelBuffers:X,length:G,duration:z});break;case"getEncodedData":case"done":this.worker.postMessage({command:v});break;default:throw new Error("Internal Error: Incorrect postMessage requested.")}}},{key:"_onmessageFromWorker",value:function(v){var y,b=v.data,M=b.command,k=b.buffers;switch(M){case"readyToInit":var P=this.sampleRate,B=this.channelCount;this.workerState="readyToInit",this.state==="recording"&&this._postMessageToWorker("init",{sampleRate:P,channelCount:B,bitsPerSecond:this.audioBitsPerSecond});break;case"encodedData":case"lastEncodedData":var F=new Blob(k,{type:this._mimeType});(y=new r.Event("dataavailable")).data=F,this.dispatchEvent(y),M==="lastEncodedData"&&(y=new r.Event("stop"),this.dispatchEvent(y),this.workerState="closed")}}},{key:"_onerrorFromWorker",value:function(v){this.source.disconnect(),this.processor.disconnect(),this.worker.terminate(),this.workerState="closed";var y=["FileName: "+v.filename,"LineNumber: "+v.lineno,"Message: "+v.message].join(" - "),b=new r.Event("error");b.name="UnknownError",b.message=y,this.dispatchEvent(b)}},{key:"_enableAudioProcessCallback",value:function(v){var y=this,b=0;this.processor.onaudioprocess=function(M){for(var k=M.inputBuffer,P=(M.playbackTime,k.sampleRate,k.length),B=k.duration,F=k.numberOfChannels,X=new Array(F),G=0;G<F;G++)X[G]=k.getChannelData(G);var z={channelBuffers:X,length:P,duration:B};y._postMessageToWorker("pushInputData",z),(b+=B)>=v&&(y._postMessageToWorker("getEncodedData"),b=0)}}},{key:"start",value:function(){var v=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(v<0)throw new TypeError("invalid arguments, timeslice should be 0 or higher.");v/=1e3,this.workerState==="closed"&&this._spawnWorker(),this.context=new _;var y=this.stream.getAudioTracks();if(!y[0])throw new Error("DOMException: UnkownError, media track not found.");if(this.channelCount=y[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(v),this.workerState==="readyToInit"){var b=this.sampleRate,M=this.channelCount;this._postMessageToWorker("init",{sampleRate:b,channelCount:M,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 v=new r.Event("pause");this.dispatchEvent(v),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 v=new r.Event("resume");this.dispatchEvent(v),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,C),T&&l(D,T),S}(m);["start","stop","dataavailable","pause","resume","error"].forEach(function(O){return E(g.prototype,O)}),A&&A.name==="edge"&&(p=Worker.prototype.postMessage,Worker.prototype.postMessage=function(O){p.apply(this,[O])}),t.exports=g}).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 m}),n.d(e,"EventTarget",function(){return A});const r=new WeakMap,i=new WeakMap;function o(_){const g=r.get(_);return console.assert(g!=null,"'this' is expected an Event object, but got",_),g}function s(_,g){r.set(this,{eventTarget:_,event:g,eventPhase:2,currentTarget:_,canceled:!1,stopped:!1,passiveListener:null,timeStamp:g.timeStamp||Date.now()}),Object.defineProperty(this,"isTrusted",{value:!1,enumerable:!0});const O=Object.keys(g);for(let D=0;D<O.length;++D){const C=O[D];C in this||Object.defineProperty(this,C,a(C))}}function a(_){return{get(){return o(this).event[_]},set(g){o(this).event[_]=g},configurable:!0,enumerable:!0}}function l(_){return{value(){const g=o(this).event;return g[_].apply(g,arguments)},configurable:!0,enumerable:!0}}function u(_){if(_==null||_===Object.prototype)return s;let g=i.get(_);return g==null&&(g=function(O,D){const C=Object.keys(D);if(C.length===0)return O;function T(I,S){O.call(this,I,S)}T.prototype=Object.create(O.prototype,{constructor:{value:T,configurable:!0,writable:!0}});for(let I=0;I<C.length;++I){const S=C[I];if(!(S in O.prototype)){const v=typeof Object.getOwnPropertyDescriptor(D,S).value=="function";Object.defineProperty(T.prototype,S,v?l(S):a(S))}}return T}(u(Object.getPrototypeOf(_)),_),i.set(_,g)),g}function c(_){return o(_).stopped}function h(_,g){o(_).passiveListener=g}s.prototype={get type(){return o(this).event.type},get target(){return o(this).eventTarget},get currentTarget(){return o(this).currentTarget},composedPath(){const _=o(this).currentTarget;return _==null?[]:[_]},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 _=o(this);typeof _.event.stopPropagation=="function"&&_.event.stopPropagation()},stopImmediatePropagation(){const _=o(this);_.stopped=!0,typeof _.event.stopImmediatePropagation=="function"&&_.event.stopImmediatePropagation()},get bubbles(){return!!o(this).event.bubbles},get cancelable(){return!!o(this).event.cancelable},preventDefault(){const _=o(this);_.passiveListener==null?_.event.cancelable&&(_.canceled=!0,typeof _.event.preventDefault=="function"&&_.event.preventDefault()):console.warn("Event#preventDefault() was called from a passive listener:",_.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 d=new WeakMap;function p(_){return _!==null&&typeof _=="object"}function f(_){const g=d.get(_);if(g==null)throw new TypeError("'this' is expected an EventTarget object, but got another value.");return g}function m(_,g){Object.defineProperty(_,"on"+g,function(O){return{get(){let D=f(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 C=f(this);let T=null,I=C.get(O);for(;I!=null;)I.listenerType===3?T!==null?T.next=I.next:I.next!==null?C.set(O,I.next):C.delete(O):T=I,I=I.next;if(D!==null){const S={listener:D,listenerType:3,passive:!1,once:!1,next:null};T===null?C.set(O,S):T.next=S}},configurable:!0,enumerable:!0}}(g))}function E(_){function g(){A.call(this)}g.prototype=Object.create(A.prototype,{constructor:{value:g,configurable:!0,writable:!0}});for(let O=0;O<_.length;++O)m(g.prototype,_[O]);return g}function A(){if(!(this instanceof A)){if(arguments.length===1&&Array.isArray(arguments[0]))return E(arguments[0]);if(arguments.length>0){const _=new Array(arguments.length);for(let g=0;g<arguments.length;++g)_[g]=arguments[g];return E(_)}throw new TypeError("Cannot call a class as a function")}d.set(this,new Map)}A.prototype={addEventListener(_,g,O){if(g==null)return!1;if(typeof g!="function"&&!p(g))throw new TypeError("'listener' should be a function or an object.");const D=f(this),C=p(O),T=(C?O.capture:O)?1:2,I={listener:g,listenerType:T,passive:C&&!!O.passive,once:C&&!!O.once,next:null};let S=D.get(_);if(S===void 0)return D.set(_,I),!0;let v=null;for(;S!=null;){if(S.listener===g&&S.listenerType===T)return!1;v=S,S=S.next}return v.next=I,!0},removeEventListener(_,g,O){if(g==null)return!1;const D=f(this),C=(p(O)?O.capture:O)?1:2;let T=null,I=D.get(_);for(;I!=null;){if(I.listener===g&&I.listenerType===C)return T!==null?T.next=I.next:I.next!==null?D.set(_,I.next):D.delete(_),!0;T=I,I=I.next}return!1},dispatchEvent(_){if(_==null||typeof _.type!="string")throw new TypeError('"event.type" should be a string.');const g=f(this),O=_.type;let D=g.get(O);if(D==null)return!0;const C=function(I,S){return new(u(Object.getPrototypeOf(S)))(I,S)}(this,_);let T=null;for(;D!=null;){if(D.once?T!==null?T.next=D.next:D.next!==null?g.set(O,D.next):g.delete(O):T=D,h(C,D.passive?D.listener:null),typeof D.listener=="function")try{D.listener.call(this,C)}catch(I){typeof console!="undefined"&&typeof console.error=="function"&&console.error(I)}else D.listenerType!==3&&typeof D.listener.handleEvent=="function"&&D.listener.handleEvent(C);if(c(C))break;D=D.next}return h(C,null),function(I,S){o(I).eventPhase=S}(C,0),function(I,S){o(I).currentTarget=S}(C,null),!C.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,f=0,m=arguments.length;f<m;f++)p+=arguments[f].length;var E=Array(p),A=0;for(f=0;f<m;f++)for(var _=arguments[f],g=0,O=_.length;g<O;g++,A++)E[A]=_[g];return E};Object.defineProperty(e,"__esModule",{value:!0});var o=function(p,f,m){this.name=p,this.version=f,this.os=m};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 f=p!==""&&l.reduce(function(_,g){var O=g[0],D=g[1];if(_)return _;var C=D.exec(p);return!!C&&[O,C]},!1);if(!f)return null;var m=f[0],E=f[1];if(m==="searchbot")return new a;var A=E[1]&&E[1].split(/[._]/).slice(0,3);return A?A.length<3&&(A=i(A,function(_){for(var g=[],O=0;O<_;O++)g.push("0");return g}(3-A.length))):A=[],new o(m,A.join("."),h(p))}function h(p){for(var f=0,m=u.length;f<m;f++){var E=u[f],A=E[0];if(E[1].test(p))return A}return null}function d(){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):d()},e.parseUserAgent=c,e.detectOS=h,e.getNodeVersion=d}).call(this,n(4))},function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(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(_){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,h=-1;function d(){c&&l&&(c=!1,l.length?u=l.concat(u):h=-1,u.length&&p())}function p(){if(!c){var E=a(d);c=!0;for(var A=u.length;A;){for(l=u,u=[];++h<A;)l&&l[h].run();h=-1,A=u.length}l=null,c=!1,function(_){if(r===clearTimeout)return clearTimeout(_);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(_);try{r(_)}catch(g){try{return r.call(null,_)}catch(O){return r.call(this,_)}}}(E)}}function f(E,A){this.fun=E,this.array=A}function m(){}i.nextTick=function(E){var A=new Array(arguments.length-1);if(arguments.length>1)for(var _=1;_<arguments.length;_++)A[_-1]=arguments[_];u.push(new f(E,A)),u.length!==1||c||a(p)},f.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=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,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}}]);const oT=eu(gA.exports);var nf,Il,SA={exports:{}};nf=SA,typeof OpusMediaRecorder!="undefined"&&OpusMediaRecorder,Il=function(){return function(){(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}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=5)})([function(t,e,n){(function(r){function i(a,l){for(var u=0,c=a.length-1;c>=0;c--){var h=a[c];h==="."?a.splice(c,1):h===".."?(a.splice(c,1),u++):u&&(a.splice(c,1),u--)}if(l)for(;u--;u)a.unshift("..");return a}function o(a,l){if(a.filter)return a.filter(l);for(var u=[],c=0;c<a.length;c++)l(a[c],c,a)&&u.push(a[c]);return u}e.resolve=function(){for(var a="",l=!1,u=arguments.length-1;u>=-1&&!l;u--){var c=u>=0?arguments[u]:r.cwd();if(typeof c!="string")throw new TypeError("Arguments to path.resolve must be strings");c&&(a=c+"/"+a,l=c.charAt(0)==="/")}return(l?"/":"")+(a=i(o(a.split("/"),function(h){return!!h}),!l).join("/"))||"."},e.normalize=function(a){var l=e.isAbsolute(a),u=s(a,-1)==="/";return(a=i(o(a.split("/"),function(c){return!!c}),!l).join("/"))||l||(a="."),a&&u&&(a+="/"),(l?"/":"")+a},e.isAbsolute=function(a){return a.charAt(0)==="/"},e.join=function(){var a=Array.prototype.slice.call(arguments,0);return e.normalize(o(a,function(l,u){if(typeof l!="string")throw new TypeError("Arguments to path.join must be strings");return l}).join("/"))},e.relative=function(a,l){function u(E){for(var A=0;A<E.length&&E[A]==="";A++);for(var _=E.length-1;_>=0&&E[_]==="";_--);return A>_?[]:E.slice(A,_-A+1)}a=e.resolve(a).substr(1),l=e.resolve(l).substr(1);for(var c=u(a.split("/")),h=u(l.split("/")),d=Math.min(c.length,h.length),p=d,f=0;f<d;f++)if(c[f]!==h[f]){p=f;break}var m=[];for(f=p;f<c.length;f++)m.push("..");return(m=m.concat(h.slice(p))).join("/")},e.sep="/",e.delimiter=":",e.dirname=function(a){if(typeof a!="string"&&(a+=""),a.length===0)return".";for(var l=a.charCodeAt(0),u=l===47,c=-1,h=!0,d=a.length-1;d>=1;--d)if((l=a.charCodeAt(d))===47){if(!h){c=d;break}}else h=!1;return c===-1?u?"/":".":u&&c===1?"/":a.slice(0,c)},e.basename=function(a,l){var u=function(c){typeof c!="string"&&(c+="");var h,d=0,p=-1,f=!0;for(h=c.length-1;h>=0;--h)if(c.charCodeAt(h)===47){if(!f){d=h+1;break}}else p===-1&&(f=!1,p=h+1);return p===-1?"":c.slice(d,p)}(a);return l&&u.substr(-1*l.length)===l&&(u=u.substr(0,u.length-l.length)),u},e.extname=function(a){typeof a!="string"&&(a+="");for(var l=-1,u=0,c=-1,h=!0,d=0,p=a.length-1;p>=0;--p){var f=a.charCodeAt(p);if(f!==47)c===-1&&(h=!1,c=p+1),f===46?l===-1?l=p:d!==1&&(d=1):l!==-1&&(d=-1);else if(!h){u=p+1;break}}return l===-1||c===-1||d===0||d===1&&l===c-1&&l===u+1?"":a.slice(l,c)};var s="ab".substr(-1)==="b"?function(a,l,u){return a.substr(l,u)}:function(a,l,u){return l<0&&(l=a.length+l),a.substr(l,u)}}).call(this,n(2))},function(t,e){function n(A){return(n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(_){return typeof _}:function(_){return _&&typeof Symbol=="function"&&_.constructor===Symbol&&_!==Symbol.prototype?"symbol":typeof _})(A)}function r(A,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");A.prototype=Object.create(_&&_.prototype,{constructor:{value:A,writable:!0,configurable:!0}}),_&&i(A,_)}function i(A,_){return(i=Object.setPrototypeOf||function(g,O){return g.__proto__=O,g})(A,_)}function o(A){var _=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(g){return!1}}();return function(){var g,O=a(A);if(_){var D=a(this).constructor;g=Reflect.construct(O,arguments,D)}else g=O.apply(this,arguments);return s(this,g)}}function s(A,_){return!_||n(_)!=="object"&&typeof _!="function"?function(g){if(g===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g}(A):_}function a(A){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(_){return _.__proto__||Object.getPrototypeOf(_)})(A)}function l(A,_){if(!(A instanceof _))throw new TypeError("Cannot call a class as a function")}function u(A,_,g){return _&&function(O,D){for(var C=0;C<D.length;C++){var T=D[C];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(O,T.key,T)}}(A.prototype,_),A}var c=function(){function A(_,g,O,D){switch(l(this,A),this._size=g,this._module=_,this._size){case 1:this._heapArray=O?this._module.HEAP8:this._module.HEAPU8;break;case 2:this._heapArray=O?this._module.HEAP16:this._module.HEAPU16;break;case 4:this._heapArray=O?this._module.HEAP32:this._module.HEAPU32;break;default:this._heapArray=this._module.HEAPU8}D&&(this._size=4,this._heapArray=this._module.HEAPF32),this._pointer=this._module._malloc(g)}return u(A,[{key:"free",value:function(){this._module._free(this.pointer)}},{key:"pointer",get:function(){return this._pointer}},{key:"value",get:function(){var _=0;switch(this._size){case 2:_=1;break;case 4:_=2;break;default:throw new Error("Pointer can be only deferenced as integer-sized")}return this._heapArray[this.pointer>>_]},set:function(_){var g=0;switch(this._size){case 2:g=1;break;case 4:g=2;break;default:throw new Error("Pointer can be only deferenced as integer-sized")}this._heapArray[this.pointer>>g]=_}}]),A}(),h=function(A){r(g,A);var _=o(g);function g(O,D){var C;return l(this,g),C=_.call(this,O,4,!0,!1),D!==void 0&&(C.value=D),C}return g}(c),d=function(A){r(g,A);var _=o(g);function g(O,D){var C;return l(this,g),C=_.call(this,O,4,!1,!1),D!==void 0&&(C.value=D),C}return g}(c),p=function(A){r(g,A);var _=o(g);function g(O,D,C,T,I){var S;l(this,g),S=_.call(this,O,D*C,T,I);var v=0;switch(C){case 1:S._heapArray=T?S._module.HEAP8:S._module.HEAPU8,v=0;break;case 2:S._heapArray=T?S._module.HEAP16:S._module.HEAPU16,v=1;break;case 4:S._heapArray=T?S._module.HEAP32:S._module.HEAPU32,v=2;break;default:throw new Error("Unit size must be an integer-size")}I&&(S._heapArray=S._module.HEAPF32,v=2);var y=S._pointer>>v;return S._buffer=S._heapArray.subarray(y,y+D),S._length=D,S}return u(g,[{key:"set",value:function(O,D){this._buffer.set(O,D)}},{key:"subarray",value:function(O,D){return this._buffer.subarray(O,D)}},{key:"length",get:function(){return this._length}}]),g}(c),f=function(A){r(g,A);var _=o(g);function g(O,D){return l(this,g),_.call(this,O,D,4,!0,!0)}return g}(p),m=function(A){r(g,A);var _=o(g);function g(O,D){return l(this,g),_.call(this,O,D,1,!1,!1)}return g}(p),E=function(){function A(_){l(this,A),this._module=_}return u(A,[{key:"mallocInt32",value:function(_){return new h(this._module,_)}},{key:"mallocUint32",value:function(_){return new d(this._module,_)}},{key:"mallocUint8Buffer",value:function(_){return new m(this._module,_)}},{key:"mallocFloat32Buffer",value:function(_){return new f(this._module,_)}}]),A}();t.exports={writeString:function(A,_,g){for(var O=0;O<g.length;O++)A.setUint8(_+O,g.charCodeAt(O))},EmscriptenMemoryAllocator:E}},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(_){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,h=-1;function d(){c&&l&&(c=!1,l.length?u=l.concat(u):h=-1,u.length&&p())}function p(){if(!c){var E=a(d);c=!0;for(var A=u.length;A;){for(l=u,u=[];++h<A;)l&&l[h].run();h=-1,A=u.length}l=null,c=!1,function(_){if(r===clearTimeout)return clearTimeout(_);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(_);try{r(_)}catch(g){try{return r.call(null,_)}catch(O){return r.call(this,_)}}}(E)}}function f(E,A){this.fun=E,this.array=A}function m(){}i.nextTick=function(E){var A=new Array(arguments.length-1);if(arguments.length>1)for(var _=1;_<arguments.length;_++)A[_-1]=arguments[_];u.push(new f(E,A)),u.length!==1||c||a(p)},f.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=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,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}},function(t,e){t.exports=function(n){return n.webpackPolyfill||(n.deprecate=function(){},n.paths=[],n.children||(n.children=[]),Object.defineProperty(n,"loaded",{enumerable:!0,get:function(){return n.l}}),Object.defineProperty(n,"id",{enumerable:!0,get:function(){return n.i}}),n.webpackPolyfill=1),n}},function(t,e){},function(t,e,n){function r(i){var o,s=n(6),a=n(7),l=n(8);i.onmessage=function(u){var c=u.data.command;switch(c){case"loadEncoder":var h,d=u.data,p=d.mimeType,f=d.wasmPath;switch(p){case"audio/wav":case"audio/wave":h=s;break;case"audio/webm":h=a;break;case"audio/ogg":h=l}var m={};f&&(m.locateFile=function(I,S){return I.match(/.wasm/)?f:S+I}),h(m).then(function(I){o=I,self.postMessage({command:"readyToInit"})});break;case"init":var E=u.data,A=E.sampleRate,_=E.channelCount,g=E.bitsPerSecond;o.init(A,_,g);break;case"pushInputData":for(var O=u.data,D=O.channelBuffers,C=(O.length,O.duration,0);C<D.length;C++)D[C]=new Float32Array(D[C].buffer);o.encode(D);break;case"getEncodedData":case"done":c==="done"&&o.close();var T=o.flush();self.postMessage({command:c==="done"?"lastEncodedData":"encodedData",buffers:T},T),c==="done"&&self.close()}}}typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&r(self),t.exports=r},function(t,e,n){function r(a,l){(l==null||l>a.length)&&(l=a.length);for(var u=0,c=new Array(l);u<l;u++)c[u]=a[u];return c}var i=n(1).writeString,o=Int16Array.BYTES_PER_ELEMENT,s=function(){function a(u,c,h){(function(d,p){if(!(d instanceof p))throw new TypeError("Cannot call a class as a function")})(this,a),this.config={inputSampleRate:u,channelCount:c},this.encodedBuffers=[]}var l;return(l=[{key:"encode",value:function(u){for(var c=u[0].length,h=new ArrayBuffer(c*o*this.config.channelCount),d=new DataView(h),p=0;p<this.config.channelCount;p++)for(var f=u[p],m=0;m<c;m++){var E=32767*f[m]|0;E>32767?E=32767:E<-32768&&(E=-32768);var A=(m*this.config.channelCount+p)*o;d.setInt16(A,0|E,!0)}this.encodedBuffers.push(h)}},{key:"getHeader",value:function(){var u=this.encodedBuffers.reduce(function(d,p){return d+p.byteLength},0),c=new ArrayBuffer(44),h=new DataView(c);return i(h,0,"RIFF"),h.setUint32(4,36+u,!0),i(h,8,"WAVE"),i(h,12,"fmt "),h.setUint32(16,16,!0),h.setUint16(20,1,!0),h.setUint16(22,this.config.channelCount,!0),h.setUint32(24,this.config.inputSampleRate,!0),h.setUint32(28,this.config.inputSampleRate*o*this.config.channelCount,!0),h.setUint16(32,o*this.config.channelCount,!0),h.setUint16(34,8*o,!0),i(h,36,"data"),h.setUint32(40,u,!0),c}}])&&function(u,c){for(var h=0;h<c.length;h++){var d=c[h];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(u,d.key,d)}}(a.prototype,l),a}();t.exports=function(a){return new Promise(function(l,u){(a=a!==void 0&&a||{}).init=function(c,h,d){a.encoder=new s(c,h,d)},a.encode=function(c){a.encoder.encode(c)},a.flush=function(){var c=a.encoder.getHeader(),h=a.encoder.encodedBuffers.splice(0,a.encoder.encodedBuffers.length);return[c].concat(function(d){return function(p){if(Array.isArray(p))return r(p)}(d)||function(p){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(p))return Array.from(p)}(d)||function(p,f){if(p){if(typeof p=="string")return r(p,f);var m=Object.prototype.toString.call(p).slice(8,-1);return m==="Object"&&p.constructor&&(m=p.constructor.name),m==="Map"||m==="Set"?Array.from(p):m==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(m)?r(p,f):void 0}}(d)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
104
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}(h))},a.close=function(){},l(a)})}},function(t,e,n){(function(r,i,o,s){var a;function l(d){return(l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p})(d)}function u(d,p,f){return p&&function(m,E){for(var A=0;A<E.length;A++){var _=E[A];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(m,_.key,_)}}(d.prototype,p),d}var c,h=(c=(c=typeof document!="undefined"&&document.currentScript?document.currentScript.src:void 0)||r,function(d){d=(d=d||{})!==void 0?d:{};var p=n(1).EmscriptenMemoryAllocator,f=48e3,m=function(){function R(N,x){var $=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;(function(Y,V){if(!(Y instanceof V))throw new TypeError("Cannot call a class as a function")})(this,R),this.config={inputSampleRate:N,channelCount:x},this.memory=new p(d),this._opus_encoder_create=d._opus_encoder_create,this._opus_encoder_ctl=d._opus_encoder_ctl,this._opus_encode_float=d._opus_encode_float,this._opus_encoder_destroy=d._opus_encoder_destroy,this._speex_resampler_init=d._speex_resampler_init,this._speex_resampler_process_interleaved_float=d._speex_resampler_process_interleaved_float,this._speex_resampler_destroy=d._speex_resampler_destroy,this._container=new d.Container,this._container.init(f,x,Math.floor(4294967295*Math.random())),this.OpusInitCodec(f,x,$),this.SpeexInitResampler(N,f,x),this.inputSamplesPerChannel=20*N/1e3,this.outputSamplePerChannel=960,this.inputBufferIndex=0,this.mInputBuffer=this.memory.mallocFloat32Buffer(this.inputSamplesPerChannel*x),this.mResampledBuffer=this.memory.mallocFloat32Buffer(this.outputSamplePerChannel*x),this.mOutputBuffer=this.memory.mallocUint8Buffer(4e3),this.interleavedBuffers=x!==1?new Float32Array(4096*x):void 0}return u(R,[{key:"encode",value:function(N){for(var x=this.interleave(N),$=0;$<x.length;){var Y=Math.min(this.mInputBuffer.length-this.inputBufferIndex,x.length-$);if(this.mInputBuffer.set(x.subarray($,$+Y),this.inputBufferIndex),this.inputBufferIndex+=Y,this.inputBufferIndex>=this.mInputBuffer.length){var V=this.memory.mallocUint32(this.inputSamplesPerChannel),oe=this.memory.mallocUint32(this.outputSamplePerChannel),be=this._speex_resampler_process_interleaved_float(this.resampler,this.mInputBuffer.pointer,V.pointer,this.mResampledBuffer.pointer,oe.pointer);if(V.free(),oe.free(),be!==0)throw new Error("Resampling error.");var He=this._opus_encode_float(this.encoder,this.mResampledBuffer.pointer,this.outputSamplePerChannel,this.mOutputBuffer.pointer,this.mOutputBuffer.length);if(He<0)throw new Error("Opus encoding error.");this._container.writeFrame(this.mOutputBuffer.pointer,He,this.outputSamplePerChannel),this.inputBufferIndex=0}$+=Y}}},{key:"close",value:function(){for(var N=this.config.channelCount,x=[],$=0;$<N;++$)x.push(new Float32Array(4096-this.inputBufferIndex/N));this.encode(x),d.destroy(this._container),this.mInputBuffer.free(),this.mResampledBuffer.free(),this.mOutputBuffer.free(),this._opus_encoder_destroy(this.encoder),this._speex_resampler_destroy(this.resampler)}},{key:"interleave",value:function(N){var x=N.length;if(x===1)return N[0];for(var $=0;$<x;$++)for(var Y=N[$],V=0;V<Y.length;V++)this.interleavedBuffers[V*x+$]=Y[V];return this.interleavedBuffers}},{key:"OpusInitCodec",value:function(N,x){var $=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,Y=this.memory.mallocUint32(void 0);this.encoder=this._opus_encoder_create(N,x,2049,Y.pointer);var V=Y.value;if(Y.free(),V!==0)throw new Error("Opus encodor initialization failed.");$&&this.OpusSetOpusControl(4002,$)}},{key:"OpusSetOpusControl",value:function(N,x){var $=this.memory.mallocInt32(x);this._opus_encoder_ctl(this.encoder,N,$.pointer),$.free()}},{key:"SpeexInitResampler",value:function(N,x,$){var Y=this.memory.mallocUint32(void 0);this.resampler=this._speex_resampler_init($,N,x,6,Y.pointer);var V=Y.value;if(Y.free(),V!==0)throw new Error("Initializing resampler failed.")}}]),R}();d.init=function(R,N,x){d.encodedBuffers=[],d.encoder=new m(R,N,x)},d.encode=function(R){d.encoder.encode(R)},d.flush=function(){return d.encodedBuffers.splice(0,d.encodedBuffers.length)},d.close=function(){d.encoder.close()};var E,A,_,g,O,D={};for(E in d)d.hasOwnProperty(E)&&(D[E]=d[E]);A=(typeof window=="undefined"?"undefined":l(window))==="object",_=typeof importScripts=="function",g=(i===void 0?"undefined":l(i))==="object"&&l(i.versions)==="object"&&typeof i.versions.node=="string",O=!A&&!g&&!_;var C,T,I,S,v="";g?(v=_?n(0).dirname(v)+"/":o+"/",C=function(R,N){return I||(I=n(4)),S||(S=n(0)),R=S.normalize(R),I.readFileSync(R,N?null:"utf8")},T=function(R){var N=C(R,!0);return N.buffer||(N=new Uint8Array(N)),F(N.buffer),N},i.argv.length>1&&i.argv[1].replace(/\\/g,"/"),i.argv.slice(2),i.on("uncaughtException",function(R){if(!(R instanceof mr))throw R}),i.on("unhandledRejection",Ie),d.inspect=function(){return"[Emscripten Module object]"}):O?(typeof read!="undefined"&&(C=function(R){return read(R)}),T=function(R){var N;return typeof readbuffer=="function"?new Uint8Array(readbuffer(R)):(F(l(N=read(R,"binary"))==="object"),N)},typeof scriptArgs!="undefined"&&scriptArgs,typeof print!="undefined"&&(typeof console=="undefined"&&(console={}),console.log=print,console.warn=console.error=typeof printErr!="undefined"?printErr:print)):(A||_)&&(_?v=self.location.href:document.currentScript&&(v=document.currentScript.src),c&&(v=c),v=v.indexOf("blob:")!==0?v.substr(0,v.lastIndexOf("/")+1):"",C=function(R){var N=new XMLHttpRequest;return N.open("GET",R,!1),N.send(null),N.responseText},_&&(T=function(R){var N=new XMLHttpRequest;return N.open("GET",R,!1),N.responseType="arraybuffer",N.send(null),new Uint8Array(N.response)}));var y,b,M=d.print||console.log.bind(console),k=d.printErr||console.warn.bind(console);for(E in D)D.hasOwnProperty(E)&&(d[E]=D[E]);D=null,d.arguments&&d.arguments,d.thisProgram&&d.thisProgram,d.quit&&d.quit,d.wasmBinary&&(y=d.wasmBinary),d.noExitRuntime&&d.noExitRuntime,(typeof WebAssembly=="undefined"?"undefined":l(WebAssembly))!=="object"&&k("no native wasm support detected");var P=new WebAssembly.Table({initial:60,maximum:60,element:"anyfunc"}),B=!1;function F(R,N){R||Ie("Assertion failed: "+N)}var X,G,z,K=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):void 0;function me(R,N,x){for(var $=N+x,Y=N;R[Y]&&!(Y>=$);)++Y;if(Y-N>16&&R.subarray&&K)return K.decode(R.subarray(N,Y));for(var V="";N<Y;){var oe=R[N++];if(128&oe){var be=63&R[N++];if((224&oe)!=192){var He=63&R[N++];if((oe=(240&oe)==224?(15&oe)<<12|be<<6|He:(7&oe)<<18|be<<12|He<<6|63&R[N++])<65536)V+=String.fromCharCode(oe);else{var yn=oe-65536;V+=String.fromCharCode(55296|yn>>10,56320|1023&yn)}}else V+=String.fromCharCode((31&oe)<<6|be)}else V+=String.fromCharCode(oe)}return V}function ee(R,N){return R?me(G,R,N):""}typeof TextDecoder!="undefined"&&new TextDecoder("utf-16le");var ie=d.INITIAL_MEMORY||16777216;function ne(R){for(;R.length>0;){var N=R.shift();if(typeof N!="function"){var x=N.func;typeof x=="number"?N.arg===void 0?d.dynCall_v(x):d.dynCall_vi(x,N.arg):x(N.arg===void 0?null:N.arg)}else N()}}(b=d.wasmMemory?d.wasmMemory:new WebAssembly.Memory({initial:ie/65536,maximum:ie/65536}))&&(X=b.buffer),ie=X.byteLength,function(R){X=R,d.HEAP8=new Int8Array(R),d.HEAP16=new Int16Array(R),d.HEAP32=z=new Int32Array(R),d.HEAPU8=G=new Uint8Array(R),d.HEAPU16=new Uint16Array(R),d.HEAPU32=new Uint32Array(R),d.HEAPF32=new Float32Array(R),d.HEAPF64=new Float64Array(R)}(X),z[11496]=5289024;var ge=[],it=[],qe=[],Re=[];function xe(R){ge.unshift(R)}function It(R){Re.unshift(R)}var _e=0,Fe=null;function Ie(R){throw d.onAbort&&d.onAbort(R),M(R+=""),k(R),B=!0,R="abort("+R+"). Build with -s ASSERTIONS=1 for more info.",new WebAssembly.RuntimeError(R)}d.preloadedImages={},d.preloadedAudios={};var _t="data:application/octet-stream;base64,";function Gt(R){return String.prototype.startsWith?R.startsWith(_t):R.indexOf(_t)===0}var he="WebMOpusEncoder.wasm";function At(){try{if(y)return new Uint8Array(y);if(T)return T(he);throw"both async and sync fetching of the wasm failed"}catch(R){Ie(R)}}Gt(he)||(he=function(R){return d.locateFile?d.locateFile(R,v):v+R}(he)),it.push({func:function(){dr()}});var ye={mappings:{},buffers:[null,[],[]],printChar:function(R,N){var x=ye.buffers[R];N===0||N===10?((R===1?M:k)(me(x,0)),x.length=0):x.push(N)},varargs:void 0,get:function(){return ye.varargs+=4,z[ye.varargs-4>>2]},getStr:function(R){return ee(R)},get64:function(R,N){return R}},xi={a:function(R,N,x,$){Ie("Assertion failed: "+ee(R)+", at: "+[N?ee(N):"unknown filename",x,$?ee($):"unknown function"])},e:function(R,N,x){return ye.varargs=x,0},h:function(R,N,x){ye.varargs=x},g:function(R,N,x){return ye.varargs=x,0},b:function(){Ie()},m:function(R,N){var x=new Uint8Array(d.HEAPU8.buffer,R,N);d.encodedBuffers.push(new Uint8Array(x).buffer)},k:function(R,N,x){G.copyWithin(R,N,N+x)},l:function(R){Ie("OOM")},c:function(R){return 0},f:function(R,N,x,$){var Y=ye.getStreamFromFD(R),V=ye.doReadv(Y,N,x);return z[$>>2]=V,0},j:function(R,N,x,$,Y){},d:function(R,N,x,$){for(var Y=0,V=0;V<x;V++){for(var oe=z[N+8*V>>2],be=z[N+(8*V+4)>>2],He=0;He<be;He++)ye.printChar(R,G[oe+He]);Y+=be}return z[$>>2]=Y,0},memory:b,table:P,i:function(R){var N=Date.now()/1e3|0;return R&&(z[R>>2]=N),N}},an=function(){var R={a:xi};function N(Y,V){var oe=Y.exports;d.asm=oe,function(){if(_e--,d.monitorRunDependencies&&d.monitorRunDependencies(_e),_e==0&&Fe){var be=Fe;Fe=null,be()}}()}function x(Y){N(Y.instance)}function $(Y){return(y||!A&&!_||typeof fetch!="function"?new Promise(function(V,oe){V(At())}):fetch(he,{credentials:"same-origin"}).then(function(V){if(!V.ok)throw"failed to load wasm binary file at '"+he+"'";return V.arrayBuffer()}).catch(function(){return At()})).then(function(V){return WebAssembly.instantiate(V,R)}).then(Y,function(V){k("failed to asynchronously prepare wasm: "+V),Ie(V)})}if(_e++,d.monitorRunDependencies&&d.monitorRunDependencies(_e),d.instantiateWasm)try{return d.instantiateWasm(R,N)}catch(Y){return k("Module.instantiateWasm callback failed with error: "+Y),!1}return function(){if(y||typeof WebAssembly.instantiateStreaming!="function"||Gt(he)||typeof fetch!="function")return $(x);fetch(he,{credentials:"same-origin"}).then(function(Y){return WebAssembly.instantiateStreaming(Y,R).then(x,function(V){k("wasm streaming compile failed: "+V),k("falling back to ArrayBuffer instantiation"),$(x)})})}(),{}}();d.asm=an;var yt,dr=d.___wasm_call_ctors=function(){return(dr=d.___wasm_call_ctors=d.asm.n).apply(null,arguments)},hr=(d.___em_js__emscriptenPushBuffer=function(){return(d.___em_js__emscriptenPushBuffer=d.asm.o).apply(null,arguments)},d._emscripten_bind_VoidPtr___destroy___0=function(){return(hr=d._emscripten_bind_VoidPtr___destroy___0=d.asm.p).apply(null,arguments)}),zn=d._emscripten_bind_Container_Container_0=function(){return(zn=d._emscripten_bind_Container_Container_0=d.asm.q).apply(null,arguments)},pr=d._emscripten_bind_Container_init_3=function(){return(pr=d._emscripten_bind_Container_init_3=d.asm.r).apply(null,arguments)},fr=d._emscripten_bind_Container_writeFrame_3=function(){return(fr=d._emscripten_bind_Container_writeFrame_3=d.asm.s).apply(null,arguments)},ln=d._emscripten_bind_Container___destroy___0=function(){return(ln=d._emscripten_bind_Container___destroy___0=d.asm.t).apply(null,arguments)};function mr(R){this.name="ExitStatus",this.message="Program terminated with exit("+R+")",this.status=R}function cn(R){function N(){yt||(yt=!0,d.calledRun=!0,B||(ne(it),ne(qe),d.onRuntimeInitialized&&d.onRuntimeInitialized(),function(){if(d.postRun)for(typeof d.postRun=="function"&&(d.postRun=[d.postRun]);d.postRun.length;)It(d.postRun.shift());ne(Re)}()))}_e>0||(function(){if(d.preRun)for(typeof d.preRun=="function"&&(d.preRun=[d.preRun]);d.preRun.length;)xe(d.preRun.shift());ne(ge)}(),_e>0||(d.setStatus?(d.setStatus("Running..."),setTimeout(function(){setTimeout(function(){d.setStatus("")},1),N()},1)):N()))}if(d._opus_encoder_create=function(){return(d._opus_encoder_create=d.asm.u).apply(null,arguments)},d._opus_encode_float=function(){return(d._opus_encode_float=d.asm.v).apply(null,arguments)},d._opus_encoder_ctl=function(){return(d._opus_encoder_ctl=d.asm.w).apply(null,arguments)},d._opus_encoder_destroy=function(){return(d._opus_encoder_destroy=d.asm.x).apply(null,arguments)},d._speex_resampler_init=function(){return(d._speex_resampler_init=d.asm.y).apply(null,arguments)},d._speex_resampler_destroy=function(){return(d._speex_resampler_destroy=d.asm.z).apply(null,arguments)},d._speex_resampler_process_interleaved_float=function(){return(d._speex_resampler_process_interleaved_float=d.asm.A).apply(null,arguments)},d._free=function(){return(d._free=d.asm.B).apply(null,arguments)},d._malloc=function(){return(d._malloc=d.asm.C).apply(null,arguments)},d.dynCall_vi=function(){return(d.dynCall_vi=d.asm.D).apply(null,arguments)},d.dynCall_v=function(){return(d.dynCall_v=d.asm.E).apply(null,arguments)},d.asm=an,d.then=function(R){if(yt)R(d);else{var N=d.onRuntimeInitialized;d.onRuntimeInitialized=function(){N&&N(),R(d)}}return d},Fe=function R(){yt||cn(),yt||(Fe=R)},d.run=cn,d.preInit)for(typeof d.preInit=="function"&&(d.preInit=[d.preInit]);d.preInit.length>0;)d.preInit.pop()();function ve(){}function Mt(R){return(R||ve).__cache__}function In(R,N){var x=Mt(N),$=x[R];return $||(($=Object.create((N||ve).prototype)).ptr=R,x[R]=$)}function Ne(){throw"cannot construct a VoidPtr, no constructor in IDL"}function fe(){this.ptr=zn(),Mt(fe)[this.ptr]=this}return cn(),ve.prototype=Object.create(ve.prototype),ve.prototype.constructor=ve,ve.prototype.__class__=ve,ve.__cache__={},d.WrapperObject=ve,d.getCache=Mt,d.wrapPointer=In,d.castObject=function(R,N){return In(R.ptr,N)},d.NULL=In(0),d.destroy=function(R){if(!R.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";R.__destroy__(),delete Mt(R.__class__)[R.ptr]},d.compare=function(R,N){return R.ptr===N.ptr},d.getPointer=function(R){return R.ptr},d.getClass=function(R){return R.__class__},Ne.prototype=Object.create(ve.prototype),Ne.prototype.constructor=Ne,Ne.prototype.__class__=Ne,Ne.__cache__={},d.VoidPtr=Ne,Ne.prototype.__destroy__=Ne.prototype.__destroy__=function(){var R=this.ptr;hr(R)},fe.prototype=Object.create(ve.prototype),fe.prototype.constructor=fe,fe.prototype.__class__=fe,fe.__cache__={},d.Container=fe,fe.prototype.init=fe.prototype.init=function(R,N,x){var $=this.ptr;R&&l(R)==="object"&&(R=R.ptr),N&&l(N)==="object"&&(N=N.ptr),x&&l(x)==="object"&&(x=x.ptr),pr($,R,N,x)},fe.prototype.writeFrame=fe.prototype.writeFrame=function(R,N,x){var $=this.ptr;R&&l(R)==="object"&&(R=R.ptr),N&&l(N)==="object"&&(N=N.ptr),x&&l(x)==="object"&&(x=x.ptr),fr($,R,N,x)},fe.prototype.__destroy__=fe.prototype.__destroy__=function(){var R=this.ptr;ln(R)},d});l(e)==="object"&&l(s)==="object"?s.exports=h:(a=function(){return h}.apply(e,[]))===void 0||(s.exports=a)}).call(this,"/index.js",n(2),"/",n(3)(t))},function(t,e,n){(function(r,i,o,s){var a;function l(d){return(l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p})(d)}function u(d,p,f){return p&&function(m,E){for(var A=0;A<E.length;A++){var _=E[A];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(m,_.key,_)}}(d.prototype,p),d}var c,h=(c=(c=typeof document!="undefined"&&document.currentScript?document.currentScript.src:void 0)||r,function(d){d=(d=d||{})!==void 0?d:{};var p=n(1).EmscriptenMemoryAllocator,f=48e3,m=function(){function R(N,x){var $=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;(function(Y,V){if(!(Y instanceof V))throw new TypeError("Cannot call a class as a function")})(this,R),this.config={inputSampleRate:N,channelCount:x},this.memory=new p(d),this._opus_encoder_create=d._opus_encoder_create,this._opus_encoder_ctl=d._opus_encoder_ctl,this._opus_encode_float=d._opus_encode_float,this._opus_encoder_destroy=d._opus_encoder_destroy,this._speex_resampler_init=d._speex_resampler_init,this._speex_resampler_process_interleaved_float=d._speex_resampler_process_interleaved_float,this._speex_resampler_destroy=d._speex_resampler_destroy,this._container=new d.Container,this._container.init(f,x,Math.floor(4294967295*Math.random())),this.OpusInitCodec(f,x,$),this.SpeexInitResampler(N,f,x),this.inputSamplesPerChannel=20*N/1e3,this.outputSamplePerChannel=960,this.inputBufferIndex=0,this.mInputBuffer=this.memory.mallocFloat32Buffer(this.inputSamplesPerChannel*x),this.mResampledBuffer=this.memory.mallocFloat32Buffer(this.outputSamplePerChannel*x),this.mOutputBuffer=this.memory.mallocUint8Buffer(4e3),this.interleavedBuffers=x!==1?new Float32Array(4096*x):void 0}return u(R,[{key:"encode",value:function(N){for(var x=this.interleave(N),$=0;$<x.length;){var Y=Math.min(this.mInputBuffer.length-this.inputBufferIndex,x.length-$);if(this.mInputBuffer.set(x.subarray($,$+Y),this.inputBufferIndex),this.inputBufferIndex+=Y,this.inputBufferIndex>=this.mInputBuffer.length){var V=this.memory.mallocUint32(this.inputSamplesPerChannel),oe=this.memory.mallocUint32(this.outputSamplePerChannel),be=this._speex_resampler_process_interleaved_float(this.resampler,this.mInputBuffer.pointer,V.pointer,this.mResampledBuffer.pointer,oe.pointer);if(V.free(),oe.free(),be!==0)throw new Error("Resampling error.");var He=this._opus_encode_float(this.encoder,this.mResampledBuffer.pointer,this.outputSamplePerChannel,this.mOutputBuffer.pointer,this.mOutputBuffer.length);if(He<0)throw new Error("Opus encoding error.");this._container.writeFrame(this.mOutputBuffer.pointer,He,this.outputSamplePerChannel),this.inputBufferIndex=0}$+=Y}}},{key:"close",value:function(){for(var N=this.config.channelCount,x=[],$=0;$<N;++$)x.push(new Float32Array(4096-this.inputBufferIndex/N));this.encode(x),d.destroy(this._container),this.mInputBuffer.free(),this.mResampledBuffer.free(),this.mOutputBuffer.free(),this._opus_encoder_destroy(this.encoder),this._speex_resampler_destroy(this.resampler)}},{key:"interleave",value:function(N){var x=N.length;if(x===1)return N[0];for(var $=0;$<x;$++)for(var Y=N[$],V=0;V<Y.length;V++)this.interleavedBuffers[V*x+$]=Y[V];return this.interleavedBuffers}},{key:"OpusInitCodec",value:function(N,x){var $=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,Y=this.memory.mallocUint32(void 0);this.encoder=this._opus_encoder_create(N,x,2049,Y.pointer);var V=Y.value;if(Y.free(),V!==0)throw new Error("Opus encodor initialization failed.");$&&this.OpusSetOpusControl(4002,$)}},{key:"OpusSetOpusControl",value:function(N,x){var $=this.memory.mallocInt32(x);this._opus_encoder_ctl(this.encoder,N,$.pointer),$.free()}},{key:"SpeexInitResampler",value:function(N,x,$){var Y=this.memory.mallocUint32(void 0);this.resampler=this._speex_resampler_init($,N,x,6,Y.pointer);var V=Y.value;if(Y.free(),V!==0)throw new Error("Initializing resampler failed.")}}]),R}();d.init=function(R,N,x){d.encodedBuffers=[],d.encoder=new m(R,N,x)},d.encode=function(R){d.encoder.encode(R)},d.flush=function(){return d.encodedBuffers.splice(0,d.encodedBuffers.length)},d.close=function(){d.encoder.close()};var E,A,_,g,O,D={};for(E in d)d.hasOwnProperty(E)&&(D[E]=d[E]);A=(typeof window=="undefined"?"undefined":l(window))==="object",_=typeof importScripts=="function",g=(i===void 0?"undefined":l(i))==="object"&&l(i.versions)==="object"&&typeof i.versions.node=="string",O=!A&&!g&&!_;var C,T,I,S,v="";g?(v=_?n(0).dirname(v)+"/":o+"/",C=function(R,N){return I||(I=n(4)),S||(S=n(0)),R=S.normalize(R),I.readFileSync(R,N?null:"utf8")},T=function(R){var N=C(R,!0);return N.buffer||(N=new Uint8Array(N)),F(N.buffer),N},i.argv.length>1&&i.argv[1].replace(/\\/g,"/"),i.argv.slice(2),i.on("uncaughtException",function(R){if(!(R instanceof mr))throw R}),i.on("unhandledRejection",Ie),d.inspect=function(){return"[Emscripten Module object]"}):O?(typeof read!="undefined"&&(C=function(R){return read(R)}),T=function(R){var N;return typeof readbuffer=="function"?new Uint8Array(readbuffer(R)):(F(l(N=read(R,"binary"))==="object"),N)},typeof scriptArgs!="undefined"&&scriptArgs,typeof print!="undefined"&&(typeof console=="undefined"&&(console={}),console.log=print,console.warn=console.error=typeof printErr!="undefined"?printErr:print)):(A||_)&&(_?v=self.location.href:document.currentScript&&(v=document.currentScript.src),c&&(v=c),v=v.indexOf("blob:")!==0?v.substr(0,v.lastIndexOf("/")+1):"",C=function(R){var N=new XMLHttpRequest;return N.open("GET",R,!1),N.send(null),N.responseText},_&&(T=function(R){var N=new XMLHttpRequest;return N.open("GET",R,!1),N.responseType="arraybuffer",N.send(null),new Uint8Array(N.response)}));var y,b,M=d.print||console.log.bind(console),k=d.printErr||console.warn.bind(console);for(E in D)D.hasOwnProperty(E)&&(d[E]=D[E]);D=null,d.arguments&&d.arguments,d.thisProgram&&d.thisProgram,d.quit&&d.quit,d.wasmBinary&&(y=d.wasmBinary),d.noExitRuntime&&d.noExitRuntime,(typeof WebAssembly=="undefined"?"undefined":l(WebAssembly))!=="object"&&k("no native wasm support detected");var P=new WebAssembly.Table({initial:36,maximum:36,element:"anyfunc"}),B=!1;function F(R,N){R||Ie("Assertion failed: "+N)}var X,G,z,K=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):void 0;function me(R,N,x){for(var $=N+x,Y=N;R[Y]&&!(Y>=$);)++Y;if(Y-N>16&&R.subarray&&K)return K.decode(R.subarray(N,Y));for(var V="";N<Y;){var oe=R[N++];if(128&oe){var be=63&R[N++];if((224&oe)!=192){var He=63&R[N++];if((oe=(240&oe)==224?(15&oe)<<12|be<<6|He:(7&oe)<<18|be<<12|He<<6|63&R[N++])<65536)V+=String.fromCharCode(oe);else{var yn=oe-65536;V+=String.fromCharCode(55296|yn>>10,56320|1023&yn)}}else V+=String.fromCharCode((31&oe)<<6|be)}else V+=String.fromCharCode(oe)}return V}function ee(R,N){return R?me(G,R,N):""}typeof TextDecoder!="undefined"&&new TextDecoder("utf-16le");var ie=d.INITIAL_MEMORY||16777216;function ne(R){for(;R.length>0;){var N=R.shift();if(typeof N!="function"){var x=N.func;typeof x=="number"?N.arg===void 0?d.dynCall_v(x):d.dynCall_vi(x,N.arg):x(N.arg===void 0?null:N.arg)}else N()}}(b=d.wasmMemory?d.wasmMemory:new WebAssembly.Memory({initial:ie/65536,maximum:ie/65536}))&&(X=b.buffer),ie=X.byteLength,function(R){X=R,d.HEAP8=new Int8Array(R),d.HEAP16=new Int16Array(R),d.HEAP32=z=new Int32Array(R),d.HEAPU8=G=new Uint8Array(R),d.HEAPU16=new Uint16Array(R),d.HEAPU32=new Uint32Array(R),d.HEAPF32=new Float32Array(R),d.HEAPF64=new Float64Array(R)}(X),z[11672]=5289728;var ge=[],it=[],qe=[],Re=[];function xe(R){ge.unshift(R)}function It(R){Re.unshift(R)}var _e=0,Fe=null;function Ie(R){throw d.onAbort&&d.onAbort(R),M(R+=""),k(R),B=!0,R="abort("+R+"). Build with -s ASSERTIONS=1 for more info.",new WebAssembly.RuntimeError(R)}d.preloadedImages={},d.preloadedAudios={};var _t="data:application/octet-stream;base64,";function Gt(R){return String.prototype.startsWith?R.startsWith(_t):R.indexOf(_t)===0}var he="OggOpusEncoder.wasm";function At(){try{if(y)return new Uint8Array(y);if(T)return T(he);throw"both async and sync fetching of the wasm failed"}catch(R){Ie(R)}}Gt(he)||(he=function(R){return d.locateFile?d.locateFile(R,v):v+R}(he)),it.push({func:function(){dr()}});var ye={mappings:{},buffers:[null,[],[]],printChar:function(R,N){var x=ye.buffers[R];N===0||N===10?((R===1?M:k)(me(x,0)),x.length=0):x.push(N)},varargs:void 0,get:function(){return ye.varargs+=4,z[ye.varargs-4>>2]},getStr:function(R){return ee(R)},get64:function(R,N){return R}},xi={a:function(R,N,x,$){Ie("Assertion failed: "+ee(R)+", at: "+[N?ee(N):"unknown filename",x,$?ee($):"unknown function"])},c:function(){Ie()},d:function(R,N){var x=new Uint8Array(d.HEAPU8.buffer,R,N);d.encodedBuffers.push(new Uint8Array(x).buffer)},f:function(R,N,x){G.copyWithin(R,N,N+x)},g:function(R){Ie("OOM")},h:function(R){return 0},e:function(R,N,x,$,Y){},b:function(R,N,x,$){for(var Y=0,V=0;V<x;V++){for(var oe=z[N+8*V>>2],be=z[N+(8*V+4)>>2],He=0;He<be;He++)ye.printChar(R,G[oe+He]);Y+=be}return z[$>>2]=Y,0},memory:b,table:P},an=function(){var R={a:xi};function N(Y,V){var oe=Y.exports;d.asm=oe,function(){if(_e--,d.monitorRunDependencies&&d.monitorRunDependencies(_e),_e==0&&Fe){var be=Fe;Fe=null,be()}}()}function x(Y){N(Y.instance)}function $(Y){return(y||!A&&!_||typeof fetch!="function"?new Promise(function(V,oe){V(At())}):fetch(he,{credentials:"same-origin"}).then(function(V){if(!V.ok)throw"failed to load wasm binary file at '"+he+"'";return V.arrayBuffer()}).catch(function(){return At()})).then(function(V){return WebAssembly.instantiate(V,R)}).then(Y,function(V){k("failed to asynchronously prepare wasm: "+V),Ie(V)})}if(_e++,d.monitorRunDependencies&&d.monitorRunDependencies(_e),d.instantiateWasm)try{return d.instantiateWasm(R,N)}catch(Y){return k("Module.instantiateWasm callback failed with error: "+Y),!1}return function(){if(y||typeof WebAssembly.instantiateStreaming!="function"||Gt(he)||typeof fetch!="function")return $(x);fetch(he,{credentials:"same-origin"}).then(function(Y){return WebAssembly.instantiateStreaming(Y,R).then(x,function(V){k("wasm streaming compile failed: "+V),k("falling back to ArrayBuffer instantiation"),$(x)})})}(),{}}();d.asm=an;var yt,dr=d.___wasm_call_ctors=function(){return(dr=d.___wasm_call_ctors=d.asm.i).apply(null,arguments)},hr=(d.___em_js__emscriptenPushBuffer=function(){return(d.___em_js__emscriptenPushBuffer=d.asm.j).apply(null,arguments)},d._emscripten_bind_VoidPtr___destroy___0=function(){return(hr=d._emscripten_bind_VoidPtr___destroy___0=d.asm.k).apply(null,arguments)}),zn=d._emscripten_bind_Container_Container_0=function(){return(zn=d._emscripten_bind_Container_Container_0=d.asm.l).apply(null,arguments)},pr=d._emscripten_bind_Container_init_3=function(){return(pr=d._emscripten_bind_Container_init_3=d.asm.m).apply(null,arguments)},fr=d._emscripten_bind_Container_writeFrame_3=function(){return(fr=d._emscripten_bind_Container_writeFrame_3=d.asm.n).apply(null,arguments)},ln=d._emscripten_bind_Container___destroy___0=function(){return(ln=d._emscripten_bind_Container___destroy___0=d.asm.o).apply(null,arguments)};function mr(R){this.name="ExitStatus",this.message="Program terminated with exit("+R+")",this.status=R}function cn(R){function N(){yt||(yt=!0,d.calledRun=!0,B||(ne(it),ne(qe),d.onRuntimeInitialized&&d.onRuntimeInitialized(),function(){if(d.postRun)for(typeof d.postRun=="function"&&(d.postRun=[d.postRun]);d.postRun.length;)It(d.postRun.shift());ne(Re)}()))}_e>0||(function(){if(d.preRun)for(typeof d.preRun=="function"&&(d.preRun=[d.preRun]);d.preRun.length;)xe(d.preRun.shift());ne(ge)}(),_e>0||(d.setStatus?(d.setStatus("Running..."),setTimeout(function(){setTimeout(function(){d.setStatus("")},1),N()},1)):N()))}if(d._opus_encoder_create=function(){return(d._opus_encoder_create=d.asm.p).apply(null,arguments)},d._opus_encode_float=function(){return(d._opus_encode_float=d.asm.q).apply(null,arguments)},d._opus_encoder_ctl=function(){return(d._opus_encoder_ctl=d.asm.r).apply(null,arguments)},d._opus_encoder_destroy=function(){return(d._opus_encoder_destroy=d.asm.s).apply(null,arguments)},d._malloc=function(){return(d._malloc=d.asm.t).apply(null,arguments)},d._free=function(){return(d._free=d.asm.u).apply(null,arguments)},d._speex_resampler_init=function(){return(d._speex_resampler_init=d.asm.v).apply(null,arguments)},d._speex_resampler_destroy=function(){return(d._speex_resampler_destroy=d.asm.w).apply(null,arguments)},d._speex_resampler_process_interleaved_float=function(){return(d._speex_resampler_process_interleaved_float=d.asm.x).apply(null,arguments)},d.dynCall_vi=function(){return(d.dynCall_vi=d.asm.y).apply(null,arguments)},d.dynCall_v=function(){return(d.dynCall_v=d.asm.z).apply(null,arguments)},d.asm=an,d.then=function(R){if(yt)R(d);else{var N=d.onRuntimeInitialized;d.onRuntimeInitialized=function(){N&&N(),R(d)}}return d},Fe=function R(){yt||cn(),yt||(Fe=R)},d.run=cn,d.preInit)for(typeof d.preInit=="function"&&(d.preInit=[d.preInit]);d.preInit.length>0;)d.preInit.pop()();function ve(){}function Mt(R){return(R||ve).__cache__}function In(R,N){var x=Mt(N),$=x[R];return $||(($=Object.create((N||ve).prototype)).ptr=R,x[R]=$)}function Ne(){throw"cannot construct a VoidPtr, no constructor in IDL"}function fe(){this.ptr=zn(),Mt(fe)[this.ptr]=this}return cn(),ve.prototype=Object.create(ve.prototype),ve.prototype.constructor=ve,ve.prototype.__class__=ve,ve.__cache__={},d.WrapperObject=ve,d.getCache=Mt,d.wrapPointer=In,d.castObject=function(R,N){return In(R.ptr,N)},d.NULL=In(0),d.destroy=function(R){if(!R.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";R.__destroy__(),delete Mt(R.__class__)[R.ptr]},d.compare=function(R,N){return R.ptr===N.ptr},d.getPointer=function(R){return R.ptr},d.getClass=function(R){return R.__class__},Ne.prototype=Object.create(ve.prototype),Ne.prototype.constructor=Ne,Ne.prototype.__class__=Ne,Ne.__cache__={},d.VoidPtr=Ne,Ne.prototype.__destroy__=Ne.prototype.__destroy__=function(){var R=this.ptr;hr(R)},fe.prototype=Object.create(ve.prototype),fe.prototype.constructor=fe,fe.prototype.__class__=fe,fe.__cache__={},d.Container=fe,fe.prototype.init=fe.prototype.init=function(R,N,x){var $=this.ptr;R&&l(R)==="object"&&(R=R.ptr),N&&l(N)==="object"&&(N=N.ptr),x&&l(x)==="object"&&(x=x.ptr),pr($,R,N,x)},fe.prototype.writeFrame=fe.prototype.writeFrame=function(R,N,x){var $=this.ptr;R&&l(R)==="object"&&(R=R.ptr),N&&l(N)==="object"&&(N=N.ptr),x&&l(x)==="object"&&(x=x.ptr),fr($,R,N,x)},fe.prototype.__destroy__=fe.prototype.__destroy__=function(){var R=this.ptr;ln(R)},d});l(e)==="object"&&l(s)==="object"?s.exports=h:(a=function(){return h}.apply(e,[]))===void 0||(s.exports=a)}).call(this,"/index.js",n(2),"/",n(3)(t))}])}},typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope?Il()():nf.exports=Il();const sT=eu(SA.exports);let OA;const vs="audio/webm;codecs=opus";function aT(t){const e=Q(),n=Q(),r=Q(),i=Q(!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=Hu.create({scrollingWaveform:!0,scrollingWaveformWindow:10}),e.current=_A({...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();MediaRecorder&&MediaRecorder.isTypeSupported(vs)?o.current=new MediaRecorder(a,{mimeType:vs}):typeof window!="undefined"&&(o.current=new oT(a,{mimeType:vs},{encoderWorkerFactory:()=>new sT,WebMOpusEncoderWasmPath:OA})),o.current.onstart=()=>r.current=Date.now(),o.current.ondataavailable=u=>{var c;if(!i.current){const h=Date.now(),d=Math.floor((h-r.current)/1e3),p=new File([u.data],`talkjs_audio_message_${h}_${d}.webm`,{type:"audio/webm"});t.onSendRecording(p,d)}i.current=!1,o.current=void 0,(c=e.current)==null||c.destroy(),e.current=void 0,n.current=void 0},o.current.start()};return null}function DA(t){const e=rt(),n=pe(),r=sn(),i=re(n.referencedMessage$),o=re(n.state$.userPermissions),s=Po(),{sendMessage:a}=jg(),{voiceRecorder:l,recordVoiceMessage:u,voiceRecorderControlsProps:c}=function(){const p=pe(),f=zr(),m=Vt({...Rl}),{state:E,duration:A,recordingUrl:_,uploadState:g,fileToken:O}=re(m),D=Q(void 0),C=Q(null),T=Q(),I=te(()=>{m.assign({state:"recording",duration:0}),T.current=setInterval(()=>{m.duration.set(M=>M+1)},1e3)},[m]),S=te(()=>{var M;T.current&&(clearInterval(T.current),T.current=void 0),(M=D.current)==null||M.stop()},[]),v=te(()=>{T.current&&(clearInterval(T.current),T.current=void 0),m.assign(Rl)},[m]),y=te((M,k)=>{const P=URL.createObjectURL(new Blob([M])),B=M.size+","+M.name;p.state$.localFileBlobUrls.child(p.state$.currentConversationId.peek()).child(B).set({url:P,fetching:!1});const F={duration:k,filename:M.name};p.latestFileUpload={type:"voice",file:M,metadata:F,temporaryBlobUrl:P},m.assign({state:"previewing",uploadState:"pending",recordingUrl:P+"?name="+M.name}),f.uploadVoice(M,F).then(X=>{m.assign({uploadState:"done",fileToken:X})})},[f,m,p]),b=te(()=>{O&&f.sendFileMessage({fileToken:O}),m.assign(Rl)},[f,O,m]);return{voiceRecorder:le(()=>{if(!E)return;const M={state:E,duration:A,recordingUrl:_,uploadState:g,stop:S,cancel:v,send:b};return uA.set(M,C),M},[E,A,_,g,S,v,b]),recordVoiceMessage:I,voiceRecorderControlsProps:le(()=>({onSendRecording:y,recordingState:E,mediaRecorder:D,wavesurferOptions:K0,wavesurferContainer:C}),[y,E])}}(),h=re(Vt(()=>{const p=s.state$.get();return t.editMessageId===void 0?new Bd(p,a,t.attachFile,t.shareLocation,s.toggleEmojiPicker,u):new Bd(p,t.onEditMessage,()=>{},()=>{},()=>{},()=>{})},[s.state$,s.toggleEmojiPicker,t.attachFile,t.editMessageId,t.onEditMessage,t.shareLocation,a])),d=te(p=>s.setText(p),[s]);return function({appId:p,conversationId:f,meId:m,setText:E,enabled:A}){const _=le(()=>A_(f,m,p),[p,f,m]);Z(()=>{var O;if(!_||!A)return;const g=(O=JSON.parse(Ot.getItem(hc)||"{}")[_])!=null?O:"";E(g)},[_,A,E])}({appId:r.app.id,conversationId:r.conversation.id,meId:r.currentUser.id,setText:d,enabled:!t.editMessageId}),L(xm.Provider,{value:{onClose:()=>s.toggleEmojiPicker(!1),onEmojiSelected:p=>s.selectEmoji(p)},children:[L(aT,{...c}),L(e.MessageField,{common:r,referencedMessage:i,permissions:o,editor:h,voiceRecorder:l,editMessageId:t.editMessageId})]})}function lT({message:t}){const e=pe(),n=zr(),r=re(e.state$.editingMessageId),i=le(()=>dn(t.content[0].children),[t]),o=Vt({isEmpty:i.length===0,atTextLimit:!1,characterCount:i.length,showEmojiPicker:!1,suggestEmojiQuery:void 0,suggestMentionQuery:void 0}),s=le(()=>new __(o,e.device$,e.state$.userPermissions),[o,e]),a=te(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(dn(t.content[0].children,!0))},[s,t]),L(bm.Provider,{value:s,children:L(DA,{editMessageId:r,onEditMessage:a})})}function cT(t){const e=rt(),n=sn();return L(e.MessageDivider,{common:n,...t})}function uT({message:t}){const e=rt(),n=pe(),r=re(()=>n.messagePermissions$(t)),i=sn(),[o,s]=ue("sent");return mo(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}),L(e.Message,{common:i,message:t,messageStatus:o,permissions:r})}function dT(){const t=rt(),e=sn();return L(t.BeforeMessages,{common:e})}function hT(){const t=rt(),e=sn();return L(t.AfterMessages,{common:e})}function pT(t){const e=pe(),n=xo();Z(()=>function(r,i,o){const s=r.state$.currentConversation;let a=!1;function l(){if(!a){const E=r.state$.currentConversationId.peek();de.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 h=null;function d(){var O;const E=r.state$.currentConversation.lastMessage.id.get(),A=r.state$.currentConversationId.peek(),_=A!==h;if(h=A,_&&(p.stop(),a=!1,r.newMessageMarker$.set(void 0)),!E||!A)return;s.isUnread.peek()&&(o()?(_&&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=()=>{de.defined(p.handle),p.tick()});const f=Dt(c),m=Dt(d);return()=>{r.newMessageMarker$.set(void 0),f(),m(),p.stop()}}(e,n,t),[e,n,t])}function fT({conversationId:t}){const e=pe(),n=zr(),r=Q(!0),i=Q(null),o=re(()=>!!e.state$.messages.child(t).loadedAll.get());Z(()=>n.setScrollableDiv(i),[n]),pT(te(()=>{if(!i.current)return!1;const a=!document.hidden,l=function(h){if(h.checkVisibility)return h.checkVisibility({contentVisibilityAuto:!0,opacityProperty:!0,visibilityProperty:!0,checkOpacity:!0,checkVisibilityCSS:!0});{const d=window.getComputedStyle(h),p=d.visibility,f=d.opacity;return!(h.getClientRects().length===0||p==="hidden"||f==="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},[])),mt(()=>{r.current=i.current.scrollTop>-30}),Z(()=>{r.current&&(i.current.scrollTop=0)});const s=te(a=>{const l=a.currentTarget,u=l.scrollHeight-l.clientHeight+l.scrollTop,c=e.messageSubscriptions[t];u<90&&c&&c.loadMore(10)},[e.messageSubscriptions,t]);return L("div",{className:"t-message-list",ref:i,"t-menu-boundary":"",onScroll:s,children:[L(hT,{}),L(fo,{each:e.chatItems$,children:a=>L("div",{className:"t-message-group","t-group-type":a.type.get(),children:L(fo,{each:a.items,item:mT,itemProps:{controller:n,conversationId:t}})},a.id.get())}),o&&L(dT,{})]})}function mT({item$:t}){const e=pe(),n=re(t),r=re(e.state$.editingMessageId);return n instanceof ps?L(cT,{timestamp:n.timestamp,isReadMarker:n.isReadMarker,isDayMarker:n.isDayMarker}):r===n.id?L(lT,{message:n}):L(uT,{message:n})}typeof window=="undefined"||MediaRecorder&&MediaRecorder.isTypeSupported(vs)||async function(){return(await fc(y_["opus-media-recorder-wasm"])).default}().then(t=>OA=t);const ET=new Set(["ByV39eoc","B1FxElnd","aW4c49tW","qGfuGtx","SbERe5ee","ilaVEa15","FOlWOSaH","dao5gGmT","DLUgAhzL","fqXFumr6","FtiWHMYT","66iWOyWt","1375amYi","mWbJgzpt","jO7GqAvL","SkFIKxo5","2z4ILc3y","aDr8oPL1","Hku1c4Pt"]);function Na({appId:t,chatboxState:e}){const n=t.charAt(0)==="t"||ET.has(t);return Z(()=>{switch(e.type){case"auth-failed":Ge.error("Could not authenticate user. Check if you are authenticating correctly.");break;case"unknown-user":Ge.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":Ge.error(e.error);break;case"wrong-app-id":Ge.error(`Could not find given appId: "${e.appId}". You can find your appId on https://talkjs.com/dashboard.`);break;case"server-error":break;default:de.never(e)}},[e]),L("div",{className:"t-panel t-error-panel",children:[L("span",{className:"t-heading",children:"Something went wrong"}),L("p",{children:"Please reload the page and try again."}),n?L(Ue,{children:[L("p",{children:"Developer note: check your browser's developer tools console for messages that may help solve the problem."}),L("p",{children:"This message only shows up in test mode."})]}):L("p",{children:"If things keep not working, do not hesitate to get in touch with us."})]})}function _T(){return L("div",{className:"t-panel t-error-panel",children:L("span",{className:"t-heading",children:re(pe().t$).CHAT_NOT_FOUND})})}function vA(){return L("div",{className:"t-panel t-loading-panel",children:L(yu,{})})}function TA(){const t=re(pe().t$);return L("div",{className:"t-panel t-error-panel",children:[L("span",{className:"t-heading",children:t.AUTH_EXPIRED_OVERLAY_TITLE}),L("p",{children:t.AUTH_EXPIRED_OVERLAY_DESCRIPTION})]})}const AT=()=>!0;async function Uu(t,e,{initialDelay:n,maxDelay:r,log:i,shouldRetry:o=AT}){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,h;return(h=u,h<=0?Promise.resolve():new Promise(d=>setTimeout(d,h))).then(()=>Uu(t-1,e,{initialDelay:u/1e3,maxDelay:r,log:i,shouldRetry:o}))})}function yo(){const t={},e=new Promise(function(n,r){t.resolve=n,t.reject=r});return t.promise=e,t}function gT(t,e,n){const{beforeBrowserPermissionPrompt:r,onMissingBrowserPermissionCallback:i}=lr(km);return te(async()=>{function o(c){c==="denied"&&i({type:t})}if(!r||!await async function(c){if(!("permissions"in navigator))return!1;try{return(await navigator.permissions.query({name:c})).state==="prompt"}catch(h){return!1}}(t))return e(c=>{o(c)});const s=yo(),a=yo(),l={type:t,showPrompt:async()=>(a.resolve({cancelled:!1}),await s.promise),cancel:()=>{a.resolve({cancelled:!0})}};try{r(l)}catch(c){Ge.error("Your beforeBrowserPermissionPrompt callback threw an error: ",c),a.resolve({cancelled:!0})}const{cancelled:u}=await a.promise;return u?void 0:e(c=>{s.resolve(c),o(c)})},[r,i,t,e,...n])}function ST({onClose:t}){const e=pe(),n=zr(),r=xo(),[i,o]=ue(null),s=te(async l=>{try{if(l||(l=(await new Promise(m=>{const E=document.createElement("input");E.type="file",E.multiple=!1,E.addEventListener("change",()=>{m([...E.files])}),E.addEventListener("cancel",()=>{m([])}),E.click()}))[0]),!l)return;const{uploadPromise:u,upload:c}=await async function(m,E){const A=m.name;if(function(D){return/\.(mp4|ts|mov|webm|ogv)$/i.test(D)}(m.name)){const D=await yl("video",m,I=>({width:I.videoWidth,height:I.videoHeight,duration:I.duration,filename:A})),C=E.uploadVideo(m,D),T=function(I){switch(I.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"}}(m);return{uploadPromise:C,upload:{type:"video",file:m,metadata:D,temporaryBlobUrl:URL.createObjectURL(new Blob([m],{type:T}))}}}if(function(D){return/\.(mp3|m4a|ogg|oga|opus|flac|wav)$/i.test(D)}(m.name)){const D=await yl("audio",m,C=>({duration:C.duration,filename:A}));return{uploadPromise:E.uploadAudio(m,D),upload:{type:"audio",file:m,metadata:D,temporaryBlobUrl:URL.createObjectURL(new Blob([m]))}}}if(function(D){return/(gif|png|jpg|jpeg|svg|bmp|webp)$/i.test(D)}(m.name)){const D=await yl("img",m,C=>({width:C.naturalWidth,height:C.naturalHeight,filename:A}));return{uploadPromise:E.uploadImage(m,D),upload:{type:"image",file:m,metadata:D,temporaryBlobUrl:URL.createObjectURL(new Blob([m]))}}}const _={filename:A},g=E.uploadFile(m,_),O=URL.createObjectURL(new Blob([m]));return{uploadPromise:g,upload:{type:"file",file:m,metadata:_,temporaryBlobUrl:O}}}(l,r),h=c.file.size+","+c.file.name;e.state$.localFileBlobUrls.child(e.state$.currentConversationId.peek()).child(h).set({url:c.temporaryBlobUrl,fetching:!1}),e.latestFileUpload=c;const d=yo(),p={upload:c,closePreview:d.resolve,uploaded:!1,errored:!1};let f;o(p);try{f=await rf(u,d.promise),o({...p,uploaded:!0})}catch(m){if(m===Nc)return;Ge.warn("File upload failed",m.toString()),o(E=>({...E,errored:!0}))}if(await d.promise==="cancel")return;de.defined(f),n.sendFileMessage({fileToken:f})}finally{t(),o(null)}},[n,r,o,e,t]),a=gT("geolocation",async l=>{try{const u=yo(),c={upload:{type:"location",location:void 0},uploaded:!1,closePreview:u.resolve,errored:!1};o(c);const{permissionResult:h,location:d}=await rf(new Promise(p=>{navigator.geolocation.getCurrentPosition(f=>{const m={latitude:f.coords.latitude,longitude:f.coords.longitude};p({permissionResult:"granted",location:m})},f=>{f.code===1?p({permissionResult:"denied"}):p({permissionResult:"granted"})})}),u.promise);if(l(h),!d||(o({...c,upload:{type:"location",location:d},uploaded:!0}),await u.promise==="cancel"))return;n.sendLocationMessage({location:d})}catch(u){if(u===Nc)return;throw u}finally{t(),o(null)}},[n,o,t]);return{attachFile:s,shareLocation:a,uploadState:i}}const Nc=Symbol("cancelled");function rf(t,e){return Promise.race([t,e.then(()=>Promise.reject(Nc))])}async function yl(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)}}function RA({children:t,className:e,...n}){return L("div",{className:"t-attach-overlay "+e,...n,children:t})}function OT({uploadState:t}){const{uploaded:e,errored:n}=t;$o(()=>t.closePreview("cancel"),".t-upload-preview");const r=Q(null);Z(()=>{e&&r.current.focus()},[e]);const i=re(pe().t$);return L(RA,{className:"t-upload-preview",children:L("div",{className:"t-preview",children:[!n&&L(DT,{upload:t.upload,uploaded:e}),n&&L("div",{className:"t-error-row",children:i.UPLOAD_ERROR}),L("div",{className:"t-send-row",children:[L("button",{className:"t-cancel",onClick:()=>t.closePreview("cancel"),children:i.CANCEL}),!n&&e&&L("button",{className:"t-confirm-send test__confirm-upload-button",onClick:()=>t.closePreview("send"),ref:r,children:i.SEND_BUTTON_TEXT})]})]})})}function DT({upload:t,uploaded:e}){const n=re(pe().t$);return t.type!=="location"?L(Ue,{children:[L(TT,{upload:t}),L(RT,{upload:t,uploaded:e,t:n})]}):e?L(vT,{location:t.location}):L("div",{className:"t-loading",children:L(yu,{})})}function vT({location:t}){const{imageUrl:e,linkUrl:n}=Fu(t);return L("a",{href:n,target:"_blank",rel:"noreferrer",className:"t-location-upload-preview",style:{background:`url(${JSON.stringify(e)}) center center / cover no-repeat`}})}const TT=Bn(function({upload:t}){let e=null;const n=t.file;if(t.type==="video"){const r=/[.]ts/i.test(n.name)?"mpegts":"native";e=L("div",{className:"video-container",children:L(CT,{src:t.temporaryBlobUrl,videoType:r,playsInline:!0,controls:!0,preload:"auto"})})}else t.type==="image"?e=L("div",{className:"t-img-container",children:L("img",{src:t.temporaryBlobUrl})}):t.type==="audio"&&(e=L(Yo,{src:t.temporaryBlobUrl,filename:n.name}));return e}),RT=Bn(function({uploaded:t,upload:e,t:n}){let r;r=t?e.metadata.filename:n.UPLOAD_IN_PROGRESS;let i="",o="";return e.type==="file"&&(i="is-file",t&&(o="file-block")),L("div",{className:`t-filename-row ${i}`,children:L("div",{className:o,children:r})})});function CT(t){const{videoType:e,...n}=t;return L("video",{...n})}function IT(){var o;const t=rt(),e=pe(),n=sn(),r=(o=re(()=>e.state$.isUserConnected.child(e.state$.currentConversationId.get())))!=null?o:{},i=re(e.state$.userPermissions);return L(t.ChatHeader,{common:n,isUserConnected:r,permissions:i})}function yT(){const t=rt(),e=sn();return L(t.MessageListHeader,{common:e})}function NT(){const t=rt(),e=sn();return L(t.MessageListFooter,{common:e})}function bT(){const t=rt(),e=sn();return L(t.NoConversationSelected,{common:e})}function kT({appId:t,chatHeaderVisible:e,messageFieldVisible:n}){const r=Po(),i=function(){const m=pe(),E=Vt(()=>{const g=m.errors$.get(),O=m.authTokenState$.get(),D=m.state$.loadingConversationId.get(),C=m.state$.currentConversationId.get();return g.serverError?"server-error":g.wrongAppId?"wrong-app-id":O==="loading"||O==="idle"?"loading-token":O==="invalid"?"invalid-token":O==="expired"?"expired-token":O==="valid"?g.unknownUser?"unknown-user":D&&m.state$.unknownConversations.child(D).get()?"loading-conv-failed":m.canRenderUi(D)||C!==D&&m.canRenderUi(C)?"loaded":"loading-data":void de.unreachable()}),A=Vt({type:"loading"});mo(g=>{const O=E.get(),D=m.state$.currentConversationId.get(),C=m.extUserId$.get(),T=m.appId$.get();function I(S){A.set({type:"loading"});const v=setTimeout(()=>{A.set(S)},5e3);return()=>clearTimeout(v)}switch(O){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:T});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:D,userId:C});break;case"loading-conv-failed":g.onCleanup=I({type:"inaccessible-conversation",userId:C,conversationId:D});break;case"unknown-user":g.onCleanup=I({type:"unknown-user",userId:C});break;default:de.never(O)}});const _=Vt({type:"loading"});return mo(g=>{if(A.type.get()==="loading"){_.set({type:"invisible-loading"});const O=setTimeout(()=>{_.set({type:"loading"})},1e3);g.onCleanup=()=>{clearTimeout(O)}}else _.set(A.get())}),re(_)}(),{attachFile:o,shareLocation:s,uploadState:a}=ST({onClose:()=>r.focus()});Z(()=>{r.uploadFile=o},[r,o]);const[l,u]=ue(!1),c=pe(),h=re(()=>c.app$.get()?c.state$.userPermissions.canShareFile.get():void 0);Z(()=>{i.type==="loaded"?c.renderedConversationId$.set(i.conversationId):c.renderedConversationId$.set(void 0)},[i,c]);const d=te(m=>{o(m.dataTransfer.files[0]),m.preventDefault(),u(!1)},[o]),p=te(m=>{m.preventDefault(),u(!0)},[]),f=te(m=>{m.preventDefault(),u(!1)},[]);return Nu(),i.type==="invisible-loading"?L(Ue,{}):i.type==="loading"?L(vA,{}):i.type==="inaccessible-conversation"?L(_T,{}):i.type==="unknown-user"||i.type==="auth-failed"||i.type==="wrong-app-id"||i.type==="server-error"||i.type==="unexpected-error"?L(Na,{appId:t,chatboxState:i}):i.type=="expired-token"?L(TA,{}):i.type==="loaded"?i.conversationId===null?L(bT,{}):L("div",{className:"t-chatbox-content",onDragOver:h?p:void 0,onDragLeave:h?f:void 0,onDrop:h?d:void 0,"t-menu-boundary":"root",children:[e&&L(IT,{}),L(yT,{}),L(fT,{conversationId:i.conversationId}),L(NT,{}),n&&L(DA,{attachFile:o,shareLocation:s}),a&&L(OT,{uploadState:a}),l&&L(RA,{className:"t-drop-overlay",children:L(zs,{type:"attach"})})]}):L(Ue,{})}const cs=new Uint8Array(31);function CA(){if(globalThis.crypto!==void 0)crypto.getRandomValues(cs);else for(let e=0;e<cs.length;e++)cs[e]=Math.floor(256*Math.random());let t=0;return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,e=>(+e^cs[t++]&15>>+e/4).toString(16))}class LT{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(),h=this.store.state$.messages.child(c).loadedAll;let d;do{const p=this.store.messageSubscriptions[c];p&&!h.peek()&&await p.loadMore(30),d=u()}while(!h.peek()&&!d);return d}}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 Ge.error("In-conversation message search is only available to customers on Growth plan and above.")}async deleteMessage(e){const n=this.store.state$.currentConversationId.peek();if(!n)return;const r=this.store.state$.messages.child(n).lookup.child(e).peek(),i=this.talkSession.conversation(n).message(e),[o]=await Promise.all([r!=null?r:i.get(),i.delete()]);if(o){const s={currentUser:this.store.currentUser$.peek(),conversation:this.store.state$.currentConversation.peek(),message:r};this.onDeleteMessage(s)}}setEditing(e){this.store.state$.currentConversationId.peek()&&this.store.state$.editingMessageId.set(e)}async editMessage(e,n){const r=this.store.state$.currentConversationId.peek();r&&await this.talkSession.conversation(r).message(e).edit(n)}setReferencedMessage(e){this.store.state$.currentConversationId.peek()&&(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 ua(()=>this.store.state$.loadingConversationId.get()===this.store.renderedConversationId$.get()),this.store.state$.currentConversationId.peek()===null)return Ge.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 Ge.error(`Message with id: \`${e}\` could not be found in this conversation`),i;const o=(a=this.scrollable)==null?void 0:a.current;de.defined(o);const s=o.querySelector(`[t-message-id="${e}"]`);return s?this.scrollToAndHighlight(s,i,n):Ge.error(`Could not find HTMLElement with attribute: t-message-id="${e}"`),i}async jumpToHighlight(e){if(!this.store.state$.userPermissions.canSearch.peek())return Ge.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;de.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 Ge.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 h=i.findIndex(f=>f.contains(c));if(h===-1)return;const d=i.splice(h,1)[0],p=d.getAttribute("t-message-id");r.push([p,d])}),e==="up"){const c=n.getBoundingClientRect().top;a=r.find(([h,d])=>d.getBoundingClientRect().top-c<-5)}else{const c=.05*n.getBoundingClientRect().height,h=n.getBoundingClientRect().bottom;for(let d=r.length-1;d>=0;d--){const p=r[d],[f,m]=p;if(h-m.getBoundingClientRect().top<=c){a=p;break}}}const l=this.store.chatSearchState$;if(a){const[c,h]=a,d=this.store.state$.messages.child(o).lookup.child(c).peek();return this.scrollToAndHighlight(h,d),l.set("visible"),d}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):Ge.error("In-conversation message search and by extension highlighting of strings are only available to customers on Growth plan and above.")}async sendMessage(e){const n=this.store.state$.currentConversationId.peek();if(!n)return;const r=await async function(s,a){var m,E,A,_,g;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=(m=a.referencedMessage)==null?void 0:m.get())!=null?E:null),h=c&&{...c,type:"UserMessage",sender:c.sender,referencedMessageId:(_=(A=c.referencedMessage)==null?void 0:A.id)!=null?_:null};h&&delete h.referencedMessage;const d=s.latestFileUpload,p="content"in a?[of(d,a.content[0])]:[wT(a.text)],f="text"in a?a.text:hA(a.content.map(O=>of(d,O)),{});return{id:"ephemeral-"+CA(),type:"UserMessage",sender:s.currentUser$.peek(),createdAt:Date.now(),editedAt:null,custom:(g=a.custom)!=null?g:{},origin:"web",referencedMessage:h,reactions:[],content:p,plaintext:f}}(this.store,e);this.store.state$.ephemeralMessages.child(n).child(r.id).set(r);const i=yo();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();de.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&&pv(n,r.id,i,e)}_getReactionRef(e,n){const r=this.store.state$.currentConversationId.peek();return this.talkSession.conversation(r).message(e).reaction(n)}}const wT=t=>({type:"text",children:h_(t)});function of(t,e){switch(e.type){case"text":case"location":return e;case"file":return function(n,r){return{type:"file",subtype:n.type==="file"?void 0:n.type,...n.metadata,size:n.file.size,filename:n.file.name,fileToken:r.fileToken,url:n.temporaryBlobUrl}}(t,e)}}class Nl extends Error{constructor(e,n){const r=function(i){if(typeof i=="string")return i;if(Array.isArray(i))return i.join(`
105
- `);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 No=console;class MT{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?sf(i,r):Vi(i,{retries:5})}post(e,n,r){const i=()=>this._doPost(e,n);return r?sf(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 zl.error(`[${this.appId}][BackendRestClient] Couldn't find resource.`),new Nl("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 zl.error(`[${this.appId}][BackendRestClient] Couldn't authenticate ${n} with token ${r}.`),new Nl("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 Nl(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:(No.error(`401 error from ${n==null?void 0:n.method} ${e}, ${i}`),this.authProvider.refreshToken(),r(await this.authProvider.getToken()))}}function IA(t){return!t.userMessage}function Vi(t,{retries:e=30}={}){return Uu(e,t,{shouldRetry:IA,log:No.warn.bind(No),maxDelay:30,initialDelay:.2})}async function sf(t,e){try{return await t()}catch(r){if(!IA(r))throw r}let n=!1;return e.then(()=>{n=!0}),Uu(1e3,t,{initialDelay:.2,maxDelay:30,shouldRetry:()=>!n,log:No.warn.bind(No)})}var bc={exports:{}};(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=typeof Jo=="object"&&Jo&&Jo.Object===Object&&Jo,h=typeof self=="object"&&self&&self.Object===Object&&self,d=c||h||Function("return this")(),p=e&&!e.nodeType&&e,f=p&&t&&!t.nodeType&&t,m=f&&f.exports===p,E=m&&c.process,A=function(){try{var w=f&&f.require&&f.require("util").types;return w||E&&E.binding&&E.binding("util")}catch(H){}}(),_=A&&A.isTypedArray,g,O=Array.prototype,D=Function.prototype,C=Object.prototype,T=d["__core-js_shared__"],I=D.toString,S=C.hasOwnProperty,v=(g=/[^.]+$/.exec(T&&T.keys&&T.keys.IE_PROTO||""))?"Symbol(src)_1."+g:"",y=C.toString,b=I.call(Object),M=RegExp("^"+I.call(S).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),k=m?d.Buffer:void 0,P=d.Symbol,B=d.Uint8Array;k&&k.allocUnsafe;var F,X,G=(F=Object.getPrototypeOf,X=Object,function(w){return F(X(w))}),z=Object.create,K=C.propertyIsEnumerable,me=O.splice,ee=P?P.toStringTag:void 0,ie=function(){try{var w=mr(Object,"defineProperty");return w({},"",{}),w}catch(H){}}(),ne=k?k.isBuffer:void 0,ge=Math.max,it=Date.now,qe=mr(d,"Map"),Re=mr(Object,"create"),xe=function(){function w(){}return function(H){if(!V(H))return{};if(z)return z(H);w.prototype=H;var j=new w;return w.prototype=void 0,j}}();function It(w){var H=-1,j=w==null?0:w.length;for(this.clear();++H<j;){var q=w[H];this.set(q[0],q[1])}}function _e(w){var H=-1,j=w==null?0:w.length;for(this.clear();++H<j;){var q=w[H];this.set(q[0],q[1])}}function Fe(w){var H=-1,j=w==null?0:w.length;for(this.clear();++H<j;){var q=w[H];this.set(q[0],q[1])}}function Ie(w){var H=this.__data__=new _e(w);this.size=H.size}function _t(w,H){var j=R(w),q=!j&&fe(w),Ee=!j&&!q&&x(w),Be=!j&&!q&&!Ee&&be(w),Le=j||q||Ee||Be,gt=Le?function(ot,Nn){for(var bt=-1,Xr=Array(ot);++bt<ot;)Xr[bt]=Nn(bt);return Xr}(w.length,String):[],Nt=gt.length;for(var je in w)Le&&(je=="length"||Ee&&(je=="offset"||je=="parent")||Be&&(je=="buffer"||je=="byteLength"||je=="byteOffset")||cn(je,Nt))||gt.push(je);return gt}function Gt(w,H,j){(j!==void 0&&!Ne(w[H],j)||j===void 0&&!(H in w))&&ye(w,H,j)}function he(w,H,j){var q=w[H];S.call(w,H)&&Ne(q,j)&&(j!==void 0||H in w)||ye(w,H,j)}function At(w,H){for(var j=w.length;j--;)if(Ne(w[j][0],H))return j;return-1}function ye(w,H,j){H=="__proto__"&&ie?ie(w,H,{configurable:!0,enumerable:!0,value:j,writable:!0}):w[H]=j}It.prototype.clear=function(){this.__data__=Re?Re(null):{},this.size=0},It.prototype.delete=function(w){var H=this.has(w)&&delete this.__data__[w];return this.size-=H?1:0,H},It.prototype.get=function(w){var H=this.__data__;if(Re){var j=H[w];return j===n?void 0:j}return S.call(H,w)?H[w]:void 0},It.prototype.has=function(w){var H=this.__data__;return Re?H[w]!==void 0:S.call(H,w)},It.prototype.set=function(w,H){var j=this.__data__;return this.size+=this.has(w)?0:1,j[w]=Re&&H===void 0?n:H,this},_e.prototype.clear=function(){this.__data__=[],this.size=0},_e.prototype.delete=function(w){var H=this.__data__,j=At(H,w);return!(j<0)&&(j==H.length-1?H.pop():me.call(H,j,1),--this.size,!0)},_e.prototype.get=function(w){var H=this.__data__,j=At(H,w);return j<0?void 0:H[j][1]},_e.prototype.has=function(w){return At(this.__data__,w)>-1},_e.prototype.set=function(w,H){var j=this.__data__,q=At(j,w);return q<0?(++this.size,j.push([w,H])):j[q][1]=H,this},Fe.prototype.clear=function(){this.size=0,this.__data__={hash:new It,map:new(qe||_e),string:new It}},Fe.prototype.delete=function(w){var H=ln(this,w).delete(w);return this.size-=H?1:0,H},Fe.prototype.get=function(w){return ln(this,w).get(w)},Fe.prototype.has=function(w){return ln(this,w).has(w)},Fe.prototype.set=function(w,H){var j=ln(this,w),q=j.size;return j.set(w,H),this.size+=j.size==q?0:1,this},Ie.prototype.clear=function(){this.__data__=new _e,this.size=0},Ie.prototype.delete=function(w){var H=this.__data__,j=H.delete(w);return this.size=H.size,j},Ie.prototype.get=function(w){return this.__data__.get(w)},Ie.prototype.has=function(w){return this.__data__.has(w)},Ie.prototype.set=function(w,H){var j=this.__data__;if(j instanceof _e){var q=j.__data__;if(!qe||q.length<199)return q.push([w,H]),this.size=++j.size,this;j=this.__data__=new Fe(q)}return j.set(w,H),this.size=j.size,this};var xi=function(w,H,j){for(var q=-1,Ee=Object(w),Be=j(w),Le=Be.length;Le--;){var gt=Be[++q];if(H(Ee[gt],gt,Ee)===!1)break}return w};function an(w){return w==null?w===void 0?"[object Undefined]":"[object Null]":ee&&ee in Object(w)?function(H){var j=S.call(H,ee),q=H[ee];try{H[ee]=void 0;var Ee=!0}catch(Le){}var Be=y.call(H);return Ee&&(j?H[ee]=q:delete H[ee]),Be}(w):function(H){return y.call(H)}(w)}function yt(w){return oe(w)&&an(w)==i}function dr(w){return!(!V(w)||function(H){return!!v&&v in H}(w))&&($(w)?M:a).test(function(H){if(H!=null){try{return I.call(H)}catch(j){}try{return H+""}catch(j){}}return""}(w))}function hr(w){if(!V(w))return function(Ee){var Be=[];if(Ee!=null)for(var Le in Object(Ee))Be.push(Le);return Be}(w);var H=ve(w),j=[];for(var q in w)(q!="constructor"||!H&&S.call(w,q))&&j.push(q);return j}function zn(w,H,j,q,Ee){w!==H&&xi(H,function(Be,Le){if(Ee||(Ee=new Ie),V(Be))(function(Nt,je,ot,Nn,bt,Xr,Fi){var un=Mt(Nt,ot),kt=Mt(je,ot),Vu=Fi.get(kt);if(Vu)return void Gt(Nt,ot,Vu);var Pt=Xr?Xr(un,kt,ot+"",Nt,je,Fi):void 0,Hi=Pt===void 0;if(Hi){var ba=R(kt),ka=!ba&&x(kt),zu=!ba&&!ka&&be(kt);Pt=kt,ba||ka||zu?R(un)?Pt=un:oe(Yu=un)&&N(Yu)?Pt=function(Qe,Wt){var ht=-1,xt=Qe.length;for(Wt||(Wt=Array(xt));++ht<xt;)Wt[ht]=Qe[ht];return Wt}(un):ka?(Hi=!1,Pt=kt.slice()):zu?(Hi=!1,Pt=function(Qe){var Wt=(ht=Qe.buffer,xt=new ht.constructor(ht.byteLength),new B(xt).set(new B(ht)),xt),ht,xt;return new Qe.constructor(Wt,Qe.byteOffset,Qe.length)}(kt)):Pt=[]:function(Qe){if(!oe(Qe)||an(Qe)!=s)return!1;var Wt=G(Qe);if(Wt===null)return!0;var ht=S.call(Wt,"constructor")&&Wt.constructor;return typeof ht=="function"&&ht instanceof ht&&I.call(ht)==b}(kt)||fe(kt)?(Pt=un,fe(un)?Pt=function(Qe){return function(Wt,ht,xt){var PA=!xt;xt||(xt={});for(var Gu=-1,xA=ht.length;++Gu<xA;){var La=ht[Gu],Go=void 0;Go===void 0&&(Go=Wt[La]),PA?ye(xt,La,Go):he(xt,La,Go)}return xt}(Qe,He(Qe))}(un):V(un)&&!$(un)||(Pt=function(Qe){return typeof Qe.constructor!="function"||ve(Qe)?{}:xe(G(Qe))}(kt))):Hi=!1}var Yu;Hi&&(Fi.set(kt,Pt),bt(Pt,kt,Nn,Xr,Fi),Fi.delete(kt)),Gt(Nt,ot,Pt)})(w,H,Le,j,zn,q,Ee);else{var gt=q?q(Mt(w,Le),Be,Le+"",w,H,Ee):void 0;gt===void 0&&(gt=Be),Gt(w,Le,gt)}},He)}function pr(w,H){return In(function(j,q,Ee){return q=ge(q===void 0?j.length-1:q,0),function(){for(var Be=arguments,Le=-1,gt=ge(Be.length-q,0),Nt=Array(gt);++Le<gt;)Nt[Le]=Be[q+Le];Le=-1;for(var je=Array(q+1);++Le<q;)je[Le]=Be[Le];return je[q]=Ee(Nt),function(ot,Nn,bt){switch(bt.length){case 0:return ot.call(Nn);case 1:return ot.call(Nn,bt[0]);case 2:return ot.call(Nn,bt[0],bt[1]);case 3:return ot.call(Nn,bt[0],bt[1],bt[2])}return ot.apply(Nn,bt)}(j,this,je)}}(w,H,$u),w+"")}var fr=ie?function(w,H){return ie(w,"toString",{configurable:!0,enumerable:!1,value:(j=H,function(){return j}),writable:!0});var j}:$u;function ln(w,H){var j,q,Ee=w.__data__;return((q=typeof(j=H))=="string"||q=="number"||q=="symbol"||q=="boolean"?j!=="__proto__":j===null)?Ee[typeof H=="string"?"string":"hash"]:Ee.map}function mr(w,H){var j=function(q,Ee){return q==null?void 0:q[Ee]}(w,H);return dr(j)?j:void 0}function cn(w,H){var j=typeof w;return!!(H=H==null?r:H)&&(j=="number"||j!="symbol"&&l.test(w))&&w>-1&&w%1==0&&w<H}function ve(w){var H=w&&w.constructor;return w===(typeof H=="function"&&H.prototype||C)}function Mt(w,H){if((H!=="constructor"||typeof w[H]!="function")&&H!="__proto__")return w[H]}var In=function(w){var H=0,j=0;return function(){var q=it(),Ee=16-(q-j);if(j=q,Ee>0){if(++H>=800)return arguments[0]}else H=0;return w.apply(void 0,arguments)}}(fr);function Ne(w,H){return w===H||w!=w&&H!=H}var fe=yt(function(){return arguments}())?yt:function(w){return oe(w)&&S.call(w,"callee")&&!K.call(w,"callee")},R=Array.isArray;function N(w){return w!=null&&Y(w.length)&&!$(w)}var x=ne||function(){return!1};function $(w){if(!V(w))return!1;var H=an(w);return H==o||H=="[object GeneratorFunction]"||H=="[object AsyncFunction]"||H=="[object Proxy]"}function Y(w){return typeof w=="number"&&w>-1&&w%1==0&&w<=r}function V(w){var H=typeof w;return w!=null&&(H=="object"||H=="function")}function oe(w){return w!=null&&typeof w=="object"}var be=_?function(w){return function(H){return w(H)}}(_):function(w){return oe(w)&&Y(w.length)&&!!u[an(w)]};function He(w){return N(w)?_t(w):hr(w)}var yn,MA=(yn=function(w,H,j){zn(w,H,j)},pr(function(w,H){var j=-1,q=H.length,Ee=q>1?H[q-1]:void 0,Be=q>2?H[2]:void 0;for(Ee=yn.length>3&&typeof Ee=="function"?(q--,Ee):void 0,Be&&function(gt,Nt,je){if(!V(je))return!1;var ot=typeof Nt;return!!(ot=="number"?N(je)&&cn(Nt,je.length):ot=="string"&&Nt in je)&&Ne(je[Nt],gt)}(H[0],H[1],Be)&&(Ee=q<3?void 0:Ee,q=1),w=Object(w);++j<q;){var Le=H[j];Le&&yn(w,Le,j,Ee)}return w}));function $u(w){return w}t.exports=MA})(bc,bc.exports);const PT=eu(bc.exports);class xT{constructor(e,n,r,i){this.backendRestClient=new MT(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}},
102
+ </svg>`.replace(/\s+/g," ");return"data:image/svg+xml;base64,"+pO(i)}(t.id,EO(t.name))}function zo(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 Fu({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=${bv}`,linkUrl:`https://maps.google.com/maps?q=${n}&z=15`}}function gA(t,e){const[n,r]=ae({long:"",short:""});return ft(()=>{let i,o=!0;const s=()=>{const l=Date.now(),u=function(c,h,d){const p=c-h;let f,m,E;const A=new Date(h),_={month:"short",day:"numeric"};if(p<Qp)return{changeTimeout:5e3,short:d.JUST_NOW,long:d.JUST_NOW};if(p<ef)f=Qp,m="MINUTES",E=d.MINUTES;else if(p<tf)f=ef,m="HOURS",E=d.HOURS;else{if(!(p<nT)){if(A.getFullYear()===new Date(c).getFullYear()){const O=A.toLocaleDateString(d.locale,_);return{changeTimeout:void 0,short:O,long:O}}{const O=A.toLocaleDateString(d.locale,{..._,year:"numeric"});return{changeTimeout:void 0,short:O,long:O}}}f=tf,m="DAYS",E=d.DAYS}const g=Math.floor(p/f);return{changeTimeout:f,short:g+E,long:rT(g,m.toLowerCase(),d.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 Na(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 Zp=864e5;function SA(t,e){const n=Date.now(),r=(i=t,o=n,Math.floor((o-i)/Zp));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,h){return Math.floor((h-c)/(365*Zp))}(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 Qp=6e4,ef=36e5,tf=864e5,nT=6048e5;function rT(t,e,n){return new Intl.RelativeTimeFormat(n).format(-t,e)}function U(t,...e){const n=yv.bind(Oe)(t,...e);return Array.isArray(n)?Oe(Pe,{},...n):n}function Yo(t,e=10){return Cu(t,Math.min(e,100))}function OA(t,e,n){const r=Mi(),i=vt([]),o=vt(!1);ym(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=ee(()=>o.set(!0),[o]);return[te(i),s]}function DA(t){var i,o,s,a,l,u,c,h;if(!t.container)return;const e=getComputedStyle(t.container),n=(i=yo.parse(e.color))!=null?i:new yo(255,255,255,1),r=n.withAlpha(n.alpha/2);return To.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:(h=t.waveColor)!=null?h:r.toRgbaString()})}function Go({src:t,onError:e,filename:n,className:r=""}){const i=Q(null),o=Q(),s=Q(),[a,l]=ae(!1),[u,c]=ae(0),[h,d]=ae(1),p=Q(),[f,m]=ae(!1),E=te(he().t$),{audioUrl:A,audioName:_,height:g,isRecordingPreviewBlob:O}=se(()=>{const S=new URL(t),v=S.protocol==="blob:"&&S.searchParams.has("name");let y=n!=null?n:"";return v&&(y=S.searchParams.get("name"),S.searchParams.delete("name")),{audioUrl:S,audioName:y,height:v?24:50,isRecordingPreviewBlob:v}},[t,n]),[D,R]=ae(O);Z(()=>{let S;const v=i.current.closest("t-message-list"),y=new IntersectionObserver(function([b]){b.isIntersecting?S=setTimeout(()=>R(!0),500):clearTimeout(S)},{root:v});return y.observe(i.current),()=>{y.disconnect()}},[]),Z(()=>{if(!D)return;o.current=new Audio;const S={normalize:!0,height:g,container:i.current};function v(){const M=o.current;if(!M)return;const k=M.error;(k.message!=="Media failed to load"||M.paused)&&(k.message==="PIPELINE_ERROR_READ: FFmpegDemuxer: demuxer seek failed"?(M.load(),l(!1)):(m(!0),l(!1),e==null||e()))}const y=_.slice(_.lastIndexOf(".")+1);if(function(M){return/(?:^|\/)talkjs_audio_message_[0-9]+_([0-9]+)[.](?:mp3|webm)$/.test(M)}(_)&&y==="webm"&&!o.current.canPlayType("audio/webm;codecs=opus"))S.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 M=o.current;M.addEventListener("error",v),M.preservesPitch=!0,S.url=A.toString(),S.media=M}p.current=DA(S);const b=p.current;return b.on("finish",()=>{o.current.loop=!0,l(!1)}),b.on("ready",M=>c(Math.trunc(M))),b.on("timeupdate",M=>c(Math.trunc(M))),S.backend==="WebAudio"&&b.load(A.toString()).catch(()=>{m(!0),l(!1),e==null||e()}),()=>{var M,k;(M=o.current)==null||M.pause(),(k=o.current)==null||k.removeEventListener("error",v),o.current=void 0,b.destroy(),p.current=void 0}},[A,_,e,D,g]);const T=ee(()=>{var S;if(p.current.options.backend==="WebAudio")p.current.isPlaying()||s.current.play(),p.current.playPause(),l((S=p.current.isPlaying())!=null?S:!1);else{const v=o.current;v.paused?v.play():v.pause(),v.loop=!1,!v.paused&&v.ended&&(v.load(),v.play()),l(!v.paused)}},[]),I=ee(S=>{p.current.setPlaybackRate(S),d(S)},[]);return L("div",f?{}:{className:`t-audio-player ${r}`,children:[L("button",{onClick:T,children:L(Ys,{className:"t-play-pause-icon",type:a?"pause":"play","aria-label":a?E.ARIA_PAUSE_AUDIO:E.ARIA_PLAY_AUDIO})}),L("div",{className:"t-waveform",ref:i,style:{height:g}}),L("div",{className:"t-duration",children:Na(u)}),L(li,{type:"menu",portal:!0,popoverComponent:oT,popoverProps:{playbackSpeed:h,selectPlaybackSpeed:I},className:"t-playback-speed","aria-label":E.ARIA_SET_PLAYBACK_SPEED,children:[h,"x",L(Ys,{type:"updown",className:"t-up-down-icon","aria-hidden":!0})]})]})}const iT=[.25,.5,.75,1,1.25,1.5,2];function oT({playbackSpeed:t,selectPlaybackSpeed:e}){return L("div",{className:"t-playback-speed-menu",children:[L("div",{className:"t-heading",children:"Playback Speed"}),iT.map(n=>L(Kn,{className:"t-menu-item",onSelect:()=>e(n),children:[L("span",{className:"t-playback-checkmark",children:t===n?"✓ ":""}),n,"x"]},n))]})}const sT=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/,aT=/^rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)$/;class yo{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(sT))!=null?r:e.match(aT);if(n){const[i,o,s,a,l="1"]=n;return new yo(Number(o),Number(s),Number(a),Number(l))}return null}withAlpha(e){return new yo(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 Il(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(h){h(c)})).then(s,a)}l((r=r.apply(t,[])).next())})}class vA{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 lT extends vA{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 cT extends vA{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 uT=["audio/webm","audio/wav","audio/mpeg","audio/mp4","audio/mp3"];class Hu extends lT{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 cT,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 Hu(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,h,d,p;if(!this.isWaveformPaused){if(o.getFloatTimeDomainData(a),this.options.scrollingWaveform){const f=Math.floor(100*(this.options.scrollingWaveformWindow||0));let m=0;for(let A=0;A<s;A++){const _=Math.abs(a[A]);_>m&&(m=_)}this.dataWindow||(this.dataWindow=new Float32Array(f));const E=new Float32Array(f);if(this.dataWindow&&this.dataWindow.length>0){const A=f-1,_=this.dataWindow.slice(-A);E.set(_,0)}E[f-1]=m,this.dataWindow=E}else if(this.options.continuousWaveform){if(!this.dataWindow){const m=this.options.continuousWaveformDuration?Math.round(100*this.options.continuousWaveformDuration):((h=(c=this.wavesurfer)===null||c===void 0?void 0:c.getWidth())!==null&&h!==void 0?h:0)*window.devicePixelRatio;this.dataWindow=new Float32Array(m)}let f=0;for(let m=0;m<s;m++){const E=Math.abs(a[m]);E>f&&(f=E)}if(l+1>this.dataWindow.length){const m=new Float32Array(2*this.dataWindow.length);m.set(this.dataWindow,0),this.dataWindow=m}this.dataWindow[l]=f,l++}else this.dataWindow=a;if(this.wavesurfer){const f=((p=(d=this.dataWindow)===null||d===void 0?void 0:d.length)!==null&&p!==void 0?p:0)/100;this.wavesurfer.load("",[this.dataWindow],this.options.scrollingWaveform?this.options.scrollingWaveformWindow:f).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(m=>{console.error("Error rendering real-time recording data:",m)})}}},10);return{onDestroy:()=>{clearInterval(u),i==null||i.disconnect(),r==null||r.close()},onEnd:()=>{this.isWaveformPaused=!0,this.stopMic()}}}startMic(e){return Il(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 Il(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||uT.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 Il(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 TA={exports:{}};TA.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(R){if(Array.isArray(R))return R}(O)||function(R,T){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(R)){var I=[],S=!0,v=!1,y=void 0;try{for(var b,M=R[Symbol.iterator]();!(S=(b=M.next()).done)&&(I.push(b.value),!T||I.length!==T);S=!0);}catch(k){v=!0,y=k}finally{try{S||M.return==null||M.return()}finally{if(v)throw y}}return I}}(O,D)||function(R,T){if(R){if(typeof R=="string")return s(R,T);var I=Object.prototype.toString.call(R).slice(8,-1);return I==="Object"&&R.constructor&&(I=R.constructor.name),I==="Map"||I==="Set"?Array.from(R):I==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(I)?s(R,T):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 R=0,T=new Array(D);R<D;R++)T[R]=O[R];return T}function a(O,D){if(!(O instanceof D))throw new TypeError("Cannot call a class as a function")}function l(O,D){for(var R=0;R<D.length;R++){var T=D[R];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(O,T.key,T)}}function u(O,D){return(u=Object.setPrototypeOf||function(R,T){return R.__proto__=T,R})(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(R){return!1}}();return function(){var R,T=d(O);if(D){var I=d(this).constructor;R=Reflect.construct(T,arguments,I)}else R=T.apply(this,arguments);return h(this,R)}}function h(O,D){return!D||i(D)!=="object"&&typeof D!="function"?function(R){if(R===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return R}(O):D}function d(O){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(D){return D.__proto__||Object.getPrototypeOf(D)})(O)}var p,f=n(2),m=f.EventTarget,E=f.defineEventAttribute,A=(0,n(3).detect)(),_=r.AudioContext||r.webkitAudioContext,g=function(O){(function(v,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");v.prototype=Object.create(y&&y.prototype,{constructor:{value:v,writable:!0,configurable:!0}}),y&&u(v,y)})(S,O);var D,R,T,I=c(S);function S(v){var y,b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},M=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};a(this,S);var k=b.mimeType,P=b.audioBitsPerSecond,B=(b.videoBitsPerSecond,b.bitsPerSecond),F=M.encoderWorkerFactory,V=M.OggOpusEncoderWasmPath,G=M.WebMOpusEncoderWasmPath;if((y=I.call(this))._stream=v,y._state="inactive",y._mimeType=k||"",y._audioBitsPerSecond=P||B,y.workerState="inactive",!S.isTypeSupported(y._mimeType))throw new TypeError("invalid arguments, a MIME Type is not supported");switch(S._parseType(y._mimeType).subtype){case"wave":case"wav":y._mimeType="audio/wave";break;case"webm":y._mimeType="audio/webm";break;case"ogg":y._mimeType="audio/ogg";break;default:switch(A&&A.name){case"chrome":case"edge":default:y._mimeType="audio/webm";break;case"firefox":y._mimeType="audio/ogg";break;case"ios":case"safari":y._mimeType="audio/wave"}}switch(y._mimeType){case"audio/wave":y._wasmPath="";break;case"audio/webm":y._wasmPath=G||"";break;case"audio/ogg":y._wasmPath=V||"";break;default:throw new Error("Internal Error: Unexpected MIME Type: ".concat(y._mimeType))}var z="";return document.currentScript?z=document.currentScript.src:self.location&&(z=self.location.href),z=z.substr(0,z.lastIndexOf("/"))+"/encoderWorker.umd.js",typeof S.encoderWorker=="function"&&(z=URL.createObjectURL(new Blob(["(".concat(S.encoderWorker,")()")]))),y._workerFactory=typeof F=="function"?F:function(K){return new Worker(z)},y._spawnWorker(),y}return D=S,T=[{key:"isTypeSupported",value:function(v){if(typeof v=="string"&&!v)return!0;try{var y=S._parseType(v),b=y.type,M=y.subtype,k=y.codec}catch(P){return!1}if(b!=="audio"||M!=="ogg"&&M!=="webm"&&M!=="wave"&&M!=="wav")return!1;switch(M){case"ogg":case"webm":if(k!=="opus"&&k)return!1;break;case"wave":case"wav":if(k)return!1}return!0}},{key:"_parseType",value:function(v){try{var y=o(v.match(/^(\w+)\/(\w+)(;\s*codecs=(\w+))?$/),5),b=y[1],M=y[2],k=y[4]}catch(P){return typeof v!="string"||v?null:{type:"",subtype:"",codec:""}}return{type:b,subtype:M,codec:k}}}],(R=[{key:"_spawnWorker",value:function(){var v=this;this.worker=this._workerFactory(),this.worker.onmessage=function(y){return v._onmessageFromWorker(y)},this.worker.onerror=function(y){return v._onerrorFromWorker(y)},this._postMessageToWorker("loadEncoder",{mimeType:this._mimeType,wasmPath:this._wasmPath})}},{key:"_postMessageToWorker",value:function(v){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};switch(v){case"loadEncoder":var b=y.mimeType,M=y.wasmPath;this.worker.postMessage({command:v,mimeType:b,wasmPath:M});break;case"init":var k=y.sampleRate,P=y.channelCount,B=y.bitsPerSecond;this.worker.postMessage({command:v,sampleRate:k,channelCount:P,bitsPerSecond:B}),this.workerState="encoding",this.source.connect(this.processor),this.processor.connect(this.context.destination);var F=new r.Event("start");this.dispatchEvent(F);break;case"pushInputData":var V=y.channelBuffers,G=y.length,z=y.duration;this.worker.postMessage({command:v,channelBuffers:V,length:G,duration:z});break;case"getEncodedData":case"done":this.worker.postMessage({command:v});break;default:throw new Error("Internal Error: Incorrect postMessage requested.")}}},{key:"_onmessageFromWorker",value:function(v){var y,b=v.data,M=b.command,k=b.buffers;switch(M){case"readyToInit":var P=this.sampleRate,B=this.channelCount;this.workerState="readyToInit",this.state==="recording"&&this._postMessageToWorker("init",{sampleRate:P,channelCount:B,bitsPerSecond:this.audioBitsPerSecond});break;case"encodedData":case"lastEncodedData":var F=new Blob(k,{type:this._mimeType});(y=new r.Event("dataavailable")).data=F,this.dispatchEvent(y),M==="lastEncodedData"&&(y=new r.Event("stop"),this.dispatchEvent(y),this.workerState="closed")}}},{key:"_onerrorFromWorker",value:function(v){this.source.disconnect(),this.processor.disconnect(),this.worker.terminate(),this.workerState="closed";var y=["FileName: "+v.filename,"LineNumber: "+v.lineno,"Message: "+v.message].join(" - "),b=new r.Event("error");b.name="UnknownError",b.message=y,this.dispatchEvent(b)}},{key:"_enableAudioProcessCallback",value:function(v){var y=this,b=0;this.processor.onaudioprocess=function(M){for(var k=M.inputBuffer,P=(M.playbackTime,k.sampleRate,k.length),B=k.duration,F=k.numberOfChannels,V=new Array(F),G=0;G<F;G++)V[G]=k.getChannelData(G);var z={channelBuffers:V,length:P,duration:B};y._postMessageToWorker("pushInputData",z),(b+=B)>=v&&(y._postMessageToWorker("getEncodedData"),b=0)}}},{key:"start",value:function(){var v=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(v<0)throw new TypeError("invalid arguments, timeslice should be 0 or higher.");v/=1e3,this.workerState==="closed"&&this._spawnWorker(),this.context=new _;var y=this.stream.getAudioTracks();if(!y[0])throw new Error("DOMException: UnkownError, media track not found.");if(this.channelCount=y[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(v),this.workerState==="readyToInit"){var b=this.sampleRate,M=this.channelCount;this._postMessageToWorker("init",{sampleRate:b,channelCount:M,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 v=new r.Event("pause");this.dispatchEvent(v),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 v=new r.Event("resume");this.dispatchEvent(v),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,R),T&&l(D,T),S}(m);["start","stop","dataavailable","pause","resume","error"].forEach(function(O){return E(g.prototype,O)}),A&&A.name==="edge"&&(p=Worker.prototype.postMessage,Worker.prototype.postMessage=function(O){p.apply(this,[O])}),t.exports=g}).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 m}),n.d(e,"EventTarget",function(){return A});const r=new WeakMap,i=new WeakMap;function o(_){const g=r.get(_);return console.assert(g!=null,"'this' is expected an Event object, but got",_),g}function s(_,g){r.set(this,{eventTarget:_,event:g,eventPhase:2,currentTarget:_,canceled:!1,stopped:!1,passiveListener:null,timeStamp:g.timeStamp||Date.now()}),Object.defineProperty(this,"isTrusted",{value:!1,enumerable:!0});const O=Object.keys(g);for(let D=0;D<O.length;++D){const R=O[D];R in this||Object.defineProperty(this,R,a(R))}}function a(_){return{get(){return o(this).event[_]},set(g){o(this).event[_]=g},configurable:!0,enumerable:!0}}function l(_){return{value(){const g=o(this).event;return g[_].apply(g,arguments)},configurable:!0,enumerable:!0}}function u(_){if(_==null||_===Object.prototype)return s;let g=i.get(_);return g==null&&(g=function(O,D){const R=Object.keys(D);if(R.length===0)return O;function T(I,S){O.call(this,I,S)}T.prototype=Object.create(O.prototype,{constructor:{value:T,configurable:!0,writable:!0}});for(let I=0;I<R.length;++I){const S=R[I];if(!(S in O.prototype)){const v=typeof Object.getOwnPropertyDescriptor(D,S).value=="function";Object.defineProperty(T.prototype,S,v?l(S):a(S))}}return T}(u(Object.getPrototypeOf(_)),_),i.set(_,g)),g}function c(_){return o(_).stopped}function h(_,g){o(_).passiveListener=g}s.prototype={get type(){return o(this).event.type},get target(){return o(this).eventTarget},get currentTarget(){return o(this).currentTarget},composedPath(){const _=o(this).currentTarget;return _==null?[]:[_]},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 _=o(this);typeof _.event.stopPropagation=="function"&&_.event.stopPropagation()},stopImmediatePropagation(){const _=o(this);_.stopped=!0,typeof _.event.stopImmediatePropagation=="function"&&_.event.stopImmediatePropagation()},get bubbles(){return!!o(this).event.bubbles},get cancelable(){return!!o(this).event.cancelable},preventDefault(){const _=o(this);_.passiveListener==null?_.event.cancelable&&(_.canceled=!0,typeof _.event.preventDefault=="function"&&_.event.preventDefault()):console.warn("Event#preventDefault() was called from a passive listener:",_.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 d=new WeakMap;function p(_){return _!==null&&typeof _=="object"}function f(_){const g=d.get(_);if(g==null)throw new TypeError("'this' is expected an EventTarget object, but got another value.");return g}function m(_,g){Object.defineProperty(_,"on"+g,function(O){return{get(){let D=f(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 R=f(this);let T=null,I=R.get(O);for(;I!=null;)I.listenerType===3?T!==null?T.next=I.next:I.next!==null?R.set(O,I.next):R.delete(O):T=I,I=I.next;if(D!==null){const S={listener:D,listenerType:3,passive:!1,once:!1,next:null};T===null?R.set(O,S):T.next=S}},configurable:!0,enumerable:!0}}(g))}function E(_){function g(){A.call(this)}g.prototype=Object.create(A.prototype,{constructor:{value:g,configurable:!0,writable:!0}});for(let O=0;O<_.length;++O)m(g.prototype,_[O]);return g}function A(){if(!(this instanceof A)){if(arguments.length===1&&Array.isArray(arguments[0]))return E(arguments[0]);if(arguments.length>0){const _=new Array(arguments.length);for(let g=0;g<arguments.length;++g)_[g]=arguments[g];return E(_)}throw new TypeError("Cannot call a class as a function")}d.set(this,new Map)}A.prototype={addEventListener(_,g,O){if(g==null)return!1;if(typeof g!="function"&&!p(g))throw new TypeError("'listener' should be a function or an object.");const D=f(this),R=p(O),T=(R?O.capture:O)?1:2,I={listener:g,listenerType:T,passive:R&&!!O.passive,once:R&&!!O.once,next:null};let S=D.get(_);if(S===void 0)return D.set(_,I),!0;let v=null;for(;S!=null;){if(S.listener===g&&S.listenerType===T)return!1;v=S,S=S.next}return v.next=I,!0},removeEventListener(_,g,O){if(g==null)return!1;const D=f(this),R=(p(O)?O.capture:O)?1:2;let T=null,I=D.get(_);for(;I!=null;){if(I.listener===g&&I.listenerType===R)return T!==null?T.next=I.next:I.next!==null?D.set(_,I.next):D.delete(_),!0;T=I,I=I.next}return!1},dispatchEvent(_){if(_==null||typeof _.type!="string")throw new TypeError('"event.type" should be a string.');const g=f(this),O=_.type;let D=g.get(O);if(D==null)return!0;const R=function(I,S){return new(u(Object.getPrototypeOf(S)))(I,S)}(this,_);let T=null;for(;D!=null;){if(D.once?T!==null?T.next=D.next:D.next!==null?g.set(O,D.next):g.delete(O):T=D,h(R,D.passive?D.listener:null),typeof D.listener=="function")try{D.listener.call(this,R)}catch(I){typeof console!="undefined"&&typeof console.error=="function"&&console.error(I)}else D.listenerType!==3&&typeof D.listener.handleEvent=="function"&&D.listener.handleEvent(R);if(c(R))break;D=D.next}return h(R,null),function(I,S){o(I).eventPhase=S}(R,0),function(I,S){o(I).currentTarget=S}(R,null),!R.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,f=0,m=arguments.length;f<m;f++)p+=arguments[f].length;var E=Array(p),A=0;for(f=0;f<m;f++)for(var _=arguments[f],g=0,O=_.length;g<O;g++,A++)E[A]=_[g];return E};Object.defineProperty(e,"__esModule",{value:!0});var o=function(p,f,m){this.name=p,this.version=f,this.os=m};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 f=p!==""&&l.reduce(function(_,g){var O=g[0],D=g[1];if(_)return _;var R=D.exec(p);return!!R&&[O,R]},!1);if(!f)return null;var m=f[0],E=f[1];if(m==="searchbot")return new a;var A=E[1]&&E[1].split(/[._]/).slice(0,3);return A?A.length<3&&(A=i(A,function(_){for(var g=[],O=0;O<_;O++)g.push("0");return g}(3-A.length))):A=[],new o(m,A.join("."),h(p))}function h(p){for(var f=0,m=u.length;f<m;f++){var E=u[f],A=E[0];if(E[1].test(p))return A}return null}function d(){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):d()},e.parseUserAgent=c,e.detectOS=h,e.getNodeVersion=d}).call(this,n(4))},function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(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(_){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,h=-1;function d(){c&&l&&(c=!1,l.length?u=l.concat(u):h=-1,u.length&&p())}function p(){if(!c){var E=a(d);c=!0;for(var A=u.length;A;){for(l=u,u=[];++h<A;)l&&l[h].run();h=-1,A=u.length}l=null,c=!1,function(_){if(r===clearTimeout)return clearTimeout(_);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(_);try{r(_)}catch(g){try{return r.call(null,_)}catch(O){return r.call(this,_)}}}(E)}}function f(E,A){this.fun=E,this.array=A}function m(){}i.nextTick=function(E){var A=new Array(arguments.length-1);if(arguments.length>1)for(var _=1;_<arguments.length;_++)A[_-1]=arguments[_];u.push(new f(E,A)),u.length!==1||c||a(p)},f.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=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,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}}]);const dT=tu(TA.exports);var nf,yl,RA={exports:{}};nf=RA,typeof OpusMediaRecorder!="undefined"&&OpusMediaRecorder,yl=function(){return function(){(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}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=5)})([function(t,e,n){(function(r){function i(a,l){for(var u=0,c=a.length-1;c>=0;c--){var h=a[c];h==="."?a.splice(c,1):h===".."?(a.splice(c,1),u++):u&&(a.splice(c,1),u--)}if(l)for(;u--;u)a.unshift("..");return a}function o(a,l){if(a.filter)return a.filter(l);for(var u=[],c=0;c<a.length;c++)l(a[c],c,a)&&u.push(a[c]);return u}e.resolve=function(){for(var a="",l=!1,u=arguments.length-1;u>=-1&&!l;u--){var c=u>=0?arguments[u]:r.cwd();if(typeof c!="string")throw new TypeError("Arguments to path.resolve must be strings");c&&(a=c+"/"+a,l=c.charAt(0)==="/")}return(l?"/":"")+(a=i(o(a.split("/"),function(h){return!!h}),!l).join("/"))||"."},e.normalize=function(a){var l=e.isAbsolute(a),u=s(a,-1)==="/";return(a=i(o(a.split("/"),function(c){return!!c}),!l).join("/"))||l||(a="."),a&&u&&(a+="/"),(l?"/":"")+a},e.isAbsolute=function(a){return a.charAt(0)==="/"},e.join=function(){var a=Array.prototype.slice.call(arguments,0);return e.normalize(o(a,function(l,u){if(typeof l!="string")throw new TypeError("Arguments to path.join must be strings");return l}).join("/"))},e.relative=function(a,l){function u(E){for(var A=0;A<E.length&&E[A]==="";A++);for(var _=E.length-1;_>=0&&E[_]==="";_--);return A>_?[]:E.slice(A,_-A+1)}a=e.resolve(a).substr(1),l=e.resolve(l).substr(1);for(var c=u(a.split("/")),h=u(l.split("/")),d=Math.min(c.length,h.length),p=d,f=0;f<d;f++)if(c[f]!==h[f]){p=f;break}var m=[];for(f=p;f<c.length;f++)m.push("..");return(m=m.concat(h.slice(p))).join("/")},e.sep="/",e.delimiter=":",e.dirname=function(a){if(typeof a!="string"&&(a+=""),a.length===0)return".";for(var l=a.charCodeAt(0),u=l===47,c=-1,h=!0,d=a.length-1;d>=1;--d)if((l=a.charCodeAt(d))===47){if(!h){c=d;break}}else h=!1;return c===-1?u?"/":".":u&&c===1?"/":a.slice(0,c)},e.basename=function(a,l){var u=function(c){typeof c!="string"&&(c+="");var h,d=0,p=-1,f=!0;for(h=c.length-1;h>=0;--h)if(c.charCodeAt(h)===47){if(!f){d=h+1;break}}else p===-1&&(f=!1,p=h+1);return p===-1?"":c.slice(d,p)}(a);return l&&u.substr(-1*l.length)===l&&(u=u.substr(0,u.length-l.length)),u},e.extname=function(a){typeof a!="string"&&(a+="");for(var l=-1,u=0,c=-1,h=!0,d=0,p=a.length-1;p>=0;--p){var f=a.charCodeAt(p);if(f!==47)c===-1&&(h=!1,c=p+1),f===46?l===-1?l=p:d!==1&&(d=1):l!==-1&&(d=-1);else if(!h){u=p+1;break}}return l===-1||c===-1||d===0||d===1&&l===c-1&&l===u+1?"":a.slice(l,c)};var s="ab".substr(-1)==="b"?function(a,l,u){return a.substr(l,u)}:function(a,l,u){return l<0&&(l=a.length+l),a.substr(l,u)}}).call(this,n(2))},function(t,e){function n(A){return(n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(_){return typeof _}:function(_){return _&&typeof Symbol=="function"&&_.constructor===Symbol&&_!==Symbol.prototype?"symbol":typeof _})(A)}function r(A,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");A.prototype=Object.create(_&&_.prototype,{constructor:{value:A,writable:!0,configurable:!0}}),_&&i(A,_)}function i(A,_){return(i=Object.setPrototypeOf||function(g,O){return g.__proto__=O,g})(A,_)}function o(A){var _=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(g){return!1}}();return function(){var g,O=a(A);if(_){var D=a(this).constructor;g=Reflect.construct(O,arguments,D)}else g=O.apply(this,arguments);return s(this,g)}}function s(A,_){return!_||n(_)!=="object"&&typeof _!="function"?function(g){if(g===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g}(A):_}function a(A){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(_){return _.__proto__||Object.getPrototypeOf(_)})(A)}function l(A,_){if(!(A instanceof _))throw new TypeError("Cannot call a class as a function")}function u(A,_,g){return _&&function(O,D){for(var R=0;R<D.length;R++){var T=D[R];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(O,T.key,T)}}(A.prototype,_),A}var c=function(){function A(_,g,O,D){switch(l(this,A),this._size=g,this._module=_,this._size){case 1:this._heapArray=O?this._module.HEAP8:this._module.HEAPU8;break;case 2:this._heapArray=O?this._module.HEAP16:this._module.HEAPU16;break;case 4:this._heapArray=O?this._module.HEAP32:this._module.HEAPU32;break;default:this._heapArray=this._module.HEAPU8}D&&(this._size=4,this._heapArray=this._module.HEAPF32),this._pointer=this._module._malloc(g)}return u(A,[{key:"free",value:function(){this._module._free(this.pointer)}},{key:"pointer",get:function(){return this._pointer}},{key:"value",get:function(){var _=0;switch(this._size){case 2:_=1;break;case 4:_=2;break;default:throw new Error("Pointer can be only deferenced as integer-sized")}return this._heapArray[this.pointer>>_]},set:function(_){var g=0;switch(this._size){case 2:g=1;break;case 4:g=2;break;default:throw new Error("Pointer can be only deferenced as integer-sized")}this._heapArray[this.pointer>>g]=_}}]),A}(),h=function(A){r(g,A);var _=o(g);function g(O,D){var R;return l(this,g),R=_.call(this,O,4,!0,!1),D!==void 0&&(R.value=D),R}return g}(c),d=function(A){r(g,A);var _=o(g);function g(O,D){var R;return l(this,g),R=_.call(this,O,4,!1,!1),D!==void 0&&(R.value=D),R}return g}(c),p=function(A){r(g,A);var _=o(g);function g(O,D,R,T,I){var S;l(this,g),S=_.call(this,O,D*R,T,I);var v=0;switch(R){case 1:S._heapArray=T?S._module.HEAP8:S._module.HEAPU8,v=0;break;case 2:S._heapArray=T?S._module.HEAP16:S._module.HEAPU16,v=1;break;case 4:S._heapArray=T?S._module.HEAP32:S._module.HEAPU32,v=2;break;default:throw new Error("Unit size must be an integer-size")}I&&(S._heapArray=S._module.HEAPF32,v=2);var y=S._pointer>>v;return S._buffer=S._heapArray.subarray(y,y+D),S._length=D,S}return u(g,[{key:"set",value:function(O,D){this._buffer.set(O,D)}},{key:"subarray",value:function(O,D){return this._buffer.subarray(O,D)}},{key:"length",get:function(){return this._length}}]),g}(c),f=function(A){r(g,A);var _=o(g);function g(O,D){return l(this,g),_.call(this,O,D,4,!0,!0)}return g}(p),m=function(A){r(g,A);var _=o(g);function g(O,D){return l(this,g),_.call(this,O,D,1,!1,!1)}return g}(p),E=function(){function A(_){l(this,A),this._module=_}return u(A,[{key:"mallocInt32",value:function(_){return new h(this._module,_)}},{key:"mallocUint32",value:function(_){return new d(this._module,_)}},{key:"mallocUint8Buffer",value:function(_){return new m(this._module,_)}},{key:"mallocFloat32Buffer",value:function(_){return new f(this._module,_)}}]),A}();t.exports={writeString:function(A,_,g){for(var O=0;O<g.length;O++)A.setUint8(_+O,g.charCodeAt(O))},EmscriptenMemoryAllocator:E}},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(_){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,h=-1;function d(){c&&l&&(c=!1,l.length?u=l.concat(u):h=-1,u.length&&p())}function p(){if(!c){var E=a(d);c=!0;for(var A=u.length;A;){for(l=u,u=[];++h<A;)l&&l[h].run();h=-1,A=u.length}l=null,c=!1,function(_){if(r===clearTimeout)return clearTimeout(_);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(_);try{r(_)}catch(g){try{return r.call(null,_)}catch(O){return r.call(this,_)}}}(E)}}function f(E,A){this.fun=E,this.array=A}function m(){}i.nextTick=function(E){var A=new Array(arguments.length-1);if(arguments.length>1)for(var _=1;_<arguments.length;_++)A[_-1]=arguments[_];u.push(new f(E,A)),u.length!==1||c||a(p)},f.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=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,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}},function(t,e){t.exports=function(n){return n.webpackPolyfill||(n.deprecate=function(){},n.paths=[],n.children||(n.children=[]),Object.defineProperty(n,"loaded",{enumerable:!0,get:function(){return n.l}}),Object.defineProperty(n,"id",{enumerable:!0,get:function(){return n.i}}),n.webpackPolyfill=1),n}},function(t,e){},function(t,e,n){function r(i){var o,s=n(6),a=n(7),l=n(8);i.onmessage=function(u){var c=u.data.command;switch(c){case"loadEncoder":var h,d=u.data,p=d.mimeType,f=d.wasmPath;switch(p){case"audio/wav":case"audio/wave":h=s;break;case"audio/webm":h=a;break;case"audio/ogg":h=l}var m={};f&&(m.locateFile=function(I,S){return I.match(/.wasm/)?f:S+I}),h(m).then(function(I){o=I,self.postMessage({command:"readyToInit"})});break;case"init":var E=u.data,A=E.sampleRate,_=E.channelCount,g=E.bitsPerSecond;o.init(A,_,g);break;case"pushInputData":for(var O=u.data,D=O.channelBuffers,R=(O.length,O.duration,0);R<D.length;R++)D[R]=new Float32Array(D[R].buffer);o.encode(D);break;case"getEncodedData":case"done":c==="done"&&o.close();var T=o.flush();self.postMessage({command:c==="done"?"lastEncodedData":"encodedData",buffers:T},T),c==="done"&&self.close()}}}typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&r(self),t.exports=r},function(t,e,n){function r(a,l){(l==null||l>a.length)&&(l=a.length);for(var u=0,c=new Array(l);u<l;u++)c[u]=a[u];return c}var i=n(1).writeString,o=Int16Array.BYTES_PER_ELEMENT,s=function(){function a(u,c,h){(function(d,p){if(!(d instanceof p))throw new TypeError("Cannot call a class as a function")})(this,a),this.config={inputSampleRate:u,channelCount:c},this.encodedBuffers=[]}var l;return(l=[{key:"encode",value:function(u){for(var c=u[0].length,h=new ArrayBuffer(c*o*this.config.channelCount),d=new DataView(h),p=0;p<this.config.channelCount;p++)for(var f=u[p],m=0;m<c;m++){var E=32767*f[m]|0;E>32767?E=32767:E<-32768&&(E=-32768);var A=(m*this.config.channelCount+p)*o;d.setInt16(A,0|E,!0)}this.encodedBuffers.push(h)}},{key:"getHeader",value:function(){var u=this.encodedBuffers.reduce(function(d,p){return d+p.byteLength},0),c=new ArrayBuffer(44),h=new DataView(c);return i(h,0,"RIFF"),h.setUint32(4,36+u,!0),i(h,8,"WAVE"),i(h,12,"fmt "),h.setUint32(16,16,!0),h.setUint16(20,1,!0),h.setUint16(22,this.config.channelCount,!0),h.setUint32(24,this.config.inputSampleRate,!0),h.setUint32(28,this.config.inputSampleRate*o*this.config.channelCount,!0),h.setUint16(32,o*this.config.channelCount,!0),h.setUint16(34,8*o,!0),i(h,36,"data"),h.setUint32(40,u,!0),c}}])&&function(u,c){for(var h=0;h<c.length;h++){var d=c[h];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(u,d.key,d)}}(a.prototype,l),a}();t.exports=function(a){return new Promise(function(l,u){(a=a!==void 0&&a||{}).init=function(c,h,d){a.encoder=new s(c,h,d)},a.encode=function(c){a.encoder.encode(c)},a.flush=function(){var c=a.encoder.getHeader(),h=a.encoder.encodedBuffers.splice(0,a.encoder.encodedBuffers.length);return[c].concat(function(d){return function(p){if(Array.isArray(p))return r(p)}(d)||function(p){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(p))return Array.from(p)}(d)||function(p,f){if(p){if(typeof p=="string")return r(p,f);var m=Object.prototype.toString.call(p).slice(8,-1);return m==="Object"&&p.constructor&&(m=p.constructor.name),m==="Map"||m==="Set"?Array.from(p):m==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(m)?r(p,f):void 0}}(d)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
104
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}(h))},a.close=function(){},l(a)})}},function(t,e,n){(function(r,i,o,s){var a;function l(d){return(l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p})(d)}function u(d,p,f){return p&&function(m,E){for(var A=0;A<E.length;A++){var _=E[A];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(m,_.key,_)}}(d.prototype,p),d}var c,h=(c=(c=typeof document!="undefined"&&document.currentScript?document.currentScript.src:void 0)||r,function(d){d=(d=d||{})!==void 0?d:{};var p=n(1).EmscriptenMemoryAllocator,f=48e3,m=function(){function C(N,x){var $=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;(function(W,Y){if(!(W instanceof Y))throw new TypeError("Cannot call a class as a function")})(this,C),this.config={inputSampleRate:N,channelCount:x},this.memory=new p(d),this._opus_encoder_create=d._opus_encoder_create,this._opus_encoder_ctl=d._opus_encoder_ctl,this._opus_encode_float=d._opus_encode_float,this._opus_encoder_destroy=d._opus_encoder_destroy,this._speex_resampler_init=d._speex_resampler_init,this._speex_resampler_process_interleaved_float=d._speex_resampler_process_interleaved_float,this._speex_resampler_destroy=d._speex_resampler_destroy,this._container=new d.Container,this._container.init(f,x,Math.floor(4294967295*Math.random())),this.OpusInitCodec(f,x,$),this.SpeexInitResampler(N,f,x),this.inputSamplesPerChannel=20*N/1e3,this.outputSamplePerChannel=960,this.inputBufferIndex=0,this.mInputBuffer=this.memory.mallocFloat32Buffer(this.inputSamplesPerChannel*x),this.mResampledBuffer=this.memory.mallocFloat32Buffer(this.outputSamplePerChannel*x),this.mOutputBuffer=this.memory.mallocUint8Buffer(4e3),this.interleavedBuffers=x!==1?new Float32Array(4096*x):void 0}return u(C,[{key:"encode",value:function(N){for(var x=this.interleave(N),$=0;$<x.length;){var W=Math.min(this.mInputBuffer.length-this.inputBufferIndex,x.length-$);if(this.mInputBuffer.set(x.subarray($,$+W),this.inputBufferIndex),this.inputBufferIndex+=W,this.inputBufferIndex>=this.mInputBuffer.length){var Y=this.memory.mallocUint32(this.inputSamplesPerChannel),ne=this.memory.mallocUint32(this.outputSamplePerChannel),Re=this._speex_resampler_process_interleaved_float(this.resampler,this.mInputBuffer.pointer,Y.pointer,this.mResampledBuffer.pointer,ne.pointer);if(Y.free(),ne.free(),Re!==0)throw new Error("Resampling error.");var Me=this._opus_encode_float(this.encoder,this.mResampledBuffer.pointer,this.outputSamplePerChannel,this.mOutputBuffer.pointer,this.mOutputBuffer.length);if(Me<0)throw new Error("Opus encoding error.");this._container.writeFrame(this.mOutputBuffer.pointer,Me,this.outputSamplePerChannel),this.inputBufferIndex=0}$+=W}}},{key:"close",value:function(){for(var N=this.config.channelCount,x=[],$=0;$<N;++$)x.push(new Float32Array(4096-this.inputBufferIndex/N));this.encode(x),d.destroy(this._container),this.mInputBuffer.free(),this.mResampledBuffer.free(),this.mOutputBuffer.free(),this._opus_encoder_destroy(this.encoder),this._speex_resampler_destroy(this.resampler)}},{key:"interleave",value:function(N){var x=N.length;if(x===1)return N[0];for(var $=0;$<x;$++)for(var W=N[$],Y=0;Y<W.length;Y++)this.interleavedBuffers[Y*x+$]=W[Y];return this.interleavedBuffers}},{key:"OpusInitCodec",value:function(N,x){var $=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,W=this.memory.mallocUint32(void 0);this.encoder=this._opus_encoder_create(N,x,2049,W.pointer);var Y=W.value;if(W.free(),Y!==0)throw new Error("Opus encodor initialization failed.");$&&this.OpusSetOpusControl(4002,$)}},{key:"OpusSetOpusControl",value:function(N,x){var $=this.memory.mallocInt32(x);this._opus_encoder_ctl(this.encoder,N,$.pointer),$.free()}},{key:"SpeexInitResampler",value:function(N,x,$){var W=this.memory.mallocUint32(void 0);this.resampler=this._speex_resampler_init($,N,x,6,W.pointer);var Y=W.value;if(W.free(),Y!==0)throw new Error("Initializing resampler failed.")}}]),C}();d.init=function(C,N,x){d.encodedBuffers=[],d.encoder=new m(C,N,x)},d.encode=function(C){d.encoder.encode(C)},d.flush=function(){return d.encodedBuffers.splice(0,d.encodedBuffers.length)},d.close=function(){d.encoder.close()};var E,A,_,g,O,D={};for(E in d)d.hasOwnProperty(E)&&(D[E]=d[E]);A=(typeof window=="undefined"?"undefined":l(window))==="object",_=typeof importScripts=="function",g=(i===void 0?"undefined":l(i))==="object"&&l(i.versions)==="object"&&typeof i.versions.node=="string",O=!A&&!g&&!_;var R,T,I,S,v="";g?(v=_?n(0).dirname(v)+"/":o+"/",R=function(C,N){return I||(I=n(4)),S||(S=n(0)),C=S.normalize(C),I.readFileSync(C,N?null:"utf8")},T=function(C){var N=R(C,!0);return N.buffer||(N=new Uint8Array(N)),F(N.buffer),N},i.argv.length>1&&i.argv[1].replace(/\\/g,"/"),i.argv.slice(2),i.on("uncaughtException",function(C){if(!(C instanceof Er))throw C}),i.on("unhandledRejection",we),d.inspect=function(){return"[Emscripten Module object]"}):O?(typeof read!="undefined"&&(R=function(C){return read(C)}),T=function(C){var N;return typeof readbuffer=="function"?new Uint8Array(readbuffer(C)):(F(l(N=read(C,"binary"))==="object"),N)},typeof scriptArgs!="undefined"&&scriptArgs,typeof print!="undefined"&&(typeof console=="undefined"&&(console={}),console.log=print,console.warn=console.error=typeof printErr!="undefined"?printErr:print)):(A||_)&&(_?v=self.location.href:document.currentScript&&(v=document.currentScript.src),c&&(v=c),v=v.indexOf("blob:")!==0?v.substr(0,v.lastIndexOf("/")+1):"",R=function(C){var N=new XMLHttpRequest;return N.open("GET",C,!1),N.send(null),N.responseText},_&&(T=function(C){var N=new XMLHttpRequest;return N.open("GET",C,!1),N.responseType="arraybuffer",N.send(null),new Uint8Array(N.response)}));var y,b,M=d.print||console.log.bind(console),k=d.printErr||console.warn.bind(console);for(E in D)D.hasOwnProperty(E)&&(d[E]=D[E]);D=null,d.arguments&&d.arguments,d.thisProgram&&d.thisProgram,d.quit&&d.quit,d.wasmBinary&&(y=d.wasmBinary),d.noExitRuntime&&d.noExitRuntime,(typeof WebAssembly=="undefined"?"undefined":l(WebAssembly))!=="object"&&k("no native wasm support detected");var P=new WebAssembly.Table({initial:60,maximum:60,element:"anyfunc"}),B=!1;function F(C,N){C||we("Assertion failed: "+N)}var V,G,z,K=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):void 0;function _e(C,N,x){for(var $=N+x,W=N;C[W]&&!(W>=$);)++W;if(W-N>16&&C.subarray&&K)return K.decode(C.subarray(N,W));for(var Y="";N<W;){var ne=C[N++];if(128&ne){var Re=63&C[N++];if((224&ne)!=192){var Me=63&C[N++];if((ne=(240&ne)==224?(15&ne)<<12|Re<<6|Me:(7&ne)<<18|Re<<12|Me<<6|63&C[N++])<65536)Y+=String.fromCharCode(ne);else{var In=ne-65536;Y+=String.fromCharCode(55296|In>>10,56320|1023&In)}}else Y+=String.fromCharCode((31&ne)<<6|Re)}else Y+=String.fromCharCode(ne)}return Y}function ie(C,N){return C?_e(G,C,N):""}typeof TextDecoder!="undefined"&&new TextDecoder("utf-16le");var ue=d.INITIAL_MEMORY||16777216;function le(C){for(;C.length>0;){var N=C.shift();if(typeof N!="function"){var x=N.func;typeof x=="number"?N.arg===void 0?d.dynCall_v(x):d.dynCall_vi(x,N.arg):x(N.arg===void 0?null:N.arg)}else N()}}(b=d.wasmMemory?d.wasmMemory:new WebAssembly.Memory({initial:ue/65536,maximum:ue/65536}))&&(V=b.buffer),ue=V.byteLength,function(C){V=C,d.HEAP8=new Int8Array(C),d.HEAP16=new Int16Array(C),d.HEAP32=z=new Int32Array(C),d.HEAPU8=G=new Uint8Array(C),d.HEAPU16=new Uint16Array(C),d.HEAPU32=new Uint32Array(C),d.HEAPF32=new Float32Array(C),d.HEAPF64=new Float64Array(C)}(V),z[11496]=5289024;var Ie=[],$t=[],rt=[],ye=[];function Ke(C){Ie.unshift(C)}function Jt(C){ye.unshift(C)}var ve=0,qe=null;function we(C){throw d.onAbort&&d.onAbort(C),M(C+=""),k(C),B=!0,C="abort("+C+"). Build with -s ASSERTIONS=1 for more info.",new WebAssembly.RuntimeError(C)}d.preloadedImages={},d.preloadedAudios={};var dr="data:application/octet-stream;base64,";function Rn(C){return String.prototype.startsWith?C.startsWith(dr):C.indexOf(dr)===0}var Ge="WebMOpusEncoder.wasm";function rn(){try{if(y)return new Uint8Array(y);if(T)return T(Ge);throw"both async and sync fetching of the wasm failed"}catch(C){we(C)}}Rn(Ge)||(Ge=function(C){return d.locateFile?d.locateFile(C,v):v+C}(Ge)),$t.push({func:function(){hr()}});var Je={mappings:{},buffers:[null,[],[]],printChar:function(C,N){var x=Je.buffers[C];N===0||N===10?((C===1?M:k)(_e(x,0)),x.length=0):x.push(N)},varargs:void 0,get:function(){return Je.varargs+=4,z[Je.varargs-4>>2]},getStr:function(C){return ie(C)},get64:function(C,N){return C}},Fi={a:function(C,N,x,$){we("Assertion failed: "+ie(C)+", at: "+[N?ie(N):"unknown filename",x,$?ie($):"unknown function"])},e:function(C,N,x){return Je.varargs=x,0},h:function(C,N,x){Je.varargs=x},g:function(C,N,x){return Je.varargs=x,0},b:function(){we()},m:function(C,N){var x=new Uint8Array(d.HEAPU8.buffer,C,N);d.encodedBuffers.push(new Uint8Array(x).buffer)},k:function(C,N,x){G.copyWithin(C,N,N+x)},l:function(C){we("OOM")},c:function(C){return 0},f:function(C,N,x,$){var W=Je.getStreamFromFD(C),Y=Je.doReadv(W,N,x);return z[$>>2]=Y,0},j:function(C,N,x,$,W){},d:function(C,N,x,$){for(var W=0,Y=0;Y<x;Y++){for(var ne=z[N+8*Y>>2],Re=z[N+(8*Y+4)>>2],Me=0;Me<Re;Me++)Je.printChar(C,G[ne+Me]);W+=Re}return z[$>>2]=W,0},memory:b,table:P,i:function(C){var N=Date.now()/1e3|0;return C&&(z[C>>2]=N),N}},on=function(){var C={a:Fi};function N(W,Y){var ne=W.exports;d.asm=ne,function(){if(ve--,d.monitorRunDependencies&&d.monitorRunDependencies(ve),ve==0&&qe){var Re=qe;qe=null,Re()}}()}function x(W){N(W.instance)}function $(W){return(y||!A&&!_||typeof fetch!="function"?new Promise(function(Y,ne){Y(rn())}):fetch(Ge,{credentials:"same-origin"}).then(function(Y){if(!Y.ok)throw"failed to load wasm binary file at '"+Ge+"'";return Y.arrayBuffer()}).catch(function(){return rn()})).then(function(Y){return WebAssembly.instantiate(Y,C)}).then(W,function(Y){k("failed to asynchronously prepare wasm: "+Y),we(Y)})}if(ve++,d.monitorRunDependencies&&d.monitorRunDependencies(ve),d.instantiateWasm)try{return d.instantiateWasm(C,N)}catch(W){return k("Module.instantiateWasm callback failed with error: "+W),!1}return function(){if(y||typeof WebAssembly.instantiateStreaming!="function"||Rn(Ge)||typeof fetch!="function")return $(x);fetch(Ge,{credentials:"same-origin"}).then(function(W){return WebAssembly.instantiateStreaming(W,C).then(x,function(Y){k("wasm streaming compile failed: "+Y),k("falling back to ArrayBuffer instantiation"),$(x)})})}(),{}}();d.asm=on;var Rt,hr=d.___wasm_call_ctors=function(){return(hr=d.___wasm_call_ctors=d.asm.n).apply(null,arguments)},pr=(d.___em_js__emscriptenPushBuffer=function(){return(d.___em_js__emscriptenPushBuffer=d.asm.o).apply(null,arguments)},d._emscripten_bind_VoidPtr___destroy___0=function(){return(pr=d._emscripten_bind_VoidPtr___destroy___0=d.asm.p).apply(null,arguments)}),Vn=d._emscripten_bind_Container_Container_0=function(){return(Vn=d._emscripten_bind_Container_Container_0=d.asm.q).apply(null,arguments)},fr=d._emscripten_bind_Container_init_3=function(){return(fr=d._emscripten_bind_Container_init_3=d.asm.r).apply(null,arguments)},mr=d._emscripten_bind_Container_writeFrame_3=function(){return(mr=d._emscripten_bind_Container_writeFrame_3=d.asm.s).apply(null,arguments)},sn=d._emscripten_bind_Container___destroy___0=function(){return(sn=d._emscripten_bind_Container___destroy___0=d.asm.t).apply(null,arguments)};function Er(C){this.name="ExitStatus",this.message="Program terminated with exit("+C+")",this.status=C}function an(C){function N(){Rt||(Rt=!0,d.calledRun=!0,B||(le($t),le(rt),d.onRuntimeInitialized&&d.onRuntimeInitialized(),function(){if(d.postRun)for(typeof d.postRun=="function"&&(d.postRun=[d.postRun]);d.postRun.length;)Jt(d.postRun.shift());le(ye)}()))}ve>0||(function(){if(d.preRun)for(typeof d.preRun=="function"&&(d.preRun=[d.preRun]);d.preRun.length;)Ke(d.preRun.shift());le(Ie)}(),ve>0||(d.setStatus?(d.setStatus("Running..."),setTimeout(function(){setTimeout(function(){d.setStatus("")},1),N()},1)):N()))}if(d._opus_encoder_create=function(){return(d._opus_encoder_create=d.asm.u).apply(null,arguments)},d._opus_encode_float=function(){return(d._opus_encode_float=d.asm.v).apply(null,arguments)},d._opus_encoder_ctl=function(){return(d._opus_encoder_ctl=d.asm.w).apply(null,arguments)},d._opus_encoder_destroy=function(){return(d._opus_encoder_destroy=d.asm.x).apply(null,arguments)},d._speex_resampler_init=function(){return(d._speex_resampler_init=d.asm.y).apply(null,arguments)},d._speex_resampler_destroy=function(){return(d._speex_resampler_destroy=d.asm.z).apply(null,arguments)},d._speex_resampler_process_interleaved_float=function(){return(d._speex_resampler_process_interleaved_float=d.asm.A).apply(null,arguments)},d._free=function(){return(d._free=d.asm.B).apply(null,arguments)},d._malloc=function(){return(d._malloc=d.asm.C).apply(null,arguments)},d.dynCall_vi=function(){return(d.dynCall_vi=d.asm.D).apply(null,arguments)},d.dynCall_v=function(){return(d.dynCall_v=d.asm.E).apply(null,arguments)},d.asm=on,d.then=function(C){if(Rt)C(d);else{var N=d.onRuntimeInitialized;d.onRuntimeInitialized=function(){N&&N(),C(d)}}return d},qe=function C(){Rt||an(),Rt||(qe=C)},d.run=an,d.preInit)for(typeof d.preInit=="function"&&(d.preInit=[d.preInit]);d.preInit.length>0;)d.preInit.pop()();function Se(){}function kt(C){return(C||Se).__cache__}function Cn(C,N){var x=kt(N),$=x[C];return $||(($=Object.create((N||Se).prototype)).ptr=C,x[C]=$)}function Te(){throw"cannot construct a VoidPtr, no constructor in IDL"}function pe(){this.ptr=Vn(),kt(pe)[this.ptr]=this}return an(),Se.prototype=Object.create(Se.prototype),Se.prototype.constructor=Se,Se.prototype.__class__=Se,Se.__cache__={},d.WrapperObject=Se,d.getCache=kt,d.wrapPointer=Cn,d.castObject=function(C,N){return Cn(C.ptr,N)},d.NULL=Cn(0),d.destroy=function(C){if(!C.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";C.__destroy__(),delete kt(C.__class__)[C.ptr]},d.compare=function(C,N){return C.ptr===N.ptr},d.getPointer=function(C){return C.ptr},d.getClass=function(C){return C.__class__},Te.prototype=Object.create(Se.prototype),Te.prototype.constructor=Te,Te.prototype.__class__=Te,Te.__cache__={},d.VoidPtr=Te,Te.prototype.__destroy__=Te.prototype.__destroy__=function(){var C=this.ptr;pr(C)},pe.prototype=Object.create(Se.prototype),pe.prototype.constructor=pe,pe.prototype.__class__=pe,pe.__cache__={},d.Container=pe,pe.prototype.init=pe.prototype.init=function(C,N,x){var $=this.ptr;C&&l(C)==="object"&&(C=C.ptr),N&&l(N)==="object"&&(N=N.ptr),x&&l(x)==="object"&&(x=x.ptr),fr($,C,N,x)},pe.prototype.writeFrame=pe.prototype.writeFrame=function(C,N,x){var $=this.ptr;C&&l(C)==="object"&&(C=C.ptr),N&&l(N)==="object"&&(N=N.ptr),x&&l(x)==="object"&&(x=x.ptr),mr($,C,N,x)},pe.prototype.__destroy__=pe.prototype.__destroy__=function(){var C=this.ptr;sn(C)},d});l(e)==="object"&&l(s)==="object"?s.exports=h:(a=function(){return h}.apply(e,[]))===void 0||(s.exports=a)}).call(this,"/index.js",n(2),"/",n(3)(t))},function(t,e,n){(function(r,i,o,s){var a;function l(d){return(l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p})(d)}function u(d,p,f){return p&&function(m,E){for(var A=0;A<E.length;A++){var _=E[A];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(m,_.key,_)}}(d.prototype,p),d}var c,h=(c=(c=typeof document!="undefined"&&document.currentScript?document.currentScript.src:void 0)||r,function(d){d=(d=d||{})!==void 0?d:{};var p=n(1).EmscriptenMemoryAllocator,f=48e3,m=function(){function C(N,x){var $=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;(function(W,Y){if(!(W instanceof Y))throw new TypeError("Cannot call a class as a function")})(this,C),this.config={inputSampleRate:N,channelCount:x},this.memory=new p(d),this._opus_encoder_create=d._opus_encoder_create,this._opus_encoder_ctl=d._opus_encoder_ctl,this._opus_encode_float=d._opus_encode_float,this._opus_encoder_destroy=d._opus_encoder_destroy,this._speex_resampler_init=d._speex_resampler_init,this._speex_resampler_process_interleaved_float=d._speex_resampler_process_interleaved_float,this._speex_resampler_destroy=d._speex_resampler_destroy,this._container=new d.Container,this._container.init(f,x,Math.floor(4294967295*Math.random())),this.OpusInitCodec(f,x,$),this.SpeexInitResampler(N,f,x),this.inputSamplesPerChannel=20*N/1e3,this.outputSamplePerChannel=960,this.inputBufferIndex=0,this.mInputBuffer=this.memory.mallocFloat32Buffer(this.inputSamplesPerChannel*x),this.mResampledBuffer=this.memory.mallocFloat32Buffer(this.outputSamplePerChannel*x),this.mOutputBuffer=this.memory.mallocUint8Buffer(4e3),this.interleavedBuffers=x!==1?new Float32Array(4096*x):void 0}return u(C,[{key:"encode",value:function(N){for(var x=this.interleave(N),$=0;$<x.length;){var W=Math.min(this.mInputBuffer.length-this.inputBufferIndex,x.length-$);if(this.mInputBuffer.set(x.subarray($,$+W),this.inputBufferIndex),this.inputBufferIndex+=W,this.inputBufferIndex>=this.mInputBuffer.length){var Y=this.memory.mallocUint32(this.inputSamplesPerChannel),ne=this.memory.mallocUint32(this.outputSamplePerChannel),Re=this._speex_resampler_process_interleaved_float(this.resampler,this.mInputBuffer.pointer,Y.pointer,this.mResampledBuffer.pointer,ne.pointer);if(Y.free(),ne.free(),Re!==0)throw new Error("Resampling error.");var Me=this._opus_encode_float(this.encoder,this.mResampledBuffer.pointer,this.outputSamplePerChannel,this.mOutputBuffer.pointer,this.mOutputBuffer.length);if(Me<0)throw new Error("Opus encoding error.");this._container.writeFrame(this.mOutputBuffer.pointer,Me,this.outputSamplePerChannel),this.inputBufferIndex=0}$+=W}}},{key:"close",value:function(){for(var N=this.config.channelCount,x=[],$=0;$<N;++$)x.push(new Float32Array(4096-this.inputBufferIndex/N));this.encode(x),d.destroy(this._container),this.mInputBuffer.free(),this.mResampledBuffer.free(),this.mOutputBuffer.free(),this._opus_encoder_destroy(this.encoder),this._speex_resampler_destroy(this.resampler)}},{key:"interleave",value:function(N){var x=N.length;if(x===1)return N[0];for(var $=0;$<x;$++)for(var W=N[$],Y=0;Y<W.length;Y++)this.interleavedBuffers[Y*x+$]=W[Y];return this.interleavedBuffers}},{key:"OpusInitCodec",value:function(N,x){var $=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,W=this.memory.mallocUint32(void 0);this.encoder=this._opus_encoder_create(N,x,2049,W.pointer);var Y=W.value;if(W.free(),Y!==0)throw new Error("Opus encodor initialization failed.");$&&this.OpusSetOpusControl(4002,$)}},{key:"OpusSetOpusControl",value:function(N,x){var $=this.memory.mallocInt32(x);this._opus_encoder_ctl(this.encoder,N,$.pointer),$.free()}},{key:"SpeexInitResampler",value:function(N,x,$){var W=this.memory.mallocUint32(void 0);this.resampler=this._speex_resampler_init($,N,x,6,W.pointer);var Y=W.value;if(W.free(),Y!==0)throw new Error("Initializing resampler failed.")}}]),C}();d.init=function(C,N,x){d.encodedBuffers=[],d.encoder=new m(C,N,x)},d.encode=function(C){d.encoder.encode(C)},d.flush=function(){return d.encodedBuffers.splice(0,d.encodedBuffers.length)},d.close=function(){d.encoder.close()};var E,A,_,g,O,D={};for(E in d)d.hasOwnProperty(E)&&(D[E]=d[E]);A=(typeof window=="undefined"?"undefined":l(window))==="object",_=typeof importScripts=="function",g=(i===void 0?"undefined":l(i))==="object"&&l(i.versions)==="object"&&typeof i.versions.node=="string",O=!A&&!g&&!_;var R,T,I,S,v="";g?(v=_?n(0).dirname(v)+"/":o+"/",R=function(C,N){return I||(I=n(4)),S||(S=n(0)),C=S.normalize(C),I.readFileSync(C,N?null:"utf8")},T=function(C){var N=R(C,!0);return N.buffer||(N=new Uint8Array(N)),F(N.buffer),N},i.argv.length>1&&i.argv[1].replace(/\\/g,"/"),i.argv.slice(2),i.on("uncaughtException",function(C){if(!(C instanceof Er))throw C}),i.on("unhandledRejection",we),d.inspect=function(){return"[Emscripten Module object]"}):O?(typeof read!="undefined"&&(R=function(C){return read(C)}),T=function(C){var N;return typeof readbuffer=="function"?new Uint8Array(readbuffer(C)):(F(l(N=read(C,"binary"))==="object"),N)},typeof scriptArgs!="undefined"&&scriptArgs,typeof print!="undefined"&&(typeof console=="undefined"&&(console={}),console.log=print,console.warn=console.error=typeof printErr!="undefined"?printErr:print)):(A||_)&&(_?v=self.location.href:document.currentScript&&(v=document.currentScript.src),c&&(v=c),v=v.indexOf("blob:")!==0?v.substr(0,v.lastIndexOf("/")+1):"",R=function(C){var N=new XMLHttpRequest;return N.open("GET",C,!1),N.send(null),N.responseText},_&&(T=function(C){var N=new XMLHttpRequest;return N.open("GET",C,!1),N.responseType="arraybuffer",N.send(null),new Uint8Array(N.response)}));var y,b,M=d.print||console.log.bind(console),k=d.printErr||console.warn.bind(console);for(E in D)D.hasOwnProperty(E)&&(d[E]=D[E]);D=null,d.arguments&&d.arguments,d.thisProgram&&d.thisProgram,d.quit&&d.quit,d.wasmBinary&&(y=d.wasmBinary),d.noExitRuntime&&d.noExitRuntime,(typeof WebAssembly=="undefined"?"undefined":l(WebAssembly))!=="object"&&k("no native wasm support detected");var P=new WebAssembly.Table({initial:36,maximum:36,element:"anyfunc"}),B=!1;function F(C,N){C||we("Assertion failed: "+N)}var V,G,z,K=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):void 0;function _e(C,N,x){for(var $=N+x,W=N;C[W]&&!(W>=$);)++W;if(W-N>16&&C.subarray&&K)return K.decode(C.subarray(N,W));for(var Y="";N<W;){var ne=C[N++];if(128&ne){var Re=63&C[N++];if((224&ne)!=192){var Me=63&C[N++];if((ne=(240&ne)==224?(15&ne)<<12|Re<<6|Me:(7&ne)<<18|Re<<12|Me<<6|63&C[N++])<65536)Y+=String.fromCharCode(ne);else{var In=ne-65536;Y+=String.fromCharCode(55296|In>>10,56320|1023&In)}}else Y+=String.fromCharCode((31&ne)<<6|Re)}else Y+=String.fromCharCode(ne)}return Y}function ie(C,N){return C?_e(G,C,N):""}typeof TextDecoder!="undefined"&&new TextDecoder("utf-16le");var ue=d.INITIAL_MEMORY||16777216;function le(C){for(;C.length>0;){var N=C.shift();if(typeof N!="function"){var x=N.func;typeof x=="number"?N.arg===void 0?d.dynCall_v(x):d.dynCall_vi(x,N.arg):x(N.arg===void 0?null:N.arg)}else N()}}(b=d.wasmMemory?d.wasmMemory:new WebAssembly.Memory({initial:ue/65536,maximum:ue/65536}))&&(V=b.buffer),ue=V.byteLength,function(C){V=C,d.HEAP8=new Int8Array(C),d.HEAP16=new Int16Array(C),d.HEAP32=z=new Int32Array(C),d.HEAPU8=G=new Uint8Array(C),d.HEAPU16=new Uint16Array(C),d.HEAPU32=new Uint32Array(C),d.HEAPF32=new Float32Array(C),d.HEAPF64=new Float64Array(C)}(V),z[11672]=5289728;var Ie=[],$t=[],rt=[],ye=[];function Ke(C){Ie.unshift(C)}function Jt(C){ye.unshift(C)}var ve=0,qe=null;function we(C){throw d.onAbort&&d.onAbort(C),M(C+=""),k(C),B=!0,C="abort("+C+"). Build with -s ASSERTIONS=1 for more info.",new WebAssembly.RuntimeError(C)}d.preloadedImages={},d.preloadedAudios={};var dr="data:application/octet-stream;base64,";function Rn(C){return String.prototype.startsWith?C.startsWith(dr):C.indexOf(dr)===0}var Ge="OggOpusEncoder.wasm";function rn(){try{if(y)return new Uint8Array(y);if(T)return T(Ge);throw"both async and sync fetching of the wasm failed"}catch(C){we(C)}}Rn(Ge)||(Ge=function(C){return d.locateFile?d.locateFile(C,v):v+C}(Ge)),$t.push({func:function(){hr()}});var Je={mappings:{},buffers:[null,[],[]],printChar:function(C,N){var x=Je.buffers[C];N===0||N===10?((C===1?M:k)(_e(x,0)),x.length=0):x.push(N)},varargs:void 0,get:function(){return Je.varargs+=4,z[Je.varargs-4>>2]},getStr:function(C){return ie(C)},get64:function(C,N){return C}},Fi={a:function(C,N,x,$){we("Assertion failed: "+ie(C)+", at: "+[N?ie(N):"unknown filename",x,$?ie($):"unknown function"])},c:function(){we()},d:function(C,N){var x=new Uint8Array(d.HEAPU8.buffer,C,N);d.encodedBuffers.push(new Uint8Array(x).buffer)},f:function(C,N,x){G.copyWithin(C,N,N+x)},g:function(C){we("OOM")},h:function(C){return 0},e:function(C,N,x,$,W){},b:function(C,N,x,$){for(var W=0,Y=0;Y<x;Y++){for(var ne=z[N+8*Y>>2],Re=z[N+(8*Y+4)>>2],Me=0;Me<Re;Me++)Je.printChar(C,G[ne+Me]);W+=Re}return z[$>>2]=W,0},memory:b,table:P},on=function(){var C={a:Fi};function N(W,Y){var ne=W.exports;d.asm=ne,function(){if(ve--,d.monitorRunDependencies&&d.monitorRunDependencies(ve),ve==0&&qe){var Re=qe;qe=null,Re()}}()}function x(W){N(W.instance)}function $(W){return(y||!A&&!_||typeof fetch!="function"?new Promise(function(Y,ne){Y(rn())}):fetch(Ge,{credentials:"same-origin"}).then(function(Y){if(!Y.ok)throw"failed to load wasm binary file at '"+Ge+"'";return Y.arrayBuffer()}).catch(function(){return rn()})).then(function(Y){return WebAssembly.instantiate(Y,C)}).then(W,function(Y){k("failed to asynchronously prepare wasm: "+Y),we(Y)})}if(ve++,d.monitorRunDependencies&&d.monitorRunDependencies(ve),d.instantiateWasm)try{return d.instantiateWasm(C,N)}catch(W){return k("Module.instantiateWasm callback failed with error: "+W),!1}return function(){if(y||typeof WebAssembly.instantiateStreaming!="function"||Rn(Ge)||typeof fetch!="function")return $(x);fetch(Ge,{credentials:"same-origin"}).then(function(W){return WebAssembly.instantiateStreaming(W,C).then(x,function(Y){k("wasm streaming compile failed: "+Y),k("falling back to ArrayBuffer instantiation"),$(x)})})}(),{}}();d.asm=on;var Rt,hr=d.___wasm_call_ctors=function(){return(hr=d.___wasm_call_ctors=d.asm.i).apply(null,arguments)},pr=(d.___em_js__emscriptenPushBuffer=function(){return(d.___em_js__emscriptenPushBuffer=d.asm.j).apply(null,arguments)},d._emscripten_bind_VoidPtr___destroy___0=function(){return(pr=d._emscripten_bind_VoidPtr___destroy___0=d.asm.k).apply(null,arguments)}),Vn=d._emscripten_bind_Container_Container_0=function(){return(Vn=d._emscripten_bind_Container_Container_0=d.asm.l).apply(null,arguments)},fr=d._emscripten_bind_Container_init_3=function(){return(fr=d._emscripten_bind_Container_init_3=d.asm.m).apply(null,arguments)},mr=d._emscripten_bind_Container_writeFrame_3=function(){return(mr=d._emscripten_bind_Container_writeFrame_3=d.asm.n).apply(null,arguments)},sn=d._emscripten_bind_Container___destroy___0=function(){return(sn=d._emscripten_bind_Container___destroy___0=d.asm.o).apply(null,arguments)};function Er(C){this.name="ExitStatus",this.message="Program terminated with exit("+C+")",this.status=C}function an(C){function N(){Rt||(Rt=!0,d.calledRun=!0,B||(le($t),le(rt),d.onRuntimeInitialized&&d.onRuntimeInitialized(),function(){if(d.postRun)for(typeof d.postRun=="function"&&(d.postRun=[d.postRun]);d.postRun.length;)Jt(d.postRun.shift());le(ye)}()))}ve>0||(function(){if(d.preRun)for(typeof d.preRun=="function"&&(d.preRun=[d.preRun]);d.preRun.length;)Ke(d.preRun.shift());le(Ie)}(),ve>0||(d.setStatus?(d.setStatus("Running..."),setTimeout(function(){setTimeout(function(){d.setStatus("")},1),N()},1)):N()))}if(d._opus_encoder_create=function(){return(d._opus_encoder_create=d.asm.p).apply(null,arguments)},d._opus_encode_float=function(){return(d._opus_encode_float=d.asm.q).apply(null,arguments)},d._opus_encoder_ctl=function(){return(d._opus_encoder_ctl=d.asm.r).apply(null,arguments)},d._opus_encoder_destroy=function(){return(d._opus_encoder_destroy=d.asm.s).apply(null,arguments)},d._malloc=function(){return(d._malloc=d.asm.t).apply(null,arguments)},d._free=function(){return(d._free=d.asm.u).apply(null,arguments)},d._speex_resampler_init=function(){return(d._speex_resampler_init=d.asm.v).apply(null,arguments)},d._speex_resampler_destroy=function(){return(d._speex_resampler_destroy=d.asm.w).apply(null,arguments)},d._speex_resampler_process_interleaved_float=function(){return(d._speex_resampler_process_interleaved_float=d.asm.x).apply(null,arguments)},d.dynCall_vi=function(){return(d.dynCall_vi=d.asm.y).apply(null,arguments)},d.dynCall_v=function(){return(d.dynCall_v=d.asm.z).apply(null,arguments)},d.asm=on,d.then=function(C){if(Rt)C(d);else{var N=d.onRuntimeInitialized;d.onRuntimeInitialized=function(){N&&N(),C(d)}}return d},qe=function C(){Rt||an(),Rt||(qe=C)},d.run=an,d.preInit)for(typeof d.preInit=="function"&&(d.preInit=[d.preInit]);d.preInit.length>0;)d.preInit.pop()();function Se(){}function kt(C){return(C||Se).__cache__}function Cn(C,N){var x=kt(N),$=x[C];return $||(($=Object.create((N||Se).prototype)).ptr=C,x[C]=$)}function Te(){throw"cannot construct a VoidPtr, no constructor in IDL"}function pe(){this.ptr=Vn(),kt(pe)[this.ptr]=this}return an(),Se.prototype=Object.create(Se.prototype),Se.prototype.constructor=Se,Se.prototype.__class__=Se,Se.__cache__={},d.WrapperObject=Se,d.getCache=kt,d.wrapPointer=Cn,d.castObject=function(C,N){return Cn(C.ptr,N)},d.NULL=Cn(0),d.destroy=function(C){if(!C.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";C.__destroy__(),delete kt(C.__class__)[C.ptr]},d.compare=function(C,N){return C.ptr===N.ptr},d.getPointer=function(C){return C.ptr},d.getClass=function(C){return C.__class__},Te.prototype=Object.create(Se.prototype),Te.prototype.constructor=Te,Te.prototype.__class__=Te,Te.__cache__={},d.VoidPtr=Te,Te.prototype.__destroy__=Te.prototype.__destroy__=function(){var C=this.ptr;pr(C)},pe.prototype=Object.create(Se.prototype),pe.prototype.constructor=pe,pe.prototype.__class__=pe,pe.__cache__={},d.Container=pe,pe.prototype.init=pe.prototype.init=function(C,N,x){var $=this.ptr;C&&l(C)==="object"&&(C=C.ptr),N&&l(N)==="object"&&(N=N.ptr),x&&l(x)==="object"&&(x=x.ptr),fr($,C,N,x)},pe.prototype.writeFrame=pe.prototype.writeFrame=function(C,N,x){var $=this.ptr;C&&l(C)==="object"&&(C=C.ptr),N&&l(N)==="object"&&(N=N.ptr),x&&l(x)==="object"&&(x=x.ptr),mr($,C,N,x)},pe.prototype.__destroy__=pe.prototype.__destroy__=function(){var C=this.ptr;sn(C)},d});l(e)==="object"&&l(s)==="object"?s.exports=h:(a=function(){return h}.apply(e,[]))===void 0||(s.exports=a)}).call(this,"/index.js",n(2),"/",n(3)(t))}])}},typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope?yl()():nf.exports=yl();const hT=tu(RA.exports);let CA;const Ts="audio/webm;codecs=opus";function pT(t){const e=Q(),n=Q(),r=Q(),i=Q(!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=Hu.create({scrollingWaveform:!0,scrollingWaveformWindow:10}),e.current=DA({...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();MediaRecorder&&MediaRecorder.isTypeSupported(Ts)?o.current=new MediaRecorder(a,{mimeType:Ts}):typeof window!="undefined"&&(o.current=new dT(a,{mimeType:Ts},{encoderWorkerFactory:()=>new hT,WebMOpusEncoderWasmPath:CA})),o.current.onstart=()=>r.current=Date.now(),o.current.ondataavailable=u=>{var c;if(!i.current){const h=Date.now(),d=Math.floor((h-r.current)/1e3),p=new File([u.data],`talkjs_audio_message_${h}_${d}.webm`,{type:"audio/webm"});t.onSendRecording(p,d)}i.current=!1,o.current=void 0,(c=e.current)==null||c.destroy(),e.current=void 0,n.current=void 0},o.current.start()};return null}function IA(t){const e=nt(),n=he(),r=nn(),i=te(n.referencedMessage$),o=te(n.state$.userPermissions),s=xo(),{sendMessage:a}=Wg(),{voiceRecorder:l,recordVoiceMessage:u,voiceRecorderControlsProps:c}=function(){const p=he(),f=Yr(),m=vt({...Cl}),{state:E,duration:A,recordingUrl:_,uploadState:g,fileToken:O}=te(m),D=Q(void 0),R=Q(null),T=Q(),I=ee(()=>{m.assign({state:"recording",duration:0}),T.current=setInterval(()=>{m.duration.set(M=>M+1)},1e3)},[m]),S=ee(()=>{var M;T.current&&(clearInterval(T.current),T.current=void 0),(M=D.current)==null||M.stop()},[]),v=ee(()=>{T.current&&(clearInterval(T.current),T.current=void 0),m.assign(Cl)},[m]),y=ee((M,k)=>{const P=URL.createObjectURL(new Blob([M])),B=M.size+","+M.name;p.state$.localFileBlobUrls.child(p.state$.currentConversationId.peek()).child(B).set({url:P,fetching:!1});const F={duration:k,filename:M.name};p.latestFileUpload={type:"voice",file:M,metadata:F,temporaryBlobUrl:P},m.assign({state:"previewing",uploadState:"pending",recordingUrl:P+"?name="+M.name}),f.uploadVoice(M,F).then(V=>{m.assign({uploadState:"done",fileToken:V})})},[f,m,p]),b=ee(()=>{O&&f.sendFileMessage({fileToken:O}),m.assign(Cl)},[f,O,m]);return{voiceRecorder:se(()=>{if(!E)return;const M={state:E,duration:A,recordingUrl:_,uploadState:g,stop:S,cancel:v,send:b};return fA.set(M,R),M},[E,A,_,g,S,v,b]),recordVoiceMessage:I,voiceRecorderControlsProps:se(()=>({onSendRecording:y,recordingState:E,mediaRecorder:D,wavesurferOptions:tT,wavesurferContainer:R}),[y,E])}}(),h=te(vt(()=>{const p=s.state$.get();return t.editMessageId===void 0?new Bd(p,a,t.attachFile,t.shareLocation,s.toggleEmojiPicker,u):new Bd(p,t.onEditMessage,()=>{},()=>{},()=>{},()=>{})},[s.state$,s.toggleEmojiPicker,t.attachFile,t.editMessageId,t.onEditMessage,t.shareLocation,a])),d=ee(p=>s.setText(p),[s]);return function({appId:p,conversationId:f,meId:m,setText:E,enabled:A}){const _=se(()=>g_(f,m,p),[p,f,m]);Z(()=>{var O;if(!_||!A)return;const g=(O=JSON.parse(At.getItem(pc)||"{}")[_])!=null?O:"";E(g)},[_,A,E])}({appId:r.app.id,conversationId:r.conversation.id,meId:r.currentUser.id,setText:d,enabled:!t.editMessageId}),L(Fm.Provider,{value:{onClose:()=>s.toggleEmojiPicker(!1),onEmojiSelected:p=>s.selectEmoji(p)},children:[L(pT,{...c}),L(e.MessageField,{common:r,referencedMessage:i,permissions:o,editor:h,voiceRecorder:l,editMessageId:t.editMessageId})]})}function fT({message:t}){const e=he(),n=Yr(),r=te(e.state$.editingMessageId),i=se(()=>cn(t.content[0].children),[t]),o=vt({isEmpty:i.length===0,atTextLimit:!1,characterCount:i.length,showEmojiPicker:!1,suggestEmojiQuery:void 0,suggestMentionQuery:void 0}),s=se(()=>new A_(o,e.device$,e.state$.userPermissions),[o,e]),a=ee(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(cn(t.content[0].children,!0))},[s,t]),L(km.Provider,{value:s,children:L(IA,{editMessageId:r,onEditMessage:a})})}function mT(t){const e=nt(),n=nn();return L(e.MessageDivider,{common:n,...t})}function ET({message:t}){const e=nt(),n=he(),r=te(()=>n.messagePermissions$(t)),i=nn(),[o,s]=ae("sent");return Eo(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}),L(e.Message,{common:i,message:t,messageStatus:o,permissions:r})}function _T(){const t=nt(),e=nn();return L(t.BeforeMessages,{common:e})}function AT(){const t=nt(),e=nn();return L(t.AfterMessages,{common:e})}function gT(t){const e=he(),n=Mi();Z(()=>function(r,i,o){const s=r.state$.currentConversation;let a=!1;function l(){if(!a){const E=r.state$.currentConversationId.peek();de.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 h=null;function d(){var O;const E=r.state$.currentConversation.lastMessage.id.get(),A=r.state$.currentConversationId.peek(),_=A!==h;if(h=A,_&&(p.stop(),a=!1,r.newMessageMarker$.set(void 0)),!E||!A)return;s.isUnread.peek()&&(o()?(_&&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=()=>{de.defined(p.handle),p.tick()});const f=gt(c),m=gt(d);return()=>{r.newMessageMarker$.set(void 0),f(),m(),p.stop()}}(e,n,t),[e,n,t])}function ST({conversationId:t}){const e=he(),n=Yr(),r=Q(!0),i=Q(null),o=te(()=>!!e.state$.messages.child(t).loadedAll.get());Z(()=>n.setScrollableDiv(i),[n]),gT(ee(()=>{if(!i.current)return!1;const a=!document.hidden,l=function(h){if(h.checkVisibility)return h.checkVisibility({contentVisibilityAuto:!0,opacityProperty:!0,visibilityProperty:!0,checkOpacity:!0,checkVisibilityCSS:!0});{const d=window.getComputedStyle(h),p=d.visibility,f=d.opacity;return!(h.getClientRects().length===0||p==="hidden"||f==="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},[])),ft(()=>{r.current=i.current.scrollTop>-30}),Z(()=>{r.current&&(i.current.scrollTop=0)});const s=ee(a=>{const l=a.currentTarget,u=l.scrollHeight-l.clientHeight+l.scrollTop,c=e.messageSubscriptions[t];u<90&&c&&c.loadMore(10)},[e.messageSubscriptions,t]);return L("div",{className:"t-message-list",ref:i,"t-menu-boundary":"",onScroll:s,children:[L(AT,{}),L(mo,{each:e.chatItems$,children:a=>L("div",{className:"t-message-group","t-group-type":a.type.get(),children:L(mo,{each:a.items,item:OT,itemProps:{controller:n,conversationId:t}})},a.id.get())}),o&&L(_T,{})]})}function OT({item$:t}){const e=he(),n=te(t),r=te(e.state$.editingMessageId);return n instanceof fs?L(mT,{timestamp:n.timestamp,isReadMarker:n.isReadMarker,isDayMarker:n.isDayMarker}):r===n.id?L(fT,{message:n}):L(ET,{message:n})}typeof window=="undefined"||MediaRecorder&&MediaRecorder.isTypeSupported(Ts)||async function(){return(await mc(N_["opus-media-recorder-wasm"])).default}().then(t=>CA=t);const DT=new Set(["ByV39eoc","B1FxElnd","aW4c49tW","qGfuGtx","SbERe5ee","ilaVEa15","FOlWOSaH","dao5gGmT","DLUgAhzL","fqXFumr6","FtiWHMYT","66iWOyWt","1375amYi","mWbJgzpt","jO7GqAvL","SkFIKxo5","2z4ILc3y","aDr8oPL1","Hku1c4Pt"]);function ba({appId:t,chatboxState:e}){const n=t.charAt(0)==="t"||DT.has(t);return Z(()=>{switch(e.type){case"auth-failed":$e.error("Could not authenticate user. Check if you are authenticating correctly.");break;case"unknown-user":$e.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":$e.error(e.error);break;case"wrong-app-id":$e.error(`Could not find given appId: "${e.appId}". You can find your appId on https://talkjs.com/dashboard.`);break;case"server-error":break;default:de.never(e)}},[e]),L("div",{className:"t-panel t-error-panel",children:[L("span",{className:"t-heading",children:"Something went wrong"}),L("p",{children:"Please reload the page and try again."}),n?L(Pe,{children:[L("p",{children:"Developer note: check your browser's developer tools console for messages that may help solve the problem."}),L("p",{children:"This message only shows up in test mode."})]}):L("p",{children:"If things keep not working, do not hesitate to get in touch with us."})]})}function vT(){return L("div",{className:"t-panel t-error-panel",children:L("span",{className:"t-heading",children:te(he().t$).CHAT_NOT_FOUND})})}function yA(){return L("div",{className:"t-panel t-loading-panel",children:L(Nu,{})})}function NA(){const t=te(he().t$);return L("div",{className:"t-panel t-error-panel",children:[L("span",{className:"t-heading",children:t.AUTH_EXPIRED_OVERLAY_TITLE}),L("p",{children:t.AUTH_EXPIRED_OVERLAY_DESCRIPTION})]})}const TT=()=>!0;async function Uu(t,e,{initialDelay:n,maxDelay:r,log:i,shouldRetry:o=TT}){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,h;return(h=u,h<=0?Promise.resolve():new Promise(d=>setTimeout(d,h))).then(()=>Uu(t-1,e,{initialDelay:u/1e3,maxDelay:r,log:i,shouldRetry:o}))})}function No(){const t={},e=new Promise(function(n,r){t.resolve=n,t.reject=r});return t.promise=e,t}function RT(t,e,n){const{beforeBrowserPermissionPrompt:r,onMissingBrowserPermissionCallback:i}=lr(Lm);return ee(async()=>{function o(c){c==="denied"&&i({type:t})}if(!r||!await async function(c){if(!("permissions"in navigator))return!1;try{return(await navigator.permissions.query({name:c})).state==="prompt"}catch(h){return!1}}(t))return e(c=>{o(c)});const s=No(),a=No(),l={type:t,showPrompt:async()=>(a.resolve({cancelled:!1}),await s.promise),cancel:()=>{a.resolve({cancelled:!0})}};try{r(l)}catch(c){$e.error("Your beforeBrowserPermissionPrompt callback threw an error: ",c),a.resolve({cancelled:!0})}const{cancelled:u}=await a.promise;return u?void 0:e(c=>{s.resolve(c),o(c)})},[r,i,t,e,...n])}function CT({onClose:t}){const e=he(),n=Yr(),r=Mi(),[i,o]=ae(null),s=ee(async l=>{try{if(l||(l=(await new Promise(m=>{const E=document.createElement("input");E.type="file",E.multiple=!1,E.addEventListener("change",()=>{m([...E.files])}),E.addEventListener("cancel",()=>{m([])}),E.click()}))[0]),!l)return;const{uploadPromise:u,upload:c}=await async function(m,E){const A=m.name;if(function(D){return/\.(mp4|ts|mov|webm|ogv)$/i.test(D)}(m.name)){const D=await Nl("video",m,I=>({width:I.videoWidth,height:I.videoHeight,duration:I.duration,filename:A})),R=E.uploadVideo(m,D),T=function(I){switch(I.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"}}(m);return{uploadPromise:R,upload:{type:"video",file:m,metadata:D,temporaryBlobUrl:URL.createObjectURL(new Blob([m],{type:T}))}}}if(function(D){return/\.(mp3|m4a|ogg|oga|opus|flac|wav)$/i.test(D)}(m.name)){const D=await Nl("audio",m,R=>({duration:R.duration,filename:A}));return{uploadPromise:E.uploadAudio(m,D),upload:{type:"audio",file:m,metadata:D,temporaryBlobUrl:URL.createObjectURL(new Blob([m]))}}}if(function(D){return/(gif|png|jpg|jpeg|svg|bmp|webp)$/i.test(D)}(m.name)){const D=await Nl("img",m,R=>({width:R.naturalWidth,height:R.naturalHeight,filename:A}));return{uploadPromise:E.uploadImage(m,D),upload:{type:"image",file:m,metadata:D,temporaryBlobUrl:URL.createObjectURL(new Blob([m]))}}}const _={filename:A},g=E.uploadFile(m,_),O=URL.createObjectURL(new Blob([m]));return{uploadPromise:g,upload:{type:"file",file:m,metadata:_,temporaryBlobUrl:O}}}(l,r),h=c.file.size+","+c.file.name;e.state$.localFileBlobUrls.child(e.state$.currentConversationId.peek()).child(h).set({url:c.temporaryBlobUrl,fetching:!1}),e.latestFileUpload=c;const d=No(),p={upload:c,closePreview:d.resolve,uploaded:!1,errored:!1};let f;o(p);try{f=await rf(u,d.promise),o({...p,uploaded:!0})}catch(m){if(m===bc)return;$e.warn("File upload failed",m.toString()),o(E=>({...E,errored:!0}))}if(await d.promise==="cancel")return;de.defined(f),n.sendFileMessage({fileToken:f})}finally{t(),o(null)}},[n,r,o,e,t]),a=RT("geolocation",async l=>{try{const u=No(),c={upload:{type:"location",location:void 0},uploaded:!1,closePreview:u.resolve,errored:!1};o(c);const{permissionResult:h,location:d}=await rf(new Promise(p=>{navigator.geolocation.getCurrentPosition(f=>{const m={latitude:f.coords.latitude,longitude:f.coords.longitude};p({permissionResult:"granted",location:m})},f=>{f.code===1?p({permissionResult:"denied"}):p({permissionResult:"granted"})})}),u.promise);if(l(h),!d||(o({...c,upload:{type:"location",location:d},uploaded:!0}),await u.promise==="cancel"))return;n.sendLocationMessage({location:d})}catch(u){if(u===bc)return;throw u}finally{t(),o(null)}},[n,o,t]);return{attachFile:s,shareLocation:a,uploadState:i}}const bc=Symbol("cancelled");function rf(t,e){return Promise.race([t,e.then(()=>Promise.reject(bc))])}async function Nl(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)}}function bA({children:t,className:e,...n}){return L("div",{className:"t-attach-overlay "+e,...n,children:t})}function IT({uploadState:t}){const{uploaded:e,errored:n}=t;$o(()=>t.closePreview("cancel"),".t-upload-preview");const r=Q(null);Z(()=>{e&&r.current.focus()},[e]);const i=te(he().t$);return L(bA,{className:"t-upload-preview",children:L("div",{className:"t-preview",children:[!n&&L(yT,{upload:t.upload,uploaded:e}),n&&L("div",{className:"t-error-row",children:i.UPLOAD_ERROR}),L("div",{className:"t-send-row",children:[L("button",{className:"t-cancel",onClick:()=>t.closePreview("cancel"),children:i.CANCEL}),!n&&e&&L("button",{className:"t-confirm-send test__confirm-upload-button",onClick:()=>t.closePreview("send"),ref:r,children:i.SEND_BUTTON_TEXT})]})]})})}function yT({upload:t,uploaded:e}){const n=te(he().t$);return t.type!=="location"?L(Pe,{children:[L(bT,{upload:t}),L(kT,{upload:t,uploaded:e,t:n})]}):e?L(NT,{location:t.location}):L("div",{className:"t-loading",children:L(Nu,{})})}function NT({location:t}){const{imageUrl:e,linkUrl:n}=Fu(t);return L("a",{href:n,target:"_blank",rel:"noreferrer",className:"t-location-upload-preview",style:{background:`url(${JSON.stringify(e)}) center center / cover no-repeat`}})}const bT=Un(function({upload:t}){let e=null;const n=t.file;if(t.type==="video"){const r=/[.]ts/i.test(n.name)?"mpegts":"native";e=L("div",{className:"video-container",children:L(LT,{src:t.temporaryBlobUrl,videoType:r,playsInline:!0,controls:!0,preload:"auto"})})}else t.type==="image"?e=L("div",{className:"t-img-container",children:L("img",{src:t.temporaryBlobUrl})}):t.type==="audio"&&(e=L(Go,{src:t.temporaryBlobUrl,filename:n.name}));return e}),kT=Un(function({uploaded:t,upload:e,t:n}){let r;r=t?e.metadata.filename:n.UPLOAD_IN_PROGRESS;let i="",o="";return e.type==="file"&&(i="is-file",t&&(o="file-block")),L("div",{className:`t-filename-row ${i}`,children:L("div",{className:o,children:r})})});function LT(t){const{videoType:e,...n}=t;return L("video",{...n})}function wT(){var o;const t=nt(),e=he(),n=nn(),r=(o=te(()=>e.state$.isUserConnected.child(e.state$.currentConversationId.get())))!=null?o:{},i=te(e.state$.userPermissions);return L(t.ChatHeader,{common:n,isUserConnected:r,permissions:i})}function MT(){const t=nt(),e=nn();return L(t.MessageListHeader,{common:e})}function PT(){const t=nt(),e=nn();return L(t.MessageListFooter,{common:e})}function xT(){const t=nt(),e=nn();return L(t.NoConversationSelected,{common:e})}function kA({containerRef:t}){const[e,n]=ae(null),[r,i]=ae(null),[o,s]=ae(!1);Z(()=>{const h=t.current;let d=null;const p=f=>{if(f.pointerType!=="mouse")return;d&&(clearTimeout(d),d=null);const m=f.target.closest("[t-tooltip-text]");m&&(d=setTimeout(()=>{d=null,n(m),s(!1)},500))};return h==null||h.addEventListener("pointerover",p),()=>{h==null||h.removeEventListener("pointerover",p)}},[t]),Z(()=>{const h=t.current;let d,p=!1;function f(A){p=!1,A.pointerType!=="mouse"&&(d=setTimeout(()=>{const _=A.target.closest("[t-tooltip-text]");_&&(p=!0,n(_),s(!0))},300))}function m(){clearTimeout(d)}function E(A){p&&(A.stopPropagation(),A.preventDefault())}return h.addEventListener("pointerdown",f),h.addEventListener("pointerup",m),h.addEventListener("pointerleave",m),h.addEventListener("click",E,!0),h.addEventListener("contextmenu",E,!0),()=>{h.removeEventListener("pointerdown",f),h.removeEventListener("pointerup",m),h.removeEventListener("pointerleave",m),h.removeEventListener("click",E,!0),h.removeEventListener("contextmenu",E,!0)}},[t]);const{refs:a,floatingStyles:l}=q_({placement:"top",middleware:[J_(),o&&(u=10,{...g0(u),options:[u,c]})],whileElementsMounted:X_});var u,c;return Z(()=>{if(e){a.setReference(e);const h=()=>{const f=e.getAttribute("t-tooltip-text");f===null?p():i(f.trim())},d=new MutationObserver(h);d.observe(e,{attributes:!0}),h();const p=()=>{o?setTimeout(()=>n(null),1e3):n(null)};return e.addEventListener("pointerleave",p),()=>{e.removeEventListener("pointerleave",p),d.disconnect(),a.setReference(null),i(null)}}},[e,o,a]),r?L("div",{className:"t-tooltip",role:"tooltip",style:l,ref:a.setFloating,children:r}):null}function FT({appId:t,chatHeaderVisible:e,messageFieldVisible:n}){const r=xo(),i=function(){const E=he(),A=vt(()=>{const O=E.errors$.get(),D=E.authTokenState$.get(),R=E.state$.loadingConversationId.get(),T=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":R&&E.state$.unknownConversations.child(R).get()?"loading-conv-failed":E.canRenderUi(R)||T!==R&&E.canRenderUi(T)?"loaded":"loading-data":void de.unreachable()}),_=vt({type:"loading"});Eo(O=>{const D=A.get(),R=E.state$.currentConversationId.get(),T=E.extUserId$.get(),I=E.appId$.get();function S(v){_.set({type:"loading"});const y=setTimeout(()=>{_.set(v)},5e3);return()=>clearTimeout(y)}switch(D){case"invalid-token":_.set({type:"auth-failed"});break;case"expired-token":_.set({type:"expired-token"});break;case"wrong-app-id":_.set({type:"wrong-app-id",appId:I});break;case"server-error":_.set({type:"server-error"});break;case"loading-data":case"loading-token":_.set({type:"loading"});break;case"loaded":_.set({type:"loaded",conversationId:R,userId:T});break;case"loading-conv-failed":O.onCleanup=S({type:"inaccessible-conversation",userId:T,conversationId:R});break;case"unknown-user":O.onCleanup=S({type:"unknown-user",userId:T});break;default:de.never(D)}});const g=vt({type:"loading"});return Eo(O=>{if(_.type.get()==="loading"){g.set({type:"invisible-loading"});const D=setTimeout(()=>{g.set({type:"loading"})},1e3);O.onCleanup=()=>{clearTimeout(D)}}else g.set(_.get())}),te(g)}(),{attachFile:o,shareLocation:s,uploadState:a}=CT({onClose:()=>r.focus()});Z(()=>{r.uploadFile=o},[r,o]);const[l,u]=ae(!1),c=he(),h=te(()=>c.app$.get()?c.state$.userPermissions.canShareFile.get():void 0);Z(()=>{i.type==="loaded"?c.renderedConversationId$.set(i.conversationId):c.renderedConversationId$.set(void 0)},[i,c]);const d=ee(E=>{o(E.dataTransfer.files[0]),E.preventDefault(),u(!1)},[o]),p=ee(E=>{E.preventDefault(),u(!0)},[]),f=ee(E=>{E.preventDefault(),u(!1)},[]),m=Q(null);return bu(),i.type==="invisible-loading"?L(Pe,{}):i.type==="loading"?L(yA,{}):i.type==="inaccessible-conversation"?L(vT,{}):i.type==="unknown-user"||i.type==="auth-failed"||i.type==="wrong-app-id"||i.type==="server-error"||i.type==="unexpected-error"?L(ba,{appId:t,chatboxState:i}):i.type=="expired-token"?L(NA,{}):i.type==="loaded"?i.conversationId===null?L(xT,{}):L("div",{className:"t-chatbox-content",onDragOver:h?p:void 0,onDragLeave:h?f:void 0,onDrop:h?d:void 0,"t-menu-boundary":"root",ref:m,children:[e&&L(wT,{}),L(MT,{}),L(ST,{conversationId:i.conversationId}),L(PT,{}),n&&L(IA,{attachFile:o,shareLocation:s}),a&&L(IT,{uploadState:a}),l&&L(bA,{className:"t-drop-overlay",children:L(Ys,{type:"attach"})}),L(kA,{containerRef:m})]}):L(Pe,{})}const us=new Uint8Array(31);function LA(){if(globalThis.crypto!==void 0)crypto.getRandomValues(us);else for(let e=0;e<us.length;e++)us[e]=Math.floor(256*Math.random());let t=0;return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,e=>(+e^us[t++]&15>>+e/4).toString(16))}class HT{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(),h=this.store.state$.messages.child(c).loadedAll;let d;do{const p=this.store.messageSubscriptions[c];p&&!h.peek()&&await p.loadMore(30),d=u()}while(!h.peek()&&!d);return d}}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 $e.error("In-conversation message search is only available to customers on Growth plan and above.")}async deleteMessage(e){const n=this.store.state$.currentConversationId.peek();if(!n)return;const r=this.store.state$.messages.child(n).lookup.child(e).peek(),i=this.talkSession.conversation(n).message(e),[o]=await Promise.all([r!=null?r:i.get(),i.delete()]);if(o){const s={currentUser:this.store.currentUser$.peek(),conversation:this.store.state$.currentConversation.peek(),message:r};this.onDeleteMessage(s)}}setEditing(e){this.store.state$.currentConversationId.peek()&&this.store.state$.editingMessageId.set(e)}async editMessage(e,n){const r=this.store.state$.currentConversationId.peek();r&&await this.talkSession.conversation(r).message(e).edit(n)}setReferencedMessage(e){this.store.state$.currentConversationId.peek()&&(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 da(()=>this.store.state$.loadingConversationId.get()===this.store.renderedConversationId$.get()),this.store.state$.currentConversationId.peek()===null)return $e.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 $e.error(`Message with id: \`${e}\` could not be found in this conversation`),i;const o=(a=this.scrollable)==null?void 0:a.current;de.defined(o);const s=o.querySelector(`[t-message-id="${e}"]`);return s?this.scrollToAndHighlight(s,i,n):$e.error(`Could not find HTMLElement with attribute: t-message-id="${e}"`),i}async jumpToHighlight(e){if(!this.store.state$.userPermissions.canSearch.peek())return $e.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;de.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 $e.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 h=i.findIndex(f=>f.contains(c));if(h===-1)return;const d=i.splice(h,1)[0],p=d.getAttribute("t-message-id");r.push([p,d])}),e==="up"){const c=n.getBoundingClientRect().top;a=r.find(([h,d])=>d.getBoundingClientRect().top-c<-5)}else{const c=.05*n.getBoundingClientRect().height,h=n.getBoundingClientRect().bottom;for(let d=r.length-1;d>=0;d--){const p=r[d],[f,m]=p;if(h-m.getBoundingClientRect().top<=c){a=p;break}}}const l=this.store.chatSearchState$;if(a){const[c,h]=a,d=this.store.state$.messages.child(o).lookup.child(c).peek();return this.scrollToAndHighlight(h,d),l.set("visible"),d}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):$e.error("In-conversation message search and by extension highlighting of strings are only available to customers on Growth plan and above.")}async sendMessage(e){const n=this.store.state$.currentConversationId.peek();if(!n)return;const r=await async function(s,a){var m,E,A,_,g;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=(m=a.referencedMessage)==null?void 0:m.get())!=null?E:null),h=c&&{...c,type:"UserMessage",sender:c.sender,referencedMessageId:(_=(A=c.referencedMessage)==null?void 0:A.id)!=null?_:null};h&&delete h.referencedMessage;const d=s.latestFileUpload,p="content"in a?[of(d,a.content[0])]:[UT(a.text)],f="text"in a?a.text:EA(a.content.map(O=>of(d,O)),{});return{id:"ephemeral-"+LA(),type:"UserMessage",sender:s.currentUser$.peek(),createdAt:Date.now(),editedAt:null,custom:(g=a.custom)!=null?g:{},origin:"web",referencedMessage:h,reactions:[],content:p,plaintext:f}}(this.store,e);this.store.state$.ephemeralMessages.child(n).child(r.id).set(r);const i=No();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();de.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&&gv(n,r.id,i,e)}_getReactionRef(e,n){const r=this.store.state$.currentConversationId.peek();return this.talkSession.conversation(r).message(e).reaction(n)}}const UT=t=>({type:"text",children:p_(t)});function of(t,e){switch(e.type){case"text":case"location":return e;case"file":return function(n,r){return{type:"file",subtype:n.type==="file"?void 0:n.type,...n.metadata,size:n.file.size,filename:n.file.name,fileToken:r.fileToken,url:n.temporaryBlobUrl}}(t,e)}}class bl extends Error{constructor(e,n){const r=function(i){if(typeof i=="string")return i;if(Array.isArray(i))return i.join(`
105
+ `);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 bo=console;class BT{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 zi(()=>this.fetchWithReauth(r),{retries:11});return await this.handleResponse(i,r)}async queuedPut(e,n){await this._lastPutPromise;const r=zi(()=>this._doPut(e,n));return this._lastPutPromise=r,r}put(e,n,r){const i=()=>this._doPut(e,n);return r?sf(i,r):zi(i,{retries:5})}post(e,n,r){const i=()=>this._doPost(e,n);return r?sf(i,r):zi(i,{retries:5})}delete(e,n={}){return zi(()=>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 Yl.error(`[${this.appId}][BackendRestClient] Couldn't find resource.`),new bl("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 Yl.error(`[${this.appId}][BackendRestClient] Couldn't authenticate ${n} with token ${r}.`),new bl("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 bl(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:(bo.error(`401 error from ${n==null?void 0:n.method} ${e}, ${i}`),this.authProvider.refreshToken(),r(await this.authProvider.getToken()))}}function wA(t){return!t.userMessage}function zi(t,{retries:e=30}={}){return Uu(e,t,{shouldRetry:wA,log:bo.warn.bind(bo),maxDelay:30,initialDelay:.2})}async function sf(t,e){try{return await t()}catch(r){if(!wA(r))throw r}let n=!1;return e.then(()=>{n=!0}),Uu(1e3,t,{initialDelay:.2,maxDelay:30,shouldRetry:()=>!n,log:bo.warn.bind(bo)})}var kc={exports:{}};(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=typeof Zo=="object"&&Zo&&Zo.Object===Object&&Zo,h=typeof self=="object"&&self&&self.Object===Object&&self,d=c||h||Function("return this")(),p=e&&!e.nodeType&&e,f=p&&t&&!t.nodeType&&t,m=f&&f.exports===p,E=m&&c.process,A=function(){try{var w=f&&f.require&&f.require("util").types;return w||E&&E.binding&&E.binding("util")}catch(H){}}(),_=A&&A.isTypedArray,g,O=Array.prototype,D=Function.prototype,R=Object.prototype,T=d["__core-js_shared__"],I=D.toString,S=R.hasOwnProperty,v=(g=/[^.]+$/.exec(T&&T.keys&&T.keys.IE_PROTO||""))?"Symbol(src)_1."+g:"",y=R.toString,b=I.call(Object),M=RegExp("^"+I.call(S).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),k=m?d.Buffer:void 0,P=d.Symbol,B=d.Uint8Array;k&&k.allocUnsafe;var F,V,G=(F=Object.getPrototypeOf,V=Object,function(w){return F(V(w))}),z=Object.create,K=R.propertyIsEnumerable,_e=O.splice,ie=P?P.toStringTag:void 0,ue=function(){try{var w=Er(Object,"defineProperty");return w({},"",{}),w}catch(H){}}(),le=k?k.isBuffer:void 0,Ie=Math.max,$t=Date.now,rt=Er(d,"Map"),ye=Er(Object,"create"),Ke=function(){function w(){}return function(H){if(!Y(H))return{};if(z)return z(H);w.prototype=H;var j=new w;return w.prototype=void 0,j}}();function Jt(w){var H=-1,j=w==null?0:w.length;for(this.clear();++H<j;){var q=w[H];this.set(q[0],q[1])}}function ve(w){var H=-1,j=w==null?0:w.length;for(this.clear();++H<j;){var q=w[H];this.set(q[0],q[1])}}function qe(w){var H=-1,j=w==null?0:w.length;for(this.clear();++H<j;){var q=w[H];this.set(q[0],q[1])}}function we(w){var H=this.__data__=new ve(w);this.size=H.size}function dr(w,H){var j=C(w),q=!j&&pe(w),fe=!j&&!q&&x(w),xe=!j&&!q&&!fe&&Re(w),Ne=j||q||fe||xe,Et=Ne?function(it,yn){for(var It=-1,Kr=Array(it);++It<it;)Kr[It]=yn(It);return Kr}(w.length,String):[],Ct=Et.length;for(var Fe in w)Ne&&(Fe=="length"||fe&&(Fe=="offset"||Fe=="parent")||xe&&(Fe=="buffer"||Fe=="byteLength"||Fe=="byteOffset")||an(Fe,Ct))||Et.push(Fe);return Et}function Rn(w,H,j){(j!==void 0&&!Te(w[H],j)||j===void 0&&!(H in w))&&Je(w,H,j)}function Ge(w,H,j){var q=w[H];S.call(w,H)&&Te(q,j)&&(j!==void 0||H in w)||Je(w,H,j)}function rn(w,H){for(var j=w.length;j--;)if(Te(w[j][0],H))return j;return-1}function Je(w,H,j){H=="__proto__"&&ue?ue(w,H,{configurable:!0,enumerable:!0,value:j,writable:!0}):w[H]=j}Jt.prototype.clear=function(){this.__data__=ye?ye(null):{},this.size=0},Jt.prototype.delete=function(w){var H=this.has(w)&&delete this.__data__[w];return this.size-=H?1:0,H},Jt.prototype.get=function(w){var H=this.__data__;if(ye){var j=H[w];return j===n?void 0:j}return S.call(H,w)?H[w]:void 0},Jt.prototype.has=function(w){var H=this.__data__;return ye?H[w]!==void 0:S.call(H,w)},Jt.prototype.set=function(w,H){var j=this.__data__;return this.size+=this.has(w)?0:1,j[w]=ye&&H===void 0?n:H,this},ve.prototype.clear=function(){this.__data__=[],this.size=0},ve.prototype.delete=function(w){var H=this.__data__,j=rn(H,w);return!(j<0)&&(j==H.length-1?H.pop():_e.call(H,j,1),--this.size,!0)},ve.prototype.get=function(w){var H=this.__data__,j=rn(H,w);return j<0?void 0:H[j][1]},ve.prototype.has=function(w){return rn(this.__data__,w)>-1},ve.prototype.set=function(w,H){var j=this.__data__,q=rn(j,w);return q<0?(++this.size,j.push([w,H])):j[q][1]=H,this},qe.prototype.clear=function(){this.size=0,this.__data__={hash:new Jt,map:new(rt||ve),string:new Jt}},qe.prototype.delete=function(w){var H=sn(this,w).delete(w);return this.size-=H?1:0,H},qe.prototype.get=function(w){return sn(this,w).get(w)},qe.prototype.has=function(w){return sn(this,w).has(w)},qe.prototype.set=function(w,H){var j=sn(this,w),q=j.size;return j.set(w,H),this.size+=j.size==q?0:1,this},we.prototype.clear=function(){this.__data__=new ve,this.size=0},we.prototype.delete=function(w){var H=this.__data__,j=H.delete(w);return this.size=H.size,j},we.prototype.get=function(w){return this.__data__.get(w)},we.prototype.has=function(w){return this.__data__.has(w)},we.prototype.set=function(w,H){var j=this.__data__;if(j instanceof ve){var q=j.__data__;if(!rt||q.length<199)return q.push([w,H]),this.size=++j.size,this;j=this.__data__=new qe(q)}return j.set(w,H),this.size=j.size,this};var Fi=function(w,H,j){for(var q=-1,fe=Object(w),xe=j(w),Ne=xe.length;Ne--;){var Et=xe[++q];if(H(fe[Et],Et,fe)===!1)break}return w};function on(w){return w==null?w===void 0?"[object Undefined]":"[object Null]":ie&&ie in Object(w)?function(H){var j=S.call(H,ie),q=H[ie];try{H[ie]=void 0;var fe=!0}catch(Ne){}var xe=y.call(H);return fe&&(j?H[ie]=q:delete H[ie]),xe}(w):function(H){return y.call(H)}(w)}function Rt(w){return ne(w)&&on(w)==i}function hr(w){return!(!Y(w)||function(H){return!!v&&v in H}(w))&&($(w)?M:a).test(function(H){if(H!=null){try{return I.call(H)}catch(j){}try{return H+""}catch(j){}}return""}(w))}function pr(w){if(!Y(w))return function(fe){var xe=[];if(fe!=null)for(var Ne in Object(fe))xe.push(Ne);return xe}(w);var H=Se(w),j=[];for(var q in w)(q!="constructor"||!H&&S.call(w,q))&&j.push(q);return j}function Vn(w,H,j,q,fe){w!==H&&Fi(H,function(xe,Ne){if(fe||(fe=new we),Y(xe))(function(Ct,Fe,it,yn,It,Kr,Hi){var ln=kt(Ct,it),yt=kt(Fe,it),Vu=Hi.get(yt);if(Vu)return void Rn(Ct,it,Vu);var Lt=Kr?Kr(ln,yt,it+"",Ct,Fe,Hi):void 0,Ui=Lt===void 0;if(Ui){var ka=C(yt),La=!ka&&x(yt),zu=!ka&&!La&&Re(yt);Lt=yt,ka||La||zu?C(ln)?Lt=ln:ne(Yu=ln)&&N(Yu)?Lt=function(Ze,Vt){var dt=-1,wt=Ze.length;for(Vt||(Vt=Array(wt));++dt<wt;)Vt[dt]=Ze[dt];return Vt}(ln):La?(Ui=!1,Lt=yt.slice()):zu?(Ui=!1,Lt=function(Ze){var Vt=(dt=Ze.buffer,wt=new dt.constructor(dt.byteLength),new B(wt).set(new B(dt)),wt),dt,wt;return new Ze.constructor(Vt,Ze.byteOffset,Ze.length)}(yt)):Lt=[]:function(Ze){if(!ne(Ze)||on(Ze)!=s)return!1;var Vt=G(Ze);if(Vt===null)return!0;var dt=S.call(Vt,"constructor")&&Vt.constructor;return typeof dt=="function"&&dt instanceof dt&&I.call(dt)==b}(yt)||pe(yt)?(Lt=ln,pe(ln)?Lt=function(Ze){return function(Vt,dt,wt){var jA=!wt;wt||(wt={});for(var Gu=-1,$A=dt.length;++Gu<$A;){var wa=dt[Gu],Wo=void 0;Wo===void 0&&(Wo=Vt[wa]),jA?Je(wt,wa,Wo):Ge(wt,wa,Wo)}return wt}(Ze,Me(Ze))}(ln):Y(ln)&&!$(ln)||(Lt=function(Ze){return typeof Ze.constructor!="function"||Se(Ze)?{}:Ke(G(Ze))}(yt))):Ui=!1}var Yu;Ui&&(Hi.set(yt,Lt),It(Lt,yt,yn,Kr,Hi),Hi.delete(yt)),Rn(Ct,it,Lt)})(w,H,Ne,j,Vn,q,fe);else{var Et=q?q(kt(w,Ne),xe,Ne+"",w,H,fe):void 0;Et===void 0&&(Et=xe),Rn(w,Ne,Et)}},Me)}function fr(w,H){return Cn(function(j,q,fe){return q=Ie(q===void 0?j.length-1:q,0),function(){for(var xe=arguments,Ne=-1,Et=Ie(xe.length-q,0),Ct=Array(Et);++Ne<Et;)Ct[Ne]=xe[q+Ne];Ne=-1;for(var Fe=Array(q+1);++Ne<q;)Fe[Ne]=xe[Ne];return Fe[q]=fe(Ct),function(it,yn,It){switch(It.length){case 0:return it.call(yn);case 1:return it.call(yn,It[0]);case 2:return it.call(yn,It[0],It[1]);case 3:return it.call(yn,It[0],It[1],It[2])}return it.apply(yn,It)}(j,this,Fe)}}(w,H,$u),w+"")}var mr=ue?function(w,H){return ue(w,"toString",{configurable:!0,enumerable:!1,value:(j=H,function(){return j}),writable:!0});var j}:$u;function sn(w,H){var j,q,fe=w.__data__;return((q=typeof(j=H))=="string"||q=="number"||q=="symbol"||q=="boolean"?j!=="__proto__":j===null)?fe[typeof H=="string"?"string":"hash"]:fe.map}function Er(w,H){var j=function(q,fe){return q==null?void 0:q[fe]}(w,H);return hr(j)?j:void 0}function an(w,H){var j=typeof w;return!!(H=H==null?r:H)&&(j=="number"||j!="symbol"&&l.test(w))&&w>-1&&w%1==0&&w<H}function Se(w){var H=w&&w.constructor;return w===(typeof H=="function"&&H.prototype||R)}function kt(w,H){if((H!=="constructor"||typeof w[H]!="function")&&H!="__proto__")return w[H]}var Cn=function(w){var H=0,j=0;return function(){var q=$t(),fe=16-(q-j);if(j=q,fe>0){if(++H>=800)return arguments[0]}else H=0;return w.apply(void 0,arguments)}}(mr);function Te(w,H){return w===H||w!=w&&H!=H}var pe=Rt(function(){return arguments}())?Rt:function(w){return ne(w)&&S.call(w,"callee")&&!K.call(w,"callee")},C=Array.isArray;function N(w){return w!=null&&W(w.length)&&!$(w)}var x=le||function(){return!1};function $(w){if(!Y(w))return!1;var H=on(w);return H==o||H=="[object GeneratorFunction]"||H=="[object AsyncFunction]"||H=="[object Proxy]"}function W(w){return typeof w=="number"&&w>-1&&w%1==0&&w<=r}function Y(w){var H=typeof w;return w!=null&&(H=="object"||H=="function")}function ne(w){return w!=null&&typeof w=="object"}var Re=_?function(w){return function(H){return w(H)}}(_):function(w){return ne(w)&&W(w.length)&&!!u[on(w)]};function Me(w){return N(w)?dr(w):pr(w)}var In,BA=(In=function(w,H,j){Vn(w,H,j)},fr(function(w,H){var j=-1,q=H.length,fe=q>1?H[q-1]:void 0,xe=q>2?H[2]:void 0;for(fe=In.length>3&&typeof fe=="function"?(q--,fe):void 0,xe&&function(Et,Ct,Fe){if(!Y(Fe))return!1;var it=typeof Ct;return!!(it=="number"?N(Fe)&&an(Ct,Fe.length):it=="string"&&Ct in Fe)&&Te(Fe[Ct],Et)}(H[0],H[1],xe)&&(fe=q<3?void 0:fe,q=1),w=Object(w);++j<q;){var Ne=H[j];Ne&&In(w,Ne,j,fe)}return w}));function $u(w){return w}t.exports=BA})(kc,kc.exports);const jT=tu(kc.exports);class $T{constructor(e,n,r,i){this.backendRestClient=new BT(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}},
106
106
  {{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}},
107
107
  The {{app.name}} team`,enableReplyToEmail:a.includes("reply_via_email"),emailThemeType:a.includes("email_templates")?"custom":"standard",emailTheme:"default_email",emailAttachmentMode:"enabledExcludingImages",htmlTemplate:`<div>
108
108
  Hi {{recipient.name}}, <br/>
@@ -126,13 +126,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
126
126
  {{app.custom.websiteUrl}} Join the chat
127
127
 
128
128
  On behalf of {{sender.name}},
129
- 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 PT(l,s)}(n.configuration,n.features),i=JSON.parse(r.suppressContactInfo),o={...r,suppressContactInfo:new R_(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 li{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 li("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 li(`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 li(`ws://${e}/public_api/v1`,`http://${e}/api/v0`,`http://${e}/public_api/v1`):new li(`wss://${e}/public_api/v1`,`https://${e}/api/v0`,`https://${e}/public_api/v1`)}}function af(t){return Object.values(t)}class FT{constructor(e,n,r){this.subscribedConversations={},this.store=e,this.session=n,this.restApi=r}subscribeToConversationListData(){const e=[this.listenForErrors(),this.listenForAuth(),this.listenForUserAndApp(),this.listenForConversations(),this.listenForConversationSearch(),this.listenForMessageSearch()];return()=>e.forEach(n=>n())}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=>{Ge.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 Dt(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 Dt(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()}})}listenForConversations(){const{store:e,session:n}=this;return de(e.type==="ConversationListStore"),Dt(r=>{const i=n.subscribeConversations(o=>{An(()=>{e.conversationsArray$.set(o);const s={};for(const a of o)s[a.id]=a;e.conversationsMap$.set(s)})});e.conversationListSubscription=i,r.onCleanup=()=>{i.unsubscribe(),e.conversationListSubscription=null}})}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=af(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 af(this.subscribedConversations))n.unsubscribe();(e=this.unsubscribeTypingAndPresence)==null||e.call(this),this.subscribedConversations={}}listenForMessages(e){const{store:n,session:r}=this;de(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;de(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;de(n.type==="ChatboxStore");const i=r.conversation(e).subscribe(async o=>{An(()=>{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;de(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;de(n.type==="ChatboxStore");const i=n.state$.participants.child(e),o=n.state$.isUserConnected.child(e),s=Dt(a=>{var c;const l=((c=i.get())!=null?c:[]).map(({user:h})=>h.id),u=l.map(h=>r.user(h).subscribeOnline(d=>{var p;o.child(h).set((p=d==null?void 0:d.isConnected)!=null?p:!1)}));An(()=>{var f;const h=new Set(l),d=(p=(f=o.peek())!=null?f:{},Object.keys(p));var p;for(const m of d)h.has(m)||o.child(m).delete()}),a.onCleanup=()=>{u.forEach(h=>h.unsubscribe())}});return()=>{s==null||s(),n.state$.isUserConnected.child(e).delete(),o.delete()}}listenForConversationSearch(){const{store:e,session:n}=this;de(e.type==="ConversationListStore");const r=n.searchConversations((s,a)=>{e.globalSearchState$.assign({conversationResults:s,conversationStatus:a})}),i=mp(s=>{const a=s.trim();a.length?a.length>=3&&r.setQuery(a):r.setQuery("")},500),o=Dt(()=>{const s=e.globalSearchState$.query.get();i(s)});return e.conversationSearch=r,()=>{e.conversationSearch=null,o()}}listenForMessageSearch(){const{store:e,session:n}=this;de(e.type==="ConversationListStore");const r=n.searchMessages((s,a)=>{e.globalSearchState$.assign({messageResults:s,messageStatus:a})}),i=mp(s=>{const a=s.trim();a.length?a.length>=3&&r.setQuery(a):r.setQuery("")},500),o=Dt(()=>{const s=e.globalSearchState$.query.get();i(s)});return e.messageSearch=r,()=>{e.messageSearch=null,o()}}}function yA(t,e){const n=e.appId,r=e.userId,i=Q(void 0),o=le(()=>{const c=i.current,h=typeof c!=typeof e.tokenFetcher?e.tokenFetcher:c;return i.current=h,h},[e.tokenFetcher]);mt(()=>{t.updateThemeCustom(e.themeCustom)},[t,e.themeCustom]);const s=le(()=>CA(),[e.appId,e.userId,e.token,o]);Z(()=>{t.hasTokenFetcher$.set(!!o)},[t,o]);const a=FA.getTalkSession({host:e.host,appId:n,userId:r,token:e.token,tokenFetcher:o}),l=le(()=>{const c=li.fromHost(e.host);return new xT(c,n,s,a._authProvider)},[n,s,a,e.host]),u=le(()=>new FT(t,a,l),[t,a,l]);return{session:a,restApi:l,fetcher:u}}function Ht(t,e,n){const r=Q(t),i=Q(n);return mt(()=>{r.current=t,i.current=n}),te(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 NA(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]=ue(!0);return Z(()=>{e(!1)},[]),t}const HT=Yt(function(t,e){var b,M;const{onSendMessage:n,onDeleteMessage:r,onMessageAction:i,onFocusMessage:o,onBackButtonClick:s,beforeBrowserPermissionPrompt:a,onMissingBrowserPermission:l,messageFieldPlaceholder:u,messageFieldSpellcheck:c,__hostElement:h}=t;Z(()=>{var k;(k=t.__internalOnLoaded)==null||k.call(t)},[]);const d=bA(),p=Q(h!=null?h:null);NA(p);const f=Ht(r,h,["deleteMessage","delete-message","deletemessage","DeleteMessage"]),m=Ht(n,h,["sendMessage","send-message","sendmessage","SendMessage"]),E=Ht(i,h,["messageAction","message-action","messageaction","MessageAction"]),A=Ht(o,h,["focusMessage","focus-message","focusmessage","FocusMessage"]),_=Ht(s,h,["backButtonClick","back-button-click","backbuttonclick","BackButtonClick"]),g={beforeBrowserPermissionPrompt:a,onMissingBrowserPermissionCallback:Ht(l,h,["browserPermissionDenied","browser-permission-denied","browserpermissiondenied","BrowserPermissionDenied"])},{store:O,controller:D,editorInternals:C,session:T}=function(k,P,B,F,X,G){const z=le(()=>new jm(k.appId,k.userId),[]),{session:K,fetcher:me}=yA(z,k);Z(()=>{const ne=me.subscribeToChatboxData();return()=>ne()},[me]);const ee=le(()=>new __(z.state$.editor,z.device$,z.state$.userPermissions),[z]),ie=le(()=>new LT(z,K,ee,P,B,F,X,G),[K,z,ee,P,B,X,F,G]);return ee.controller=ie,mt(()=>{let ne=!0;const ge=k.conversationId||null;return z.state$.loadingConversationId.set(ge),ge&&me.subscribeConversation(ge),me.subscribeTypingAndPresence(ge),ua(()=>z.canRenderUi(ge)).then(()=>{ne&&An(()=>{z.state$.currentConversationId.set(ge),z.state$.referencedMessageId.set(null),z.chatSearchState$.set("hidden")})}),()=>{ne=!1}},[z,me,k.conversationId]),{store:z,controller:ie,editorInternals:ee,session:K}}(t,m,f,E,A,_),I=te(async()=>{const k=C.state$;if(k.isEmpty.peek()||k.atTextLimit.peek())return;const P=C.getText(),B=O.state$.referencedMessageId.peek();B&&D.setReferencedMessage(null),C.clearText(),O.state$.editor.showEmojiPicker.set(!1),await D.sendMessage({text:P,referencedMessage:B!=null?B:void 0})},[D,C,O]);Z(()=>{var P;const k=(P=t.enterSendsMessage)!=null?P:!0;O.state$.enterSendsMessage.set(k),C.onEnter=k?I:void 0},[C,t.enterSendsMessage,I,O]);const S=Q(void 0);Z(()=>{var P;const k=(P=O.focusedMessage$.peek())==null?void 0:P.id;t.focusedMessageId!==S.current&&k!==t.focusedMessageId&&(S.current=t.focusedMessageId,D.focusMessage(t.focusedMessageId||null,!1))},[O,D,t.focusedMessageId]),Z(()=>{const k=t.__hostElement;if(k)return O.focusedMessage$.onChange(({value:P})=>{var B;k.focusedMessageId=(B=P==null?void 0:P.id)!=null?B:null})},[O,t.__hostElement]),Z(()=>{C.spellcheck$.set(c)},[C,c]),Z(()=>{C.placeholder$.set(u)},[C,u]),$n(e,()=>({controller:D,editorInternals:C}));const v=te(({error:k})=>L(Na,{appId:t.appId,chatboxState:{type:"unexpected-error",error:k}}),[t.appId]),y=d?null:L(Dm,{fallbackRender:v,children:L(bm.Provider,{value:C,children:L(Lm.Provider,{value:O,children:L(Nm.Provider,{value:t.theme,children:L(km.Provider,{value:g,children:L(wm.Provider,{value:D,children:L(nu.Provider,{value:T,children:L(Bg.Provider,{value:{sendMessage:I},children:L(kT,{appId:t.appId,chatHeaderVisible:(b=t.chatHeaderVisible)!=null?b:!0,messageFieldVisible:(M=t.messageFieldVisible)!=null?M:!0})})})})})})})})});return h?y:L("div",{className:"t-chatbox"+(t.className?` ${t.className}`:""),style:t.style,ref:p,children:y})});(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 {
129
+ 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 jT(l,s)}(n.configuration,n.features),i=JSON.parse(r.suppressContactInfo),o={...r,suppressContactInfo:new C_(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 ci{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 ci("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 ci(`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 ci(`ws://${e}/public_api/v1`,`http://${e}/api/v0`,`http://${e}/public_api/v1`):new ci(`wss://${e}/public_api/v1`,`https://${e}/api/v0`,`https://${e}/public_api/v1`)}}function af(t){return Object.values(t)}class VT{constructor(e,n,r){this.subscribedConversations={},this.store=e,this.session=n,this.restApi=r}subscribeToConversationListData(){const e=[this.listenForErrors(),this.listenForAuth(),this.listenForUserAndApp(),this.listenForConversations(),this.listenForConversationSearch(),this.listenForMessageSearch()];return()=>e.forEach(n=>n())}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=>{$e.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 gt(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 gt(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()}})}listenForConversations(){const{store:e,session:n}=this;return de(e.type==="ConversationListStore"),gt(r=>{const i=n.subscribeConversations(o=>{En(()=>{e.conversationsArray$.set(o);const s={};for(const a of o)s[a.id]=a;e.conversationsMap$.set(s)})});e.conversationListSubscription=i,r.onCleanup=()=>{i.unsubscribe(),e.conversationListSubscription=null}})}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=af(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 af(this.subscribedConversations))n.unsubscribe();(e=this.unsubscribeTypingAndPresence)==null||e.call(this),this.subscribedConversations={}}listenForMessages(e){const{store:n,session:r}=this;de(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;de(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;de(n.type==="ChatboxStore");const i=r.conversation(e).subscribe(async o=>{En(()=>{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;de(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;de(n.type==="ChatboxStore");const i=n.state$.participants.child(e),o=n.state$.isUserConnected.child(e),s=gt(a=>{var c;const l=((c=i.get())!=null?c:[]).map(({user:h})=>h.id),u=l.map(h=>r.user(h).subscribeOnline(d=>{var p;o.child(h).set((p=d==null?void 0:d.isConnected)!=null?p:!1)}));En(()=>{var f;const h=new Set(l),d=(p=(f=o.peek())!=null?f:{},Object.keys(p));var p;for(const m of d)h.has(m)||o.child(m).delete()}),a.onCleanup=()=>{u.forEach(h=>h.unsubscribe())}});return()=>{s==null||s(),n.state$.isUserConnected.child(e).delete(),o.delete()}}listenForConversationSearch(){const{store:e,session:n}=this;de(e.type==="ConversationListStore");const r=n.searchConversations((s,a)=>{e.globalSearchState$.assign({conversationResults:s,conversationStatus:a})}),i=mp(s=>{const a=s.trim();a.length?a.length>=3&&r.setQuery(a):r.setQuery("")},500),o=gt(()=>{const s=e.globalSearchState$.query.get();i(s)});return e.conversationSearch=r,()=>{e.conversationSearch=null,o()}}listenForMessageSearch(){const{store:e,session:n}=this;de(e.type==="ConversationListStore");const r=n.searchMessages((s,a)=>{e.globalSearchState$.assign({messageResults:s,messageStatus:a})}),i=mp(s=>{const a=s.trim();a.length?a.length>=3&&r.setQuery(a):r.setQuery("")},500),o=gt(()=>{const s=e.globalSearchState$.query.get();i(s)});return e.messageSearch=r,()=>{e.messageSearch=null,o()}}}function MA(t,e){const n=e.appId,r=e.userId,i=Q(void 0),o=se(()=>{const c=i.current,h=typeof c!=typeof e.tokenFetcher?e.tokenFetcher:c;return i.current=h,h},[e.tokenFetcher]);ft(()=>{t.updateThemeCustom(e.themeCustom)},[t,e.themeCustom]);const s=se(()=>LA(),[e.appId,e.userId,e.token,o]);Z(()=>{t.hasTokenFetcher$.set(!!o)},[t,o]);const a=VA.getTalkSession({host:e.host,appId:n,userId:r,token:e.token,tokenFetcher:o}),l=se(()=>{const c=ci.fromHost(e.host);return new $T(c,n,s,a._authProvider)},[n,s,a,e.host]),u=se(()=>new VT(t,a,l),[t,a,l]);return{session:a,restApi:l,fetcher:u}}function Pt(t,e,n){const r=Q(t),i=Q(n);return ft(()=>{r.current=t,i.current=n}),ee(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 PA(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 xA(){const[t,e]=ae(!0);return Z(()=>{e(!1)},[]),t}const zT=jt(function(t,e){var b,M;const{onSendMessage:n,onDeleteMessage:r,onMessageAction:i,onFocusMessage:o,onBackButtonClick:s,beforeBrowserPermissionPrompt:a,onMissingBrowserPermission:l,messageFieldPlaceholder:u,messageFieldSpellcheck:c,__hostElement:h}=t;Z(()=>{var k;(k=t.__internalOnLoaded)==null||k.call(t)},[]);const d=xA(),p=Q(h!=null?h:null);PA(p);const f=Pt(r,h,["deleteMessage","delete-message","deletemessage","DeleteMessage"]),m=Pt(n,h,["sendMessage","send-message","sendmessage","SendMessage"]),E=Pt(i,h,["messageAction","message-action","messageaction","MessageAction"]),A=Pt(o,h,["focusMessage","focus-message","focusmessage","FocusMessage"]),_=Pt(s,h,["backButtonClick","back-button-click","backbuttonclick","BackButtonClick"]),g={beforeBrowserPermissionPrompt:a,onMissingBrowserPermissionCallback:Pt(l,h,["browserPermissionDenied","browser-permission-denied","browserpermissiondenied","BrowserPermissionDenied"])},{store:O,controller:D,editorInternals:R,session:T}=function(k,P,B,F,V,G){const z=se(()=>new $m(k.appId,k.userId),[]),{session:K,fetcher:_e}=MA(z,k);Z(()=>{const le=_e.subscribeToChatboxData();return()=>le()},[_e]);const ie=se(()=>new A_(z.state$.editor,z.device$,z.state$.userPermissions),[z]),ue=se(()=>new HT(z,K,ie,P,B,F,V,G),[K,z,ie,P,B,V,F,G]);return ie.controller=ue,ft(()=>{let le=!0;const Ie=k.conversationId||null;return z.state$.loadingConversationId.set(Ie),Ie&&_e.subscribeConversation(Ie),_e.subscribeTypingAndPresence(Ie),da(()=>z.canRenderUi(Ie)).then(()=>{le&&En(()=>{z.state$.currentConversationId.set(Ie),z.state$.referencedMessageId.set(null),z.chatSearchState$.set("hidden")})}),()=>{le=!1}},[z,_e,k.conversationId]),{store:z,controller:ue,editorInternals:ie,session:K}}(t,m,f,E,A,_),I=ee(async()=>{const k=R.state$;if(k.isEmpty.peek()||k.atTextLimit.peek())return;const P=R.getText(),B=O.state$.referencedMessageId.peek();B&&D.setReferencedMessage(null),R.clearText(),O.state$.editor.showEmojiPicker.set(!1),await D.sendMessage({text:P,referencedMessage:B!=null?B:void 0})},[D,R,O]);Z(()=>{var P;const k=(P=t.enterSendsMessage)!=null?P:!0;O.state$.enterSendsMessage.set(k),R.onEnter=k?I:void 0},[R,t.enterSendsMessage,I,O]);const S=Q(void 0);Z(()=>{var P;const k=(P=O.focusedMessage$.peek())==null?void 0:P.id;t.focusedMessageId!==S.current&&k!==t.focusedMessageId&&(S.current=t.focusedMessageId,D.focusMessage(t.focusedMessageId||null,!1))},[O,D,t.focusedMessageId]),Z(()=>{const k=t.__hostElement;if(k)return O.focusedMessage$.onChange(({value:P})=>{var B;k.focusedMessageId=(B=P==null?void 0:P.id)!=null?B:null})},[O,t.__hostElement]),Z(()=>{R.spellcheck$.set(c)},[R,c]),Z(()=>{R.placeholder$.set(u)},[R,u]),jn(e,()=>({controller:D,editorInternals:R}));const v=ee(({error:k})=>L(ba,{appId:t.appId,chatboxState:{type:"unexpected-error",error:k}}),[t.appId]),y=d?null:L(Dm,{fallbackRender:v,children:L(km.Provider,{value:R,children:L(wm.Provider,{value:O,children:L(bm.Provider,{value:t.theme,children:L(Lm.Provider,{value:g,children:L(Mm.Provider,{value:D,children:L(ru.Provider,{value:T,children:L(Gg.Provider,{value:{sendMessage:I},children:L(FT,{appId:t.appId,chatHeaderVisible:(b=t.chatHeaderVisible)!=null?b:!0,messageFieldVisible:(M=t.messageFieldVisible)!=null?M:!0})})})})})})})})});return h?y:L("div",{className:"t-chatbox"+(t.className?` ${t.className}`:""),style:t.style,ref:p,children:y})});(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 {
130
130
  font-family: "${t}";
131
131
  unicode-range: U+1F1E6-1F1FF, U+1F3F4, U+E0062-E0063, U+E0065, U+E0067,
132
132
  U+E006C, U+E006E, U+E0073-E0074, U+E0077, U+E007F;
133
133
  src: url('${e}') format('woff2');
134
134
  font-display: swap;
135
- }`,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];vg.set(i,o),Rd.prototype[i]=function(...s){return o.call(this,this._node,...s)}}if(e)for(const i in e){const o=e[i];Dg.set(i,o),Object.defineProperty(Rd.prototype,i,{configurable:!0,get(){return o.get.call(this,this._node)},set(s){return o.set.call(this,this._node,s)}})}n&&(Td.replacer=n),r&&(Td.reviver=r)}({observableFunctions:{child:(t,e)=>ha.getProxy(t,e)}}),Ge.registerHandler(({level:t,data:e})=>{console[t]("[TalkJS]",...e)});const kA=Yt(function(t,e){const n=Q(null),r=le(()=>new UT(n),[]);$n(e,()=>r,[r]);const{theme:i,...o}=t,s=le(()=>({...kc,...i!=null?i:{}}),[i]),a=`chatbox|${t.userId}|${t.appId}`;return L(Mm.Provider,{value:r,children:Te(HT,{...o,key:a,theme:s,ref:n})})});var Ai,$e,St,Ts;class UT{constructor(e){Kr(this,$e);Kr(this,Ai);Wo(this,Ai,e)}deleteMessage(e){return we(this,$e,St).deleteMessage(e)}setEditing(e){we(this,$e,St).setEditing(e)}editMessage(e,n){return we(this,$e,St).editMessage(e,n)}sendMessage(e){return we(this,$e,St).sendMessage(e)}sendFileMessage(e){return we(this,$e,St).sendFileMessage(e)}sendLocationMessage(e){return we(this,$e,St).sendLocationMessage(e)}setReferencedMessage(e){we(this,$e,St).setReferencedMessage(e)}toggleReaction(e,n,r){return we(this,$e,St).toggleReaction(e,n,r)}getMessageFieldText(){return we(this,$e,Ts).getText()}setMessageFieldText(e){we(this,$e,Ts).setText(e)}focusMessageField(){we(this,$e,Ts).focus()}toggleSearchBox(e){we(this,$e,St).toggleSearchBox(e)}async focusMessage(e){return we(this,$e,St).focusMessage(e)}setHighlightedStrings(e){we(this,$e,St).setHighlightedStrings(e)}async jumpToPreviousHighlight(){return we(this,$e,St).jumpToHighlight("up")}async jumpToNextHighlight(){return we(this,$e,St).jumpToHighlight("down")}clickBackButton(){we(this,$e,St).clickBackButton()}}Ai=new WeakMap,$e=new WeakSet,St=function(){return we(this,Ai).current.controller},Ts=function(){return we(this,Ai).current.editorInternals};function BT({conversation:t}){const e=pe(),n=rt(),r=va(),i=re(e.currentConversationId$),o=Ru(i);return L(n.ConversationListItem,{common:r,conversation:t,participants:o,isSelected:i===t.id})}function jT(){const t=pe(),e=Q(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=te(r=>{const i=r.currentTarget;i.scrollHeight-i.clientHeight-i.scrollTop<15&&t.conversationListSubscription&&t.conversationListSubscription.loadMore(20)},[t]);return L("div",{className:"t-conversation-list-scrollable",ref:e,"t-menu-boundary":"root",onScroll:n,children:L(fo,{each:t.conversationsArray$,children:r=>L(BT,{conversation:r.get()})})})}function $T(){const t=pe(),e=rt(),n=va(),r=re(t.globalSearchState$.query),i=te(s=>{t.setGlobalSearchQuery(s)},[t]),o=te(()=>{t.cancelGlobalSearch()},[t]);return L(e.GlobalSearchBox,{common:n,query:r,setQuery:i,cancel:o})}function VT({appId:t}){const e=pe(),n=function(){const o=pe(),s=Vt(()=>{const u=o.currentUser$.get(),c=o.app$.get(),h=o.errors$.get(),d=o.authTokenState$.get();return h.serverError?"server-error":h.wrongAppId?"wrong-app-id":d==="loading"||d==="idle"?"loading-token":d==="invalid"?"invalid-token":d==="expired"?"expired-token":d==="valid"?h.unknownUser?"unknown-user":u&&c?"loaded":"loading-data":void de.unreachable()}),a=Vt({type:"loading"});mo(u=>{const c=s.get(),h=o.extUserId$.peek(),d=o.appId$.peek();switch(c){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:d});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",currentUser:o.currentUser$.peek()});break;case"unknown-user":u.onCleanup=function(p){a.set({type:"loading"});const f=setTimeout(()=>{a.set(p)},5e3);return()=>clearTimeout(f)}({type:"unknown-user",userId:h});break;default:de.never(c)}});const l=Vt({type:"loading"});return mo(u=>{if(a.type.get()==="loading"){l.set({type:"invisible-loading"});const c=setTimeout(()=>{l.set({type:"loading"})},1e3);u.onCleanup=()=>{clearTimeout(c)}}else l.set(a.get())}),re(l)}(),r=re(e.globalSearchEnabled$),i=re(e.globalSearchActive$);return n.type==="invisible-loading"?L(Ue,{}):n.type==="loading"?L(vA,{}):n.type==="unknown-user"||n.type==="auth-failed"||n.type==="wrong-app-id"||n.type==="server-error"||n.type==="unexpected-error"?L(Na,{appId:t,chatboxState:n}):n.type==="expired-token"?L(TA,{}):n.type==="loaded"?L("div",{className:"t-conversation-list-content",children:[r&&L($T,{}),L(i?zT:jT,{})]}):L(Ue,{})}function zT(){const t=pe(),e=rt(),n=va(),r=re(t.t$),i=re(t.globalSearchState$.messageStatus),o=re(t.globalSearchState$.conversationStatus),s=re(t.globalSearchStatus$);return L("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:[L(xd,{if:()=>t.globalSearchState$.conversationResults.get().length,children:()=>L(Ue,{children:[L(e.GlobalSearchResultHeader,{common:n,type:"conversations",canLoadMore:o==="canLoadMore",loadMore:()=>t.conversationSearch.loadMore()}),L(fo,{each:t.globalSearchState$.conversationResults,children:a=>L(e.GlobalSearchResultItem,{common:n,conversation:a.get(),isSelected:a.id.get()===t.globalSearchState$.selectedResultId.get()})})]})}),L(xd,{if:()=>t.globalSearchState$.messageResults.get().length,children:()=>L(Ue,{children:[L(e.GlobalSearchResultHeader,{common:n,type:"messages",canLoadMore:i==="canLoadMore",loadMore:()=>t.messageSearch.loadMore()}),L(fo,{each:t.globalSearchState$.messageResults,children:a=>L(e.GlobalSearchResultItem,{common:n,conversation:a.conversation.get(),message:a.message.get(),isSelected:a.message.id.get()===t.globalSearchState$.selectedResultId.get()})})]})})]})}class YT extends Bm{constructor(){super(...arguments),this.type="ConversationListStore",this.conversationListSubscription=null,this.currentConversationId$=Ae(null),this.conversationsArray$=Ae([]),this.conversationsMap$=Ae({}),this.globalSearchState$=Ae({query:"",selectedResultId:null,conversationResults:[],conversationStatus:"idle",messageResults:[],messageStatus:"idle"}),this.globalSearchStatus$=function(e,n){const r=Ae(e);return Dt(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$=Ae(()=>{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$=Ae(()=>{const e=this.globalSearchEnabled$.get(),n=this.globalSearchState$.query.get().trim();return e&&n.length>=3}),this.highlightedStrings$=Ae(()=>{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()?An(()=>{this.globalSearchState$.query.set(e),this.globalSearchActive$.peek()||this.globalSearchState$.selectedResultId.set(null)}):Ge.error('The "Search messages & conversations" feature is only available to customers on Growth plan and above.')}cancelGlobalSearch(){this.globalSearchEnabled$.peek()?this.setGlobalSearchQuery(""):Ge.error('The "Search messages & conversations" feature is only available to customers on Growth plan and above.')}}class GT{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;An(()=>{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){}}const WT=Yt(function(t,e){const{__hostElement:n,onSelectConversation:r}=t;Z(()=>{var f;(f=t.__internalOnLoaded)==null||f.call(t)},[]);const i=bA(),o=Q(n!=null?n:null);NA(o);const s=Ht(r,n,["selectConversation","select-conversation","selectconversation","SelectConversation"]),a=le(()=>new YT(t.appId,t.userId),[]);Z(()=>{An(()=>{a.extUserId$.set(t.userId),a.appId$.set(t.appId)})},[a,t.appId,t.userId]);const{session:l,fetcher:u}=yA(a,t);Z(()=>{const f=u.subscribeToConversationListData();return()=>f()},[u]);const c=le(()=>new GT(l,a,s),[l,a,s]),h=Q(void 0);Z(()=>{t.selectedConversationId!==h.current&&(h.current=t.selectedConversationId,a.currentConversationId$.set(t.selectedConversationId||null))},[a,t.selectedConversationId]),Z(()=>{const f=t.__hostElement;if(f)return a.currentConversationId$.onChange(({value:m})=>{f.selectedConversationId=m})},[a,t.__hostElement]),$n(e,()=>({controller:c}));const d=te(({error:f})=>L(Na,{appId:t.appId,chatboxState:{type:"unexpected-error",error:f}}),[t.appId]),p=i?null:L(Dm,{fallbackRender:d,children:L(Lm.Provider,{value:a,children:L(Nm.Provider,{value:t.theme,children:L(wm.Provider,{value:c,children:L(nu.Provider,{value:l,children:L(VT,{appId:t.appId})})})})})});return n?p:L("div",{className:"t-conversation-list"+(t.className?` ${t.className}`:""),style:t.style,ref:o,children:p})});var bo,ra,LA;class XT{constructor(e){Kr(this,ra);Kr(this,bo);Wo(this,bo,e)}selectConversation(e,n){return we(this,ra,LA).selectConversation(e,n)}}bo=new WeakMap,ra=new WeakSet,LA=function(){return we(this,bo).current.controller};const wA=Yt(function(t,e){const n=Q(null),r=le(()=>new XT(n),[]);$n(e,()=>r,[r]);const{theme:i,...o}=t,s=le(()=>({...kc,...i!=null?i:{}}),[i]),a=`conversation-list|${t.userId}|${t.appId}`;return L(Mm.Provider,{value:r,children:Te(WT,{...o,key:a,theme:s,ref:n})})});function KT(t){const{selectedConversationId:e,focusedMessageId:n,chatboxProps:r,conversationListProps:i,style:o,__hostElement:s}=t,{onDeleteMessage:a,onSendMessage:l,onMessageAction:u,onFocusMessage:c,onMissingBrowserPermission:h,...d}=r,{onSelectConversation:p,...f}=i,[m,E]=ue(e||null),[A,_]=ue(t.focusedMessageId||null);Z(()=>{E(e||null)},[e]),Z(()=>{_(t.focusedMessageId||null)},[t.focusedMessageId]);const g=Ht(a,s,["deleteMessage","delete-message","deletemessage","DeleteMessage"]),O=Ht(l,s,["sendMessage","send-message","sendmessage","SendMessage"]),D=Ht(u,s,["messageAction","message-action","messageaction","MessageAction"]),C=Ht(c,s,["focusMessage","focus-message","focusmessage","FocusMessage"]),T=Ht(h,s,["browserPermissionDenied","browser-permission-denied","browserpermissiondenied","BrowserPermissionDenied"]),I=Ht(p,s,["selectConversation","select-conversation","selectconversation","SelectConversation"]),S=te(F=>{var X,G;E((G=(X=F.conversation)==null?void 0:X.id)!=null?G:null),I(F)},[I]),v=te(F=>{var X,G;_((G=(X=F.message)==null?void 0:X.id)!=null?G:null),C(F)},[C]);Z(()=>{var F;(F=t.__internalOnLoaded)==null||F.call(t)},[]);const y=Q(s!=null?s:null),[b,M]=ue(void 0);mt(()=>{var G;const F=(G=t.mobileBreakPoint)!=null?G:700,X=new ResizeObserver(z=>{const K=z[0].contentRect.width;M(K>=F)});return X.observe(y.current),()=>X.disconnect()},[t.mobileBreakPoint]);const k=te(F=>{E(null),I({conversation:null,currentUser:F.currentUser})},[I]),P=m?"chatbox":"conversation-list";Z(()=>{s&&(b?s.removeAttribute("t-mobile-inbox"):s.setAttribute("t-mobile-inbox",P))},[b,s,P]);const B=b===void 0?null:L(Ue,{children:[L(wA,{...f,onSelectConversation:S,selectedConversationId:m!=null?m:void 0}),L(kA,{...d,onDeleteMessage:g,onSendMessage:O,onMessageAction:D,onFocusMessage:v,onMissingBrowserPermission:T,onBackButtonClick:k,conversationId:m,focusedMessageId:A!=null?A:void 0})]});if(s)return B;{const F="t-inbox"+(t.className?` ${t.className}`:"");return L("div",{ref:y,style:o,className:F,"t-mobile-inbox":b?void 0:P,children:B})}}var ko;class qT{constructor(e){Kr(this,ko);Wo(this,ko,e)}get chatbox(){return we(this,ko).current}}ko=new WeakMap;const JT=Yt(function(t,e){const n=Q(null),r=Q(null),i=le(()=>new qT(n),[]);$n(e,()=>i,[i]);const{theme:o,appId:s,userId:a,__hostElement:l,__internalOnLoaded:u,beforeBrowserPermissionPrompt:c,chatHeaderVisible:h,className:d,style:p,enterSendsMessage:f,messageFieldVisible:m,messageFieldSpellcheck:E,messageFieldPlaceholder:A,onDeleteMessage:_,onSendMessage:g,onMessageAction:O,onFocusMessage:D,onMissingBrowserPermission:C,onSelectConversation:T,themeCustom:I,host:S,focusedMessageId:v,selectedConversationId:y,mobileBreakPoint:b}=t;return L(KT,{style:p,className:d,selectedConversationId:y,focusedMessageId:v,chatboxProps:{appId:s,userId:a,theme:o,host:S,focusedMessageId:v,enterSendsMessage:f,chatHeaderVisible:h,messageFieldVisible:m,messageFieldSpellcheck:E,messageFieldPlaceholder:A,beforeBrowserPermissionPrompt:c,onDeleteMessage:_,onSendMessage:g,onMessageAction:O,onFocusMessage:D,onMissingBrowserPermission:C,themeCustom:I,ref:n},conversationListProps:{appId:s,userId:a,theme:o,host:S,onSelectConversation:T,themeCustom:I,ref:r},mobileBreakPoint:b,__hostElement:l,__internalOnLoaded:u},`inbox|${t.userId}|${t.appId}`)});function ZT(t){const{conversation:e,theme:n,t:r,chatbox:i,chatSearchState:o}=t.common,{ConversationImage:s,Icon:a,ChatSearchBox:l}=n,u=zo(e.id,10);return t.permissions.canSearch&&o!=="hidden"?U`
135
+ }`,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];Ng.set(i,o),Rd.prototype[i]=function(...s){return o.call(this,this._node,...s)}}if(e)for(const i in e){const o=e[i];yg.set(i,o),Object.defineProperty(Rd.prototype,i,{configurable:!0,get(){return o.get.call(this,this._node)},set(s){return o.set.call(this,this._node,s)}})}n&&(Td.replacer=n),r&&(Td.reviver=r)}({observableFunctions:{child:(t,e)=>pa.getProxy(t,e)}}),$e.registerHandler(({level:t,data:e})=>{console[t]("[TalkJS]",...e)});const FA=jt(function(t,e){const n=Q(null),r=se(()=>new YT(n),[]);jn(e,()=>r,[r]);const{theme:i,...o}=t,s=se(()=>({...Lc,...i!=null?i:{}}),[i]),a=`chatbox|${t.userId}|${t.appId}`;return L(Pm.Provider,{value:r,children:Oe(zT,{...o,key:a,theme:s,ref:n})})});var gi,He,_t,Rs;class YT{constructor(e){qr(this,He);qr(this,gi);Xo(this,gi,e)}deleteMessage(e){return be(this,He,_t).deleteMessage(e)}setEditing(e){be(this,He,_t).setEditing(e)}editMessage(e,n){return be(this,He,_t).editMessage(e,n)}sendMessage(e){return be(this,He,_t).sendMessage(e)}sendFileMessage(e){return be(this,He,_t).sendFileMessage(e)}sendLocationMessage(e){return be(this,He,_t).sendLocationMessage(e)}setReferencedMessage(e){be(this,He,_t).setReferencedMessage(e)}toggleReaction(e,n,r){return be(this,He,_t).toggleReaction(e,n,r)}getMessageFieldText(){return be(this,He,Rs).getText()}setMessageFieldText(e){be(this,He,Rs).setText(e)}focusMessageField(){be(this,He,Rs).focus()}toggleSearchBox(e){be(this,He,_t).toggleSearchBox(e)}async focusMessage(e){return be(this,He,_t).focusMessage(e)}setHighlightedStrings(e){be(this,He,_t).setHighlightedStrings(e)}async jumpToPreviousHighlight(){return be(this,He,_t).jumpToHighlight("up")}async jumpToNextHighlight(){return be(this,He,_t).jumpToHighlight("down")}clickBackButton(){be(this,He,_t).clickBackButton()}}gi=new WeakMap,He=new WeakSet,_t=function(){return be(this,gi).current.controller},Rs=function(){return be(this,gi).current.editorInternals};function GT({conversation:t}){const e=he(),n=nt(),r=Ta(),i=te(e.currentConversationId$),o=Cu(i);return L(n.ConversationListItem,{common:r,conversation:t,participants:o,isSelected:i===t.id})}function WT(){const t=he(),e=Q(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=ee(r=>{const i=r.currentTarget;i.scrollHeight-i.clientHeight-i.scrollTop<15&&t.conversationListSubscription&&t.conversationListSubscription.loadMore(20)},[t]);return L("div",{className:"t-conversation-list-scrollable",ref:e,"t-menu-boundary":"",onScroll:n,children:L(mo,{each:t.conversationsArray$,children:r=>L(GT,{conversation:r.get()})})})}function XT(){const t=he(),e=nt(),n=Ta(),r=te(t.globalSearchState$.query),i=ee(s=>{t.setGlobalSearchQuery(s)},[t]),o=ee(()=>{t.cancelGlobalSearch()},[t]);return L(e.GlobalSearchBox,{common:n,query:r,setQuery:i,cancel:o})}function KT({appId:t}){const e=he(),n=function(){const s=he(),a=vt(()=>{const c=s.currentUser$.get(),h=s.app$.get(),d=s.errors$.get(),p=s.authTokenState$.get();return d.serverError?"server-error":d.wrongAppId?"wrong-app-id":p==="loading"||p==="idle"?"loading-token":p==="invalid"?"invalid-token":p==="expired"?"expired-token":p==="valid"?d.unknownUser?"unknown-user":c&&h?"loaded":"loading-data":void de.unreachable()}),l=vt({type:"loading"});Eo(c=>{const h=a.get(),d=s.extUserId$.peek(),p=s.appId$.peek();switch(h){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(f){l.set({type:"loading"});const m=setTimeout(()=>{l.set(f)},5e3);return()=>clearTimeout(m)}({type:"unknown-user",userId:d});break;default:de.never(h)}});const u=vt({type:"loading"});return Eo(c=>{if(l.type.get()==="loading"){u.set({type:"invisible-loading"});const h=setTimeout(()=>{u.set({type:"loading"})},1e3);c.onCleanup=()=>{clearTimeout(h)}}else u.set(l.get())}),te(u)}(),r=te(e.globalSearchEnabled$),i=te(e.globalSearchActive$),o=Q(null);return n.type==="invisible-loading"?L(Pe,{}):n.type==="loading"?L(yA,{}):n.type==="unknown-user"||n.type==="auth-failed"||n.type==="wrong-app-id"||n.type==="server-error"||n.type==="unexpected-error"?L(ba,{appId:t,chatboxState:n}):n.type==="expired-token"?L(NA,{}):n.type==="loaded"?L("div",{className:"t-conversation-list-content","t-menu-boundary":"root",ref:o,children:[r&&L(XT,{}),L(i?qT:WT,{}),L(kA,{containerRef:o})]}):L(Pe,{})}function qT(){const t=he(),e=nt(),n=Ta(),r=te(t.t$),i=te(t.globalSearchState$.messageStatus),o=te(t.globalSearchState$.conversationStatus),s=te(t.globalSearchStatus$);return L("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:[L(xd,{if:()=>t.globalSearchState$.conversationResults.get().length,children:()=>L(Pe,{children:[L(e.GlobalSearchResultHeader,{common:n,type:"conversations",canLoadMore:o==="canLoadMore",loadMore:()=>t.conversationSearch.loadMore()}),L(mo,{each:t.globalSearchState$.conversationResults,children:a=>L(e.GlobalSearchResultItem,{common:n,conversation:a.get(),isSelected:a.id.get()===t.globalSearchState$.selectedResultId.get()})})]})}),L(xd,{if:()=>t.globalSearchState$.messageResults.get().length,children:()=>L(Pe,{children:[L(e.GlobalSearchResultHeader,{common:n,type:"messages",canLoadMore:i==="canLoadMore",loadMore:()=>t.messageSearch.loadMore()}),L(mo,{each:t.globalSearchState$.messageResults,children:a=>L(e.GlobalSearchResultItem,{common:n,conversation:a.conversation.get(),message:a.message.get(),isSelected:a.message.id.get()===t.globalSearchState$.selectedResultId.get()})})]})})]})}class JT extends jm{constructor(){super(...arguments),this.type="ConversationListStore",this.conversationListSubscription=null,this.currentConversationId$=me(null),this.conversationsArray$=me([]),this.conversationsMap$=me({}),this.globalSearchState$=me({query:"",selectedResultId:null,conversationResults:[],conversationStatus:"idle",messageResults:[],messageStatus:"idle"}),this.globalSearchStatus$=function(e,n){const r=me(e);return gt(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$=me(()=>{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$=me(()=>{const e=this.globalSearchEnabled$.get(),n=this.globalSearchState$.query.get().trim();return e&&n.length>=3}),this.highlightedStrings$=me(()=>{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()?En(()=>{this.globalSearchState$.query.set(e),this.globalSearchActive$.peek()||this.globalSearchState$.selectedResultId.set(null)}):$e.error('The "Search messages & conversations" feature is only available to customers on Growth plan and above.')}cancelGlobalSearch(){this.globalSearchEnabled$.peek()?this.setGlobalSearchQuery(""):$e.error('The "Search messages & conversations" feature is only available to customers on Growth plan and above.')}}class ZT{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;En(()=>{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){}}const QT=jt(function(t,e){const{__hostElement:n,onSelectConversation:r}=t;Z(()=>{var f;(f=t.__internalOnLoaded)==null||f.call(t)},[]);const i=xA(),o=Q(n!=null?n:null);PA(o);const s=Pt(r,n,["selectConversation","select-conversation","selectconversation","SelectConversation"]),a=se(()=>new JT(t.appId,t.userId),[]);Z(()=>{En(()=>{a.extUserId$.set(t.userId),a.appId$.set(t.appId)})},[a,t.appId,t.userId]);const{session:l,fetcher:u}=MA(a,t);Z(()=>{const f=u.subscribeToConversationListData();return()=>f()},[u]);const c=se(()=>new ZT(l,a,s),[l,a,s]),h=Q(void 0);Z(()=>{t.selectedConversationId!==h.current&&(h.current=t.selectedConversationId,a.currentConversationId$.set(t.selectedConversationId||null))},[a,t.selectedConversationId]),Z(()=>{const f=t.__hostElement;if(f)return a.currentConversationId$.onChange(({value:m})=>{f.selectedConversationId=m})},[a,t.__hostElement]),jn(e,()=>({controller:c}));const d=ee(({error:f})=>L(ba,{appId:t.appId,chatboxState:{type:"unexpected-error",error:f}}),[t.appId]),p=i?null:L(Dm,{fallbackRender:d,children:L(wm.Provider,{value:a,children:L(bm.Provider,{value:t.theme,children:L(Mm.Provider,{value:c,children:L(ru.Provider,{value:l,children:L(KT,{appId:t.appId})})})})})});return n?p:L("div",{className:"t-conversation-list"+(t.className?` ${t.className}`:""),style:t.style,ref:o,children:p})});var ko,ia,HA;class eR{constructor(e){qr(this,ia);qr(this,ko);Xo(this,ko,e)}selectConversation(e,n){return be(this,ia,HA).selectConversation(e,n)}}ko=new WeakMap,ia=new WeakSet,HA=function(){return be(this,ko).current.controller};const UA=jt(function(t,e){const n=Q(null),r=se(()=>new eR(n),[]);jn(e,()=>r,[r]);const{theme:i,...o}=t,s=se(()=>({...Lc,...i!=null?i:{}}),[i]),a=`conversation-list|${t.userId}|${t.appId}`;return L(Pm.Provider,{value:r,children:Oe(QT,{...o,key:a,theme:s,ref:n})})});function tR(t){const{selectedConversationId:e,focusedMessageId:n,chatboxProps:r,conversationListProps:i,style:o,__hostElement:s}=t,{onDeleteMessage:a,onSendMessage:l,onMessageAction:u,onFocusMessage:c,onMissingBrowserPermission:h,...d}=r,{onSelectConversation:p,...f}=i,[m,E]=ae(e||null),[A,_]=ae(t.focusedMessageId||null);Z(()=>{E(e||null)},[e]),Z(()=>{_(t.focusedMessageId||null)},[t.focusedMessageId]);const g=Pt(a,s,["deleteMessage","delete-message","deletemessage","DeleteMessage"]),O=Pt(l,s,["sendMessage","send-message","sendmessage","SendMessage"]),D=Pt(u,s,["messageAction","message-action","messageaction","MessageAction"]),R=Pt(c,s,["focusMessage","focus-message","focusmessage","FocusMessage"]),T=Pt(h,s,["browserPermissionDenied","browser-permission-denied","browserpermissiondenied","BrowserPermissionDenied"]),I=Pt(p,s,["selectConversation","select-conversation","selectconversation","SelectConversation"]),S=ee(F=>{var V,G;E((G=(V=F.conversation)==null?void 0:V.id)!=null?G:null),I(F)},[I]),v=ee(F=>{var V,G;_((G=(V=F.message)==null?void 0:V.id)!=null?G:null),R(F)},[R]);Z(()=>{var F;(F=t.__internalOnLoaded)==null||F.call(t)},[]);const y=Q(s!=null?s:null),[b,M]=ae(void 0);ft(()=>{var G;const F=(G=t.mobileBreakPoint)!=null?G:700,V=new ResizeObserver(z=>{const K=z[0].contentRect.width;M(K>=F)});return V.observe(y.current),()=>V.disconnect()},[t.mobileBreakPoint]);const k=ee(F=>{E(null),I({conversation:null,currentUser:F.currentUser})},[I]),P=m?"chatbox":"conversation-list";Z(()=>{s&&(b?s.removeAttribute("t-mobile-inbox"):s.setAttribute("t-mobile-inbox",P))},[b,s,P]);const B=b===void 0?null:L(Pe,{children:[L(UA,{...f,onSelectConversation:S,selectedConversationId:m!=null?m:void 0}),L(FA,{...d,onDeleteMessage:g,onSendMessage:O,onMessageAction:D,onFocusMessage:v,onMissingBrowserPermission:T,onBackButtonClick:k,conversationId:m,focusedMessageId:A!=null?A:void 0})]});if(s)return B;{const F="t-inbox"+(t.className?` ${t.className}`:"");return L("div",{ref:y,style:o,className:F,"t-mobile-inbox":b?void 0:P,children:B})}}var Lo;class nR{constructor(e){qr(this,Lo);Xo(this,Lo,e)}get chatbox(){return be(this,Lo).current}}Lo=new WeakMap;const rR=jt(function(t,e){const n=Q(null),r=Q(null),i=se(()=>new nR(n),[]);jn(e,()=>i,[i]);const{theme:o,appId:s,userId:a,__hostElement:l,__internalOnLoaded:u,beforeBrowserPermissionPrompt:c,chatHeaderVisible:h,className:d,style:p,enterSendsMessage:f,messageFieldVisible:m,messageFieldSpellcheck:E,messageFieldPlaceholder:A,onDeleteMessage:_,onSendMessage:g,onMessageAction:O,onFocusMessage:D,onMissingBrowserPermission:R,onSelectConversation:T,themeCustom:I,host:S,focusedMessageId:v,selectedConversationId:y,mobileBreakPoint:b}=t;return L(tR,{style:p,className:d,selectedConversationId:y,focusedMessageId:v,chatboxProps:{appId:s,userId:a,theme:o,host:S,focusedMessageId:v,enterSendsMessage:f,chatHeaderVisible:h,messageFieldVisible:m,messageFieldSpellcheck:E,messageFieldPlaceholder:A,beforeBrowserPermissionPrompt:c,onDeleteMessage:_,onSendMessage:g,onMessageAction:O,onFocusMessage:D,onMissingBrowserPermission:R,themeCustom:I,ref:n},conversationListProps:{appId:s,userId:a,theme:o,host:S,onSelectConversation:T,themeCustom:I,ref:r},mobileBreakPoint:b,__hostElement:l,__internalOnLoaded:u},`inbox|${t.userId}|${t.appId}`)});function iR(t){const{conversation:e,theme:n,t:r,chatbox:i,chatSearchState:o}=t.common,{ConversationImage:s,Icon:a,ChatSearchBox:l}=n,u=Yo(e.id,10);return t.permissions.canSearch&&o!=="hidden"?U`
136
136
  <div className="t-theme-chat-header">
137
137
  <${l} common=${t.common} />
138
138
  </div>
@@ -157,7 +157,7 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
157
157
  </div>
158
158
 
159
159
  <div className="t-info">
160
- <${QT} ...${t} />
160
+ <${oR} ...${t} />
161
161
  </div>
162
162
  </div>
163
163
  <div className="t-actions">
@@ -172,7 +172,7 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
172
172
  </div>
173
173
  </div>
174
174
  </div>
175
- `}function QT(t){const{common:e}=t;return e.conversation.subject?U`
175
+ `}function oR(t){const{common:e}=t;return e.conversation.subject?U`
176
176
  <div className="t-title">${e.conversation.subject}</div>
177
177
  <div className="t-subtitle">
178
178
  <${lf} ...${t} />
@@ -191,17 +191,17 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
191
191
  </span>
192
192
  `)}
193
193
  </span>
194
- `:U`<span className="t-participants">${o.map(({user:s})=>s.name).join(", ")}</span>`}function eR({common:t}){return null}function tR(t){const{message:e,messageStatus:n,permissions:r,common:i}=t,{currentUser:o,theme:s,chatbox:a,conversationId:l,t:u,focusedMessage:c}=i,{Avatar:h,Icon:d,ReferencedMessage:p,TimeAgo:f,MessageActionMenu:m}=s,E=zo(l,3).length>=3,A=e.sender,_=(A==null?void 0:A.id)!==o.id&&E,g=e.referencedMessage,O=r.canReplyToMessage||r.canDeleteMessage;let D;D=A?A.id===o.id?"currentUser":"other":"system";const C=e.id===(c==null?void 0:c.id);return U`
194
+ `:U`<span className="t-participants">${o.map(({user:s})=>s.name).join(", ")}</span>`}function sR({common:t}){return null}function aR(t){const{message:e,messageStatus:n,permissions:r,common:i}=t,{currentUser:o,theme:s,chatbox:a,conversationId:l,t:u,focusedMessage:c}=i,{Avatar:h,Icon:d,ReferencedMessage:p,TimeAgo:f,MessageActionMenu:m}=s,E=Yo(l,3).length>=3,A=e.sender,_=(A==null?void 0:A.id)!==o.id&&E,g=e.referencedMessage,O=r.canReplyToMessage||r.canDeleteMessage;let D;D=A?A.id===o.id?"currentUser":"other":"system";const R=e.id===(c==null?void 0:c.id);return U`
195
195
  <div
196
196
  className="t-theme-message"
197
197
  t-sender=${D}
198
198
  t-message-id=${e.id}
199
199
  t-status=${n}
200
- t-focused=${C?"":void 0}
200
+ t-focused=${R?"":void 0}
201
201
  >
202
202
  <div className="t-message-row">
203
203
  ${A&&U`<${h}
204
- photoUrl=${$r(A)}
204
+ photoUrl=${Vr(A)}
205
205
  common=${i}
206
206
  />`}
207
207
 
@@ -209,7 +209,7 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
209
209
  <!-- in group chats, show the message sender name in a random color -->
210
210
  ${A&&_&&U`<div
211
211
  className="t-message-sender-name"
212
- style=${{color:fA(A.id)}}
212
+ style=${{color:AA(A.id)}}
213
213
  >
214
214
  ${A.name}
215
215
  </div>`}
@@ -218,7 +218,7 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
218
218
  common=${i}
219
219
  />`}
220
220
 
221
- <${I_}
221
+ <${y_}
222
222
  common=${i}
223
223
  message=${e}
224
224
  messageStatus=${n}
@@ -226,12 +226,12 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
226
226
 
227
227
  <div className="t-message-status">
228
228
  <${f} timestamp=${e.createdAt} common=${i} />
229
- ${D=="currentUser"&&U`<${nR} ...${t} />`}
229
+ ${D=="currentUser"&&U`<${cR} ...${t} />`}
230
230
  </div>
231
231
  </div>
232
232
 
233
233
  ${O&&U`
234
- <${ai}
234
+ <${li}
235
235
  type="menu"
236
236
  popoverComponent=${m}
237
237
  popoverProps=${{message:e,permissions:r,common:i}}
@@ -239,40 +239,48 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
239
239
  aria-label=${u.ARIA_MORE_ACTIONS}
240
240
  >
241
241
  <${d} className="t-action-menu-icon" type="horizontalDots" />
242
- </${ai}>
242
+ </${li}>
243
243
  `}
244
244
  ${r.canAddReaction&&U`
245
- <${ai}
245
+ <${li}
246
246
  className="t-add-reaction-button"
247
- popoverComponent=${N_}
247
+ popoverComponent=${b_}
248
248
  popoverProps=${{messageId:e.id,colorScheme:"light"}}
249
249
  aria-label=${u.ADD_REACTION}
250
250
  >
251
251
  <${d} type="addEmoji" />
252
- </${ai}>
252
+ </${li}>
253
253
  `}
254
254
  </div>
255
255
 
256
256
  ${e.reactions.length>0&&U`
257
257
  <div className="t-emoji-reactions">
258
- ${e.reactions.map(T=>U`
259
- <button
260
- className="t-reaction-button"
261
- t-active=${T.currentUserReacted?"true":void 0}
262
- onClick=${()=>a.toggleReaction(e.id,T.emoji)}
263
- disabled=${!r.canAddReaction}
264
- aria-label=${u.ARIA_REACTION_COUNT(T.count,T.emoji)}
265
- aria-pressed=${T.currentUserReacted}
258
+ ${e.reactions.map(T=>U`<${lR}
266
259
  key=${T.emoji}
267
- >
268
- <span className="t-emoji">${T.emoji}</span>
269
- <span className="t-num-reactions">${T.count}</span>
270
- </button>
271
- `)}
260
+ summary=${T}
261
+ message=${e}
262
+ common=${i}
263
+ permissions=${r}
264
+ />`)}
272
265
  </div>
273
266
  `}
274
267
  </div>
275
- `}function nR({messageStatus:t,common:e}){const{Icon:n}=e.theme;return t==="virtual"?null:t==="sending"?U`
268
+ `}function lR({summary:t,message:e,common:n,permissions:r}){const{t:i,chatbox:o,conversationId:s}=n,{emoji:a,count:l,currentUserReacted:u}=t,[c,h]=OA(s,e.id,t.emoji),d=c.map(p=>p.user.name);return c.length&&c.length<t.count&&d.push("..."),U`
269
+ <button
270
+ className="t-reaction-button"
271
+ t-active=${u?"true":void 0}
272
+ onClick=${()=>o.toggleReaction(e.id,a)}
273
+ disabled=${!r.canAddReaction}
274
+ aria-label=${i.ARIA_REACTION_COUNT(l,a)}
275
+ aria-pressed=${u}
276
+ onMouseOver=${h}
277
+ onTouchStart=${h}
278
+ t-tooltip-text=${d.join(", ")}
279
+ >
280
+ <span className="t-emoji">${a}</span>
281
+ <span className="t-num-reactions">${l}</span>
282
+ </button>
283
+ `}function cR({messageStatus:t,common:e}){const{Icon:n}=e.theme;return t==="virtual"?null:t==="sending"?U`
276
284
  <span className="t-status-icon">
277
285
  <${n}
278
286
  type="spinner"
@@ -280,31 +288,31 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
280
288
  common=${e}
281
289
  />
282
290
  </span>
283
- `:t==="sent"?U`<span className="t-status-icon">✓</span>`:t==="everyoneRead"?U`<span className="t-status-icon">✓✓</span>`:null}function rR(t){const{message:e,permissions:n,common:r}=t,{chatbox:i,t:o}=r;return U` <div className="t-theme-message-action-menu">
291
+ `:t==="sent"?U`<span className="t-status-icon">✓</span>`:t==="everyoneRead"?U`<span className="t-status-icon">✓✓</span>`:null}function uR(t){const{message:e,permissions:n,common:r}=t,{chatbox:i,t:o}=r;return U` <div className="t-theme-message-action-menu">
284
292
  ${n.canReplyToMessage&&U`
285
- <${qn} className="t-menu-item" onSelect=${()=>i.setReferencedMessage(e.id)}>
293
+ <${Kn} className="t-menu-item" onSelect=${()=>i.setReferencedMessage(e.id)}>
286
294
  ${o.REPLY_TO_MESSAGE}
287
- </${qn}>
295
+ </${Kn}>
288
296
  `}
289
297
  ${n.canEditMessage&&U`
290
- <${qn} className="t-menu-item" onSelect=${()=>i.setEditing(e.id)}>
298
+ <${Kn} className="t-menu-item" onSelect=${()=>i.setEditing(e.id)}>
291
299
  ${o.EDIT_MESSAGE}
292
- </${qn}>
300
+ </${Kn}>
293
301
  `}
294
302
  ${n.canDeleteMessage&&U`
295
- <${qn} className="t-menu-item t-danger" onSelect=${()=>i.deleteMessage(e.id)}>
303
+ <${Kn} className="t-menu-item t-danger" onSelect=${()=>i.deleteMessage(e.id)}>
296
304
  ${o.DELETE_MESSAGE}
297
- </${qn}>
305
+ </${Kn}>
298
306
  `}
299
- </div>`}function iR(t){const{common:e,referencedMessage:n,editor:r,voiceRecorder:i,permissions:o,editMessageId:s}=t,{chatbox:a,device:l,conversation:u,t:c,theme:h}=e,{ReplyBar:d,Icon:p,VoiceRecorder:f,RecordingPreview:m}=h,E=s?"edit":"send",A=!r.atTextLimit&&!r.isEmpty,_=E==="send"&&r.isEmpty&&o.canShareLocation,g=E==="send"&&r.isEmpty&&o.canShareFile,O=E==="send"&&l.supportsEmojiPicker&&!l.isMobile,D=E==="send"&&r.isEmpty&&o.canSendVoiceMessage;return U`
307
+ </div>`}function dR(t){const{common:e,referencedMessage:n,editor:r,voiceRecorder:i,permissions:o,editMessageId:s}=t,{chatbox:a,device:l,conversation:u,t:c,theme:h}=e,{ReplyBar:d,Icon:p,VoiceRecorder:f,RecordingPreview:m}=h,E=s?"edit":"send",A=!r.atTextLimit&&!r.isEmpty,_=E==="send"&&r.isEmpty&&o.canShareLocation,g=E==="send"&&r.isEmpty&&o.canShareFile,O=E==="send"&&l.supportsEmojiPicker&&!l.isMobile,D=E==="send"&&r.isEmpty&&o.canSendVoiceMessage;return U`
300
308
  <div className="t-theme-message-field" t-mode=${E}>
301
309
  ${r.showEmojiPicker&&U`
302
310
  <div className="t-emoji-picker-wrapper">
303
- <${bu} colorScheme="light" />
311
+ <${ku} colorScheme="light" />
304
312
  </div>
305
313
  `}
306
- <${F_} />
307
- <${cA} />
314
+ <${H_} />
315
+ <${pA} />
308
316
 
309
317
  ${n&&U`<${d}
310
318
  common=${e}
@@ -334,7 +342,7 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
334
342
  `)}
335
343
  ${!i&&u.access==="ReadWrite"&&U`
336
344
  <div className="t-textbox-column">
337
- <${E_} placeholder=${c.ENTRYBOX_PLACEHOLDER} />
345
+ <${__} placeholder=${c.ENTRYBOX_PLACEHOLDER} />
338
346
 
339
347
  <div className="t-button-overlay">
340
348
  ${_&&U`<button
@@ -413,7 +421,7 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
413
421
  </div>
414
422
  </div>
415
423
  </div>
416
- `}function oR(t){const{common:e,voiceRecorder:n}=t,{t:r,theme:i}=e,{Icon:o}=i;return U`
424
+ `}function hR(t){const{common:e,voiceRecorder:n}=t,{t:r,theme:i}=e,{Icon:o}=i;return U`
417
425
  <div className="t-theme-voice-recorder">
418
426
  <button
419
427
  className="t-close-button"
@@ -426,9 +434,9 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
426
434
  </button>
427
435
 
428
436
  <div className="t-textbox-column t-waveform-wrapper">
429
- <${dA} className="t-waveform" voiceRecorder=${n} />
437
+ <${mA} className="t-waveform" voiceRecorder=${n} />
430
438
  <span className="t-duration"
431
- >${ya(n.duration)}</span
439
+ >${Na(n.duration)}</span
432
440
  >
433
441
  </div>
434
442
 
@@ -444,7 +452,7 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
444
452
  </button>
445
453
  </div>
446
454
  </div>
447
- `}function sR(t){const{common:e,voiceRecorder:n}=t,{t:r,theme:i}=e,{Icon:o}=i;return U`
455
+ `}function pR(t){const{common:e,voiceRecorder:n}=t,{t:r,theme:i}=e,{Icon:o}=i;return U`
448
456
  <div className="t-theme-recording-preview">
449
457
  <button
450
458
  className="t-close-button"
@@ -457,7 +465,7 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
457
465
  </button>
458
466
 
459
467
  <div className="t-textbox-column">
460
- <${Yo} src=${n.recordingUrl} />
468
+ <${Go} src=${n.recordingUrl} />
461
469
  </div>
462
470
 
463
471
  ${n.uploadState==="pending"&&U`
@@ -481,7 +489,7 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
481
489
  </div>
482
490
  `}
483
491
  </div>
484
- `}function aR({className:t="",type:e}){return U`<${lR[e]} className=${`t-theme-icon ${t}`} />`}const lR={attach:function({className:t}){return U`
492
+ `}function fR({className:t="",type:e}){return U`<${mR[e]} className=${`t-theme-icon ${t}`} />`}const mR={attach:function({className:t}){return U`
485
493
  <svg
486
494
  className=${t}
487
495
  xmlns="http://www.w3.org/2000/svg"
@@ -1121,13 +1129,13 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
1121
1129
  >
1122
1130
  <polyline fill="none" points="6 9 12 15 18 9"></polyline>
1123
1131
  </svg>
1124
- `}function cR(t){const{timestamp:e,isReadMarker:n,isDayMarker:r,common:i}=t,{t:o}=i;return U`
1132
+ `}function ER(t){const{timestamp:e,isReadMarker:n,isDayMarker:r,common:i}=t,{t:o}=i;return U`
1125
1133
  <div className="t-message-divider">
1126
1134
  <div className="t-line" t-side="left">
1127
1135
  <div className="t-line-segment" />
1128
1136
  </div>
1129
1137
  ${r&&U`
1130
- <span className="t-day-marker">${EA(e,o)}</span>
1138
+ <span className="t-day-marker">${SA(e,o)}</span>
1131
1139
  `}
1132
1140
  <div className="t-line" t-side="right">
1133
1141
  <div className="t-line-segment" />
@@ -1136,9 +1144,9 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
1136
1144
  `}
1137
1145
  </div>
1138
1146
  </div>
1139
- `}function uR({common:t}){return null}function dR({common:t}){const e=t.conversation.welcomeMessages;if(e.length===0)return null;const n=e.map((r,i)=>U`<${pA} key=${i} text=${r} />`);return U`<div className="t-message-group">${n.reverse()}</div>`}function hR({common:t}){const{typing:e,theme:n}=t,{Avatar:r}=n,{users:i,many:o}=e;if(!o&&i.length===0)return null;const s=o?U`<div className="t-theme-avatar">5+</div>`:i.slice(0,2).map(a=>U`<${r}
1147
+ `}function _R({common:t}){return null}function AR({common:t}){const e=t.conversation.welcomeMessages;if(e.length===0)return null;const n=e.map((r,i)=>U`<${_A} key=${i} text=${r} />`);return U`<div className="t-message-group">${n.reverse()}</div>`}function gR({common:t}){const{typing:e,theme:n}=t,{Avatar:r}=n,{users:i,many:o}=e;if(!o&&i.length===0)return null;const s=o?U`<div className="t-theme-avatar">5+</div>`:i.slice(0,2).map(a=>U`<${r}
1140
1148
  key=${a.id}
1141
- photoUrl=${$r(a)}
1149
+ photoUrl=${Vr(a)}
1142
1150
  common=${t}
1143
1151
  />`);return U`
1144
1152
  <div
@@ -1158,13 +1166,13 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
1158
1166
  </div>
1159
1167
  </div>
1160
1168
  </div>
1161
- `}function pR({common:t}){return U`<div class="t-theme-no-conversation-selected">
1169
+ `}function SR({common:t}){return U`<div className="t-theme-no-conversation-selected">
1162
1170
  ${t.t.SELECT_CONVERSATION}
1163
- </div>`}function fR(t){return U`
1171
+ </div>`}function OR(t){return U`
1164
1172
  <span className="t-theme-compact-message-content">
1165
- <${mR} ...${t} />
1173
+ <${DR} ...${t} />
1166
1174
  </span>
1167
- `}function mR({message:t,common:e}){var s;const n=t.content[0],{theme:r,t:i}=e,{Icon:o}=r;if(n.type==="text")return U`<${Iu} block=${n} message=${t} nonInteractive />`;if(n.type==="location")return U`<${o} type="location" common=${e} /> ${i.LOCATION}`;if(n.type==="file"){if(n.subtype==="image")return U`
1175
+ `}function DR({message:t,common:e}){var s;const n=t.content[0],{theme:r,t:i}=e,{Icon:o}=r;if(n.type==="text")return U`<${yu} block=${n} message=${t} nonInteractive />`;if(n.type==="location")return U`<${o} type="location" common=${e} /> ${i.LOCATION}`;if(n.type==="file"){if(n.subtype==="image")return U`
1168
1176
  <${o} type="image" common=${e} />
1169
1177
  ${n.filename}
1170
1178
  `;if(n.subtype==="video")return U`
@@ -1175,11 +1183,11 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
1175
1183
  ${n.filename}
1176
1184
  `;if(n.subtype==="voice")return U`
1177
1185
  <${o} type="microphone" common=${e} />
1178
- ${i.VOICE_MESSAGE} (${ya((s=n.duration)!=null?s:0)})
1186
+ ${i.VOICE_MESSAGE} (${Na((s=n.duration)!=null?s:0)})
1179
1187
  `;if(n.subtype===void 0)return U`
1180
1188
  <${o} type="attachment" common=${e} />
1181
1189
  ${n.filename}
1182
- `}return null}function ER(t){const{t:e,chatbox:n,theme:r,chatSearchState:i}=t.common,{Icon:o}=r;let s;return i==="searching"?s=e.SEARCH_SEARCHING:i==="noResults"?s=e.SEARCH_NO_RESULTS:i==="noMoreResults"&&(s=e.SEARCH_NO_MORE_RESULTS),U`
1190
+ `}return null}function vR(t){const{t:e,chatbox:n,theme:r,chatSearchState:i}=t.common,{Icon:o}=r;let s;return i==="searching"?s=e.SEARCH_SEARCHING:i==="noResults"?s=e.SEARCH_NO_RESULTS:i==="noMoreResults"&&(s=e.SEARCH_NO_MORE_RESULTS),U`
1183
1191
  <div className="t-theme-chat-search-box">
1184
1192
  <button
1185
1193
  className="t-button t-back-button"
@@ -1222,9 +1230,9 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
1222
1230
  <${o} type="chevronDown" />
1223
1231
  </button>
1224
1232
  </div>
1225
- `}function _R({block:t,downloadUrl:e,common:n}){const{Icon:r}=n.theme;return U`
1233
+ `}function TR({block:t,downloadUrl:e,common:n}){const{Icon:r}=n.theme;return U`
1226
1234
  <div className="t-theme-audio-block">
1227
- <${Yo} src=${t.url} filename=${t.filename} />
1235
+ <${Go} src=${t.url} filename=${t.filename} />
1228
1236
 
1229
1237
  <a className="t-body-text" href=${e} target="_blank">
1230
1238
  <${r}
@@ -1233,10 +1241,10 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
1233
1241
  common=${n}
1234
1242
  />
1235
1243
  <${Ur} text=${t.filename} />
1236
- <span className="t-filesize"> (${Vo(t.size)})</span>
1244
+ <span className="t-filesize"> (${zo(t.size)})</span>
1237
1245
  </a>
1238
1246
  </div>
1239
- `}function AR({block:t,downloadUrl:e,common:n}){const{Icon:r}=n.theme;return U`
1247
+ `}function RR({block:t,downloadUrl:e,common:n}){const{Icon:r}=n.theme;return U`
1240
1248
  <div className="t-theme-file-block">
1241
1249
  <a className="t-body-text" href=${e} target="_blank">
1242
1250
  <${r}
@@ -1245,10 +1253,10 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
1245
1253
  common=${n}
1246
1254
  />
1247
1255
  <${Ur} className="t-filename" text=${t.filename} />
1248
- <span className="t-filesize"> (${Vo(t.size)})</span>
1256
+ <span className="t-filesize"> (${zo(t.size)})</span>
1249
1257
  </a>
1250
1258
  </div>
1251
- `}function gR({block:t,downloadUrl:e,common:n}){const{Icon:r}=n.theme,i={"--img-w":t.width||1,"--img-h":t.height||1};return U`
1259
+ `}function CR({block:t,downloadUrl:e,common:n}){const{Icon:r}=n.theme,i={"--img-w":t.width||1,"--img-h":t.height||1};return U`
1252
1260
  <div className="t-theme-image-block">
1253
1261
  <a
1254
1262
  href=${t.url}
@@ -1264,10 +1272,10 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
1264
1272
  <a href=${e} className="t-body-text" target="_blank">
1265
1273
  <${r} className="download-icon" type="download" common=${n} />
1266
1274
  <${Ur} text=${t.filename} />
1267
- <span className="t-filesize"> (${Vo(t.size)})</span>
1275
+ <span className="t-filesize"> (${zo(t.size)})</span>
1268
1276
  </a>
1269
1277
  </div>
1270
- `}function SR({block:t}){const{imageUrl:e,linkUrl:n}=Fu(t);return U`
1278
+ `}function IR({block:t}){const{imageUrl:e,linkUrl:n}=Fu(t);return U`
1271
1279
  <div className="t-theme-location-block">
1272
1280
  <a
1273
1281
  href=${n}
@@ -1282,11 +1290,11 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
1282
1290
  >
1283
1291
  </span>
1284
1292
  </div>
1285
- `}function OR({block:t,message:e}){return U`
1293
+ `}function yR({block:t,message:e}){return U`
1286
1294
  <div className="t-theme-text-block">
1287
- <${Iu} block=${t} message=${e} />
1295
+ <${yu} block=${t} message=${e} />
1288
1296
  </div>
1289
- `}function DR({block:t,downloadUrl:e,common:n}){const{Icon:r}=n.theme;return U`
1297
+ `}function NR({block:t,downloadUrl:e,common:n}){const{Icon:r}=n.theme;return U`
1290
1298
  <div className="t-theme-video-block">
1291
1299
  <div className="t-video-wrapper">
1292
1300
  <div className="t-root" style=${{"--video-w":t.width||1,"--video-h":t.height||1}}>
@@ -1305,38 +1313,38 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
1305
1313
  <a href=${e} className="t-body-text" target="_blank">
1306
1314
  <${r} className="download-icon" type="download" common=${n} />
1307
1315
  <${Ur} text=${t.filename} />
1308
- <span className="t-filesize"> (${Vo(t.size)})</span>
1316
+ <span className="t-filesize"> (${zo(t.size)})</span>
1309
1317
  </a>
1310
1318
  </div>
1311
- `}function vR({block:t}){return U`<${Yo}
1319
+ `}function bR({block:t}){return U`<${Go}
1312
1320
  className="t-theme-voice-block"
1313
1321
  src=${t.url}
1314
1322
  filename=${t.filename}
1315
- />`}function TR({photoUrl:t}){return U`
1323
+ />`}function kR({photoUrl:t}){return U`
1316
1324
  <div
1317
1325
  className="t-theme-avatar"
1318
1326
  style=${{backgroundImage:`url(${t})`}}
1319
1327
  />
1320
- `}function RR({common:t,conversation:e,participants:n}){const{currentUser:r,theme:i}=t,{Avatar:o,GroupChatImage:s}=i;return e.photoUrl?U`<${o}
1328
+ `}function LR({common:t,conversation:e,participants:n}){const{currentUser:r,theme:i}=t,{Avatar:o,GroupChatImage:s}=i;return e.photoUrl?U`<${o}
1321
1329
  photoUrl=${e.photoUrl}
1322
1330
  common=${t}
1323
1331
  />`:n.length===0?null:n.length===1?U`<${o}
1324
- photoUrl=${$r(r)}
1332
+ photoUrl=${Vr(r)}
1325
1333
  common=${t}
1326
1334
  />`:n.length===2?U`<${o}
1327
- photoUrl=${$r(n[0].user.id===r.id?n[1].user:n[0].user)}
1335
+ photoUrl=${Vr(n[0].user.id===r.id?n[1].user:n[0].user)}
1328
1336
  common=${t}
1329
1337
  />`:U`
1330
1338
  <${s} participants=${n} common=${t} />
1331
- `}function CR({participants:t}){return U`
1339
+ `}function wR({participants:t}){return U`
1332
1340
  <div className="t-theme-group-chat-image">
1333
1341
  <div
1334
1342
  className="t-mini-avatar"
1335
- style=${{backgroundImage:`url("${$r(t[0].user)}")`}}
1343
+ style=${{backgroundImage:`url("${Vr(t[0].user)}")`}}
1336
1344
  ></div>
1337
1345
  <div
1338
1346
  className="t-mini-avatar"
1339
- style=${{backgroundImage:`url("${$r(t[1].user)}")`}}
1347
+ style=${{backgroundImage:`url("${Vr(t[1].user)}")`}}
1340
1348
  ></div>
1341
1349
  ${t.length>2&&U`<svg
1342
1350
  className="t-counter"
@@ -1376,7 +1384,7 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
1376
1384
  </text>
1377
1385
  </svg>`}
1378
1386
  </div>
1379
- `}function IR({referencedMessage:t,common:e}){const{theme:n,chatbox:r}=e,{CompactMessageContent:i}=n;return U`
1387
+ `}function MR({referencedMessage:t,common:e}){const{theme:n,chatbox:r}=e,{CompactMessageContent:i}=n;return U`
1380
1388
  <div
1381
1389
  className="t-theme-referenced-message"
1382
1390
  onClick=${()=>r.focusMessage(t.id)}
@@ -1389,7 +1397,7 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
1389
1397
  />
1390
1398
  </div>
1391
1399
  </div>
1392
- `}function yR(t){const{common:e,referencedMessage:n}=t,{chatbox:r,t:i,theme:o}=e,{Icon:s,CompactMessageContent:a}=o;return U`
1400
+ `}function PR(t){const{common:e,referencedMessage:n}=t,{chatbox:r,t:i,theme:o}=e,{Icon:s,CompactMessageContent:a}=o;return U`
1393
1401
  <div className="t-theme-reply-bar">
1394
1402
  <${s} className="t-reply-icon" type="reply" common=${e} />
1395
1403
 
@@ -1415,7 +1423,7 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
1415
1423
  <${s} className="t-close-icon" type="close" common=${e} />
1416
1424
  </button>
1417
1425
  </div>
1418
- `}function NR(t){return t.timestamp===-1?null:U`<${bR} ...${t} />`}function bR({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=mA(t,n);return U`
1426
+ `}function xR(t){return t.timestamp===-1?null:U`<${FR} ...${t} />`}function FR({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=gA(t,n);return U`
1419
1427
  <span className="t-theme-time-ago">
1420
1428
  <span
1421
1429
  role="time"
@@ -1425,7 +1433,7 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
1425
1433
  ${i.short}
1426
1434
  </span>
1427
1435
  </span>
1428
- `}function kR(t){var _,g,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,h=zo(n.id,10),d=h.length>=3,p=(_=c==null?void 0:c.sender)==null?void 0:_.name,f=(g=c==null?void 0:c.editedAt)!=null?g:c==null?void 0:c.createdAt,m=h.filter(D=>D.user.id!==i.id),E=m.length?m:h,A=(O=n.subject)!=null?O:E.map(D=>D.user.name).join(", ");return U`
1436
+ `}function HR(t){var _,g,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,h=Yo(n.id,10),d=h.length>=3,p=(_=c==null?void 0:c.sender)==null?void 0:_.name,f=(g=c==null?void 0:c.editedAt)!=null?g:c==null?void 0:c.createdAt,m=h.filter(D=>D.user.id!==i.id),E=m.length?m:h,A=(O=n.subject)!=null?O:E.map(D=>D.user.name).join(", ");return U`
1429
1437
  <div
1430
1438
  className="t-theme-conversation-list-item"
1431
1439
  t-unread=${n.unreadMessageCount?"":void 0}
@@ -1461,11 +1469,11 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
1461
1469
  </div>
1462
1470
  `}
1463
1471
 
1464
- <${LR} ...${t} />
1472
+ <${UR} ...${t} />
1465
1473
  </div>
1466
1474
  </div>
1467
1475
  </div>
1468
- `}function LR({conversation:t}){const{isUnread:e,unreadMessageCount:n}=t;return e?n===0?U`<div className="t-unread-generic-dot" />`:n>999?U`
1476
+ `}function UR({conversation:t}){const{isUnread:e,unreadMessageCount:n}=t;return e?n===0?U`<div className="t-unread-generic-dot" />`:n>999?U`
1469
1477
  <div className="t-unread-dot">
1470
1478
  <span>999+</span>
1471
1479
  </div>
@@ -1473,7 +1481,7 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
1473
1481
  <div className="t-unread-dot">
1474
1482
  <span>${n}</span>
1475
1483
  </div>
1476
- `:null}function wR(t){var _,g,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,h=zo(n.id,10),d=h.length>=3,p=(_=r==null?void 0:r.sender)==null?void 0:_.name,f=(g=r==null?void 0:r.editedAt)!=null?g:r==null?void 0:r.createdAt,m=h.filter(D=>D.user.id!==o.id),E=m.length?m:h,A=(O=n.subject)!=null?O:E.map(D=>D.user.name).join(", ");return U`
1484
+ `:null}function BR(t){var _,g,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,h=Yo(n.id,10),d=h.length>=3,p=(_=r==null?void 0:r.sender)==null?void 0:_.name,f=(g=r==null?void 0:r.editedAt)!=null?g:r==null?void 0:r.createdAt,m=h.filter(D=>D.user.id!==o.id),E=m.length?m:h,A=(O=n.subject)!=null?O:E.map(D=>D.user.name).join(", ");return U`
1477
1485
  <div
1478
1486
  className="t-theme-global-search-result-item"
1479
1487
  t-selected=${i?"":void 0}
@@ -1510,7 +1518,7 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
1510
1518
  </div>
1511
1519
  </div>
1512
1520
  </div>
1513
- `}function MR(t){const{common:e,query:n,setQuery:r,cancel:i}=t,{t:o}=e,{Icon:s}=e.theme;return U`
1521
+ `}function jR(t){const{common:e,query:n,setQuery:r,cancel:i}=t,{t:o}=e,{Icon:s}=e.theme;return U`
1514
1522
  <div className="t-theme-global-search-box">
1515
1523
  <${xu}
1516
1524
  value=${n}
@@ -1530,7 +1538,7 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
1530
1538
  `}
1531
1539
  ${n.length===0&&U` <${s} className="t-submit" type="search" common=${e} /> `}
1532
1540
  </div>
1533
- `}function PR(t){const{common:e,canLoadMore:n,loadMore:r,type:i}=t,{t:o}=e;return U`
1541
+ `}function $R(t){const{common:e,canLoadMore:n,loadMore:r,type:i}=t,{t:o}=e;return U`
1534
1542
  <div className="t-theme-global-search-result-header">
1535
1543
  <span className="t-title">${i==="messages"?o.SEARCH_RESULTS_MESSAGES:o.SEARCH_RESULTS_CONVERSATIONS}</span>
1536
1544
  ${n&&U`
@@ -1539,4 +1547,4 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
1539
1547
  </button>
1540
1548
  `}
1541
1549
  </div>
1542
- `}const xR=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[h,d]of(a=n,Object.entries(a))){const p=[h,h.toLowerCase(),FR(h)];for(const f of p)i.set(f,h);["string","boolean","number"].includes(d.type)&&o.push(...p),d.required!==!1&&s.push(h)}var a;const c=class c extends HTMLElement{constructor(){super(),this._renderRequested=!1,this._props={},this._renderRoot=null,this._ref={current:null};for(const[d,p]of i)if(Object.hasOwnProperty.call(this,d)){const f=this[d];this.updateProp(p,f),delete this[d]}else this.hasAttribute(d)&&this.syncAttributeToProp(d)}updateProp(d,p){const{type:f}=n[d];if(f==="boolean"&&typeof p=="string"?p=p!=="false":f==="number"&&typeof p=="string"&&(p=Number(p)),p===void 0){const m=d in this._props;return delete this._props[d],m}{const m=this._props[d]!==p;return this._props[d]=p,m}}syncAttributeToProp(d){const p=i.get(d);de(p,`Attribute "${d}" should have matching prop`);const f=this.getAttribute(d);return this.updateProp(p,f)}async requestRender(){this.isConnected&&!this._renderRequested&&(this._renderRequested=!0,this._renderRequested=await!1,this.render())}render(){var d;this._renderRoot||(this._renderRoot=(d=this,{render:function(A){Vc(A,d)},unmount:function(){Yc(d)}}));const p=s.filter(A=>!(A in this._props));if(p.length>0)return r(p),void this._renderRoot.render(null);const f=Object.assign({},this._props),m=A=>{const _=[...Object.getOwnPropertyNames(A.current),...Object.getOwnPropertyNames(Object.getPrototypeOf(A.current))];for(const g of _)g!=="constructor"&&(typeof A.current[g]=="function"?this[g]=(...O)=>(this._renderRequested&&this.render(),A.current[g](...O)):Object.defineProperty(this,g,{enumerable:!0,get:()=>A.current[g]}))},E=t;sa(()=>{this._renderRoot.render(L(E,{...f,ref:this._ref,__hostElement:this,__internalOnLoaded:()=>{m(this._ref)}}))})}async connectedCallback(){await xR;for(const d of o)this.hasAttribute(d)&&this.syncAttributeToProp(d);this.requestRender()}disconnectedCallback(){this._renderRoot&&setTimeout(()=>{this._renderRoot&&(this._renderRoot.unmount(),this._renderRoot=null)})}attributeChangedCallback(d,p,f){p!==f&&this.syncAttributeToProp(d)&&this.requestRender()}};c.observedAttributes=o;let l=c;const u={};for(const[h,d]of i)u[h]={set(p){this.updateProp(d,p)&&this.requestRender()},get(){return this._props[d]}};return Object.defineProperties(l.prototype,u),Object.defineProperty(l,"name",{value:e}),l}function FR(t){return t.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(e,n)=>(n?"-":"")+e.toLowerCase())}function ju(t,e){const n=JSON.stringify(e).replace(",",", ");Ge.error(`Could not initialize ${t} because the following required props are missing: ${n}.`)}const pf=Bu(kA,"ChatboxElement",{__internalOnLoaded:{type:"function",required:!1},appId:{type:"string"},userId:{type:"string"},conversationId:{type:"string"},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=>ju("<t-chatbox>",t)),ff=Bu(wA,"ConversationListElement",{__internalOnLoaded:{type:"function",required:!1},appId:{type:"string"},userId:{type:"string"},selectedConversationId:{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},themeCustom:{type:"object",required:!1}},t=>ju("<t-conversation-list>",t)),mf=Bu(JT,"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},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},themeCustom:{type:"object",required:!1}},t=>ju("<t-inbox>",t)),HR=kc;customElements.get("t-chatbox")||customElements.define("t-chatbox",pf),customElements.get("t-conversation-list")||customElements.define("t-conversation-list",ff),customElements.get("t-inbox")||customElements.define("t-inbox",mf),exports.AudioPlayer=Yo,exports.ChatboxElement=pf,exports.ConversationListElement=ff,exports.Editor=E_,exports.EmojiPicker=bu,exports.EmojiSuggestBar=F_,exports.Highlightable=Ur,exports.InboxElement=mf,exports.MentionSuggestList=cA,exports.MenuItem=qn,exports.MessageContent=I_,exports.PopoverButton=ai,exports.Preact=Gc,exports.ReactionPicker=N_,exports.SearchInput=xu,exports.Text=Iu,exports.VirtualMessage=pA,exports.Waveform=dA,exports.defaultTheme=HR,exports.formatDuration=ya,exports.formatFilesize=Vo,exports.getGoogleMapsUrls=Fu,exports.getPhotoUrlWithFallback=$r,exports.getRandomColor=fA,exports.html=U,exports.useParticipants=zo,exports.useTimeAgo=mA,exports.userFriendlyDate=EA;
1550
+ `}const VR=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[h,d]of(a=n,Object.entries(a))){const p=[h,h.toLowerCase(),zR(h)];for(const f of p)i.set(f,h);["string","boolean","number"].includes(d.type)&&o.push(...p),d.required!==!1&&s.push(h)}var a;const c=class c extends HTMLElement{constructor(){super(),this._renderRequested=!1,this._props={},this._renderRoot=null,this._ref={current:null};for(const[d,p]of i)if(Object.hasOwnProperty.call(this,d)){const f=this[d];this.updateProp(p,f),delete this[d]}else this.hasAttribute(d)&&this.syncAttributeToProp(d)}updateProp(d,p){const{type:f}=n[d];if(f==="boolean"&&typeof p=="string"?p=p!=="false":f==="number"&&typeof p=="string"&&(p=Number(p)),p===void 0){const m=d in this._props;return delete this._props[d],m}{const m=this._props[d]!==p;return this._props[d]=p,m}}syncAttributeToProp(d){const p=i.get(d);de(p,`Attribute "${d}" should have matching prop`);const f=this.getAttribute(d);return this.updateProp(p,f)}async requestRender(){this.isConnected&&!this._renderRequested&&(this._renderRequested=!0,this._renderRequested=await!1,this.render())}render(){var d;this._renderRoot||(this._renderRoot=(d=this,{render:function(A){zc(A,d)},unmount:function(){Gc(d)}}));const p=s.filter(A=>!(A in this._props));if(p.length>0)return r(p),void this._renderRoot.render(null);const f=Object.assign({},this._props),m=A=>{const _=[...Object.getOwnPropertyNames(A.current),...Object.getOwnPropertyNames(Object.getPrototypeOf(A.current))];for(const g of _)g!=="constructor"&&(typeof A.current[g]=="function"?this[g]=(...O)=>(this._renderRequested&&this.render(),A.current[g](...O)):Object.defineProperty(this,g,{enumerable:!0,get:()=>A.current[g]}))},E=t;aa(()=>{this._renderRoot.render(L(E,{...f,ref:this._ref,__hostElement:this,__internalOnLoaded:()=>{m(this._ref)}}))})}async connectedCallback(){await VR;for(const d of o)this.hasAttribute(d)&&this.syncAttributeToProp(d);this.requestRender()}disconnectedCallback(){this._renderRoot&&setTimeout(()=>{this._renderRoot&&(this._renderRoot.unmount(),this._renderRoot=null)})}attributeChangedCallback(d,p,f){p!==f&&this.syncAttributeToProp(d)&&this.requestRender()}};c.observedAttributes=o;let l=c;const u={};for(const[h,d]of i)u[h]={set(p){this.updateProp(d,p)&&this.requestRender()},get(){return this._props[d]}};return Object.defineProperties(l.prototype,u),Object.defineProperty(l,"name",{value:e}),l}function zR(t){return t.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(e,n)=>(n?"-":"")+e.toLowerCase())}function ju(t,e){const n=JSON.stringify(e).replace(",",", ");$e.error(`Could not initialize ${t} because the following required props are missing: ${n}.`)}const pf=Bu(FA,"ChatboxElement",{__internalOnLoaded:{type:"function",required:!1},appId:{type:"string"},userId:{type:"string"},conversationId:{type:"string"},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=>ju("<t-chatbox>",t)),ff=Bu(UA,"ConversationListElement",{__internalOnLoaded:{type:"function",required:!1},appId:{type:"string"},userId:{type:"string"},selectedConversationId:{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},themeCustom:{type:"object",required:!1}},t=>ju("<t-conversation-list>",t)),mf=Bu(rR,"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},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},themeCustom:{type:"object",required:!1}},t=>ju("<t-inbox>",t)),YR=Lc;customElements.get("t-chatbox")||customElements.define("t-chatbox",pf),customElements.get("t-conversation-list")||customElements.define("t-conversation-list",ff),customElements.get("t-inbox")||customElements.define("t-inbox",mf),exports.AudioPlayer=Go,exports.ChatboxElement=pf,exports.ConversationListElement=ff,exports.Editor=__,exports.EmojiPicker=ku,exports.EmojiSuggestBar=H_,exports.Highlightable=Ur,exports.InboxElement=mf,exports.MentionSuggestList=pA,exports.MenuItem=Kn,exports.MessageContent=y_,exports.PopoverButton=li,exports.Preact=Wc,exports.ReactionPicker=b_,exports.SearchInput=xu,exports.Text=yu,exports.VirtualMessage=_A,exports.Waveform=mA,exports.defaultTheme=YR,exports.formatDuration=Na,exports.formatFilesize=zo,exports.getGoogleMapsUrls=Fu,exports.getPhotoUrlWithFallback=Vr,exports.getRandomColor=AA,exports.html=U,exports.useParticipants=Yo,exports.useReactions=OA,exports.useTimeAgo=gA,exports.userFriendlyDate=SA;