@talkjs/web-components 0.0.29 → 0.0.31
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/README.md +4 -4
- package/default.cjs +1310 -0
- package/default.css +1 -1
- package/default.d.ts +589 -147
- package/default.js +16652 -3670
- package/package.json +21 -31
- package/default.standalone.js +0 -1359
- package/globalConstants.js +0 -60
- package/theming.d.ts +0 -1316
- package/theming.js +0 -1369
package/default.cjs
ADDED
|
@@ -0,0 +1,1310 @@
|
|
|
1
|
+
"use client";"use strict";var kc=n=>{throw TypeError(n)};var wc=(n,t,e)=>t.has(n)||kc("Cannot "+e);var Ut=(n,t,e)=>(wc(n,t,"read from private field"),e?e.call(n):t.get(n)),si=(n,t,e)=>t.has(n)?kc("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,e),pa=(n,t,e,r)=>(wc(n,t,"write to private field"),r?r.call(n,e):t.set(n,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const dD=require("@talkjs/core"),fu=Object.freeze(Object.defineProperty({__proto__:null,get AudioBlock(){return YS},get Avatar(){return qS},get ChatHeader(){return bS},get CompactMessageContent(){return $S},get ConversationImage(){return JS},get ConversationListItem(){return nv},get FileBlock(){return VS},get GroupChatImage(){return ZS},get Icon(){return PS},get ImageBlock(){return zS},get LocationBlock(){return GS},get Message(){return wS},get MessageActionMenu(){return MS},get MessageDivider(){return HS},get MessageField(){return xS},get MessageListFooter(){return US},get ReferencedMessage(){return QS},get ReplyBar(){return tv},get TextBlock(){return XS},get TimeAgo(){return ev},get VideoBlock(){return WS},get VoiceBlock(){return KS}},Symbol.toStringTag,{value:"Module"}));var lo,K,zp,Hn,Fc,Gp,Xp,Wp,mu,cl,dl,Kp,ji={},qp=[],hD=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,uo=Array.isArray;function Ue(n,t){for(var e in t)n[e]=t[e];return n}function Eu(n){n&&n.parentNode&&n.parentNode.removeChild(n)}function dt(n,t,e){var r,i,o,s={};for(o in t)o=="key"?r=t[o]:o=="ref"?i=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?lo.call(arguments,2):e),typeof n=="function"&&n.defaultProps!=null)for(o in n.defaultProps)s[o]==null&&(s[o]=n.defaultProps[o]);return Li(n,s,r,i,null)}function Li(n,t,e,r,i){var o={type:n,props:t,key:e,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i==null?++zp:i,__i:-1,__u:0};return i==null&&K.vnode!=null&&K.vnode(o),o}function Jp(){return{current:null}}function Bt(n){return n.children}function Ae(n,t){this.props=n,this.context=t}function Mr(n,t){if(t==null)return n.__?Mr(n.__,n.__i+1):null;for(var e;t<n.__k.length;t++)if((e=n.__k[t])!=null&&e.__e!=null)return e.__e;return typeof n.type=="function"?Mr(n):null}function Zp(n){var t,e;if((n=n.__)!=null&&n.__c!=null){for(n.__e=n.__c.base=null,t=0;t<n.__k.length;t++)if((e=n.__k[t])!=null&&e.__e!=null){n.__e=n.__c.base=e.__e;break}return Zp(n)}}function hl(n){(!n.__d&&(n.__d=!0)&&Hn.push(n)&&!ss.__r++||Fc!=K.debounceRendering)&&((Fc=K.debounceRendering)||Gp)(ss)}function ss(){for(var n,t,e,r,i,o,s,a=1;Hn.length;)Hn.length>a&&Hn.sort(Xp),n=Hn.shift(),a=Hn.length,n.__d&&(e=void 0,i=(r=(t=n).__v).__e,o=[],s=[],t.__P&&((e=Ue({},r)).__v=r.__v+1,K.vnode&&K.vnode(e),gu(t.__P,e,r,t.__n,t.__P.namespaceURI,32&r.__u?[i]:null,o,i==null?Mr(r):i,!!(32&r.__u),s),e.__v=r.__v,e.__.__k[e.__i]=e,ef(o,e,s),e.__e!=i&&Zp(e)));ss.__r=0}function Qp(n,t,e,r,i,o,s,a,l,u,c){var d,h,p,f,m,E,g=r&&r.__k||qp,_=t.length;for(l=function(A,T,S,v,C){var R,D,O,k,w,U=S.length,I=U,F=0;for(A.__k=new Array(C),R=0;R<C;R++)(D=T[R])!=null&&typeof D!="boolean"&&typeof D!="function"?(k=R+F,(D=A.__k[R]=typeof D=="string"||typeof D=="number"||typeof D=="bigint"||D.constructor==String?Li(null,D,null,null,null):uo(D)?Li(Bt,{children:D},null,null,null):D.constructor==null&&D.__b>0?Li(D.type,D.props,D.key,D.ref?D.ref:null,D.__v):D).__=A,D.__b=A.__b+1,O=null,(w=D.__i=pD(D,S,k,I))!=-1&&(I--,(O=S[w])&&(O.__u|=2)),O==null||O.__v==null?(w==-1&&(C>U?F--:C<U&&F++),typeof D.type!="function"&&(D.__u|=4)):w!=k&&(w==k-1?F--:w==k+1?F++:(w>k?F--:F++,D.__u|=4))):A.__k[R]=null;if(I)for(R=0;R<U;R++)(O=S[R])!=null&&!(2&O.__u)&&(O.__e==v&&(v=Mr(O)),rf(O,O));return v}(e,t,g,l,_),d=0;d<_;d++)(p=e.__k[d])!=null&&(h=p.__i==-1?ji:g[p.__i]||ji,p.__i=d,E=gu(n,p,h,i,o,s,a,l,u,c),f=p.__e,p.ref&&h.ref!=p.ref&&(h.ref&&Du(h.ref,null,p),c.push(p.ref,p.__c||f,p)),m==null&&f!=null&&(m=f),4&p.__u||h.__k===p.__k?l=tf(p,l,n):typeof p.type=="function"&&E!==void 0?l=E:f&&(l=f.nextSibling),p.__u&=-7);return e.__e=m,l}function tf(n,t,e){var r,i;if(typeof n.type=="function"){for(r=n.__k,i=0;r&&i<r.length;i++)r[i]&&(r[i].__=n,t=tf(r[i],t,e));return t}n.__e!=t&&(t&&n.type&&!e.contains(t)&&(t=Mr(n)),e.insertBefore(n.__e,t||null),t=n.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function sn(n,t){return t=t||[],n==null||typeof n=="boolean"||(uo(n)?n.some(function(e){sn(e,t)}):t.push(n)),t}function pD(n,t,e,r){var i,o,s=n.key,a=n.type,l=t[e];if(l===null&&n.key==null||l&&s==l.key&&a==l.type&&!(2&l.__u))return e;if(r>(l==null||2&l.__u?0:1))for(i=e-1,o=e+1;i>=0||o<t.length;){if(i>=0){if((l=t[i])&&!(2&l.__u)&&s==l.key&&a==l.type)return i;i--}if(o<t.length){if((l=t[o])&&!(2&l.__u)&&s==l.key&&a==l.type)return o;o++}}return-1}function Mc(n,t,e){t[0]=="-"?n.setProperty(t,e==null?"":e):n[t]=e==null?"":typeof e!="number"||hD.test(t)?e:e+"px"}function yo(n,t,e,r,i){var o,s;t:if(t=="style")if(typeof e=="string")n.style.cssText=e;else{if(typeof r=="string"&&(n.style.cssText=r=""),r)for(t in r)e&&t in e||Mc(n.style,t,"");if(e)for(t in e)r&&e[t]==r[t]||Mc(n.style,t,e[t])}else if(t[0]=="o"&&t[1]=="n")o=t!=(t=t.replace(Wp,"$1")),s=t.toLowerCase(),t=s in n||t=="onFocusOut"||t=="onFocusIn"?s.slice(2):t.slice(2),n.l||(n.l={}),n.l[t+o]=e,e?r?e.u=r.u:(e.u=mu,n.addEventListener(t,o?dl:cl,o)):n.removeEventListener(t,o?dl:cl,o);else{if(i=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in n)try{n[t]=e==null?"":e;break t}catch(a){}typeof e=="function"||(e==null||e===!1&&t[4]!="-"?n.removeAttribute(t):n.setAttribute(t,t=="popover"&&e==1?"":e))}}function xc(n){return function(t){if(this.l){var e=this.l[t.type+n];if(t.t==null)t.t=mu++;else if(t.t<e.u)return;return e(K.event?K.event(t):t)}}}function gu(n,t,e,r,i,o,s,a,l,u){var c,d,h,p,f,m,E,g,_,A,T,S,v,C,R,D,O,k=t.type;if(t.constructor!=null)return null;128&e.__u&&(l=!!(32&e.__u),o=[a=t.__e=e.__e]),(c=K.__b)&&c(t);t:if(typeof k=="function")try{if(g=t.props,_="prototype"in k&&k.prototype.render,A=(c=k.contextType)&&r[c.__c],T=c?A?A.props.value:c.__:r,e.__c?E=(d=t.__c=e.__c).__=d.__E:(_?t.__c=d=new k(g,T):(t.__c=d=new Ae(g,T),d.constructor=k,d.render=mD),A&&A.sub(d),d.props=g,d.state||(d.state={}),d.context=T,d.__n=r,h=d.__d=!0,d.__h=[],d._sb=[]),_&&d.__s==null&&(d.__s=d.state),_&&k.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=Ue({},d.__s)),Ue(d.__s,k.getDerivedStateFromProps(g,d.__s))),p=d.props,f=d.state,d.__v=t,h)_&&k.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),_&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(_&&k.getDerivedStateFromProps==null&&g!==p&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(g,T),!d.__e&&d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(g,d.__s,T)===!1||t.__v==e.__v){for(t.__v!=e.__v&&(d.props=g,d.state=d.__s,d.__d=!1),t.__e=e.__e,t.__k=e.__k,t.__k.some(function(w){w&&(w.__=t)}),S=0;S<d._sb.length;S++)d.__h.push(d._sb[S]);d._sb=[],d.__h.length&&s.push(d);break t}d.componentWillUpdate!=null&&d.componentWillUpdate(g,d.__s,T),_&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(p,f,m)})}if(d.context=T,d.props=g,d.__P=n,d.__e=!1,v=K.__r,C=0,_){for(d.state=d.__s,d.__d=!1,v&&v(t),c=d.render(d.props,d.state,d.context),R=0;R<d._sb.length;R++)d.__h.push(d._sb[R]);d._sb=[]}else do d.__d=!1,v&&v(t),c=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++C<25);d.state=d.__s,d.getChildContext!=null&&(r=Ue(Ue({},r),d.getChildContext())),_&&!h&&d.getSnapshotBeforeUpdate!=null&&(m=d.getSnapshotBeforeUpdate(p,f)),D=c,c!=null&&c.type===Bt&&c.key==null&&(D=nf(c.props.children)),a=Qp(n,uo(D)?D:[D],t,e,r,i,o,s,a,l,u),d.base=t.__e,t.__u&=-161,d.__h.length&&s.push(d),E&&(d.__E=d.__=null)}catch(w){if(t.__v=null,l||o!=null)if(w.then){for(t.__u|=l?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;o[o.indexOf(a)]=null,t.__e=a}else for(O=o.length;O--;)Eu(o[O]);else t.__e=e.__e,t.__k=e.__k;K.__e(w,t,e)}else o==null&&t.__v==e.__v?(t.__k=e.__k,t.__e=e.__e):a=t.__e=fD(e.__e,t,e,r,i,o,s,l,u);return(c=K.diffed)&&c(t),128&t.__u?void 0:a}function ef(n,t,e){for(var r=0;r<e.length;r++)Du(e[r],e[++r],e[++r]);K.__c&&K.__c(t,n),n.some(function(i){try{n=i.__h,i.__h=[],n.some(function(o){o.call(i)})}catch(o){K.__e(o,i.__v)}})}function nf(n){return typeof n!="object"||n==null||n.__b&&n.__b>0?n:uo(n)?n.map(nf):Ue({},n)}function fD(n,t,e,r,i,o,s,a,l){var u,c,d,h,p,f,m,E=e.props,g=t.props,_=t.type;if(_=="svg"?i="http://www.w3.org/2000/svg":_=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),o!=null){for(u=0;u<o.length;u++)if((p=o[u])&&"setAttribute"in p==!!_&&(_?p.localName==_:p.nodeType==3)){n=p,o[u]=null;break}}if(n==null){if(_==null)return document.createTextNode(g);n=document.createElementNS(i,_,g.is&&g),a&&(K.__m&&K.__m(t,o),a=!1),o=null}if(_==null)E===g||a&&n.data==g||(n.data=g);else{if(o=o&&lo.call(n.childNodes),E=e.props||ji,!a&&o!=null)for(E={},u=0;u<n.attributes.length;u++)E[(p=n.attributes[u]).name]=p.value;for(u in E)if(p=E[u],u!="children"){if(u=="dangerouslySetInnerHTML")d=p;else if(!(u in g)){if(u=="value"&&"defaultValue"in g||u=="checked"&&"defaultChecked"in g)continue;yo(n,u,null,p,i)}}for(u in g)p=g[u],u=="children"?h=p:u=="dangerouslySetInnerHTML"?c=p:u=="value"?f=p:u=="checked"?m=p:a&&typeof p!="function"||E[u]===p||yo(n,u,p,E[u],i);if(c)a||d&&(c.__html==d.__html||c.__html==n.innerHTML)||(n.innerHTML=c.__html),t.__k=[];else if(d&&(n.innerHTML=""),Qp(t.type=="template"?n.content:n,uo(h)?h:[h],t,e,r,_=="foreignObject"?"http://www.w3.org/1999/xhtml":i,o,s,o?o[0]:e.__k&&Mr(e,0),a,l),o!=null)for(u=o.length;u--;)Eu(o[u]);a||(u="value",_=="progress"&&f==null?n.removeAttribute("value"):f!=null&&(f!==n[u]||_=="progress"&&!f||_=="option"&&f!=E[u])&&yo(n,u,f,E[u],i),u="checked",m!=null&&m!=n[u]&&yo(n,u,m,E[u],i))}return n}function Du(n,t,e){try{if(typeof n=="function"){var r=typeof n.__u=="function";r&&n.__u(),r&&t==null||(n.__u=n(t))}else n.current=t}catch(i){K.__e(i,e)}}function rf(n,t,e){var r,i;if(K.unmount&&K.unmount(n),(r=n.ref)&&(r.current&&r.current!=n.__e||Du(r,null,t)),(r=n.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){K.__e(o,t)}r.base=r.__P=null}if(r=n.__k)for(i=0;i<r.length;i++)r[i]&&rf(r[i],t,e||typeof n.type!="function");e||Eu(n.__e),n.__c=n.__=n.__e=void 0}function mD(n,t,e){return this.constructor(n,e)}function Yi(n,t,e){var r,i,o,s;t==document&&(t=document.documentElement),K.__&&K.__(n,t),i=(r=typeof e=="function")?null:e&&e.__k||t.__k,o=[],s=[],gu(t,n=(!r&&e||t).__k=dt(Bt,null,[n]),i||ji,ji,t.namespaceURI,!r&&e?[e]:i?null:t.firstChild?lo.call(t.childNodes):null,o,!r&&e?e:i?i.__e:t.firstChild,r,s),ef(o,n,s)}function of(n,t){Yi(n,t,of)}function ED(n,t,e){var r,i,o,s,a=Ue({},n.props);for(o in n.type&&n.type.defaultProps&&(s=n.type.defaultProps),t)o=="key"?r=t[o]:o=="ref"?i=t[o]:a[o]=t[o]==null&&s!=null?s[o]:t[o];return arguments.length>2&&(a.children=arguments.length>3?lo.call(arguments,2):e),Li(n.type,a,r||n.key,i||n.ref,null)}function co(n){function t(e){var r,i;return this.getChildContext||(r=new Set,(i={})[t.__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,hl(s)})},this.sub=function(o){r.add(o);var s=o.componentWillUnmount;o.componentWillUnmount=function(){r&&r.delete(o),s&&s.call(o)}}),e.children}return t.__c="__cC"+Kp++,t.__=n,t.Provider=t.__l=(t.Consumer=function(e,r){return e.children(r)}).contextType=t,t}lo=qp.slice,K={__e:function(n,t,e,r){for(var i,o,s;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(n)),s=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(n,r||{}),s=i.__d),s)return i.__E=i}catch(a){n=a}throw n}},zp=0,Ae.prototype.setState=function(n,t){var e;e=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=Ue({},this.state),typeof n=="function"&&(n=n(Ue({},e),this.props)),n&&Ue(e,n),n!=null&&this.__v&&(t&&this._sb.push(t),hl(this))},Ae.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),hl(this))},Ae.prototype.render=Bt,Hn=[],Gp=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Xp=function(n,t){return n.__v.__b-t.__v.__b},ss.__r=0,Wp=/(PointerCapture)$|Capture$/i,mu=0,cl=xc(!1),dl=xc(!0),Kp=0;var cn,ct,fa,Pc,xr=0,sf=[],Et=K,Bc=Et.__b,Hc=Et.__r,Uc=Et.diffed,$c=Et.__c,jc=Et.unmount,Yc=Et.__;function ar(n,t){Et.__h&&Et.__h(ct,n,xr||t),xr=0;var e=ct.__H||(ct.__H={__:[],__h:[]});return n>=e.__.length&&e.__.push({}),e.__[n]}function at(n){return xr=1,Bs(af,n)}function Bs(n,t,e){var r=ar(cn++,2);if(r.t=n,!r.__c&&(r.__=[e?e(t):af(void 0,t),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=ct,!ct.__f)){var i=function(a,l,u){if(!r.__c.__H)return!0;var c=r.__c.__H.__.filter(function(h){return!!h.__c});if(c.every(function(h){return!h.__N}))return!o||o.call(this,a,l,u);var d=r.__c.props!==a;return c.forEach(function(h){if(h.__N){var p=h.__[0];h.__=h.__N,h.__N=void 0,p!==h.__[0]&&(d=!0)}}),o&&o.call(this,a,l,u)||d};ct.__f=!0;var o=ct.shouldComponentUpdate,s=ct.componentWillUpdate;ct.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)},ct.shouldComponentUpdate=i}return r.__N||r.__}function G(n,t){var e=ar(cn++,3);!Et.__s&&Ou(e.__H,t)&&(e.__=n,e.u=t,ct.__H.__h.push(e))}function ge(n,t){var e=ar(cn++,4);!Et.__s&&Ou(e.__H,t)&&(e.__=n,e.u=t,ct.__h.push(e))}function tt(n){return xr=5,Q(function(){return{current:n}},[])}function Rn(n,t,e){xr=6,ge(function(){if(typeof n=="function"){var r=n(t());return function(){n(null),r&&typeof r=="function"&&r()}}if(n)return n.current=t(),function(){return n.current=null}},e==null?e:e.concat(n))}function Q(n,t){var e=ar(cn++,7);return Ou(e.__H,t)&&(e.__=n(),e.__H=t,e.__h=n),e.__}function et(n,t){return xr=8,Q(function(){return n},t)}function qr(n){var t=ct.context[n.__c],e=ar(cn++,9);return e.c=n,t?(e.__==null&&(e.__=!0,t.sub(ct)),t.props.value):n.__}function _u(n,t){Et.useDebugValue&&Et.useDebugValue(t?t(n):n)}function Au(){var n=ar(cn++,11);if(!n.__){for(var t=ct.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var e=t.__m||(t.__m=[0,0]);n.__="P"+e[0]+"-"+e[1]++}return n.__}function gD(){for(var n;n=sf.shift();)if(n.__P&&n.__H)try{n.__H.__h.forEach(jo),n.__H.__h.forEach(pl),n.__H.__h=[]}catch(t){n.__H.__h=[],Et.__e(t,n.__v)}}Et.__b=function(n){ct=null,Bc&&Bc(n)},Et.__=function(n,t){n&&t.__k&&t.__k.__m&&(n.__m=t.__k.__m),Yc&&Yc(n,t)},Et.__r=function(n){Hc&&Hc(n),cn=0;var t=(ct=n.__c).__H;t&&(fa===ct?(t.__h=[],ct.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.forEach(jo),t.__h.forEach(pl),t.__h=[],cn=0)),fa=ct},Et.diffed=function(n){Uc&&Uc(n);var t=n.__c;t&&t.__H&&(t.__H.__h.length&&(sf.push(t)!==1&&Pc===Et.requestAnimationFrame||((Pc=Et.requestAnimationFrame)||DD)(gD)),t.__H.__.forEach(function(e){e.u&&(e.__H=e.u),e.u=void 0})),fa=ct=null},Et.__c=function(n,t){t.some(function(e){try{e.__h.forEach(jo),e.__h=e.__h.filter(function(r){return!r.__||pl(r)})}catch(r){t.some(function(i){i.__h&&(i.__h=[])}),t=[],Et.__e(r,e.__v)}}),$c&&$c(n,t)},Et.unmount=function(n){jc&&jc(n);var t,e=n.__c;e&&e.__H&&(e.__H.__.forEach(function(r){try{jo(r)}catch(i){t=i}}),e.__H=void 0,t&&Et.__e(t,e.__v))};var Vc=typeof requestAnimationFrame=="function";function DD(n){var t,e=function(){clearTimeout(r),Vc&&cancelAnimationFrame(t),setTimeout(n)},r=setTimeout(e,35);Vc&&(t=requestAnimationFrame(e))}function jo(n){var t=ct,e=n.__c;typeof e=="function"&&(n.__c=void 0,e()),ct=t}function pl(n){var t=ct;n.__c=n.__(),ct=t}function Ou(n,t){return!n||n.length!==t.length||t.some(function(e,r){return e!==n[r]})}function af(n,t){return typeof t=="function"?t(n):t}function lf(n,t){for(var e in t)n[e]=t[e];return n}function fl(n,t){for(var e in n)if(e!=="__source"&&!(e in t))return!0;for(var r in t)if(r!=="__source"&&n[r]!==t[r])return!0;return!1}function Tu(n,t){var e=t(),r=at({t:{__:e,u:t}}),i=r[0].t,o=r[1];return ge(function(){i.__=e,i.u=t,ma(i)&&o({t:i})},[n,e,t]),G(function(){return ma(i)&&o({t:i}),n(function(){ma(i)&&o({t:i})})},[n]),e}function ma(n){var t,e,r=n.u,i=n.__;try{var o=r();return!((t=i)===(e=o)&&(t!==0||1/t==1/e)||t!=t&&e!=e)}catch(s){return!0}}function Su(n){n()}function vu(n){return n}function Nu(){return[!1,Su]}var Cu=ge;function as(n,t){this.props=n,this.context=t}function dn(n,t){function e(i){var o=this.props.ref,s=o==i.ref;return!s&&o&&(o.call?o(null):o.current=null),t?!t(this.props,i)||!s:fl(this.props,i)}function r(i){return this.shouldComponentUpdate=e,dt(n,i)}return r.displayName="Memo("+(n.displayName||n.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(as.prototype=new Ae).isPureReactComponent=!0,as.prototype.shouldComponentUpdate=function(n,t){return fl(this.props,n)||fl(this.state,t)};var zc=K.__b;K.__b=function(n){n.type&&n.type.__f&&n.ref&&(n.props.ref=n.ref,n.ref=null),zc&&zc(n)};var _D=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Re(n){function t(e){var r=lf({},e);return delete r.ref,n(r,e.ref||null)}return t.$$typeof=_D,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(n.displayName||n.name)+")",t}var Gc=function(n,t){return n==null?null:sn(sn(n).map(t))},uf={map:Gc,forEach:Gc,count:function(n){return n?sn(n).length:0},only:function(n){var t=sn(n);if(t.length!==1)throw"Children.only";return t[0]},toArray:sn},AD=K.__e;K.__e=function(n,t,e,r){if(n.then){for(var i,o=t;o=o.__;)if((i=o.__c)&&i.__c)return t.__e==null&&(t.__e=e.__e,t.__k=e.__k),i.__c(n,t)}AD(n,t,e,r)};var Xc=K.unmount;function cf(n,t,e){return n&&(n.__c&&n.__c.__H&&(n.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),n.__c.__H=null),(n=lf({},n)).__c!=null&&(n.__c.__P===e&&(n.__c.__P=t),n.__c.__e=!0,n.__c=null),n.__k=n.__k&&n.__k.map(function(r){return cf(r,t,e)})),n}function df(n,t,e){return n&&e&&(n.__v=null,n.__k=n.__k&&n.__k.map(function(r){return df(r,t,e)}),n.__c&&n.__c.__P===t&&(n.__e&&e.appendChild(n.__e),n.__c.__e=!0,n.__c.__P=e)),n}function bi(){this.__u=0,this.o=null,this.__b=null}function hf(n){var t=n.__.__c;return t&&t.__a&&t.__a(n)}function pf(n){var t,e,r;function i(o){if(t||(t=n()).then(function(s){e=s.default||s},function(s){r=s}),r)throw r;if(!e)throw t;return dt(e,o)}return i.displayName="Lazy",i.__f=!0,i}function Dr(){this.i=null,this.l=null}K.unmount=function(n){var t=n.__c;t&&t.__R&&t.__R(),t&&32&n.__u&&(n.type=null),Xc&&Xc(n)},(bi.prototype=new Ae).__c=function(n,t){var e=t.__c,r=this;r.o==null&&(r.o=[]),r.o.push(e);var i=hf(r.__v),o=!1,s=function(){o||(o=!0,e.__R=null,i?i(a):a())};e.__R=s;var a=function(){if(!--r.__u){if(r.state.__a){var l=r.state.__a;r.__v.__k[0]=df(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&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),n.then(s,s)},bi.prototype.componentWillUnmount=function(){this.o=[]},bi.prototype.render=function(n,t){if(this.__b){if(this.__v.__k){var e=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=cf(this.__b,e,r.__O=r.__P)}this.__b=null}var i=t.__a&&dt(Bt,null,n.fallback);return i&&(i.__u&=-33),[dt(Bt,null,t.__a?null:n.children),i]};var Wc=function(n,t,e){if(++e[1]===e[0]&&n.l.delete(t),n.props.revealOrder&&(n.props.revealOrder[0]!=="t"||!n.l.size))for(e=n.i;e;){for(;e.length>3;)e.pop()();if(e[1]<e[0])break;n.i=e=e[2]}};function OD(n){return this.getChildContext=function(){return n.context},n.children}function TD(n){var t=this,e=n.h;if(t.componentWillUnmount=function(){Yi(null,t.v),t.v=null,t.h=null},t.h&&t.h!==e&&t.componentWillUnmount(),!t.v){for(var r=t.__v;r!==null&&!r.__m&&r.__!==null;)r=r.__;t.h=e,t.v={nodeType:1,parentNode:e,childNodes:[],__k:{__m:r.__m},contains:function(){return!0},insertBefore:function(i,o){this.childNodes.push(i),t.h.insertBefore(i,o)},removeChild:function(i){this.childNodes.splice(this.childNodes.indexOf(i)>>>1,1),t.h.removeChild(i)}}}Yi(dt(OD,{context:t.context},n.__v),t.v)}function ff(n,t){var e=dt(TD,{__v:n,h:t});return e.containerInfo=t,e}(Dr.prototype=new Ae).__a=function(n){var t=this,e=hf(t.__v),r=t.l.get(n);return r[0]++,function(i){var o=function(){t.props.revealOrder?(r.push(i),Wc(t,n,r)):i()};e?e(o):o()}},Dr.prototype.render=function(n){this.i=null,this.l=new Map;var t=sn(n.children);n.revealOrder&&n.revealOrder[0]==="b"&&t.reverse();for(var e=t.length;e--;)this.l.set(t[e],this.i=[1,0,this.i]);return n.children},Dr.prototype.componentDidUpdate=Dr.prototype.componentDidMount=function(){var n=this;this.l.forEach(function(t,e){Wc(n,e,t)})};var mf=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.element")||60103,SD=/^(?: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]/,vD=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,ND=/[A-Z0-9]/g,CD=typeof document!="undefined",yD=function(n){return(typeof Symbol!="undefined"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(n)};function yu(n,t,e){return t.__k==null&&(t.textContent=""),Yi(n,t),typeof e=="function"&&e(),n?n.__c:null}function Ef(n,t,e){return of(n,t),typeof e=="function"&&e(),n?n.__c:null}Ae.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(n){Object.defineProperty(Ae.prototype,n,{configurable:!0,get:function(){return this["UNSAFE_"+n]},set:function(t){Object.defineProperty(this,n,{configurable:!0,writable:!0,value:t})}})});var Kc=K.event;function ID(){}function RD(){return this.cancelBubble}function LD(){return this.defaultPrevented}K.event=function(n){return Kc&&(n=Kc(n)),n.persist=ID,n.isPropagationStopped=RD,n.isDefaultPrevented=LD,n.nativeEvent=n};var Iu,bD={enumerable:!1,configurable:!0,get:function(){return this.class}},qc=K.vnode;K.vnode=function(n){typeof n.type=="string"&&function(t){var e=t.props,r=t.type,i={},o=r.indexOf("-")===-1;for(var s in e){var a=e[s];if(!(s==="value"&&"defaultValue"in e&&a==null||CD&&s==="children"&&r==="noscript"||s==="class"||s==="className")){var l=s.toLowerCase();s==="defaultValue"&&"value"in e&&e.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"||yD(e.type)?l==="onfocus"?s="onfocusin":l==="onblur"?s="onfocusout":vD.test(s)&&(s=l):l=s="oninput":o&&SD.test(s)?s=s.replace(ND,"-$&").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=sn(e.children).forEach(function(u){u.props.selected=i.value.indexOf(u.props.value)!=-1})),r=="select"&&i.defaultValue!=null&&(i.value=sn(e.children).forEach(function(u){u.props.selected=i.multiple?i.defaultValue.indexOf(u.props.value)!=-1:i.defaultValue==u.props.value})),e.class&&!e.className?(i.class=e.class,Object.defineProperty(i,"className",bD)):(e.className&&!e.class||e.class&&e.className)&&(i.class=i.className=e.className),t.props=i}(n),n.$$typeof=mf,qc&&qc(n)};var Jc=K.__r;K.__r=function(n){Jc&&Jc(n),Iu=n.__c};var Zc=K.diffed;K.diffed=function(n){Zc&&Zc(n);var t=n.props,e=n.__e;e!=null&&n.type==="textarea"&&"value"in t&&t.value!==e.value&&(e.value=t.value==null?"":t.value),Iu=null};var gf={ReactCurrentDispatcher:{current:{readContext:function(n){return Iu.__n[n.__c].props.value},useCallback:et,useContext:qr,useDebugValue:_u,useDeferredValue:vu,useEffect:G,useId:Au,useImperativeHandle:Rn,useInsertionEffect:Cu,useLayoutEffect:ge,useMemo:Q,useReducer:Bs,useRef:tt,useState:at,useSyncExternalStore:Tu,useTransition:Nu}}};function Df(n){return dt.bind(null,n)}function ho(n){return!!n&&n.$$typeof===mf}function _f(n){return ho(n)&&n.type===Bt}function Af(n){return!!n&&!!n.displayName&&(typeof n.displayName=="string"||n.displayName instanceof String)&&n.displayName.startsWith("Memo(")}function Of(n){return ho(n)?ED.apply(null,arguments):n}function Ru(n){return!!n.__k&&(Yi(null,n),!0)}function Tf(n){return n&&(n.base||n.nodeType===1&&n)||null}var Sf=function(n,t){return n(t)},Lu=function(n,t){return n(t)},vf=Bt,Nf=ho,he={useState:at,useId:Au,useReducer:Bs,useEffect:G,useLayoutEffect:ge,useInsertionEffect:Cu,useTransition:Nu,useDeferredValue:vu,useSyncExternalStore:Tu,startTransition:Su,useRef:tt,useImperativeHandle:Rn,useMemo:Q,useCallback:et,useContext:qr,useDebugValue:_u,version:"18.3.1",Children:uf,render:yu,hydrate:Ef,unmountComponentAtNode:Ru,createPortal:ff,createElement:dt,createContext:co,createFactory:Df,cloneElement:Of,createRef:Jp,Fragment:Bt,isValidElement:ho,isElement:Nf,isFragment:_f,isMemo:Af,findDOMNode:Tf,Component:Ae,PureComponent:as,memo:dn,forwardRef:Re,flushSync:Lu,unstable_batchedUpdates:Sf,StrictMode:vf,Suspense:bi,SuspenseList:Dr,lazy:pf,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:gf};const kD=Object.freeze(Object.defineProperty({__proto__:null,Children:uf,Component:Ae,Fragment:Bt,PureComponent:as,StrictMode:vf,Suspense:bi,SuspenseList:Dr,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:gf,cloneElement:Of,createContext:co,createElement:dt,createFactory:Df,createPortal:ff,createRef:Jp,default:he,findDOMNode:Tf,flushSync:Lu,forwardRef:Re,hydrate:Ef,isElement:Nf,isFragment:_f,isMemo:Af,isValidElement:ho,lazy:pf,memo:dn,render:yu,startTransition:Su,unmountComponentAtNode:Ru,unstable_batchedUpdates:Sf,useCallback:et,useContext:qr,useDebugValue:_u,useDeferredValue:vu,useEffect:G,useErrorBoundary:function(n){var t=ar(cn++,10),e=at();return t.__=n,ct.componentDidCatch||(ct.componentDidCatch=function(r,i){t.__&&t.__(r,i),e[1](r)}),[e[0],function(){e[1](void 0)}]},useId:Au,useImperativeHandle:Rn,useInsertionEffect:Cu,useLayoutEffect:ge,useMemo:Q,useReducer:Bs,useRef:tt,useState:at,useSyncExternalStore:Tu,useTransition:Nu,version:"18.3.1"},Symbol.toStringTag,{value:"Module"}));var wD=0;function y(n,t,e,r,i,o){t||(t={});var s,a,l=t;if("ref"in l)for(a in l={},t)a=="ref"?s=t[a]:l[a]=t[a];var u={type:n,props:l,key:e,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--wD,__i:-1,__u:0,__source:i,__self:o};if(typeof n=="function"&&(s=n.defaultProps))for(a in s)l[a]===void 0&&(l[a]=s[a]);return K.vnode&&K.vnode(u),u}var bu=Object.prototype.hasOwnProperty;function yt(n){return Array.isArray(n)}function je(n){return!(!n||typeof n!="object"||n instanceof Date||yt(n))}function Z(n){return typeof n=="function"}function Zt(n){const t=typeof n;return n!==void 0&&(ml(n)||t!=="object"&&t!=="function")}function ml(n){return n instanceof Date}function Cf(n){return typeof n=="boolean"}function $e(n){return n instanceof Promise}function kt(n){return n instanceof Map||n instanceof WeakMap}function hn(n){return n instanceof Set||n instanceof WeakSet}function ls(n){if(!n)return!1;if(yt(n))return n.length===0;if(kt(n)||hn(n))return n.size===0;for(const t in n)if(bu.call(n,t))return!1;return!0}var FD=new Set(["boolean","string","number"]);function Hs(n){return!!n.parent}var MD=Symbol.toPrimitive,xD=Symbol.iterator,Pr=Symbol("getNode"),Us=Symbol("delete"),yf=Symbol("opaque"),PD=Symbol("plain"),ku=Symbol("optimized"),Vi=Symbol("linked"),Nt={pendingNodes:new Map,dirtyNodes:new Set};function zi(n){return n&&(n[yf]||n.$$typeof)}function If(n){return n&&n[PD]}function Rf(n){return yt(n)?"array":kt(n)?"map":n instanceof Set?"set":"object"}function BD(n,t){return kt(t)?{__LSType:"Map",value:Array.from(t.entries())}:t instanceof Set?{__LSType:"Set",value:Array.from(t)}:(Nt.replacer&&(t=Nt.replacer(n,t)),t)}var HD=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z$/;function UD(n,t){if(t){if(typeof t=="string"&&HD.test(t))return new Date(t);if(typeof t=="object"){if(t.__LSType==="Map")return new Map(t.value);if(t.__LSType==="Set")return new Set(t.value)}Nt.reviver&&(t=Nt.reviver(n,t))}return t}function Lf(n){return n&&JSON.stringify(n,BD)}function bf(n){return n&&JSON.parse(n,UD)}function kf(n){return bf(Lf(n))}function Tt(n){return!!n&&!!n[Pr]}function po(n){return n&&n[Pr]}function wf(n,t,e,r,i){return r?n.add(e):i?n.set(t,e):n[t]=e,e}function an(n,t){var e;const r=(e=n.parent)!=null?e:n,i=n.parent?n.key:"_",o=t===Us;o&&(t=void 0);const s=n.parent?wu(r):r.root,a=hn(s),l=kt(s),u=a?i:l?s.get(i):s[i],c=Z(t);if((t=r.isAssigning||!c||Z(u)?t:t(u))!==u)try{r.isSetting=(r.isSetting||0)+1,o?l||a?s.delete(i):delete s[i]:wf(s,i,t,a,l)}finally{r.isSetting--}return{prevValue:u,newValue:t,parentValue:s}}var Qc=[];function ht(n){let t=0,e=n;for(;Hs(e);)Qc[t++]=e.key,e=e.parent;let r=n.root._;for(let i=t-1;r&&i>=0;i--){const o=Qc[i];r=o!=="size"&&kt(r)?r.get(o):r[o]}return r}function Le(n,t,e){var r,i;let o=(r=n.children)==null?void 0:r.get(t);return o||(o={root:n.root,parent:n,key:t,lazy:!0,numListenersRecursive:0},((i=n.lazyFn)==null?void 0:i.length)===1&&(e=n.lazyFn.bind(n,t)),Z(e)&&(o=Object.assign(()=>{},o),o.lazyFn=e),n.children||(n.children=new Map),n.children.set(t,o)),o}function wu(n){let t=ht(n);if(!t||Z(t))if(Hs(n)){const e=wu(n.parent),r=hn(e),i=kt(e);t=wf(e,n.key,{},r,i)}else t=n.root._={};return t}function Ff(n,t){var e,r;let i=Tt(n)?void 0:je(n)?"id"in n?"id":"key"in n?"key":"_id"in n?"_id":"__id"in n?"__id":void 0:void 0;if(!i&&t.parent){const o=t.key+"_keyExtractor",s=(r=(e=t.functions)==null?void 0:e.get(o))!=null?r:ht(t.parent)[t.key+"_keyExtractor"];s&&Z(s)&&(i=s)}return i}function td(n,t,e){n.functions||(n.functions=new Map),n.functions.set(t,e)}function Mf(n,t){return n===t||ml(n)&&ml(t)&&+n==+t}function El(n,t,e,r){return t?void 0:n?r?Array.from(n):e?Array.from(n.keys()):Object.keys(n):[]}function $D(n,t){return n&&Object.defineProperty(n,t,{value:!0,enumerable:!1,writable:!0,configurable:!0}),n}var ed=function(n){return $D(n,yf)};function xf(n,t){var e;n.isPlain||!((e=n.parent)!=null&&e.isPlain)&&!If(t)||(n.isPlain=!0)}function ln(n,t,e,r){let i=n;return!Tt(i)&&Z(i)&&(i=e?i(e):i()),Tt(i)&&!r?i.get(t):i}var ki,jD=(n,t)=>n&&n[t];function Pf(n,t,e,r,i,o,s){let a,l=n;if(t.length>0){let u=o;for(let c=0;c<t.length;c++){a=t[c];const d=kt(l);let h=l?d?l.get(a):l[a]:void 0;const p=u?d?u.get(a):u[a]:void 0;if(h===Us)return u&&(d?l.set(a,p):l[a]=p,s==null||s(t.slice(0,c+1),p)),n;if(h===void 0&&r===void 0&&c===t.length-1)return n;c<t.length-1&&h==null&&(h=Fu(e[c]),kt(l)?l.set(a,h):l[a]=h),c<t.length-1&&(l=h,u&&(u=p))}}return a===void 0?n=i==="merge"?us(n,r):r:i==="merge"?l[a]=us(l[a],r):kt(l)?l.set(a,r):l[a]=r,n}function nd(n,t,e){let r=e;for(let i=0;i<n.length;i++){const o=n[i];r=r?r[o]:Fu(t[i])}return r}function rd(n){return!(!n||(je(n)||yt(n))&&ls(n))}function Fu(n){switch(n){case"array":return[];case"map":return new Map;case"set":return new Set;default:return{}}}function YD(n,t,e){const{path:r,valueAtPath:i,prevAtPath:o,pathTypes:s}=t;return Pf(n,r,s,o)}function us(n,...t){if(Zt(n))return t[t.length-1];let e=yt(n)?[...n]:{...n};for(let i=0;i<t.length;i++){const o=t[i];if(je(r=o)&&r.constructor===Object||yt(o)){const s=o;for(const a in s)bu.call(s,a)&&(s[a]instanceof Object&&!Tt(s[a])&&Object.keys(s[a]).length>0?e[a]=us(e[a]||(yt(s[a])?[]:{}),s[a]):e[a]=s[a])}else e=o}var r;return e}var cs=0,Ea=!1,ga=!1,Cr=new Map;function VD(){Cr.size>0&&Jr(!0)}function Bf(n,t){for(let e=0;e<n.length;e++)if(n[e]!==t[e])return!1;return!0}function zD(n,t){try{return function(e,r){for(let i=0;i<r.length;i++)e=YD(e,r[i]);return e}(n?kf(n):{},t)}catch(e){return}}function Mu(n,t){return function(){return zD(n,t)}}function Gi(n,t,e,r,i){const o=new Map;ds(o,n,!!Nt.isLoadingLocal,!!Nt.isLoadingRemote,t,[],[],t,e,!0,r,i);const s=Cr.get(n);s?s.prev===t?Cr.delete(n):s.value=t:Cr.set(n,{value:t,prev:e,level:r,whenOptimizedOnlyIf:i,isFromSync:!!Nt.isLoadingRemote,isFromPersist:!!Nt.isLoadingLocal}),o.size&&Hf(o,!0),cs<=0&&Uf()}function ds(n,t,e,r,i,o,s,a,l,u,c,d){if(t.numListenersRecursive>0&&(function(h,p,f,m,E,g,_,A,T,S,v,C){if(S?p.listenersImmediate:p.listeners){const R={path:g,pathTypes:_,valueAtPath:A,prevAtPath:T},D=h.get(p);if(D&&g.length>0){const{changes:O}=D;Bf(O[0].path,R.path)||(O.push(R),D.level=Math.min(D.level,v),D.whenOptimizedOnlyIf||(D.whenOptimizedOnlyIf=C))}else h.set(p,{level:v,value:E,isFromSync:m,isFromPersist:f,whenOptimizedOnlyIf:C,changes:[R]})}}(n,t,e,r,i,o,s,a,l,u,c,d),t.linkedFromNodes))for(const h of t.linkedFromNodes)ds(n,GD(h,o),e,r,a,[],[],a,l,u,0,d);if(t.parent){const h=t.parent;h&&ds(n,h,e,r,ht(h),[t.key].concat(o),[Rf(i)].concat(s),a,l,u,c+1,d)}}function Hf(n,t){const e=new Set;n.forEach(({changes:r,level:i,value:o,isFromPersist:s,isFromSync:a,whenOptimizedOnlyIf:l},u)=>{const c=t?u.listenersImmediate:u.listeners;if(c){let d;const h=Array.from(c);for(let p=0;p<h.length;p++){const f=h[p],{track:m,noArgs:E,listener:g}=f;e.has(g)||(m===!0?i<=0:m!==ku||l&&i<=0)&&(E||d||(d={value:o,isFromPersist:s,isFromSync:a,getPrevious:Mu(o,r),changes:r}),m||e.add(g),g(d))}}})}function Uf(){const n=Array.from(Nt.dirtyNodes);Nt.dirtyNodes.clear(),n.forEach(r=>{const i=r.dirtyFn;i&&(r.dirtyFn=void 0,i())});const t=Cr;Cr=new Map;const e=new Map;t.forEach(({value:r,prev:i,level:o,isFromPersist:s,isFromSync:a,whenOptimizedOnlyIf:l},u)=>{ds(e,u,s,a,r,[],[],r,i,!1,o,l)}),e.size&&Hf(e,!1)}function Br(n){$s();try{n()}finally{Jr()}}function $s(){cs++,ki||(ki=setTimeout(VD,0))}function Jr(n){(--cs<=0||n)&&(Ea?ga=!0:(ki&&(clearTimeout(ki),ki=void 0),cs=0,Ea=!0,Uf(),Ea=!1,ga&&(ga=!1,Jr(!0))))}function GD(n,t){let e=n;for(let r=0;r<t.length;r++)e=Le(e,t[r]);return e}function xu(n,t,e,r,i){if(Tt(n))return n;const o=$e(n);let s={root:{_:n},lazy:!0,numListenersRecursive:0};Z(n)&&(s=Object.assign(()=>{},s),s.lazyFn=n);var a;const l=(a=n,FD.has(typeof a)?new i(s):r(s));return o&&(an(s,void 0),e(s,n)),l}var _r=new WeakMap,$f=[],jf=[],Yf=[],Ar=0,gl=!1;function Da(n,t,e){const r=_r.get(n);if(!r||!r.has(e))return;const i=r.get(e);i&&i.size!==0&&($f[Ar]=n,jf[Ar]=t,Yf[Ar]=e,Ar++,gl||(gl=!0,queueMicrotask(XD)))}var ai={type:"listener-added",node:null,listener:void 0,timestamp:0};function XD(){gl=!1;const n=typeof performance!="undefined"?performance.now():Date.now();ai.timestamp=n;for(let t=0;t<Ar;t++){const e=$f[t],r=jf[t],i=Yf[t],o=_r.get(e);if(!o)continue;const s=o.get(i);if(!s||s.size===0)continue;const a=e.listeners,l=e.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){ai.type=i,ai.node=e,ai.listener=r;const c=Array.from(s);for(let d=0;d<c.length;d++)try{c[d](ai)}catch(h){console.error(`Error in middleware handler for ${i}:`,h)}}}Ar=0}function yn(n,t,e={},r){var i;const{initial:o,immediate:s,noArgs:a}=e,{trackingType:l}=e;let u=s?n.listenersImmediate:n.listeners;u||(u=new Set,s?n.listenersImmediate=u:n.listeners=u);const c={listener:t,track:l,noArgs:a};if(u.add(c),o){const m=ht(n);t({value:m,isFromPersist:!0,isFromSync:!1,changes:[{path:[],pathTypes:[],prevAtPath:m,valueAtPath:m}],getPrevious:()=>{}})}let d;function h(m,E=t,g){if(!(r!=null&&r.has(m))){r||(r=new Set),r.add(g||n),E||(E=t);const _={trackingType:!0,...e};d=[...d||[],yn(m,E,_,r)]}}n.linkedToNode&&h(n.linkedToNode),(i=n.linkedFromNodes)==null||i.forEach(m=>h(m)),n.numListenersRecursive++;let p=n.parent,f=[n.key];for(;p;){if(p.linkedFromNodes)for(const m of p.linkedFromNodes)r!=null&&r.has(m)||h(m,WD(m,f,t),p);p.numListenersRecursive++,f=[p.key,...f],p=p.parent}return Da(n,c,"listener-added"),()=>{u.delete(c),d==null||d.forEach(E=>E());let m=n;for(;m;)m.numListenersRecursive--,m=m.parent;Da(n,c,"listener-removed"),u.size===0&&Da(n,void 0,"listeners-cleared")}}function WD(n,t,e){let r=nd(t,[],ht(n));return function({value:i,isFromPersist:o,isFromSync:s}){const a=nd(t,[],i);a!==r&&e({value:a,isFromPersist:o,isFromSync:s,changes:[{path:[],pathTypes:[],prevAtPath:r,valueAtPath:a}],getPrevious:()=>r}),r=a}}var Yo=0,id=[],Or={current:void 0};function Vo(n,t){if(Yo){const e=Or.current;if(e){e.nodes||(e.nodes=new Map);const r=e.nodes.get(n);r?(r.track=r.track||t,r.num++):e.nodes.set(n,{node:n,track:t,num:1})}}}function Vf(n,t,e,r,i,o){let s,a=t;id.push(Or.current),Yo++,Or.current={};const l=n&&ln(n,e,r,i==null?void 0:i.fromComputed),u=Or.current.nodes;return--Yo<0&&(Yo=0),Or.current=id.pop(),r!=null&&r.cancel||(s=function(c,d,h,p){let f=[];return c==null||c.forEach(m=>{const{node:E,track:g}=m;f.push(yn(E,d,{trackingType:g,immediate:p,noArgs:h}))}),()=>{if(f){for(let m=0;m<f.length;m++)f[m]();f=void 0}}}(u,a,!1,i==null?void 0:i.immediate)),{nodes:u,value:l,dispose:s,resubscribe:void 0}}function Xi(n,t,e){let r,i;Z(t)?r=t:e=t;let o=!1;const s={num:0},a=function(){if(o)return;s.onCleanup&&(s.onCleanup(),s.onCleanup=void 0),o=!0,$s(),delete s.value,i==null||i();const{dispose:l,value:u,nodes:c}=Vf(n,a,void 0,s,e);var d,h;i=l,s.value=u,s.nodes=c,s.refresh=a,s.onCleanupReaction&&(s.onCleanupReaction(),s.onCleanupReaction=void 0),Jr(),o=!1,!r||!(e!=null&&e.fromComputed)&&(!(s.num>0)&&(d=n)&&((h=d[Pr])!=null&&h.isEvent)||s.previous===s.value&&typeof s.value!="object")||r(s),s.previous=s.value,s.num++};return a(),()=>{var l,u;(l=s.onCleanup)==null||l.call(s),s.onCleanup=void 0,(u=s.onCleanupReaction)==null||u.call(s),s.onCleanupReaction=void 0,i==null||i()}}function zf(n,t,e){if($e(n))return t?n.then(t):n;const r=yt(n);let i,o;return Xi(function(s){const a=r?n.map(l=>ln(l)):ln(n);if(!$e(a)){{let l=!0;if(yt(a))for(let u=0;u<a.length;u++){let c=a[u];Tt(c)?c=ln(c):Z(c)&&(c=c()),l=l&&!!(e?rd(c):c)}else l=e?rd(a):a;l&&(i=a,s.cancel=!0)}return i}i=a},function(){o=t==null?void 0:t(i)}),$e(i)?t?i.then(t):i:i!==void 0?t?o:Promise.resolve(i):new Promise(s=>{if(t){const a=t;t=l=>{const u=a(l);s($e(u)?u.then(c=>c):u)}}else t=s})}function Gf(n,t){return zf(n,t,!1)}var _a=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"]),KD=new Set(["filter","find"]),Dl=new Map,_l=new Map([["get",js],["set",Oe],["peek",Zr],["onChange",yn],["assign",function(n,t){const e=se(n);if($s(),Zt(n.root._)&&(n.root._={}),kt(t)){const r=ht(n);kt(r)?t.forEach((i,o)=>r.set(o,i)):Oe(n,t)}else{n.isAssigning=(n.isAssigning||0)+1;try{Object.assign(e,t)}finally{n.isAssigning--}}return Jr(),e}],["delete",Kf],["toggle",function(n){const t=ht(n);(t==null||Cf(t))&&Oe(n,!t)}]]);function Xf(n,t,e,...r){var i;if(e!=="push"||r.length!==1){const o=t.slice(),s=t[e].apply(t,r);if(n){const a=Hs(n),l=a?n.key:"_";(a?ht(n.parent):n.root)[l]=o,Hr((i=n.parent)!=null?i:n,l,t)}return s}Hr(n,t.length+"",r[0])}function Pu(n,t,e){var r,i,o;if(je(t)&&zi(t)||je(e)&&zi(e)){const S=t!==e;return S&&(n.listeners||n.listenersImmediate)&&Gi(n,t,e,0),S}const s=yt(t);let a,l;const u=kt(t),c=hn(t),d=kt(e),h=hn(e),p=El(t,s,u,c),f=El(e,s,d,h),m=((r=p||t)==null?void 0:r.length)||0,E=((i=f||e)==null?void 0:i.length)||0;let g,_,A,T=!1;if(s&&yt(e)){if(e.length>0){const S=e[0];if(S!==void 0&&(g=Ff(S,n),g&&(_=Z(g),a=new Map,l=[]),n.children))for(let v=0;v<e.length;v++){const C=e[v];if(C){const R=n.children.get(v+"");if(R&&(t[v]||sd(R,C),g)){const D=_?g(C):C[g];a.set(D,R)}}}}}else if(e&&(!t||je(t))){const S=f.length;for(let v=0;v<S;v++){const C=f[v];if(!p.includes(C)){T=!0;const R=Le(n,C),D=d?e.get(C):e[C];D!==void 0&&sd(R,D)}}}if(t&&!Zt(t)){T=T||m!==E;const S=T;let v=!1;for(let C=0;C<m;C++){const R=s?C+"":p[C];let D=u?t.get(R):t[R];const O=d?e==null?void 0:e.get(R):e==null?void 0:e[R];let k=!Mf(D,O);if(k){const w=g&&D?_?g(D):D[g]:void 0,U=(o=n.children)==null?void 0:o.get(R);if(Tt(D)){const F=po(D);if((U==null?void 0:U.linkedToNode)===F){const $=ht(F);u?t.set(R,$):t[R]=$;continue}const j=D;D=()=>j}let I=Le(n,R,D);if(I.lazy||!Z(D)&&!Tt(D)||(Zf(I,D),Qn(I)),s&&w!==void 0){const F=w!==void 0?a==null?void 0:a.get(w):void 0;if(F){if(F!==void 0&&F.key!==R){const j=e[F.key];S&&(I=F,n.children.delete(I.key),I.key=R,l.push([R,I])),v=!0,k=j!==D}}else T=!0}if(k)if(Z(D)||Tt(D))$r(n,R,D);else if(Zt(D))T=!0;else{const F=Pu(I,D,O);T=T||F,k=F}(k||s&&!S)&&(I.listeners||I.listenersImmediate)&&Gi(I,D,O,0,!S)}}if(l)for(let C=0;C<l.length;C++){const[R,D]=l[C];n.children.set(R,D)}A=T||v}else e!==void 0&&(A=!0);return A!=null&&A}function sd(n,t){var e,r;(e=n.linkedToNodeDispose)==null||e.call(n),(r=n.activatedObserveDispose)==null||r.call(n),Zt(t)||Pu(n,void 0,t),(n.listeners||n.listenersImmediate)&&Gi(n,void 0,t,0)}function se(n,t,e){return t!==void 0&&(n=Le(n,t,e)),n.proxy||(n.proxy=new Proxy(n,Wf))}function Al(){if(Nt.pendingNodes.size>0){const n=Array.from(Nt.pendingNodes.values());Nt.pendingNodes.clear(),n.forEach(t=>t())}}var Wf={get(n,t,e){var r,i;if(t===MD)throw new Error("[legend-state] observable is not a primitive.");if(t===Pr)return n;if(t==="apply"||t==="call"){const d=ht(n);if(Z(d))return d[t]}let o=Qn(n,t==="get"||t==="peek");if(t===xD)return!o||Zt(o)?void 0:o[t];const s=n.linkedToNode||(o==null?void 0:o[Pr]);if(s&&t!=="onChange")return Wf.get(s,t,e);if(kt(o)||hn(o)){const d=function(h,p,f){const m=f==null?void 0:f[p];if(p==="size")return Vo(h,!0),f[p];if(Z(m))return function(E,g,_){const A=arguments.length,T=f;if(p==="get"){if(A>0&&typeof E!="boolean"&&E!==ku)return se(h,E)}else{if(p==="set")return A===2?Oe(Le(h,E),g):A===1&&kt(f)&&Oe(h,E),se(h);if(p==="delete"){if(A>0){const v=f.get?T.get(E):E;return Kf(h,E),v!==void 0}}else{if(p==="clear"){const v=hn(T)?new Set(T):new Map(T),C=T.size;return T.clear(),void(C&&qf(h,f,v))}if(p==="add"){const v=new Set(f),C=f.add(E);return f.has(p)||Gi(h,C,v,0),se(h)}}}const S=_l.get(p);if(!S)return f[p](E,g);switch(A){case 0:return S(h);case 1:return S(h,E);case 2:return S(h,E,g);default:return S(h,E,g,_)}}}(n,t,o);if(d!==void 0)return d}const a=_l.get(t);if(a)return t!=="get"&&t!=="peek"||Al(),function(d,h,p){switch(arguments.length){case 0:return a(n);case 1:return a(n,d);case 2:return a(n,d,h);default:return a(n,d,h,p)}};const l=Dl.get(t);if(l)return l.get(n);let u=o==null?void 0:o[t];if(je(o)&&zi(o))return u;const c=(r=n.functions)==null?void 0:r.get(t);if(c)return Tt(c)?c:se(n,t,c);if(u=function(d,h){if(d){const p=Object.getOwnPropertyDescriptor(d,h);return p!=null&&p.get&&(delete d[h],d[h]=p.set?function(f){Z(f)&&(f={get:f});const m=function(){return{[Vi]:f}};return m.prototype[Vi]=f,m}({get:p.get,set:({value:f})=>p.set(f)}):p.get),d[h]}}(o,t),function(d){return d==null}(o)&&u===void 0&&(_a.has(t)||od.has(t))&&(o=[],_a.has(t)&&an(n,o),u=o[t]),Z(u)){if(yt(o)){if(_a.has(t))return(...h)=>Xf(n,o,t,...h);if(od.has(t))return Vo(n,!0),function(h,p){const f=t==="reduce",m=f?(_,A,T,S)=>h(_,se(n,T+"",A),T,S):(_,A,T)=>h(se(n,A+"",_),A,T);if(f||!KD.has(t))return o[t](m,p);const E=t==="find",g=[];for(let _=0;_<o.length;_++)if(m(o[_],_,o)){const A=se(n,_+"");if(E)return A;g.push(A)}return E?void 0:g}}$r(n,t,u);const d=(i=n.functions)==null?void 0:i.get(t);return d?se(n,t,d):u.bind(o)}return Zt(u)&&t==="length"&&yt(o)?(Vo(n,!0),u):se(n,t)},getPrototypeOf(n){const t=ht(n);return t!==null&&typeof t=="object"?Reflect.getPrototypeOf(t):null},ownKeys(n){Qn(n);const t=js(n,!0);if(Zt(t))return[];const e=t?Reflect.ownKeys(t):[];if(yt(t)&&e[e.length-1]==="length"&&e.splice(e.length-1,1),Z(n)){const r=Reflect.ownKeys(n);["caller","arguments","prototype"].forEach(i=>r.includes(i)&&e.push(i))}return e},getOwnPropertyDescriptor(n,t){if(t==="caller"||t==="arguments"||t==="prototype")return{configurable:!1,enumerable:!1};const e=ht(n);if(Zt(e))return;const r=Reflect.getOwnPropertyDescriptor(e,t);return r?{...r,configurable:!0}:void 0},set(n,t,e){if(n.isSetting)return Reflect.set(n,t,e);if(n.isAssigning)return Hr(n,t,e),!0;const r=Dl.get(t);return!!r&&(r.set(n,e),!0)},deleteProperty:(n,t)=>!!n.isSetting&&Reflect.deleteProperty(n,t),has(n,t){const e=ht(n);return Reflect.has(e,t)},apply(n,t,e){Tt(t)&&(t=t.peek());const r=ht(n),i=Z(r)?r:n.lazyFn||n;return Reflect.apply(i,t,e)}};function Oe(n,t){n.parent?Hr(n.parent,n.key,t):Hr(n,"_",t)}function Hr(n,t,e,r){const i=!n.parent&&t==="_";xf(n,e),!n.parent||ht(n)||Z(e)||Oe(n,{[t]:e});const o=i?n:Le(n,t,e);if(Tt(e))hs(o,e);else{const{newValue:s,prevValue:a,parentValue:l}=an(o,e),u=Zt(a)||a instanceof Date||Zt(s)||s instanceof Date;if(!u){let h=o;do h.needsExtract=!0,h.recursivelyAutoActivated=!1;while(h=h.parent)}const c=!Mf(s,a),d=!c&&o.isComputing&&!u&&!o.isPlain;!c&&!d||o.isComputing&&o.isPlain&&n.numListenersRecursive===0||qf(n,s,a,o,l,u,i,r,d),$r(n,t,s)}}function Kf(n,t){t===void 0&&Hs(n)&&(t=n.key,n=n.parent);const e=ht(n);yt(e)?Xf(n,e,"splice",t,1):Hr(n,t!=null?t:"_",Us,-1)}function qf(n,t,e,r,i,o,s,a,l){r||(r=n),$s(),o===void 0&&(o=Zt(t));let u,c,d=l||o,h=!1;(!o||e&&!Zt(e))&&(d=d||Pu(r,t,e),yt(t)?u=t:(kt(t)||hn(t))&&(c=t)),yt(i)?u=i:(kt(i)||hn(i))&&(c=i),u?h=(u==null?void 0:u.length)!==(e==null?void 0:e.length):c&&(h=(c==null?void 0:c.size)!==(e==null?void 0:e.size)),(o||!t||ls(t)&&!ls(e)?t!==e:d)&&Gi(o&&s?n:r,t,e,(a!=null?a:e===void 0)?-1:d?0:1,h),Jr()}function Ur(n,t,e){const r=n.numGets=(n.numGets||0)+1;n.state||(n.state=xu({isLoaded:!1},0,Ur,se)),t.then(i=>{r>=(n.getNumResolved||0)&&(n.getNumResolved=n.numGets,e?e({value:i}):Oe(n,i),n.state.assign({isLoaded:!0,error:void 0}))}).catch(i=>{n.state.error.set(i)})}function $r(n,t,e){if($e(e)){const r=Le(n,t);return Ur(r,e),void an(r,void 0)}if(Tt(e)){const r=()=>e;td(n,t,r);const i=Le(n,t,r),o=Zr(po(e));return hs(i,e),an(i,o),ht(i)}if(typeof e=="function")return td(n,t,e),t}function js(n,t){return Vo(n,t?je(t)?t.shallow:t:void 0),Zr(n)}function Zr(n){return Qn(n,!0)}var Io=!1;function Qn(n,t){var e;if(Io=!0,t&&((e=n.dirtyChildren)==null?void 0:e.size)){const i=Array.from(n.dirtyChildren);n.dirtyChildren.clear(),i.forEach(o=>o.dirtyFn&&Qn(o))}if(n.dirtyFn){const i=n.dirtyFn;n.dirtyFn=void 0,Nt.dirtyNodes.delete(n),i()}Io=!1;let r=ht(n);return n.root.isLoadingLocal||n.isPlain||(r=function(i,o,s){const a=o,l=i.lazy;if(l){const u=i.lazyFn;if(delete i.lazy,Z(u))if(u.length===1)o={};else{if(i.parent){const c=ht(i.parent);Z(o)&&(c?delete c[i.key]:i.root._=void 0)}o=function(c,d){let h,p,f,m=!0;const E=d;let g,_,A=[];function T(){c.dirtyFn=_,Nt.dirtyNodes.add(c)}const S=Xi(()=>{var v,C,R,D;if(m)m=!1,Z(ht(c))&&an(c,void 0);else if(!Io&&_&&function(I,F){if(!Io&&!function($){var X,V;let z=$,q=$.numListenersRecursive>0;for(;z&&!q;)((X=z.listeners)!=null&&X.size||(V=z.listenersImmediate)!=null&&V.size)&&(q=!0),z=z.parent;return q}(I)){F&&(I.dirtyFn=F);let $=I;for(;$;)$.dirtyChildren||($.dirtyChildren=new Set),$.dirtyChildren.add(I),$=$.parent;return!0}}(c,_))return void(f=!0);let O=E(),k=!1;const w=Tt(O);(w||c.linkedToNode)&&(k=w,O=hs(c,O)),Z(O)&&O.length===0&&(O=O());const U=w||O==null?void 0:O[Vi];if(U&&(c.activationState=U,O=void 0),f=!1,p=$e(O),c.activated){if(c.activationState){const I=c.activationState;(C=(v=c.state)==null?void 0:v.peek())!=null&&C.sync?(c.state.sync(),f=!0):O=(D=(R=I.get)==null?void 0:R.call(I))!=null?D:I.initial}}else{c.activated=!0;let I=qD;U!=null&&U.synced&&(I=Nt.activateSyncedNode,f=!0);const F=I(c,O);h=F.update;let j=F.value;!k&&Tt(j)&&(j=hs(c,j)),O=j!=null?j:U==null?void 0:U.initial}return f&&(g=O),p=p||$e(O),O},v=>{const{value:C,nodes:R,refresh:D}=v;if(_=D,!f){if(!p||!Nt.isLoadingRemote)if(p)if(c.activationState){const{initial:O}=c.activationState;C&&$e(C)&&Ur(c,C,h),Z(ht(c))&&an(c,O!=null?O:void 0)}else c.activated&&(Ur(c,C,h),Z(ht(c))&&an(c,void 0));else{g=C;const O=c.state.isLoaded.peek();!O&&Z(C)||(c.isComputing=!0,Oe(c,C),c.isComputing=!1),O||c.state.assign({isLoaded:!0,error:void 0})}A.forEach(O=>O()),A=[],R==null||R.forEach(({node:O,track:k})=>{A.push(yn(O,T,{immediate:!0,trackingType:k}))})}v.cancel=!0},{fromComputed:!0});return c.activatedObserveDispose=()=>{S==null||S(),A.forEach(v=>v())},g}(i,u)}else Tt(o)&&(o=$r(i.parent,i.key,o))}return xf(i,o),!l&&!i.needsExtract||i.isPlain||Tt(o)||Zt(o)||(s&&function(u,c){if(!c.recursivelyAutoActivated&&(je(u)||yt(u))&&!zi(u)){c.recursivelyAutoActivated=!0;const d=[];Qf(u,d,()=>{var p;let f=c;for(let m=0;m<d.length;m++){const E=d[m],g=(p=ht(f))==null?void 0:p[E];f=Le(f,E,Z(g)?g:void 0),Qn(f)}return f})}}(o,i),i.parent&&$r(i.parent,i.key,a)),o}(n,r,!!t)),r}function Jf(n){var t,e;(t=n.activatedObserveDispose)==null||t.call(n),(e=n.linkedToNodeDispose)==null||e.call(n),n.activatedObserveDispose=n.linkedToNodeDispose=n.linkedToNode=void 0}function Zf(n,t){Jf(n),n.lazyFn=t,n.lazy=!0}function qD(n,t){if(n.state||(n.state=xu({isLoaded:!1},0,Ur,se)),n.activationState){const{set:e,get:r,initial:i}=n.activationState;if((t=r==null?void 0:r())!=null&&t!==null||(t=i),e){let o,s=[],a=0;const l=u=>{if(s.length>0){let c,d,h,p=!1,f=!1;u?(c=u.changes,d=u.value,p=u.isFromPersist,f=u.isFromSync,h=u.getPrevious):(c=s,d=o,h=Mu(d,c)),s=[],o=void 0,Nt.pendingNodes.delete(n),a++;const m=a,E=()=>{m===a&&(n.isComputing=!0,e({value:d,changes:c,isFromPersist:p,isFromSync:f,getPrevious:h}),n.isComputing=!1)};zf(n.state.isLoaded,E,!0)}};yn(n,({value:u,changes:c})=>{n.isComputing||(c.length>1||!Z(c[0].prevAtPath))&&(o=u,s.length>0&&(c=c.filter(d=>!Bf(s[0].path,d.path))),s.push(...c),Nt.pendingNodes.set(n,l))},{immediate:!0}),yn(n,l)}}return{update:({value:e})=>{n.isComputing||(n.isComputing=!0,Oe(n,e),n.isComputing=!1)},value:t}}function hs(n,t){var e;const r=t?po(t):void 0;return r!==n&&(r==null?void 0:r.linkedToNode)!==n&&(n.linkedToNode=r,(e=n.linkedToNodeDispose)==null||e.call(n),r&&(r.linkedFromNodes||(r.linkedFromNodes=new Set),r.linkedFromNodes.add(n),n.linkedToNodeDispose=yn(r,()=>{Z(t=Qn(r))||Oe(n,t)},{initial:!0},new Set([n])))),t}function Qf(n,t,e){var r;if((je(n)||yt(n))&&!zi(n)&&!If(n)){for(const i in n)if(bu.call(n,i)){const o=n[i];if(Tt(o)){const s=e();$r(s,i,o),delete s.lazy}else{const s=Z(o)&&((r=o.prototype)==null?void 0:r[Vi]);if(s){const a=s.activate;(!a||a==="auto")&&Zr(Le(e(),i,o))}}typeof o=="object"&&(t.push(i),Qf(o,t,e),t.pop())}}}var ad=["get","set","peek","onChange","toggle"];function yr(n){this._node=n;for(let t=0;t<ad.length;t++){const e=ad[t];this[e]=this[e].bind(this)}}function Ro(n,t){yr.prototype[n]=function(...e){return t.call(this,this._node,...e)}}function Ot(n){return xu(n,0,Ur,se,yr)}Ro("peek",n=>(Al(),Zr(n))),Ro("get",(n,t)=>(Al(),js(n,t))),Ro("set",Oe),Ro("onChange",yn),Object.defineProperty(yr.prototype,Pr,{configurable:!0,get(){return this._node}}),yr.prototype.toggle=function(){const n=this.peek();(n==null||Cf(n))&&this.set(!n)},yr.prototype.delete=function(){return this.set(void 0),this};var Ys={createPreviousHandler:Mu,clone:kf,deactivateNode:Jf,deepMerge:us,ensureNodeValue:wu,findIDKey:Ff,get:js,getChildNode:Le,getKeys:El,getNode:po,getNodeValue:ht,getPathType:Rf,getProxy:se,getValueAtPath:function(n,t){return t.reduce(jD,n)},globalState:Nt,initializePathType:Fu,ObservablePrimitiveClass:yr,observableProperties:Dl,observableFns:_l,optimized:ku,peek:Zr,reactivateNode:Zf,registerMiddleware:function(n,t,e){let r=_r.get(n);r||(r=new Map,_r.set(n,r));let i=r.get(t);return i||(i=new Set,r.set(t,i)),i.add(e),()=>{const o=_r.get(n);if(!o)return;const s=o.get(t);s&&(s.delete(e),s.size===0&&(o.delete(t),o.size===0&&_r.delete(n)))}},safeParse:bf,safeStringify:Lf,set:Oe,setAtPath:Pf,setNodeValue:an,symbolLinked:Vi,symbolDelete:Us,tracking:Or},{globalState:ld,observableProperties:JD,observableFns:ZD,ObservablePrimitiveClass:ud}=Ys;class tm extends Error{}function cd(n,t){if(!n)throw new tm(t!=null?t:"Assertion failed")}const pt=Object.assign(cd,{is:function(n,t,e){return cd(t,e)},unreachable:function(){throw new Error("Unreachable code")},never:function(n){throw new Error("Unreachable")},defined:function(n){if(n==null)throw new tm("Value is not defined")}});class Vs{constructor(t={}){this._handlers=new Set,this._meta=t}meta(t){return new Vs(t)}_emit(t,e){for(const r of this._handlers)r({level:t,data:e,timestamp:Date.now(),meta:this._meta})}error(...t){return this._emit("error",t)}warn(...t){return this._emit("warn",t)}info(...t){return this._emit("info",t)}log(...t){return this._emit("log",t)}trace(...t){return this._emit("trace",t)}registerHandler(t){return this._handlers.add(t),()=>this._handlers.delete(t)}}const ps=new Vs,rn=new Vs,QD="https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/+esm",Bu=function(n){let t;return()=>(t===void 0&&(t={value:n()}),t.value)}(async function(){if(typeof window=="undefined"||window.document===void 0)return new Promise(()=>{});try{const n=await import(QD);return await new n.Database().ready(),n}catch(n){return ps.error("Failed to load emoji picker:",n),new Promise(()=>{})}});function dd(n,t,e){return n.clearRect(0,0,100,100),n.fillStyle=e,n.fillText(t,0,0),n.getImageData(0,0,1,1).data.join(",")}function hd(n){const t=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}(),e=dd(t,n,"#fff"),r=dd(t,n,"#000");return r===e&&!r.startsWith("0,0,0,")}const t_=co(null),Aa={didCatch:!1,error:null};class em extends Ae{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=Aa}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(t!==null){for(var e,r,i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];(e=(r=this.props).onReset)===null||e===void 0||e.call(r,{args:o,reason:"imperative-api"}),this.setState(Aa)}}componentDidCatch(t,e){var r,i;(r=(i=this.props).onError)===null||r===void 0||r.call(i,t,e)}componentDidUpdate(t,e){const{didCatch:r}=this.state,{resetKeys:i}=this.props;var o,s;r&&e.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]))}(t.resetKeys,i)&&((o=(s=this.props).onReset)===null||o===void 0||o.call(s,{next:i,prev:t.resetKeys,reason:"keys"}),this.setState(Aa))}render(){const{children:t,fallbackRender:e,FallbackComponent:r,fallback:i}=this.props,{didCatch:o,error:s}=this.state;let a=t;if(o){const l={error:s,resetErrorBoundary:this.resetErrorBoundary};if(typeof e=="function")a=e(l);else if(r)a=dt(r,l);else{if(i===void 0)throw s;a=i}}return dt(t_.Provider,{value:{didCatch:o,error:s,resetErrorBoundary:this.resetErrorBoundary}},a)}}var Lo=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function e_(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function Hu(n){if(n.__esModule)return n;var t=n.default;if(typeof t=="function"){var e=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};e.prototype=t.prototype}else e={};return Object.defineProperty(e,"__esModule",{value:!0}),Object.keys(n).forEach(function(r){var i=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(e,r,i.get?i:{enumerable:!0,get:function(){return n[r]}})}),e}var nm={exports:{}},pd={};const rm=Hu(kD);var jr=rm,n_=typeof Object.is=="function"?Object.is:function(n,t){return n===t&&(n!==0||1/n==1/t)||n!=n&&t!=t},r_=jr.useState,i_=jr.useEffect,o_=jr.useLayoutEffect,s_=jr.useDebugValue;function Oa(n){var t=n.getSnapshot;n=n.value;try{var e=t();return!n_(n,e)}catch(r){return!0}}var a_=typeof window=="undefined"||window.document===void 0||window.document.createElement===void 0?function(n,t){return t()}:function(n,t){var e=t(),r=r_({inst:{value:e,getSnapshot:t}}),i=r[0].inst,o=r[1];return o_(function(){i.value=e,i.getSnapshot=t,Oa(i)&&o({inst:i})},[n,e,t]),i_(function(){return Oa(i)&&o({inst:i}),n(function(){Oa(i)&&o({inst:i})})},[n]),s_(e),e};pd.useSyncExternalStore=jr.useSyncExternalStore!==void 0?jr.useSyncExternalStore:a_,nm.exports=pd;var l_=nm.exports,fd=!1,Ol={inObserver:!1},md=void 0,u_=()=>md||(md=co(null));function Ed(n){const t=Gf(n);if(!he.use)throw t;he.use(t)}function it(n,t){let e;if(Ol.inObserver&&Tt(n)&&!(t!=null&&t.suspense))return e=ln(n,t),t!=null&&t.suspense&&e===void 0&&Ed(n),e;try{const r=qr(u_()),i=Q(()=>function(l,u){let c,d,h,p,f,m=0;const E=()=>{d==null||d();const{value:_,dispose:A,resubscribe:T}=Vf(h,g,l,void 0,void 0);return d=A,_},g=({value:_})=>{if(u!=null&&u.peek()){const A=f;f=_,A===void 0&&Gf(()=>!u.get(),()=>{const T=f;f=void 0,g({value:T})})}else{let A=l==null?void 0:l.skipCheck;if(!A){const T=E();(T!==p||!Zt(T)&&T===_)&&(A=!0)}A&&(m++,c==null||c())}};return{subscribe:_=>(c=_,()=>{d==null||d(),d=void 0}),getVersion:()=>m,run:_=>(h=_,p=E())}}(t,r),[]),{subscribe:o,getVersion:s,run:a}=i;e=a(n),l_.useSyncExternalStore(o,s,s)}catch(r){throw r}return t!=null&&t.suspense&&e===void 0&&Ed(n),e}var gd=typeof Symbol=="function"&&Symbol.for;function im(n,t,e,r,i){const o=gd?Symbol.for("react.forward_ref"):Re(f=>null).$$typeof,s=gd?Symbol.for("react.memo"):dn(f=>null).$$typeof;if(n.__legend_proxied)return n;let a=!1,l=!1,u=n;s&&u.$$typeof===s&&u.type&&(l=!0,u=u.type),o&&u.$$typeof===o&&(a=!0,u=u.render);const c=r?new Set(r):void 0,d={apply(f,m,E){if(e){const g=E[0],_={},A=Object.keys(g);for(let T=0;T<A.length;T++){const S=A[T],v=g[S],C=c&&c.has(S);if(S==="children"&&(Z(v)||Tt(v)))_[S]=it(v,{skipCheck:!0});else if(C||S.startsWith("$")||S.endsWith("$")){const R=C?S:S.endsWith("$")?S.slice(0,-1):S.slice(1),D=i==null?void 0:i[R],O=D&&Tt(v);if(_[R]=O&&(D!=null&&D.selector)?D.selector(_,v):it(v),O&&(D.defaultValue!==void 0&&_[R]===void 0&&(_[R]=D.defaultValue),D.handler&&D.getValue)){const k=w=>{var U;v.set(D.getValue(w)),(U=g[D.handler])==null||U.call(g,w)};_[D.handler]=et(k,[g[D.handler],i])}C||delete _[S]}else _[S]===void 0&&(_[S]=v)}E[0]=_}return t?it(()=>{Ol.inObserver=!0;try{return Reflect.apply(f,m,E)}finally{Ol.inObserver=!1}},{skipCheck:!0}):Reflect.apply(f,m,E)}},h=new Proxy(u,d);let p;return a?(p=Re(h),p.__legend_proxied=!0):p=h,t||l?dn(p):p}var{findIDKey:c_,getNode:d_,optimized:h_}=Ys,Dd=new Map;function Tl({each:n,optimized:t,item:e,itemProps:r,sortValues:i,children:o}){var s;if(!n)return null;const a=it(()=>n.get(!t||h_));if(!e&&o){const u=tt();u.current=o,e=Q(()=>{return c=({item$:d,id:h})=>u.current(d,h),im(c,!0);var c},[])}else if(e.$$typeof!==Symbol.for("react.memo")){let u=Dd.get(e);u||(u=dn(e),Dd.set(e,u)),e=u}if(!a)return null;const l=[];if(yt(a)){const u=a[0],c=d_(n),d=a.length,h=d>0?c&&c_(u,c)||(u.id!==void 0?"id":u.key!==void 0?"key":void 0):void 0,p=Z(h);for(let f=0;f<d;f++)if(a[f]){const m=a[f],E=(s=p?h(m):m[h])!=null?s:f,g=n[f],_={key:E,id:E,item$:g,item:g};l.push(dt(e,r?Object.assign(_,r):_))}}else{const u=kt(a),c=u?Array.from(a.keys()):Object.keys(a);i&&c.sort((d,h)=>i(u?a.get(d):a[d],u?a.get(h):a[h],d,h));for(let d=0;d<c.length;d++){const h=c[d];if(u?a.get(h):a[h]){const p=u?n.get(h):n[h],f={key:h,id:h,item$:p,item:p};l.push(dt(e,r?Object.assign(f,r):f))}}}return l}dn(function({children:n}){return it(()=>ln(ln(n)),{skipCheck:!0})},(n,t)=>!t.scoped||n.children===t.children);var _d=new Map,Ad=new Map;new Proxy({},{get(n,t){if(!n[t]){const e=_d.get(t)||t,r=Re((i,o)=>{const s={...i};return!o||!Z(o)&&ls(o)||(s.ref=o),dt(e,s)});n[t]=function(i,o,s){return im(i,!1,!0,o,s)}(r,[],Ad.get(t))}return n[t]}}),function(n){(function(t){if(fd)return;fd=!0;const e={value:{handler:"onChange",getValue:i=>i.target.value,defaultValue:""}},r=Object.assign({checked:{handler:"onChange",getValue:i=>i.target.checked}},e);t({binders:{input:r,textarea:e,select:e}})})(n)}(function({components:n,binders:t}){if(n)for(const e in n)_d.set(e,n[e]);if(t)for(const e in t)Ad.set(e,t[e])});var p_=(n,t)=>{G(n,t)};function om(n){return p_(()=>{const t=n();if(!$e(t))return t},[])}var f_=om,{deactivateNode:m_}=Ys;function Ce(n,t){var e;const r=tt({});r.current.value=n;const i=t?Ce(t):void 0;if(!((e=r.current)!=null&&e.obs$)){const o=i?Z(n)&&n.length===1?s=>(i.get(),r.current.value(s)):()=>(i.get(),ln(r.current.value)):n;r.current.obs$=Ot(o)}return i&&i.set(t),function(o){om(()=>o)}(()=>{const o=r.current.obs$;if(o){const s=po(o);m_(s)}}),r.current.obs$}function Yr(n,t,e,r){let i;Z(t)?i=t:Array.isArray(t)?(r=t,e=void 0):e=t,i&&Array.isArray(e)&&(r=e,e=void 0),r=r||(e==null?void 0:e.deps);const o=tt({}),s=r?Ce(r):void 0;o.current.selector=n,o.current.reaction=i,s&&s.set(r),f_(()=>Xi(a=>{var l;return s==null||s.get(),ln((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)},e))}const[sm,ke]=Xe(),[am,fo]=Xe(),[lm,lv]=Xe(),[um,mo]=Xe(),[E_,g_]=Xe(),[cm,ft]=Xe(),[dm,Eo]=Xe(),[hm,pm]=Xe(),[fm,D_]=Xe(),[__,Uu]=Xe();function Xe(){const n=co(void 0);return[n,()=>{const t=qr(n);return pt(t!==void 0),t}]}const b={code:"en-US",name:"English (US)",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:n=>`${n} 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",CHAT_NOT_FOUND:"Chat 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",REPLY_TO_ARIA_LABEL:(n,t)=>`Replying to ${n}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Exit reply mode",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:"Active",STATUS_INDICATOR_OFFLINE:"Away",CONTACT_INFORMATION_HIDDEN:"hidden information"}},A_={code:"ar",name:"Arabic",translation:{YESTERDAY:"الأمس",TODAY:"اليوم",DAYS:"يوم",HOURS:"ساعة",MINUTES:"دقيقة",JUST_NOW:"فقط الآن",LOCATION:"الموقع",CANCEL:"إلغاء",INBOX:"علبة الوارد",DESKTOP_NOTIFICATIONS:"إشعارات المتصفح",DESKTOP_NOTIFICATIONS_ERROR:"لا يمكن تمكين إشعارات المتصفح لأن متصفحك يمنعها بشكل نشط. جرّب البحث في الإعدادات أو استخدام متصفح آخر.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:n=>`إعلام ${n} التجريبي`,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:"لا يوجد المزيد من النتائج",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:"وضع علامة غير مقروءة",REPLY_TO_ARIA_LABEL:b.translation.REPLY_TO_ARIA_LABEL,REPLY_MODE_LEAVE_ARIA_LABEL:b.translation.REPLY_MODE_LEAVE_ARIA_LABEL,STATUS_INDICATOR_ONLINE:b.translation.STATUS_INDICATOR_ONLINE,STATUS_INDICATOR_OFFLINE:b.translation.STATUS_INDICATOR_OFFLINE}},O_={code:"bg-BG",name:"Bulgarian",translation:{YESTERDAY:"Вчера",TODAY:"Днес",DAYS:"Ден",HOURS:"Час",MINUTES:"m",JUST_NOW:"Току-що",LOCATION:"местоположението",CANCEL:"Откажи",INBOX:"Кутия",DESKTOP_NOTIFICATIONS:"Известия на браузъра",DESKTOP_NOTIFICATIONS_ERROR:"Не можете да активирате известията на браузъра, защото браузърът ви ги блокира активно. Опитайте да погледнете в настройките или да използвате друг браузър.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:n=>`${n} демо известие`,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:"Няма повече резултати",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:"Маркирай като непрочетено",REPLY_TO_ARIA_LABEL:b.translation.REPLY_TO_ARIA_LABEL,REPLY_MODE_LEAVE_ARIA_LABEL:b.translation.REPLY_MODE_LEAVE_ARIA_LABEL,STATUS_INDICATOR_ONLINE:b.translation.STATUS_INDICATOR_ONLINE,STATUS_INDICATOR_OFFLINE:b.translation.STATUS_INDICATOR_OFFLINE}},T_={code:"bs-BA",name:"Bosnian",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:n=>`${n} 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",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",REPLY_TO_ARIA_LABEL:b.translation.REPLY_TO_ARIA_LABEL,REPLY_MODE_LEAVE_ARIA_LABEL:b.translation.REPLY_MODE_LEAVE_ARIA_LABEL,STATUS_INDICATOR_ONLINE:b.translation.STATUS_INDICATOR_ONLINE,STATUS_INDICATOR_OFFLINE:b.translation.STATUS_INDICATOR_OFFLINE}},S_={code:"ca-ES",name:"Catalan (ES)",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:n=>`Notificació de demostració de ${n}`,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",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",REPLY_TO_ARIA_LABEL:(n,t)=>`Responent a ${n}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Sortir del mode de resposta",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"}},v_={code:"cs-CZ",name:"Czech",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:n=>`${n} 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",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é",REPLY_TO_ARIA_LABEL:b.translation.REPLY_TO_ARIA_LABEL,REPLY_MODE_LEAVE_ARIA_LABEL:b.translation.REPLY_MODE_LEAVE_ARIA_LABEL,STATUS_INDICATOR_ONLINE:b.translation.STATUS_INDICATOR_ONLINE,STATUS_INDICATOR_OFFLINE:b.translation.STATUS_INDICATOR_OFFLINE}},N_={code:"da-DK",name:"Danish",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:n=>`${n} 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",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",REPLY_TO_ARIA_LABEL:b.translation.REPLY_TO_ARIA_LABEL,REPLY_MODE_LEAVE_ARIA_LABEL:b.translation.REPLY_MODE_LEAVE_ARIA_LABEL,STATUS_INDICATOR_ONLINE:b.translation.STATUS_INDICATOR_ONLINE,STATUS_INDICATOR_OFFLINE:b.translation.STATUS_INDICATOR_OFFLINE}},C_={code:"de-DE",name:"German",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:n=>`${n} 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",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",REPLY_TO_ARIA_LABEL:b.translation.REPLY_TO_ARIA_LABEL,REPLY_MODE_LEAVE_ARIA_LABEL:b.translation.REPLY_MODE_LEAVE_ARIA_LABEL,STATUS_INDICATOR_ONLINE:b.translation.STATUS_INDICATOR_ONLINE,STATUS_INDICATOR_OFFLINE:b.translation.STATUS_INDICATOR_OFFLINE}},y_={code:"el-GR",name:"Greek (Greece)",translation:{YESTERDAY:"Χθές",TODAY:"Σήμερα",DAYS:"Ημέρες",HOURS:"'Ωρες",MINUTES:"Λεπτά",JUST_NOW:"Μόλις τώρα",LOCATION:"Τοποθεσία",CANCEL:"Ακύρωση",INBOX:"Εισερχόμενα",DESKTOP_NOTIFICATIONS:"Ειδοποιήσεις περιηγητή",DESKTOP_NOTIFICATIONS_ERROR:"Δεν είναι δυνατή η ενεργοποίηση των ειδοποιήσεων του προγράμματος περιήγησης, επειδή το πρόγραμμα περιήγησης τις αποκλείει ενεργά. Δοκιμάστε να τσεκάρετε τις ρυθμίσεις ή να χρησιμοποιήσετε διαφορετικό πρόγραμμα περιήγησης.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:n=>`${n} Δοκιμαστική επίδειξη`,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:"Δεν υπάρχουν περισσότερα αποτελέσματα",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:"Επισήμανση ως μη αναγνωσμένα",REPLY_TO_ARIA_LABEL:b.translation.REPLY_TO_ARIA_LABEL,REPLY_MODE_LEAVE_ARIA_LABEL:b.translation.REPLY_MODE_LEAVE_ARIA_LABEL,STATUS_INDICATOR_ONLINE:b.translation.STATUS_INDICATOR_ONLINE,STATUS_INDICATOR_OFFLINE:b.translation.STATUS_INDICATOR_OFFLINE}},I_={code:"es-ES",name:"Spanish",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:n=>`${n} 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",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",REPLY_TO_ARIA_LABEL:b.translation.REPLY_TO_ARIA_LABEL,REPLY_MODE_LEAVE_ARIA_LABEL:b.translation.REPLY_MODE_LEAVE_ARIA_LABEL,STATUS_INDICATOR_ONLINE:b.translation.STATUS_INDICATOR_ONLINE,STATUS_INDICATOR_OFFLINE:b.translation.STATUS_INDICATOR_OFFLINE}},R_={code:"et-EE",name:"Estonian",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:n=>`${n} 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 ",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",REPLY_TO_ARIA_LABEL:b.translation.REPLY_TO_ARIA_LABEL,REPLY_MODE_LEAVE_ARIA_LABEL:b.translation.REPLY_MODE_LEAVE_ARIA_LABEL,STATUS_INDICATOR_ONLINE:b.translation.STATUS_INDICATOR_ONLINE,STATUS_INDICATOR_OFFLINE:b.translation.STATUS_INDICATOR_OFFLINE}},L_={code:"fa",name:"Persian (Farsi)",translation:{YESTERDAY:"دیروز",TODAY:"امروز",DAYS:"روز",HOURS:"ساعت",MINUTES:"دقیقه",JUST_NOW:"هم اکنون",LOCATION:"مکان",CANCEL:"لغو",INBOX:"صندوق",DESKTOP_NOTIFICATIONS:"اطلاعیههای مرورگر",DESKTOP_NOTIFICATIONS_ERROR:"خطا در فعال سازی اعلان های مرورگر، مرورگر شما آنها را مسدود می کند سعی کنید تنظیمات مرورگر را تغییر دهید یا از یک مرورگر دیگر استفاده کنید.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:n=>`نوتیفیکیشن دمو ${n}`,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:"نتیجه بیشتری وجود ندارد",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:"به عنوان خوانده نشده علامت گذاری کن",REPLY_TO_ARIA_LABEL:b.translation.REPLY_TO_ARIA_LABEL,REPLY_MODE_LEAVE_ARIA_LABEL:b.translation.REPLY_MODE_LEAVE_ARIA_LABEL,STATUS_INDICATOR_ONLINE:b.translation.STATUS_INDICATOR_ONLINE,STATUS_INDICATOR_OFFLINE:b.translation.STATUS_INDICATOR_OFFLINE}},b_={code:"fi-FI",name:"Finnish",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:n=>`${n} 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",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",REPLY_TO_ARIA_LABEL:b.translation.REPLY_TO_ARIA_LABEL,REPLY_MODE_LEAVE_ARIA_LABEL:b.translation.REPLY_MODE_LEAVE_ARIA_LABEL,STATUS_INDICATOR_ONLINE:b.translation.STATUS_INDICATOR_ONLINE,STATUS_INDICATOR_OFFLINE:b.translation.STATUS_INDICATOR_OFFLINE}},k_={code:"fr-FR",name:"French",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:n=>`Notification de démonstration ${n}`,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:"Ecrivez quelque chose...",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",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",REPLY_TO_ARIA_LABEL:b.translation.REPLY_TO_ARIA_LABEL,REPLY_MODE_LEAVE_ARIA_LABEL:b.translation.REPLY_MODE_LEAVE_ARIA_LABEL,STATUS_INDICATOR_ONLINE:b.translation.STATUS_INDICATOR_ONLINE,STATUS_INDICATOR_OFFLINE:b.translation.STATUS_INDICATOR_OFFLINE}},w_={code:"he-IL",name:"Hebrew",translation:{YESTERDAY:"אתמול",TODAY:"היום",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"עכשיו",LOCATION:"מיקום",CANCEL:"בטל",INBOX:"דואר נכנס",DESKTOP_NOTIFICATIONS:"התראות דפדפן",DESKTOP_NOTIFICATIONS_ERROR:"לא ניתן להפעיל התראות במרועה דפדפן מכיוון שהדפדפן שלך חוסם אותן באופן פעיל. נסה להסתכל בהגדרות או להשתמש בדפדפן אחר.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:n=>`${n} הודעה על הדגמה`,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:"אין תוצאות נוספות",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:"סמן כלא נקרא",REPLY_TO_ARIA_LABEL:b.translation.REPLY_TO_ARIA_LABEL,REPLY_MODE_LEAVE_ARIA_LABEL:b.translation.REPLY_MODE_LEAVE_ARIA_LABEL,STATUS_INDICATOR_ONLINE:b.translation.STATUS_INDICATOR_ONLINE,STATUS_INDICATOR_OFFLINE:b.translation.STATUS_INDICATOR_OFFLINE}},F_={code:"hi-IN",name:"Hindi (IN)",translation:{YESTERDAY:"कल",TODAY:"आज",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"अभी",LOCATION:"जगह",CANCEL:"रद्द करें",INBOX:"इनबॉक्स",DESKTOP_NOTIFICATIONS:"ब्राउज़र सूचनाएं",DESKTOP_NOTIFICATIONS_ERROR:"ब्राउज़र सूचनाएं सक्षम नहीं कर सकता क्योंकि आपका ब्राउज़र सक्रिय रूप से उन्हें ब्लॉक करता है। सेटिंग्स में देखने या एक अलग ब्राउज़र का उपयोग करने का प्रयास करें।",DESKTOP_NOTIFICATIONS_DEMO_TITLE:n=>`${n} डेमो अधिसूचना`,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:"और कोई परिणाम नहीं",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:"अपठित के रूप में चिह्नित करें",REPLY_TO_ARIA_LABEL:b.translation.REPLY_TO_ARIA_LABEL,REPLY_MODE_LEAVE_ARIA_LABEL:b.translation.REPLY_MODE_LEAVE_ARIA_LABEL,STATUS_INDICATOR_ONLINE:b.translation.STATUS_INDICATOR_ONLINE,STATUS_INDICATOR_OFFLINE:b.translation.STATUS_INDICATOR_OFFLINE}},M_={code:"hr-HR",name:"Croatian",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:n=>`${n} 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",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",REPLY_TO_ARIA_LABEL:b.translation.REPLY_TO_ARIA_LABEL,REPLY_MODE_LEAVE_ARIA_LABEL:b.translation.REPLY_MODE_LEAVE_ARIA_LABEL,STATUS_INDICATOR_ONLINE:b.translation.STATUS_INDICATOR_ONLINE,STATUS_INDICATOR_OFFLINE:b.translation.STATUS_INDICATOR_OFFLINE}},x_={code:"hu-HU",name:"Hungarian",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:n=>`${n} 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",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",REPLY_TO_ARIA_LABEL:b.translation.REPLY_TO_ARIA_LABEL,REPLY_MODE_LEAVE_ARIA_LABEL:b.translation.REPLY_MODE_LEAVE_ARIA_LABEL,STATUS_INDICATOR_ONLINE:b.translation.STATUS_INDICATOR_ONLINE,STATUS_INDICATOR_OFFLINE:b.translation.STATUS_INDICATOR_OFFLINE}},P_={code:"id-ID",name:"Bahasa Indonesia",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:n=>`pemberitahuan demo ${n}`,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",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",REPLY_TO_ARIA_LABEL:b.translation.REPLY_TO_ARIA_LABEL,REPLY_MODE_LEAVE_ARIA_LABEL:b.translation.REPLY_MODE_LEAVE_ARIA_LABEL,STATUS_INDICATOR_ONLINE:b.translation.STATUS_INDICATOR_ONLINE,STATUS_INDICATOR_OFFLINE:b.translation.STATUS_INDICATOR_OFFLINE}},B_={code:"is-IS",name:"Íslenska",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:n=>`${n} 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",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",REPLY_TO_ARIA_LABEL:(n,t)=>`Svara ${n}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Fara úr svari",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"}},H_={code:"it-IT",name:"Italian",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:n=>`${n} 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",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",CONTACT_INFORMATION_HIDDEN:"Informazioni nascoste",LEAVE_CONVERSATION:"Abbandona la conversazione",MARK_CONVERSATION_AS_UNREAD:"Segna come non letto",REPLY_TO_ARIA_LABEL:b.translation.REPLY_TO_ARIA_LABEL,REPLY_MODE_LEAVE_ARIA_LABEL:b.translation.REPLY_MODE_LEAVE_ARIA_LABEL,STATUS_INDICATOR_ONLINE:b.translation.STATUS_INDICATOR_ONLINE,STATUS_INDICATOR_OFFLINE:b.translation.STATUS_INDICATOR_OFFLINE}},U_={code:"ja-JP",name:"Japanese",translation:{YESTERDAY:"昨日",TODAY:"今日",DAYS:"日前",HOURS:"時間前",MINUTES:"分前",JUST_NOW:"たった今",LOCATION:"場所",CANCEL:"キャンセル",INBOX:"受信箱",DESKTOP_NOTIFICATIONS:"ブラウザの通知",DESKTOP_NOTIFICATIONS_ERROR:"ブラウザの通知はブロックされているため、ブラウザの通知を有効にできません。設定を確認するか、別のブラウザを使用してください。",DESKTOP_NOTIFICATIONS_DEMO_TITLE:n=>`${n} デモ通知`,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:"これ以上結果はありません",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:"未読としてマーク",REPLY_TO_ARIA_LABEL:b.translation.REPLY_TO_ARIA_LABEL,REPLY_MODE_LEAVE_ARIA_LABEL:b.translation.REPLY_MODE_LEAVE_ARIA_LABEL,STATUS_INDICATOR_ONLINE:b.translation.STATUS_INDICATOR_ONLINE,STATUS_INDICATOR_OFFLINE:b.translation.STATUS_INDICATOR_OFFLINE}},$_={code:"ka-GE",name:"Georgian",translation:{YESTERDAY:"გუშინ",TODAY:"დღეს",DAYS:"დღ",HOURS:"სთ",MINUTES:"წთ",JUST_NOW:"ახლა",LOCATION:"ადგილმდებარეობა",CANCEL:"გაუქმება",INBOX:"მიღებული შეტყობინება",DESKTOP_NOTIFICATIONS:"ბრაუზერის შეტყობინებები",DESKTOP_NOTIFICATIONS_ERROR:"შეუძლებელია ბრაუზერის შეტკობინებების ჩართვა. ეს ბრაუზერი ბლოკავს მათ. სცადე ცვლილება ოპციებიდან ან გამოიყენე სხვა ბრაუზერი.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:n=>`${n} შეტყობინებების დემო ვერსია`,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:"სხვა შედეგი ვერ მოიძებნა",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:"წაუკითხავად მონიშვნა",REPLY_TO_ARIA_LABEL:b.translation.REPLY_TO_ARIA_LABEL,REPLY_MODE_LEAVE_ARIA_LABEL:b.translation.REPLY_MODE_LEAVE_ARIA_LABEL,STATUS_INDICATOR_ONLINE:b.translation.STATUS_INDICATOR_ONLINE,STATUS_INDICATOR_OFFLINE:b.translation.STATUS_INDICATOR_OFFLINE}},j_={code:"ko-KR",name:"Korean (South Korea)",translation:{YESTERDAY:"어제",TODAY:"오늘",DAYS:"일 전",HOURS:"시간 전",MINUTES:"분 전",JUST_NOW:"방금",LOCATION:"위치",CANCEL:"취소",INBOX:"대화 목록",DESKTOP_NOTIFICATIONS:"브라우저 알림",DESKTOP_NOTIFICATIONS_ERROR:"브라우저 알림을 표시할 수 없습니다. 브라우저 설정을 확인하거나 다른 브라우저를 사용해주세요.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:n=>`${n} 데모 알림`,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:"추가 검색 결과 없음",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:"읽지 않은 상태로 표시",REPLY_TO_ARIA_LABEL:b.translation.REPLY_TO_ARIA_LABEL,REPLY_MODE_LEAVE_ARIA_LABEL:b.translation.REPLY_MODE_LEAVE_ARIA_LABEL,STATUS_INDICATOR_ONLINE:b.translation.STATUS_INDICATOR_ONLINE,STATUS_INDICATOR_OFFLINE:b.translation.STATUS_INDICATOR_OFFLINE}},Y_={code:"nb-NO",name:"Norwegian (Bokmål)",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:n=>`${n} 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",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",REPLY_TO_ARIA_LABEL:b.translation.REPLY_TO_ARIA_LABEL,REPLY_MODE_LEAVE_ARIA_LABEL:b.translation.REPLY_MODE_LEAVE_ARIA_LABEL,STATUS_INDICATOR_ONLINE:b.translation.STATUS_INDICATOR_ONLINE,STATUS_INDICATOR_OFFLINE:b.translation.STATUS_INDICATOR_OFFLINE}},V_={code:"nl-NL",name:"Dutch",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:n=>`${n} 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",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",CONTACT_INFORMATION_HIDDEN:"verborgen informatie",LEAVE_CONVERSATION:"Gesprek verlaten",MARK_CONVERSATION_AS_UNREAD:"Markeren als ongelezen",REPLY_TO_ARIA_LABEL:b.translation.REPLY_TO_ARIA_LABEL,REPLY_MODE_LEAVE_ARIA_LABEL:b.translation.REPLY_MODE_LEAVE_ARIA_LABEL,STATUS_INDICATOR_ONLINE:b.translation.STATUS_INDICATOR_ONLINE,STATUS_INDICATOR_OFFLINE:b.translation.STATUS_INDICATOR_OFFLINE}},z_={code:"pl-PL",name:"Polish",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:n=>`${n} 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",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",REPLY_TO_ARIA_LABEL:b.translation.REPLY_TO_ARIA_LABEL,REPLY_MODE_LEAVE_ARIA_LABEL:b.translation.REPLY_MODE_LEAVE_ARIA_LABEL,STATUS_INDICATOR_ONLINE:b.translation.STATUS_INDICATOR_ONLINE,STATUS_INDICATOR_OFFLINE:b.translation.STATUS_INDICATOR_OFFLINE}},G_={code:"pt-BR",name:"Portuguese (Brazil)",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:n=>`${n} 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",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",CONTACT_INFORMATION_HIDDEN:"Informação oculta",REPLY_TO_ARIA_LABEL:b.translation.REPLY_TO_ARIA_LABEL,REPLY_MODE_LEAVE_ARIA_LABEL:b.translation.REPLY_MODE_LEAVE_ARIA_LABEL,STATUS_INDICATOR_ONLINE:b.translation.STATUS_INDICATOR_ONLINE,STATUS_INDICATOR_OFFLINE:b.translation.STATUS_INDICATOR_OFFLINE}},X_={code:"ro-RO",name:"Romanian (Romania)",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:n=>`Notificare de debit ${n}`,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",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",REPLY_TO_ARIA_LABEL:b.translation.REPLY_TO_ARIA_LABEL,REPLY_MODE_LEAVE_ARIA_LABEL:b.translation.REPLY_MODE_LEAVE_ARIA_LABEL,STATUS_INDICATOR_ONLINE:b.translation.STATUS_INDICATOR_ONLINE,STATUS_INDICATOR_OFFLINE:b.translation.STATUS_INDICATOR_OFFLINE}},W_={code:"ru-RU",name:"Russian",translation:{YESTERDAY:"Вчера",TODAY:"Сегодня",DAYS:"д",HOURS:"ч",MINUTES:"м",JUST_NOW:"только что",LOCATION:"Местоположение",CANCEL:"Отмена",INBOX:"Входящие",DESKTOP_NOTIFICATIONS:"Оповещения",DESKTOP_NOTIFICATIONS_ERROR:"Невозможно включить оповещения, потому что ваш браузер активно блокирует их. Проверьте ваши настройки или попробуйте другой браузер.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:n=>`${n} демо-оповещение`,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:"Больше результатов нет",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:"Отметить как непрочитанное",REPLY_TO_ARIA_LABEL:b.translation.REPLY_TO_ARIA_LABEL,REPLY_MODE_LEAVE_ARIA_LABEL:b.translation.REPLY_MODE_LEAVE_ARIA_LABEL,STATUS_INDICATOR_ONLINE:b.translation.STATUS_INDICATOR_ONLINE,STATUS_INDICATOR_OFFLINE:b.translation.STATUS_INDICATOR_OFFLINE}},K_={code:"sq-AL",name:"Albanian",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:n=>`${n} 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",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",REPLY_TO_ARIA_LABEL:b.translation.REPLY_TO_ARIA_LABEL,REPLY_MODE_LEAVE_ARIA_LABEL:b.translation.REPLY_MODE_LEAVE_ARIA_LABEL,STATUS_INDICATOR_ONLINE:b.translation.STATUS_INDICATOR_ONLINE,STATUS_INDICATOR_OFFLINE:b.translation.STATUS_INDICATOR_OFFLINE}},q_={code:"sr-SP",name:"Serbian",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:n=>`${n} 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",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",REPLY_TO_ARIA_LABEL:(n,t)=>`Odgovarate korisniku ${n}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Izađi iz moda pisanja odgovora",STATUS_INDICATOR_ONLINE:"Aktivan",STATUS_INDICATOR_OFFLINE:"Neaktivan"}},J_={code:"sv-SE",name:"Swedish (Sweden)",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:n=>`${n} 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",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",REPLY_TO_ARIA_LABEL:b.translation.REPLY_TO_ARIA_LABEL,REPLY_MODE_LEAVE_ARIA_LABEL:b.translation.REPLY_MODE_LEAVE_ARIA_LABEL,STATUS_INDICATOR_ONLINE:b.translation.STATUS_INDICATOR_ONLINE,STATUS_INDICATOR_OFFLINE:b.translation.STATUS_INDICATOR_OFFLINE}},Z_={code:"tr-TR",name:"Turkish",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:n=>`${n} 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ı.",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",REPLY_TO_ARIA_LABEL:b.translation.REPLY_TO_ARIA_LABEL,REPLY_MODE_LEAVE_ARIA_LABEL:b.translation.REPLY_MODE_LEAVE_ARIA_LABEL,STATUS_INDICATOR_ONLINE:b.translation.STATUS_INDICATOR_ONLINE,STATUS_INDICATOR_OFFLINE:b.translation.STATUS_INDICATOR_OFFLINE}},Q_={code:"uk-UA",name:"Ukrainian (Ukraine)",translation:{YESTERDAY:"Вчора",TODAY:"Сьогодні",DAYS:"d",HOURS:"h",MINUTES:"м",JUST_NOW:"просто зараз",LOCATION:"Місцезнаходження",CANCEL:"Скасувати",INBOX:"Вхідні",DESKTOP_NOTIFICATIONS:"Сповіщення в браузері",DESKTOP_NOTIFICATIONS_ERROR:"Неможливо ввімкнути сповіщення в браузері, оскільки ваш веб-переглядач активно їх блокує. Спробуйте переглянути налаштування або використовувати інший браузер.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:n=>`Демо-повідомлення про ${n}`,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:"Більше немає результатів",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:"Відзначити як непрочитане",REPLY_TO_ARIA_LABEL:b.translation.REPLY_TO_ARIA_LABEL,REPLY_MODE_LEAVE_ARIA_LABEL:b.translation.REPLY_MODE_LEAVE_ARIA_LABEL,STATUS_INDICATOR_ONLINE:b.translation.STATUS_INDICATOR_ONLINE,STATUS_INDICATOR_OFFLINE:b.translation.STATUS_INDICATOR_OFFLINE}},t0={code:"vi-VN",name:"Vietnamese",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:n=>`${n} 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",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",REPLY_TO_ARIA_LABEL:b.translation.REPLY_TO_ARIA_LABEL,REPLY_MODE_LEAVE_ARIA_LABEL:b.translation.REPLY_MODE_LEAVE_ARIA_LABEL,STATUS_INDICATOR_ONLINE:b.translation.STATUS_INDICATOR_ONLINE,STATUS_INDICATOR_OFFLINE:b.translation.STATUS_INDICATOR_OFFLINE}},e0={code:"zh-CN",name:"Chinese (Simplified)",translation:{YESTERDAY:"昨天",TODAY:"今天",DAYS:"天",HOURS:"小时",MINUTES:"分钟",JUST_NOW:"刚才",LOCATION:"地点",CANCEL:"取消",INBOX:"收件箱",DESKTOP_NOTIFICATIONS:"浏览器通知",DESKTOP_NOTIFICATIONS_ERROR:"因浏览器设置为阻止,所以无法激活浏览器提醒。请去设置里查看或者尝试其他的浏览器。",DESKTOP_NOTIFICATIONS_DEMO_TITLE:n=>`${n} 演示提醒`,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:"无更多结果",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:"标记为未读",REPLY_TO_ARIA_LABEL:b.translation.REPLY_TO_ARIA_LABEL,REPLY_MODE_LEAVE_ARIA_LABEL:b.translation.REPLY_MODE_LEAVE_ARIA_LABEL,STATUS_INDICATOR_ONLINE:b.translation.STATUS_INDICATOR_ONLINE,STATUS_INDICATOR_OFFLINE:b.translation.STATUS_INDICATOR_OFFLINE}},n0={code:"zh-TW",name:"Chinese (Traditional)",translation:{YESTERDAY:"昨天",TODAY:"昨天",DAYS:"天",HOURS:"小時",MINUTES:"分",JUST_NOW:"現在",LOCATION:"地點",CANCEL:"取消",INBOX:"收件箱",DESKTOP_NOTIFICATIONS:"瀏覽器通知",DESKTOP_NOTIFICATIONS_ERROR:"無法啟用瀏覽器通知,因為您的瀏覽器主動阻止它們。 嘗試查看設置或使用其他瀏覽器。",DESKTOP_NOTIFICATIONS_DEMO_TITLE:n=>`${n} 演示通知`,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:"沒有其他結果",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:"標記為未讀",REPLY_TO_ARIA_LABEL:b.translation.REPLY_TO_ARIA_LABEL,REPLY_MODE_LEAVE_ARIA_LABEL:b.translation.REPLY_MODE_LEAVE_ARIA_LABEL,STATUS_INDICATOR_ONLINE:b.translation.STATUS_INDICATOR_ONLINE,STATUS_INDICATOR_OFFLINE:b.translation.STATUS_INDICATOR_OFFLINE}},Od={ar:A_,bg:O_,bs:T_,ca:S_,cs:v_,da:N_,de:C_,el:y_,en:b,es:I_,et:R_,fa:L_,fi:b_,fr:k_,he:w_,hi:F_,hr:M_,hu:x_,id:P_,is:B_,it:H_,ja:U_,ka:$_,ko:j_,nb:Y_,nl:V_,pl:z_,pt:G_,ro:X_,ru:W_,sq:K_,sr:q_,sv:J_,tr:Z_,uk:Q_,vi:t0,zh:e0,zhTw:n0};function mm(n){const t=n.replace(/_/g,"-").toLowerCase(),e=Od[t];if(e)return{...e.translation,locale:t};const r=t.slice(0,2),i=Od[r];return i?{...i.translation,locale:r}:(rn.warn(`User locale '${n}' not supported; falling back to English.`),{...b.translation,locale:"en-US"})}const Em=()=>{const n=document.createElement("canvas");n.width=n.height=1;const t=n.getContext("2d");return t.textBaseline="top",t.font='100px "Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Twemoji Mozilla","Noto Color Emoji","EmojiOne Color","Android Emoji",sans-serif',t.scale(.01,.01),t},Td=(n,t)=>{const e=Em();return e.fillStyle=t,e.fillText(n,0,0),e.getImageData(0,0,1,1).data},r0=n=>!n.includes("")||Em().measureText(n).width<160,i0=(n,t)=>{const e=[...n].join(",");return e===[...t].join(",")&&!e.startsWith("0,0,0,")};function gm(n){try{return function(t){const e=Td(t,"#000"),r=Td(t,"#fff"),i=r0(t);return e&&r&&i&&i0(e,r)}(n)}catch(t){return!0}}var Vp;const Dm=(Vp=globalThis.window)!=null&&Vp.document?function(){if(typeof window=="undefined"||window.E2E)return 16;const n={"":16,"🚶➡️":15.1,"🫨":15,"🫠":14,"😵💫":13.1,"🥲":13,"🧑🦰":12.1,"🥻":12,"🥰":11,"🤩":5,"👱♀️":4,"🤣":3,"👁️🗨️":2,"😀":1,"😐️":.7,"😃":.6};for(const[t,e]of Object.entries(n))if(gm(t))return e}():0;class _m{constructor(t,e){this.currentUser$=Ot(null),this.app$=Ot(null),this.appId$=Ot(null),this.extUserId$=Ot(null),this.authTokenState$=Ot("idle"),this.themeCustom$=Ot(ed({value:void 0})),this.device$=Ot({supportsEmojiPicker:!!Dm,isMobile:typeof window!="undefined"&&/Mobi/i.test(window.navigator.userAgent)}),this.errors$=Ot({unknownConversation:!1,unknownUser:!1,wrongAppId:!1,serverError:!1}),this.t$=Ot(()=>{var s,a;const r=this.extUserId$.get(),i=this.app$.appMetadata.defaultLocale.get(),o=this.currentUser$.locale.get();return mm((a=(s=r&&o)!=null?s:i)!=null?a:"en-US")}),Br(()=>{this.appId$.set(t),this.extUserId$.set(e)})}updateThemeCustom(t){this.themeCustom$.set(ed({value:t}))}listenForErrors(t,e){this.errors$.assign({unknownConversation:!1,unknownUser:!1,wrongAppId:!1,serverError:!1});const r=t.onError(s=>{rn.error(s.message),this.errors$.serverError.set(!0)}),i=t.currentUser.subscribe(s=>{this.errors$.unknownUser.set(s===null)}),o=e&&t.conversation(e).subscribe(s=>{this.errors$.unknownConversation.set(s===null)});return()=>{r.unsubscribe(),i.unsubscribe(),o==null||o.unsubscribe()}}listenForAuthChanges(t,e){let r=!0;this.authTokenState$.peek()!=="loading"&&this.authTokenState$.set("loading"),t._authProvider.getToken().then(()=>{r&&this.authTokenState$.set("valid")});const i=t._authProvider.onTokenRefreshFailed(()=>{r&&this.authTokenState$.set(e?"invalid":"expired")});return()=>{r=!1,i()}}listenForUserAndAppChanges(t,e){let r=!0,i=null;const o=t.currentUser.subscribe(async s=>{if(r&&s&&(this.currentUser$.set(s),s.role!==i)){i=s.role;const a=await e.getApp(s.role);if(!r)return;this.app$.set(a)}});return()=>{r=!1,o.unsubscribe()}}}var $u={};function o0(n){return String.fromCharCode(parseInt(n.slice(1),16))}Object.defineProperty($u,"__esModule",{value:!0});var s0=$u.encode=function(n){return btoa(encodeURIComponent(n).replace(/%[0-9A-F]{2}/g,o0))};function a0(n){return`%${`00${n.charCodeAt(0).toString(16)}`.slice(-2)}`}$u.decode=function(n){return decodeURIComponent(Array.from(atob(n),a0).join(""))};const l0=/[^a-zA-Z\u00C0-\u024F\u1E00-\u1EFF\u0400-\u044f\u0300-\u036e]+/,u0=n=>n.split(l0).filter(t=>t).map(t=>t[0]).join("")||n[Symbol.iterator]().next().value||"";function Am(n){const t=function(e){let r=0;for(let i=0;i<e.length;i++)r=(r<<5)-r+e.charCodeAt(i),r|=0;return Math.abs(r)}(n)%vd.length;return vd[t]}function zs(n,t){const e=t.lastIndex;let r;const i=[];for(;(r=t.exec(n))!==null;)i.push(r);return t.lastIndex=e,i}function Sl(n,t,e){let r=0;const i=[];for(const o of t)o.offset<r||(o.offset>r&&i.push(n.substring(r,o.offset)),i.push(...e(o)),r=o.offset+o.matchedText.length);return r<n.length&&i.push(n.substring(r)),i}function Om(n){try{return new URL(n).hostname}catch(t){return}}function bo(n){const t=n.replace(/%2F/g,"/").replace(/^.*?\/([^/]+?)(?:\?.*)?$/,"$1");return decodeURIComponent(t)}function Sd(n,t){return n.localeCompare(t,void 0,{usage:"search",sensitivity:"base"})===0}function c0(n){return[...n.matchAll(/^|\s+/g)].map(e=>e.index+e[0].length).map(e=>n.substring(e))}const vd=["#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"],d0={canReplyToMessage:!1,canEditMessage:!1,canDeleteMessage:!1,canAddReaction:!1};class Tm extends _m{constructor(t,e){super(t,e),this.type="ChatboxStore",this.messageSubscription=null,this.readyForNewMessagesPromise=Promise.resolve(),this.participantSubscription=null,this.onlineSubscriptions={},this.state$=Ot({extCurrentConversationId:null,editor:{isEmpty:!0,isTyping:!1,atTextLimit:!1,characterCount:0,showEmojiPicker:!1,suggestEmojiQuery:void 0,suggestMentionQuery:void 0},referencedMessageId:null,editingMessageId:null,currentConversation:null,visibility:{isInView:!1,tabFocused:!0},messages:{},participants:{},typing:{},isUserConnected:{},ephemeralMessages:{},ephemeralMessageIdMapping:{},localFileBlobUrls:{},userPermissions:()=>{const r=this.app$.role.general.get(),i=this.app$.role.permissions.get();return pt.defined(r),pt.defined(i),{showTypingIndicator:r.showTypingIndicators,canShareFile:r.enableFileTransfers,canShareLocation:r.enableLocation,canMention:r.enableMentions,showOnlineStatus:r.enablePresence!==!1,canSendVoiceMessage:r.enableVoiceRecording,canLeaveConversation:i.conversations.leave==="all",canMarkConversationAsUnread:i.conversations.markAsUnread==="all"}},messagePermissions:()=>{const r=this.app$.role.permissions.get();pt.defined(r);const i=this.state$.userPermissions.get(),o={...d0,...i},s={canReplyToMessage:fn(r.messages.reply,!0),canEditMessage:fn(r.messages.edit,!0),canDeleteMessage:fn(r.messages.delete,!0),canAddReaction:fn(r.messages.emojiReactions,!0),...i},a={...s,canEditMessage:!1},l={canReplyToMessage:fn(r.messages.reply,!1),canEditMessage:fn(r.messages.edit,!1),canDeleteMessage:fn(r.messages.delete,!1),canAddReaction:fn(r.messages.emojiReactions,!1),...i};return{system:o,own:s,ownWithoutEditing:a,other:l,otherWithoutEditing:{...l,canEditMessage:!1}}}}),this.locale$=Ot(()=>{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.t$=Ot(()=>mm(this.locale$.get())),this.referencedMessage$=Ot(()=>{const r=this.state$.extCurrentConversationId.get(),i=this.state$.referencedMessageId.get();return r&&i?this.state$.messages.child(r).lookup.child(i).get():null}),this.chatItems$=Ot(()=>{var p,f;const r=this.state$.extCurrentConversationId.get();if(!r)return[];const i=this.state$.currentConversation.readUntil.get(),o=(p=this.state$.messages.child(r).state.get())!=null?p:[],s=Object.values((f=this.state$.ephemeralMessages.child(r).get())!=null?f:{}),a=s.length===0?o:s.concat(o).sort((m,E)=>E.createdAt-m.createdAt),l=a.map(m=>{const E=m.content[0],g=E==null?void 0:E.type;if(!E||g!=="file")return m;const _=E.size+","+E.filename,A=this.state$.localFileBlobUrls.child(r).child(_).url.get();return A?{...m,content:[{...E,url:A}]}:m});let u=null,c=0,d=!1;const h=[];for(const m of l){const E=new Date(m.createdAt),g=new Date(E).setHours(0,0,0,0),_=c&&g!==c,A=E.getTime()>i,T=!(!d||A||u!=null&&u.id.startsWith("ephemeral"));(T||_)&&h.push(new vl({id:"border-before-"+m.id,isDayMarker:!!_,isReadMarker:!!T,timestamp:_?c:void 0})),h.push(m),d=A,c=g,u=m}return function(m,E){const g=[];let _=[];const A=Symbol("NO_KEY");let T=A;for(const S of m){const v=E(S);T===A||T===v?_.push(S):(g.push(_),_=[S]),T=v}return _.length!==0&&g.push(_),g}(h,m=>{var E;return m instanceof vl?m.id:(E=m.sender)==null?void 0:E.id}).map(m=>(m.id=m.map(E=>E.id).join(","),m))}),this.mentionableUsers$=Ot(()=>{const r=this.state$.extCurrentConversationId.get(),i=this.extUserId$.get();if(!r||!i)return[];const o=this.state$.participants.child(r).get();if(!o||o.length===0)return[];const s=o.map(a=>a.user);return s.sort((a,l)=>a.name.localeCompare(l.name)),function(a,l){const u=l.findIndex(c=>c.id===a);if(u>-1){const c=l[u];l.splice(u,1),l.push(c)}return l}(i,s)})}storeTyping(t,e){this.state$.typing.child(t).set(e)}messagePermissions$(t){const e=this.currentUser$.get();if(!e)throw new Error("Unreachable");const r=t.content[0];return t.sender?e.id===t.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}storeMessages(t,e,r){Br(()=>{var l;const i=e.reduce((u,c)=>(u[c.id]=c,u),{}),o=this.state$.extCurrentConversationId.peek(),s=this.extUserId$.peek();pt(s&&o),this.state$.messages.child(t).set({state:e,lookup:i,loadedAll:r});const a=this.state$.ephemeralMessages.child(t);for(const u of e){const c=this.state$.ephemeralMessageIdMapping.child(t).child(u.id).peek();c&&a.child(c).delete();const d=u.content[0];if(((l=u.sender)==null?void 0:l.id)!==s||d.type!=="file")continue;const h=d.size+","+d.filename,p=this.state$.localFileBlobUrls.child(o).child(h);if(p.fetching.peek()!==!1)continue;const f=()=>p.delete();if(d.subtype==="image"){p.fetching.set(!0);const m=document.createElement("img");m.addEventListener("load",f,{once:!0}),m.src=d.url}else if(d.subtype==="video"){p.fetching.set(!0);const m=document.createElement("video");m.addEventListener("loaddata",f,{once:!0}),m.src=d.url}else if(d.subtype==="audio"){p.fetching.set(!0);const m=document.createElement("audio");m.addEventListener("loaddata",f,{once:!0}),m.src=d.url}}})}}function fn(n,t){return n==="all"||n==="own"&&t||n==="other"&&!t}class vl{constructor({id:t,isDayMarker:e,isReadMarker:r,timestamp:i}){this.id=t,this.isDayMarker=e,this.isReadMarker=r,this.timestamp=e?i:void 0}}function Pe(n,t=!1){return function(e,r=!1){return e.map(i=>{if(typeof i=="string")return i;switch(i.type){case"bold":return"*"+Pe(i.children)+"*";case"italic":return"_"+Pe(i.children)+"_";case"strikethrough":return"~"+Pe(i.children)+"~";case"blockquote":return Pe(i.children).split(`
|
|
2
|
+
`).map(o=>"> "+o).join(`
|
|
3
|
+
`)+`
|
|
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}|${Pe(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}|${Pe(o.children)}>`}(i);case"bulletlist":case"bulletList":return`
|
|
6
|
+
`+Pe(i.children);case"bulletpoint":case"bulletPoint":return"- "+Pe(i.children)+`
|
|
7
|
+
`}}).join("")}(n,t).trim()}class Nd{constructor(t,e,r,i,o){this.send=e,this.attachFile=r,this.shareLocation=i,this.toggleEmojiPicker=o,this.isEmpty=t.isEmpty,this.isTyping=t.isTyping,this.atTextLimit=t.atTextLimit,this.characterCount=t.characterCount,this.showEmojiPicker=t.showEmojiPicker}}function Mt(n){this.content=n}function Sm(n,t,e){for(let r=0;;r++){if(r==n.childCount||r==t.childCount)return n.childCount==t.childCount?null:e;let i=n.child(r),o=t.child(r);if(i!=o){if(!i.sameMarkup(o))return e;if(i.isText&&i.text!=o.text){for(let s=0;i.text[s]==o.text[s];s++)e++;return e}if(i.content.size||o.content.size){let s=Sm(i.content,o.content,e+1);if(s!=null)return s}e+=i.nodeSize}else e+=i.nodeSize}}function vm(n,t,e,r){for(let i=n.childCount,o=t.childCount;;){if(i==0||o==0)return i==o?null:{a:e,b:r};let s=n.child(--i),a=t.child(--o),l=s.nodeSize;if(s!=a){if(!s.sameMarkup(a))return{a:e,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++,e--,r--;return{a:e,b:r}}if(s.content.size||a.content.size){let u=vm(s.content,a.content,e-1,r-1);if(u)return u}e-=l,r-=l}else e-=l,r-=l}}Mt.prototype={constructor:Mt,find:function(n){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===n)return t;return-1},get:function(n){var t=this.find(n);return t==-1?void 0:this.content[t+1]},update:function(n,t,e){var r=e&&e!=n?this.remove(e):this,i=r.find(n),o=r.content.slice();return i==-1?o.push(e||n,t):(o[i+1]=t,e&&(o[i]=e)),new Mt(o)},remove:function(n){var t=this.find(n);if(t==-1)return this;var e=this.content.slice();return e.splice(t,2),new Mt(e)},addToStart:function(n,t){return new Mt([n,t].concat(this.remove(n).content))},addToEnd:function(n,t){var e=this.remove(n).content.slice();return e.push(n,t),new Mt(e)},addBefore:function(n,t,e){var r=this.remove(t),i=r.content.slice(),o=r.find(n);return i.splice(o==-1?i.length:o,0,t,e),new Mt(i)},forEach:function(n){for(var t=0;t<this.content.length;t+=2)n(this.content[t],this.content[t+1])},prepend:function(n){return(n=Mt.from(n)).size?new Mt(n.content.concat(this.subtract(n).content)):this},append:function(n){return(n=Mt.from(n)).size?new Mt(this.subtract(n).content.concat(n.content)):this},subtract:function(n){var t=this;n=Mt.from(n);for(var e=0;e<n.content.length;e+=2)t=t.remove(n.content[e]);return t},toObject:function(){var n={};return this.forEach(function(t,e){n[t]=e}),n},get size(){return this.content.length>>1}},Mt.from=function(n){if(n instanceof Mt)return n;var t=[];if(n)for(var e in n)t.push(e,n[e]);return new Mt(t)};class H{constructor(t,e){if(this.content=t,this.size=e||0,e==null)for(let r=0;r<t.length;r++)this.size+=t[r].nodeSize}nodesBetween(t,e,r,i=0,o){for(let s=0,a=0;a<e;s++){let l=this.content[s],u=a+l.nodeSize;if(u>t&&r(l,i+a,o||null,s)!==!1&&l.content.size){let c=a+1;l.nodesBetween(Math.max(0,t-c),Math.min(l.content.size,e-c),r,i+c)}a=u}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,e,r,i){let o="",s=!0;return this.nodesBetween(t,e,(a,l)=>{let u=a.isText?a.text.slice(Math.max(t,l)-l,e-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(t){if(!t.size)return this;if(!this.size)return t;let e=this.lastChild,r=t.firstChild,i=this.content.slice(),o=0;for(e.isText&&e.sameMarkup(r)&&(i[i.length-1]=e.withText(e.text+r.text),o=1);o<t.content.length;o++)i.push(t.content[o]);return new H(i,this.size+t.size)}cut(t,e=this.size){if(t==0&&e==this.size)return this;let r=[],i=0;if(e>t)for(let o=0,s=0;s<e;o++){let a=this.content[o],l=s+a.nodeSize;l>t&&((s<t||l>e)&&(a=a.isText?a.cut(Math.max(0,t-s),Math.min(a.text.length,e-s)):a.cut(Math.max(0,t-s-1),Math.min(a.content.size,e-s-1))),r.push(a),i+=a.nodeSize),s=l}return new H(r,i)}cutByIndex(t,e){return t==e?H.empty:t==0&&e==this.content.length?this:new H(this.content.slice(t,e))}replaceChild(t,e){let r=this.content[t];if(r==e)return this;let i=this.content.slice(),o=this.size+e.nodeSize-r.nodeSize;return i[t]=e,new H(i,o)}addToStart(t){return new H([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new H(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let e=0;e<this.content.length;e++)if(!this.content[e].eq(t.content[e]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(t){let e=this.content[t];if(!e)throw new RangeError("Index "+t+" out of range for "+this);return e}maybeChild(t){return this.content[t]||null}forEach(t){for(let e=0,r=0;e<this.content.length;e++){let i=this.content[e];t(i,r,e),r+=i.nodeSize}}findDiffStart(t,e=0){return Sm(this,t,e)}findDiffEnd(t,e=this.size,r=t.size){return vm(this,t,e,r)}findIndex(t,e=-1){if(t==0)return ko(0,t);if(t==this.size)return ko(this.content.length,t);if(t>this.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let r=0,i=0;;r++){let o=i+this.child(r).nodeSize;if(o>=t)return o==t||e>0?ko(r+1,o):ko(r,i);i=o}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,e){if(!e)return H.empty;if(!Array.isArray(e))throw new RangeError("Invalid input for Fragment.fromJSON");return new H(e.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return H.empty;let e,r=0;for(let i=0;i<t.length;i++){let o=t[i];r+=o.nodeSize,i&&o.isText&&t[i-1].sameMarkup(o)?(e||(e=t.slice(0,i)),e[e.length-1]=o.withText(e[e.length-1].text+o.text)):e&&e.push(o)}return new H(e||t,r)}static from(t){if(!t)return H.empty;if(t instanceof H)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new H([t],t.nodeSize);throw new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}H.empty=new H([],0);const Ta={index:0,offset:0};function ko(n,t){return Ta.index=n,Ta.offset=t,Ta}function fs(n,t){if(n===t)return!0;if(!n||typeof n!="object"||!t||typeof t!="object")return!1;let e=Array.isArray(n);if(Array.isArray(t)!=e)return!1;if(e){if(n.length!=t.length)return!1;for(let r=0;r<n.length;r++)if(!fs(n[r],t[r]))return!1}else{for(let r in n)if(!(r in t)||!fs(n[r],t[r]))return!1;for(let r in t)if(!(r in n))return!1}return!0}class st{constructor(t,e){this.type=t,this.attrs=e}addToSet(t){let e,r=!1;for(let i=0;i<t.length;i++){let o=t[i];if(this.eq(o))return t;if(this.type.excludes(o.type))e||(e=t.slice(0,i));else{if(o.type.excludes(this.type))return t;!r&&o.type.rank>this.type.rank&&(e||(e=t.slice(0,i)),e.push(this),r=!0),e&&e.push(o)}}return e||(e=t.slice()),r||e.push(this),e}removeFromSet(t){for(let e=0;e<t.length;e++)if(this.eq(t[e]))return t.slice(0,e).concat(t.slice(e+1));return t}isInSet(t){for(let e=0;e<t.length;e++)if(this.eq(t[e]))return!0;return!1}eq(t){return this==t||this.type==t.type&&fs(this.attrs,t.attrs)}toJSON(){let t={type:this.type.name};for(let e in this.attrs){t.attrs=this.attrs;break}return t}static fromJSON(t,e){if(!e)throw new RangeError("Invalid input for Mark.fromJSON");let r=t.marks[e.type];if(!r)throw new RangeError(`There is no mark type ${e.type} in this schema`);return r.create(e.attrs)}static sameSet(t,e){if(t==e)return!0;if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!t[r].eq(e[r]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&t.length==0)return st.none;if(t instanceof st)return[t];let e=t.slice();return e.sort((r,i)=>r.type.rank-i.type.rank),e}}st.none=[];class Vr extends Error{}class B{constructor(t,e,r){this.content=t,this.openStart=e,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,e){let r=Cm(this.content,t+this.openStart,e);return r&&new B(r,this.openStart,this.openEnd)}removeBetween(t,e){return new B(Nm(this.content,t+this.openStart,e+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,e){if(!e)return B.empty;let r=e.openStart||0,i=e.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new B(H.fromJSON(t,e.content),r,i)}static maxOpen(t,e=!0){let r=0,i=0;for(let o=t.firstChild;o&&!o.isLeaf&&(e||!o.type.spec.isolating);o=o.firstChild)r++;for(let o=t.lastChild;o&&!o.isLeaf&&(e||!o.type.spec.isolating);o=o.lastChild)i++;return new B(t,r,i)}}function Nm(n,t,e){let{index:r,offset:i}=n.findIndex(t),o=n.maybeChild(r),{index:s,offset:a}=n.findIndex(e);if(i==t||o.isText){if(a!=e&&!n.child(s).isText)throw new RangeError("Removing non-flat range");return n.cut(0,t).append(n.cut(e))}if(r!=s)throw new RangeError("Removing non-flat range");return n.replaceChild(r,o.copy(Nm(o.content,t-i-1,e-i-1)))}function Cm(n,t,e,r){let{index:i,offset:o}=n.findIndex(t),s=n.maybeChild(i);if(o==t||s.isText)return n.cut(0,t).append(e).append(n.cut(t));let a=Cm(s.content,t-o-1,e);return a&&n.replaceChild(i,s.copy(a))}function h0(n,t,e){if(e.openStart>n.depth)throw new Vr("Inserted content deeper than insertion position");if(n.depth-e.openStart!=t.depth-e.openEnd)throw new Vr("Inconsistent open depths");return ym(n,t,e,0)}function ym(n,t,e,r){let i=n.index(r),o=n.node(r);if(i==t.index(r)&&r<n.depth-e.openStart){let s=ym(n,t,e,r+1);return o.copy(o.content.replaceChild(i,s))}if(e.content.size){if(e.openStart||e.openEnd||n.depth!=r||t.depth!=r){let{start:s,end:a}=function(l,u){let c=u.depth-l.openStart,d=u.node(c).copy(l.content);for(let h=c-1;h>=0;h--)d=u.node(h).copy(H.from(d));return{start:d.resolveNoCache(l.openStart+c),end:d.resolveNoCache(d.content.size-l.openEnd-c)}}(e,n);return Kn(o,Rm(n,s,a,t,r))}{let s=n.parent,a=s.content;return Kn(s,a.cut(0,n.parentOffset).append(e.content).append(a.cut(t.parentOffset)))}}return Kn(o,ms(n,t,r))}function Im(n,t){if(!t.type.compatibleContent(n.type))throw new Vr("Cannot join "+t.type.name+" onto "+n.type.name)}function Nl(n,t,e){let r=n.node(e);return Im(r,t.node(e)),r}function Wn(n,t){let e=t.length-1;e>=0&&n.isText&&n.sameMarkup(t[e])?t[e]=n.withText(t[e].text+n.text):t.push(n)}function wi(n,t,e,r){let i=(t||n).node(e),o=0,s=t?t.index(e):i.childCount;n&&(o=n.index(e),n.depth>e?o++:n.textOffset&&(Wn(n.nodeAfter,r),o++));for(let a=o;a<s;a++)Wn(i.child(a),r);t&&t.depth==e&&t.textOffset&&Wn(t.nodeBefore,r)}function Kn(n,t){return n.type.checkContent(t),n.copy(t)}function Rm(n,t,e,r,i){let o=n.depth>i&&Nl(n,t,i+1),s=r.depth>i&&Nl(e,r,i+1),a=[];return wi(null,n,i,a),o&&s&&t.index(i)==e.index(i)?(Im(o,s),Wn(Kn(o,Rm(n,t,e,r,i+1)),a)):(o&&Wn(Kn(o,ms(n,t,i+1)),a),wi(t,e,i,a),s&&Wn(Kn(s,ms(e,r,i+1)),a)),wi(r,null,i,a),new H(a)}function ms(n,t,e){let r=[];return wi(null,n,e,r),n.depth>e&&Wn(Kn(Nl(n,t,e+1),ms(n,t,e+1)),r),wi(t,null,e,r),new H(r)}B.empty=new B(H.empty,0,0);class Wi{constructor(t,e,r){this.pos=t,this.path=e,this.parentOffset=r,this.depth=e.length/3-1}resolveDepth(t){return t==null?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[3*this.resolveDepth(t)]}index(t){return this.path[3*this.resolveDepth(t)+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t!=this.depth||this.textOffset?1:0)}start(t){return(t=this.resolveDepth(t))==0?0:this.path[3*t-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(!(t=this.resolveDepth(t)))throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]}after(t){if(!(t=this.resolveDepth(t)))throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]+this.path[3*t].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,e=this.index(this.depth);if(e==t.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=t.child(e);return r?t.child(e).cut(r):i}get nodeBefore(){let t=this.index(this.depth),e=this.pos-this.path[this.path.length-1];return e?this.parent.child(t).cut(0,e):t==0?null:this.parent.child(t-1)}posAtIndex(t,e){e=this.resolveDepth(e);let r=this.path[3*e],i=e==0?0:this.path[3*e-1]+1;for(let o=0;o<t;o++)i+=r.child(o).nodeSize;return i}marks(){let t=this.parent,e=this.index();if(t.content.size==0)return st.none;if(this.textOffset)return t.child(e).marks;let r=t.maybeChild(e-1),i=t.maybeChild(e);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(t){let e=this.parent.maybeChild(this.index());if(!e||!e.isInline)return null;let r=e.marks,i=t.parent.maybeChild(t.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(t){for(let e=this.depth;e>0;e--)if(this.start(e)<=t&&this.end(e)>=t)return e;return 0}blockRange(t=this,e){if(t.pos<this.pos)return t.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==t.pos?1:0);r>=0;r--)if(t.pos<=this.end(r)&&(!e||e(this.node(r))))return new f0(this,t,r);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos<this.pos?t:this}toString(){let t="";for(let e=1;e<=this.depth;e++)t+=(t?"/":"")+this.node(e).type.name+"_"+this.index(e-1);return t+":"+this.parentOffset}static resolve(t,e){if(!(e>=0&&e<=t.content.size))throw new RangeError("Position "+e+" out of range");let r=[],i=0,o=e;for(let s=t;;){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 Wi(e,r,o)}static resolveCached(t,e){for(let i=0;i<Sa.length;i++){let o=Sa[i];if(o.pos==e&&o.doc==t)return o}let r=Sa[va]=Wi.resolve(t,e);return va=(va+1)%p0,r}}let Sa=[],va=0,p0=12;class f0{constructor(t,e,r){this.$from=t,this.$to=e,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 m0=Object.create(null);let qn=class Cl{constructor(t,e,r,i=st.none){this.type=t,this.attrs=e,this.marks=i,this.content=r||H.empty}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(t){return this.content.child(t)}maybeChild(t){return this.content.maybeChild(t)}forEach(t){this.content.forEach(t)}nodesBetween(t,e,r,i=0){this.content.nodesBetween(t,e,r,i,this)}descendants(t){this.nodesBetween(0,this.content.size,t)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(t,e,r,i){return this.content.textBetween(t,e,r,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(t){return this==t||this.sameMarkup(t)&&this.content.eq(t.content)}sameMarkup(t){return this.hasMarkup(t.type,t.attrs,t.marks)}hasMarkup(t,e,r){return this.type==t&&fs(this.attrs,e||t.defaultAttrs||m0)&&st.sameSet(this.marks,r||st.none)}copy(t=null){return t==this.content?this:new Cl(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new Cl(this.type,this.attrs,this.content,t)}cut(t,e=this.content.size){return t==0&&e==this.content.size?this:this.copy(this.content.cut(t,e))}slice(t,e=this.content.size,r=!1){if(t==e)return B.empty;let i=this.resolve(t),o=this.resolve(e),s=r?0:i.sharedDepth(e),a=i.start(s),l=i.node(s).content.cut(i.pos-a,o.pos-a);return new B(l,i.depth-s,o.depth-s)}replace(t,e,r){return h0(this.resolve(t),this.resolve(e),r)}nodeAt(t){for(let e=this;;){let{index:r,offset:i}=e.content.findIndex(t);if(e=e.maybeChild(r),!e)return null;if(i==t||e.isText)return e;t-=i+1}}childAfter(t){let{index:e,offset:r}=this.content.findIndex(t);return{node:this.content.maybeChild(e),index:e,offset:r}}childBefore(t){if(t==0)return{node:null,index:0,offset:0};let{index:e,offset:r}=this.content.findIndex(t);if(r<t)return{node:this.content.child(e),index:e,offset:r};let i=this.content.child(e-1);return{node:i,index:e-1,offset:r-i.nodeSize}}resolve(t){return Wi.resolveCached(this,t)}resolveNoCache(t){return Wi.resolve(this,t)}rangeHasMark(t,e,r){let i=!1;return e>t&&this.nodesBetween(t,e,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 t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),Lm(this.marks,t)}contentMatchAt(t){let e=this.type.contentMatch.matchFragment(this.content,0,t);if(!e)throw new Error("Called contentMatchAt on a node with invalid content");return e}canReplace(t,e,r=H.empty,i=0,o=r.childCount){let s=this.contentMatchAt(t).matchFragment(r,i,o),a=s&&s.matchFragment(this.content,e);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(t,e,r,i){if(i&&!this.type.allowsMarks(i))return!1;let o=this.contentMatchAt(t).matchType(r),s=o&&o.matchFragment(this.content,e);return!!s&&s.validEnd}canAppend(t){return t.content.size?this.canReplace(this.childCount,this.childCount,t.content):this.type.compatibleContent(t.type)}check(){this.type.checkContent(this.content);let t=st.none;for(let e=0;e<this.marks.length;e++)t=this.marks[e].addToSet(t);if(!st.sameSet(t,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(e=>e.type.name)}`);this.content.forEach(e=>e.check())}toJSON(){let t={type:this.type.name};for(let e in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(e=>e.toJSON())),t}static fromJSON(t,e){if(!e)throw new RangeError("Invalid input for Node.fromJSON");let r=null;if(e.marks){if(!Array.isArray(e.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=e.marks.map(t.markFromJSON)}if(e.type=="text"){if(typeof e.text!="string")throw new RangeError("Invalid text node in JSON");return t.text(e.text,r)}let i=H.fromJSON(t,e.content);return t.nodeType(e.type).create(e.attrs,i,r)}};qn.prototype.text=void 0;class Es extends qn{constructor(t,e,r,i){if(super(t,e,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):Lm(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,e){return this.text.slice(t,e)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new Es(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new Es(this.type,this.attrs,t,this.marks)}cut(t=0,e=this.text.length){return t==0&&e==this.text.length?this:this.withText(this.text.slice(t,e))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function Lm(n,t){for(let e=n.length-1;e>=0;e--)t=n[e].type.name+"("+t+")";return t}class tr{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,e){let r=new E0(t,e);if(r.next==null)return tr.empty;let i=bm(r);r.next&&r.err("Unexpected trailing text");let o=function(s){let a=Object.create(null);return l(yd(s,0));function l(u){let c=[];u.forEach(h=>{s[h].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]);yd(s,f).forEach(E=>{m||c.push([p,m=[]]),m.indexOf(E)==-1&&m.push(E)})})});let d=a[u.join(",")]=new tr(u.indexOf(s.length-1)>-1);for(let h=0;h<c.length;h++){let p=c[h][1].sort(km);d.next.push({type:c[h][0],next:a[p.join(",")]||l(p)})}return d}}(function(s){let a=[[]];return c(d(s,0),l()),a;function l(){return a.push([])-1}function u(h,p,f){let m={term:f,to:p};return a[h].push(m),m}function c(h,p){h.forEach(f=>f.to=p)}function d(h,p){if(h.type=="choice")return h.exprs.reduce((f,m)=>f.concat(d(m,p)),[]);if(h.type!="seq"){if(h.type=="star"){let f=l();return u(p,f),c(d(h.expr,f),f),[u(f)]}if(h.type=="plus"){let f=l();return c(d(h.expr,p),f),c(d(h.expr,f),f),[u(f)]}if(h.type=="opt")return[u(p)].concat(d(h.expr,p));if(h.type=="range"){let f=p;for(let m=0;m<h.min;m++){let E=l();c(d(h.expr,f),E),f=E}if(h.max==-1)c(d(h.expr,f),f);else for(let m=h.min;m<h.max;m++){let E=l();u(f,E),c(d(h.expr,f),E),f=E}return[u(f)]}if(h.type=="name")return[u(p,void 0,h.value)];throw new Error("Unknown expr type")}for(let f=0;;f++){let m=d(h.exprs[f],p);if(f==h.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],d=!c.validEnd,h=[];for(let p=0;p<c.next.length;p++){let{type:f,next:m}=c.next[p];h.push(f.name),!d||f.isText||f.hasRequiredAttrs()||(d=!1),u.indexOf(m)==-1&&u.push(m)}d&&a.err("Only non-generatable nodes ("+h.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(o,r),o}matchType(t){for(let e=0;e<this.next.length;e++)if(this.next[e].type==t)return this.next[e].next;return null}matchFragment(t,e=0,r=t.childCount){let i=this;for(let o=e;i&&o<r;o++)i=i.matchType(t.child(o).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let t=0;t<this.next.length;t++){let{type:e}=this.next[t];if(!e.isText&&!e.hasRequiredAttrs())return e}return null}compatible(t){for(let e=0;e<this.next.length;e++)for(let r=0;r<t.next.length;r++)if(this.next[e].type==t.next[r].type)return!0;return!1}fillBefore(t,e=!1,r=0){let i=[this];return function o(s,a){let l=s.matchFragment(t,r);if(l&&(!e||l.validEnd))return H.from(a.map(u=>u.createAndFill()));for(let u=0;u<s.next.length;u++){let{type:c,next:d}=s.next[u];if(!c.isText&&!c.hasRequiredAttrs()&&i.indexOf(d)==-1){i.push(d);let h=o(d,a.concat(c));if(h)return h}}return null}(this,[])}findWrapping(t){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==t)return this.wrapCache[r+1];let e=this.computeWrapping(t);return this.wrapCache.push(t,e),e}computeWrapping(t){let e=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),o=i.match;if(o.matchType(t)){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 e||i.type&&!l.validEnd||(r.push({match:a.contentMatch,type:a,via:i}),e[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(t){if(t>=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];return function e(r){t.push(r);for(let i=0;i<r.next.length;i++)t.indexOf(r.next[i].next)==-1&&e(r.next[i].next)}(this),t.map((e,r)=>{let i=r+(e.validEnd?"*":" ")+" ";for(let o=0;o<e.next.length;o++)i+=(o?", ":"")+e.next[o].type.name+"->"+t.indexOf(e.next[o].next);return i}).join(`
|
|
8
|
+
`)}}tr.empty=new tr(!0);class E0{constructor(t,e){this.string=t,this.nodeTypes=e,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}}function bm(n){let t=[];do t.push(g0(n));while(n.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function g0(n){let t=[];do t.push(D0(n));while(n.next&&n.next!=")"&&n.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function D0(n){let t=function(e){if(e.eat("(")){let r=bm(e);return e.eat(")")||e.err("Missing closing paren"),r}if(!/\W/.test(e.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.groups.indexOf(o)>-1&&l.push(c)}return l.length==0&&i.err("No node type or group '"+o+"' found"),l}(e,e.next).map(i=>(e.inline==null?e.inline=i.isInline:e.inline!=i.isInline&&e.err("Mixing inline and block content"),{type:"name",value:i}));return e.pos++,r.length==1?r[0]:{type:"choice",exprs:r}}e.err("Unexpected token '"+e.next+"'")}(n);for(;;)if(n.eat("+"))t={type:"plus",expr:t};else if(n.eat("*"))t={type:"star",expr:t};else if(n.eat("?"))t={type:"opt",expr:t};else{if(!n.eat("{"))break;t=_0(n,t)}return t}function Cd(n){/\D/.test(n.next)&&n.err("Expected number, got '"+n.next+"'");let t=Number(n.next);return n.pos++,t}function _0(n,t){let e=Cd(n),r=e;return n.eat(",")&&(r=n.next!="}"?Cd(n):-1),n.eat("}")||n.err("Unclosed braced range"),{type:"range",min:e,max:r,expr:t}}function km(n,t){return t-n}function yd(n,t){let e=[];return function r(i){let o=n[i];if(o.length==1&&!o[0].term)return r(o[0].to);e.push(i);for(let s=0;s<o.length;s++){let{term:a,to:l}=o[s];a||e.indexOf(l)!=-1||r(l)}}(t),e.sort(km)}function wm(n){let t=Object.create(null);for(let e in n){let r=n[e];if(!r.hasDefault)return null;t[e]=r.default}return t}function Fm(n,t){let e=Object.create(null);for(let r in n){let i=t&&t[r];if(i===void 0){let o=n[r];if(!o.hasDefault)throw new RangeError("No value supplied for attribute "+r);i=o.default}e[r]=i}return e}function Mm(n){let t=Object.create(null);if(n)for(let e in n)t[e]=new A0(n[e]);return t}let Id=class xm{constructor(t,e,r){this.name=t,this.schema=e,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=Mm(r.attrs),this.defaultAttrs=wm(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||t=="text"),this.isText=t=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==tr.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1}compatibleContent(t){return this==t||this.contentMatch.compatible(t.contentMatch)}computeAttrs(t){return!t&&this.defaultAttrs?this.defaultAttrs:Fm(this.attrs,t)}create(t=null,e,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new qn(this,this.computeAttrs(t),H.from(e),st.setFrom(r))}createChecked(t=null,e,r){return e=H.from(e),this.checkContent(e),new qn(this,this.computeAttrs(t),e,st.setFrom(r))}createAndFill(t=null,e,r){if(t=this.computeAttrs(t),(e=H.from(e)).size){let s=this.contentMatch.fillBefore(e);if(!s)return null;e=s.append(e)}let i=this.contentMatch.matchFragment(e),o=i&&i.fillBefore(H.empty,!0);return o?new qn(this,t,e.append(o),st.setFrom(r)):null}validContent(t){let e=this.contentMatch.matchFragment(t);if(!e||!e.validEnd)return!1;for(let r=0;r<t.childCount;r++)if(!this.allowsMarks(t.child(r).marks))return!1;return!0}checkContent(t){if(!this.validContent(t))throw new RangeError(`Invalid content for node ${this.name}: ${t.toString().slice(0,50)}`)}allowsMarkType(t){return this.markSet==null||this.markSet.indexOf(t)>-1}allowsMarks(t){if(this.markSet==null)return!0;for(let e=0;e<t.length;e++)if(!this.allowsMarkType(t[e].type))return!1;return!0}allowedMarks(t){if(this.markSet==null)return t;let e;for(let r=0;r<t.length;r++)this.allowsMarkType(t[r].type)?e&&e.push(t[r]):e||(e=t.slice(0,r));return e?e.length?e:st.none:t}static compile(t,e){let r=Object.create(null);t.forEach((o,s)=>r[o]=new xm(o,e,s));let i=e.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 A0{constructor(t){this.hasDefault=Object.prototype.hasOwnProperty.call(t,"default"),this.default=t.default}get isRequired(){return!this.hasDefault}}class Gs{constructor(t,e,r,i){this.name=t,this.rank=e,this.schema=r,this.spec=i,this.attrs=Mm(i.attrs),this.excluded=null;let o=wm(this.attrs);this.instance=o?new st(this,o):null}create(t=null){return!t&&this.instance?this.instance:new st(this,Fm(this.attrs,t))}static compile(t,e){let r=Object.create(null),i=0;return t.forEach((o,s)=>r[o]=new Gs(o,i++,e,s)),r}removeFromSet(t){for(var e=0;e<t.length;e++)t[e].type==this&&(t=t.slice(0,e).concat(t.slice(e+1)),e--);return t}isInSet(t){for(let e=0;e<t.length;e++)if(t[e].type==this)return t[e]}excludes(t){return this.excluded.indexOf(t)>-1}}function Rd(n,t){let e=[];for(let r=0;r<t.length;r++){let i=t[r],o=n.marks[i],s=o;if(o)e.push(o);else for(let a in n.marks){let l=n.marks[a];(i=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(i)>-1)&&e.push(s=l)}if(!s)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return e}class Ki{constructor(t,e){this.schema=t,this.rules=e,this.tags=[],this.styles=[],e.forEach(r=>{r.tag?this.tags.push(r):r.style&&this.styles.push(r)}),this.normalizeLists=!this.tags.some(r=>{if(!/^(ul|ol)\b/.test(r.tag)||!r.node)return!1;let i=t.nodes[r.node];return i.contentMatch.matchType(i)})}parse(t,e={}){let r=new kd(this,e,!1);return r.addAll(t,e.from,e.to),r.finish()}parseSlice(t,e={}){let r=new kd(this,e,!0);return r.addAll(t,e.from,e.to),B.maxOpen(r.finish())}matchTag(t,e,r){for(let i=r?this.tags.indexOf(r)+1:0;i<this.tags.length;i++){let o=this.tags[i];if(T0(t,o.tag)&&(o.namespace===void 0||t.namespaceURI==o.namespace)&&(!o.context||e.matchesContext(o.context))){if(o.getAttrs){let s=o.getAttrs(t);if(s===!1)continue;o.attrs=s||void 0}return o}}}matchStyle(t,e,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(t)!=0||s.context&&!r.matchesContext(s.context)||a.length>t.length&&(a.charCodeAt(t.length)!=61||a.slice(t.length+1)!=e))){if(s.getAttrs){let l=s.getAttrs(e);if(l===!1)continue;s.attrs=l||void 0}return s}}}static schemaRules(t){let e=[];function r(i){let o=i.priority==null?50:i.priority,s=0;for(;s<e.length;s++){let a=e[s];if((a.priority==null?50:a.priority)<o)break}e.splice(s,0,i)}for(let i in t.marks){let o=t.marks[i].spec.parseDOM;o&&o.forEach(s=>{r(s=wd(s)),s.mark||s.ignore||s.clearMark||(s.mark=i)})}for(let i in t.nodes){let o=t.nodes[i].spec.parseDOM;o&&o.forEach(s=>{r(s=wd(s)),s.node||s.ignore||s.mark||(s.node=i)})}return e}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new Ki(t,Ki.schemaRules(t)))}}const Pm={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},O0={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Ld={ol:!0,ul:!0};function bd(n,t,e){return t!=null?(t?1:0)|(t==="full"?2:0):n&&n.whitespace=="pre"?3:-5&e}class Na{constructor(t,e,r,i,o,s,a){this.type=t,this.attrs=e,this.marks=r,this.pendingMarks=i,this.solid=o,this.options=a,this.content=[],this.activeMarks=st.none,this.stashMarks=[],this.match=s||(4&a?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let e=this.type.contentMatch.fillBefore(H.from(t));if(!e){let r,i=this.type.contentMatch;return(r=i.findWrapping(t.type))?(this.match=i,r):null}this.match=this.type.contentMatch.matchFragment(e)}return this.match.findWrapping(t.type)}finish(t){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 e=H.from(this.content);return!t&&this.match&&(e=e.append(this.match.fillBefore(H.empty,!0))),this.type?this.type.create(this.attrs,e,this.marks):e}popFromStashMark(t){for(let e=this.stashMarks.length-1;e>=0;e--)if(t.eq(this.stashMarks[e]))return this.stashMarks.splice(e,1)[0]}applyPending(t){for(let e=0,r=this.pendingMarks;e<r.length;e++){let i=r[e];(this.type?this.type.allowsMarkType(i.type):S0(i.type,t))&&!i.isInSet(this.activeMarks)&&(this.activeMarks=i.addToSet(this.activeMarks),this.pendingMarks=i.removeFromSet(this.pendingMarks))}}inlineContext(t){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:t.parentNode&&!Pm.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}}class kd{constructor(t,e,r){this.parser=t,this.options=e,this.isOpen=r,this.open=0;let i,o=e.topNode,s=bd(null,e.preserveWhitespace,0)|(r?4:0);i=o?new Na(o.type,o.attrs,st.none,st.none,!0,e.topMatch||o.type.contentMatch,s):new Na(r?null:t.schema.topNodeType,null,st.none,st.none,!0,null,s),this.nodes=[i],this.find=e.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(t){t.nodeType==3?this.addTextNode(t):t.nodeType==1&&this.addElement(t)}withStyleRules(t,e){let r=t.getAttribute("style");if(!r)return e();let i=this.readStyles(function(l){let u,c=/\s*([\w-]+)\s*:\s*([^;]+)/g,d=[];for(;u=c.exec(l);)d.push(u[1],u[2].trim());return d}(r));if(!i)return;let[o,s]=i,a=this.top;for(let l=0;l<s.length;l++)this.removePendingMark(s[l],a);for(let l=0;l<o.length;l++)this.addPendingMark(o[l]);e();for(let l=0;l<o.length;l++)this.removePendingMark(o[l],a);for(let l=0;l<s.length;l++)this.addPendingMark(s[l])}addTextNode(t){let e=t.nodeValue,r=this.top;if(2&r.options||r.inlineContext(t)||/[^ \t\r\n\u000c]/.test(e)){if(1&r.options)e=2&r.options?e.replace(/\r\n?/g,`
|
|
9
|
+
`):e.replace(/\r?\n|\r/g," ");else if(e=e.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(e)&&this.open==this.nodes.length-1){let i=r.content[r.content.length-1],o=t.previousSibling;(!i||o&&o.nodeName=="BR"||i.isText&&/[ \t\r\n\u000c]$/.test(i.text))&&(e=e.slice(1))}e&&this.insertNode(this.parser.schema.text(e)),this.findInText(t)}else this.findInside(t)}addElement(t,e){let r,i=t.nodeName.toLowerCase();Ld.hasOwnProperty(i)&&this.parser.normalizeLists&&function(s){for(let a=s.firstChild,l=null;a;a=a.nextSibling){let u=a.nodeType==1?a.nodeName.toLowerCase():null;u&&Ld.hasOwnProperty(u)&&l?(l.appendChild(a),a=l):u=="li"?l=a:u&&(l=null)}}(t);let o=this.options.ruleFromNode&&this.options.ruleFromNode(t)||(r=this.parser.matchTag(t,this,e));if(o?o.ignore:O0.hasOwnProperty(i))this.findInside(t),this.ignoreFallback(t);else if(!o||o.skip||o.closeParent){o&&o.closeParent?this.open=Math.max(0,this.open-1):o&&o.skip.nodeType&&(t=o.skip);let s,a=this.top,l=this.needsBlock;if(Pm.hasOwnProperty(i))a.content.length&&a.content[0].isInline&&this.open&&(this.open--,a=this.top),s=!0,a.type||(this.needsBlock=!0);else if(!t.firstChild)return void this.leafFallback(t);o&&o.skip?this.addAll(t):this.withStyleRules(t,()=>this.addAll(t)),s&&this.sync(a),this.needsBlock=l}else this.withStyleRules(t,()=>{this.addElementByRule(t,o,o.consuming===!1?r:void 0)})}leafFallback(t){t.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode(`
|
|
10
|
+
`))}ignoreFallback(t){t.nodeName!="BR"||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"))}readStyles(t){let e=st.none,r=st.none;for(let i=0;i<t.length;i+=2)for(let o;;){let s=this.parser.matchStyle(t[i],t[i+1],this,o);if(!s)break;if(s.ignore)return null;if(s.clearMark?this.top.pendingMarks.concat(this.top.activeMarks).forEach(a=>{s.clearMark(a)&&(r=a.addToSet(r))}):e=this.parser.schema.marks[s.mark].create(s.attrs).addToSet(e),s.consuming!==!1)break;o=s}return[e,r]}addElementByRule(t,e,r){let i,o,s;e.node?(o=this.parser.schema.nodes[e.node],o.isLeaf?this.insertNode(o.create(e.attrs))||this.leafFallback(t):i=this.enter(o,e.attrs||null,e.preserveWhitespace)):(s=this.parser.schema.marks[e.mark].create(e.attrs),this.addPendingMark(s));let a=this.top;if(o&&o.isLeaf)this.findInside(t);else if(r)this.addElement(t,r);else if(e.getContent)this.findInside(t),e.getContent(t,this.parser.schema).forEach(l=>this.insertNode(l));else{let l=t;typeof e.contentElement=="string"?l=t.querySelector(e.contentElement):typeof e.contentElement=="function"?l=e.contentElement(t):e.contentElement&&(l=e.contentElement),this.findAround(t,l,!0),this.addAll(l)}i&&this.sync(a)&&this.open--,s&&this.removePendingMark(s,a)}addAll(t,e,r){let i=e||0;for(let o=e?t.childNodes[e]:t.firstChild,s=r==null?null:t.childNodes[r];o!=s;o=o.nextSibling,++i)this.findAtPoint(t,i),this.addDOM(o);this.findAtPoint(t,i)}findPlace(t){let e,r;for(let i=this.open;i>=0;i--){let o=this.nodes[i],s=o.findWrapping(t);if(s&&(!e||e.length>s.length)&&(e=s,r=o,!s.length)||o.solid)break}if(!e)return!1;this.sync(r);for(let i=0;i<e.length;i++)this.enterInner(e[i],null,!1);return!0}insertNode(t){if(t.isInline&&this.needsBlock&&!this.top.type){let e=this.textblockFromContext();e&&this.enterInner(e)}if(this.findPlace(t)){this.closeExtra();let e=this.top;e.applyPending(t.type),e.match&&(e.match=e.match.matchType(t.type));let r=e.activeMarks;for(let i=0;i<t.marks.length;i++)e.type&&!e.type.allowsMarkType(t.marks[i].type)||(r=t.marks[i].addToSet(r));return e.content.push(t.mark(r)),!0}return!1}enter(t,e,r){let i=this.findPlace(t.create(e));return i&&this.enterInner(t,e,!0,r),i}enterInner(t,e=null,r=!1,i){this.closeExtra();let o=this.top;o.applyPending(t),o.match=o.match&&o.match.matchType(t);let s=bd(t,i,o.options);4&o.options&&o.content.length==0&&(s|=4),this.nodes.push(new Na(t,e,o.activeMarks,o.pendingMarks,r,null,s)),this.open++}closeExtra(t=!1){let e=this.nodes.length-1;if(e>this.open){for(;e>this.open;e--)this.nodes[e-1].content.push(this.nodes[e].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(t){for(let e=this.open;e>=0;e--)if(this.nodes[e]==t)return this.open=e,!0;return!1}get currentPos(){this.closeExtra();let t=0;for(let e=this.open;e>=0;e--){let r=this.nodes[e].content;for(let i=r.length-1;i>=0;i--)t+=r[i].nodeSize;e&&t++}return t}findAtPoint(t,e){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==t&&this.find[r].offset==e&&(this.find[r].pos=this.currentPos)}findInside(t){if(this.find)for(let e=0;e<this.find.length;e++)this.find[e].pos==null&&t.nodeType==1&&t.contains(this.find[e].node)&&(this.find[e].pos=this.currentPos)}findAround(t,e,r){if(t!=e&&this.find)for(let i=0;i<this.find.length;i++)this.find[i].pos==null&&t.nodeType==1&&t.contains(this.find[i].node)&&e.compareDocumentPosition(this.find[i].node)&(r?2:4)&&(this.find[i].pos=this.currentPos)}findInText(t){if(this.find)for(let e=0;e<this.find.length;e++)this.find[e].node==t&&(this.find[e].pos=this.currentPos-(t.nodeValue.length-this.find[e].offset))}matchesContext(t){if(t.indexOf("|")>-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let e=t.split("/"),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=e[a];if(u==""){if(a==e.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.groups.indexOf(u)==-1)return!1;l--}}return!0};return s(e.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let e=t.depth;e>=0;e--){let r=t.node(e).contentMatchAt(t.indexAfter(e)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let e in this.parser.schema.nodes){let r=this.parser.schema.nodes[e];if(r.isTextblock&&r.defaultAttrs)return r}}addPendingMark(t){let e=function(r,i){for(let o=0;o<i.length;o++)if(r.eq(i[o]))return i[o]}(t,this.top.pendingMarks);e&&this.top.stashMarks.push(e),this.top.pendingMarks=t.addToSet(this.top.pendingMarks)}removePendingMark(t,e){for(let r=this.open;r>=0;r--){let i=this.nodes[r];if(i.pendingMarks.lastIndexOf(t)>-1)i.pendingMarks=t.removeFromSet(i.pendingMarks);else{i.activeMarks=t.removeFromSet(i.activeMarks);let o=i.popFromStashMark(t);o&&i.type&&i.type.allowsMarkType(o.type)&&(i.activeMarks=o.addToSet(i.activeMarks))}if(i==e)break}}}function T0(n,t){return(n.matches||n.msMatchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector).call(n,t)}function wd(n){let t={};for(let e in n)t[e]=n[e];return t}function S0(n,t){let e=t.schema.nodes;for(let r in e){let i=e[r];if(!i.allowsMarkType(n))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==t||o.indexOf(c)<0&&s(c))return!0}};if(s(i.contentMatch))return!0}}class on{constructor(t,e){this.nodes=t,this.marks=e}serializeFragment(t,e={},r){r||(r=Ca(e).createDocumentFragment());let i=r,o=[];return t.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,e);c&&(o.push([u,i]),i.appendChild(c.dom),i=c.contentDOM||c.dom)}}i.appendChild(this.serializeNodeInner(s,e))}),r}serializeNodeInner(t,e){let{dom:r,contentDOM:i}=on.renderSpec(Ca(e),this.nodes[t.type.name](t));if(i){if(t.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(t.content,e,i)}return r}serializeNode(t,e={}){let r=this.serializeNodeInner(t,e);for(let i=t.marks.length-1;i>=0;i--){let o=this.serializeMark(t.marks[i],t.isInline,e);o&&((o.contentDOM||o.dom).appendChild(r),r=o.dom)}return r}serializeMark(t,e,r={}){let i=this.marks[t.type.name];return i&&on.renderSpec(Ca(r),i(t,e))}static renderSpec(t,e,r=null){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],s=o.indexOf(" ");s>0&&(r=o.slice(0,s),o=o.slice(s+1));let a=r?t.createElementNS(r,o):t.createElement(o),l=e[1],u=1;if(l&&typeof l=="object"&&l.nodeType==null&&!Array.isArray(l)){u=2;for(let c in l)if(l[c]!=null){let d=c.indexOf(" ");d>0?a.setAttributeNS(c.slice(0,d),c.slice(d+1),l[c]):a.setAttribute(c,l[c])}}for(let c=u;c<e.length;c++){let d=e[c];if(d===0){if(c<e.length-1||c>u)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}{let{dom:h,contentDOM:p}=on.renderSpec(t,d,r);if(a.appendChild(h),p){if(i)throw new RangeError("Multiple content holes");i=p}}}return{dom:a,contentDOM:i}}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new on(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let e=Fd(t.nodes);return e.text||(e.text=r=>r.text),e}static marksFromSchema(t){return Fd(t.marks)}}function Fd(n){let t={};for(let e in n){let r=n[e].spec.toDOM;r&&(t[e]=r)}return t}function Ca(n){return n.document||window.document}const Bm=Math.pow(2,16);function v0(n,t){return n+t*Bm}function Md(n){return 65535&n}let yl=class{constructor(n,t,e){this.pos=n,this.delInfo=t,this.recover=e}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}},er=class pr{constructor(t,e=!1){if(this.ranges=t,this.inverted=e,!t.length&&pr.empty)return pr.empty}recover(t){let e=0,r=Md(t);if(!this.inverted)for(let i=0;i<r;i++)e+=this.ranges[3*i+2]-this.ranges[3*i+1];return this.ranges[3*r]+e+function(i){return(i-(65535&i))/Bm}(t)}mapResult(t,e=1){return this._map(t,e,!1)}map(t,e=1){return this._map(t,e,!0)}_map(t,e,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>t)break;let u=this.ranges[a+o],c=this.ranges[a+s],d=l+u;if(t<=d){let h=l+i+((u?t==l?-1:t==d?1:e:e)<0?0:c);if(r)return h;let p=t==(e<0?l:d)?null:v0(a/3,t-l),f=t==l?2:t==d?1:4;return(e<0?t!=l:t!=d)&&(f|=8),new yl(h,f,p)}i+=c-u}return r?t+i:new yl(t+i,0,null)}touches(t,e){let r=0,i=Md(e),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>t)break;let u=this.ranges[a+o];if(t<=l+u&&a==3*i)return!0;r+=this.ranges[a+s]-u}return!1}forEach(t){let e=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+e],c=this.ranges[i+r];t(a,a+u,l,l+c),o+=c-u}}invert(){return new pr(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(t){return t==0?pr.empty:new pr(t<0?[0,-t,0]:[0,0,t])}};er.empty=new er([]);let N0=class zo{constructor(t=[],e,r=0,i=t.length){this.maps=t,this.mirror=e,this.from=r,this.to=i}slice(t=0,e=this.maps.length){return new zo(this.maps,this.mirror,t,e)}copy(){return new zo(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}appendMap(t,e){this.to=this.maps.push(t),e!=null&&this.setMirror(this.maps.length-1,e)}appendMapping(t){for(let e=0,r=this.maps.length;e<t.maps.length;e++){let i=t.getMirror(e);this.appendMap(t.maps[e],i!=null&&i<e?r+i:void 0)}}getMirror(t){if(this.mirror){for(let e=0;e<this.mirror.length;e++)if(this.mirror[e]==t)return this.mirror[e+(e%2?-1:1)]}}setMirror(t,e){this.mirror||(this.mirror=[]),this.mirror.push(t,e)}appendMappingInverted(t){for(let e=t.maps.length-1,r=this.maps.length+t.maps.length;e>=0;e--){let i=t.getMirror(e);this.appendMap(t.maps[e].invert(),i!=null&&i>e?r-i-1:void 0)}}invert(){let t=new zo;return t.appendMappingInverted(this),t}map(t,e=1){if(this.mirror)return this._map(t,e,!0);for(let r=this.from;r<this.to;r++)t=this.maps[r].map(t,e);return t}mapResult(t,e=1){return this._map(t,e,!1)}_map(t,e,r){let i=0;for(let o=this.from;o<this.to;o++){let s=this.maps[o].mapResult(t,e);if(s.recover!=null){let a=this.getMirror(o);if(a!=null&&a>o&&a<this.to){o=a,t=this.maps[a].recover(s.recover);continue}}i|=s.delInfo,t=s.pos}return r?t:new yl(t,i,null)}};const ya=Object.create(null);let zt=class{getMap(){return er.empty}merge(n){return null}static fromJSON(n,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let e=ya[t.stepType];if(!e)throw new RangeError(`No step type ${t.stepType} defined`);return e.fromJSON(n,t)}static jsonID(n,t){if(n in ya)throw new RangeError("Duplicate use of step JSON ID "+n);return ya[n]=t,t.prototype.jsonID=n,t}},Qt=class hi{constructor(t,e){this.doc=t,this.failed=e}static ok(t){return new hi(t,null)}static fail(t){return new hi(null,t)}static fromReplace(t,e,r,i){try{return hi.ok(t.replace(e,r,i))}catch(o){if(o instanceof Vr)return hi.fail(o.message);throw o}}};function ju(n,t,e){let r=[];for(let i=0;i<n.childCount;i++){let o=n.child(i);o.content.size&&(o=o.copy(ju(o.content,t,o))),o.isInline&&(o=t(o,e,i)),r.push(o)}return H.fromArray(r)}let Yu=class pi extends zt{constructor(t,e,r){super(),this.from=t,this.to=e,this.mark=r}apply(t){let e=t.slice(this.from,this.to),r=t.resolve(this.from),i=r.node(r.sharedDepth(this.to)),o=new B(ju(e.content,(s,a)=>s.isAtom&&a.type.allowsMarkType(this.mark.type)?s.mark(this.mark.addToSet(s.marks)):s,i),e.openStart,e.openEnd);return Qt.fromReplace(t,this.from,this.to,o)}invert(){return new Fi(this.from,this.to,this.mark)}map(t){let e=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return e.deleted&&r.deleted||e.pos>=r.pos?null:new pi(e.pos,r.pos,this.mark)}merge(t){return t instanceof pi&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new pi(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,e){if(typeof e.from!="number"||typeof e.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new pi(e.from,e.to,t.markFromJSON(e.mark))}};zt.jsonID("addMark",Yu);let Fi=class fi extends zt{constructor(t,e,r){super(),this.from=t,this.to=e,this.mark=r}apply(t){let e=t.slice(this.from,this.to),r=new B(ju(e.content,i=>i.mark(this.mark.removeFromSet(i.marks)),t),e.openStart,e.openEnd);return Qt.fromReplace(t,this.from,this.to,r)}invert(){return new Yu(this.from,this.to,this.mark)}map(t){let e=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return e.deleted&&r.deleted||e.pos>=r.pos?null:new fi(e.pos,r.pos,this.mark)}merge(t){return t instanceof fi&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new fi(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,e){if(typeof e.from!="number"||typeof e.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new fi(e.from,e.to,t.markFromJSON(e.mark))}};zt.jsonID("removeMark",Fi);let Vu=class mi extends zt{constructor(t,e){super(),this.pos=t,this.mark=e}apply(t){let e=t.nodeAt(this.pos);if(!e)return Qt.fail("No node at mark step's position");let r=e.type.create(e.attrs,null,this.mark.addToSet(e.marks));return Qt.fromReplace(t,this.pos,this.pos+1,new B(H.from(r),0,e.isLeaf?0:1))}invert(t){let e=t.nodeAt(this.pos);if(e){let r=this.mark.addToSet(e.marks);if(r.length==e.marks.length){for(let i=0;i<e.marks.length;i++)if(!e.marks[i].isInSet(r))return new mi(this.pos,e.marks[i]);return new mi(this.pos,this.mark)}}return new zu(this.pos,this.mark)}map(t){let e=t.mapResult(this.pos,1);return e.deletedAfter?null:new mi(e.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,e){if(typeof e.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new mi(e.pos,t.markFromJSON(e.mark))}};zt.jsonID("addNodeMark",Vu);let zu=class Il extends zt{constructor(t,e){super(),this.pos=t,this.mark=e}apply(t){let e=t.nodeAt(this.pos);if(!e)return Qt.fail("No node at mark step's position");let r=e.type.create(e.attrs,null,this.mark.removeFromSet(e.marks));return Qt.fromReplace(t,this.pos,this.pos+1,new B(H.from(r),0,e.isLeaf?0:1))}invert(t){let e=t.nodeAt(this.pos);return e&&this.mark.isInSet(e.marks)?new Vu(this.pos,this.mark):this}map(t){let e=t.mapResult(this.pos,1);return e.deletedAfter?null:new Il(e.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,e){if(typeof e.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Il(e.pos,t.markFromJSON(e.mark))}};zt.jsonID("removeNodeMark",zu);let en=class Fn extends zt{constructor(t,e,r,i=!1){super(),this.from=t,this.to=e,this.slice=r,this.structure=i}apply(t){return this.structure&&Rl(t,this.from,this.to)?Qt.fail("Structure replace would overwrite content"):Qt.fromReplace(t,this.from,this.to,this.slice)}getMap(){return new er([this.from,this.to-this.from,this.slice.size])}invert(t){return new Fn(this.from,this.from+this.slice.size,t.slice(this.from,this.to))}map(t){let e=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return e.deletedAcross&&r.deletedAcross?null:new Fn(e.pos,Math.max(e.pos,r.pos),this.slice)}merge(t){if(!(t instanceof Fn)||t.structure||this.structure)return null;if(this.from+this.slice.size!=t.from||this.slice.openEnd||t.slice.openStart){if(t.to!=this.from||this.slice.openStart||t.slice.openEnd)return null;{let e=this.slice.size+t.slice.size==0?B.empty:new B(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new Fn(t.from,this.to,e,this.structure)}}{let e=this.slice.size+t.slice.size==0?B.empty:new B(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new Fn(this.from,this.to+(t.to-t.from),e,this.structure)}}toJSON(){let t={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,e){if(typeof e.from!="number"||typeof e.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new Fn(e.from,e.to,B.fromJSON(t,e.slice),!!e.structure)}};zt.jsonID("replace",en);let $n=class Go extends zt{constructor(t,e,r,i,o,s,a=!1){super(),this.from=t,this.to=e,this.gapFrom=r,this.gapTo=i,this.slice=o,this.insert=s,this.structure=a}apply(t){if(this.structure&&(Rl(t,this.from,this.gapFrom)||Rl(t,this.gapTo,this.to)))return Qt.fail("Structure gap-replace would overwrite content");let e=t.slice(this.gapFrom,this.gapTo);if(e.openStart||e.openEnd)return Qt.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,e.content);return r?Qt.fromReplace(t,this.from,this.to,r):Qt.fail("Content does not fit in gap")}getMap(){return new er([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(t){let e=this.gapTo-this.gapFrom;return new Go(this.from,this.from+this.slice.size+e,this.from+this.insert,this.from+this.insert+e,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(t){let e=t.mapResult(this.from,1),r=t.mapResult(this.to,-1),i=t.map(this.gapFrom,-1),o=t.map(this.gapTo,1);return e.deletedAcross&&r.deletedAcross||i<e.pos||o>r.pos?null:new Go(e.pos,r.pos,i,o,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,e){if(typeof e.from!="number"||typeof e.to!="number"||typeof e.gapFrom!="number"||typeof e.gapTo!="number"||typeof e.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Go(e.from,e.to,e.gapFrom,e.gapTo,B.fromJSON(t,e.slice),e.insert,!!e.structure)}};function Rl(n,t,e){let r=n.resolve(t),i=e-t,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 xd(n,t,e){return!e.openStart&&!e.openEnd&&n.start()==t.start()&&n.parent.canReplace(n.index(),t.index(),e.content)}zt.jsonID("replaceAround",$n);let C0=class{constructor(n,t,e){this.$from=n,this.$to=t,this.unplaced=e,this.frontier=[],this.placed=H.empty;for(let r=0;r<=n.depth;r++){let i=n.node(r);this.frontier.push({type:i.type,match:i.contentMatchAt(n.indexAfter(r))})}for(let r=n.depth;r>0;r--)this.placed=H.from(n.node(r).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let l=this.findFittable();l?this.placeNodes(l):this.openMore()||this.dropNode()}let n=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,e=this.$from,r=this.close(n<0?this.$to:e.doc.resolve(n));if(!r)return null;let i=this.placed,o=e.depth,s=r.depth;for(;o&&s&&i.childCount==1;)i=i.firstChild.content,o--,s--;let a=new B(i,o,s);return n>-1?new $n(e.pos,n,this.$to.pos,this.$to.end(),a,t):a.size||e.pos!=this.$to.pos?new en(e.pos,r.pos,a):null}findFittable(){let n=this.unplaced.openStart;for(let t=this.unplaced.content,e=0,r=this.unplaced.openEnd;e<n;e++){let i=t.firstChild;if(t.childCount>1&&(r=0),i.type.spec.isolating&&r<=e){n=e;break}t=i.content}for(let t=1;t<=2;t++)for(let e=t==1?n:this.unplaced.openStart;e>=0;e--){let r,i=null;e?(i=Ia(this.unplaced.content,e-1).firstChild,r=i.content):r=this.unplaced.content;let o=r.firstChild;for(let s=this.depth;s>=0;s--){let a,{type:l,match:u}=this.frontier[s],c=null;if(t==1&&(o?u.matchType(o.type)||(c=u.fillBefore(H.from(o),!1)):i&&l.compatibleContent(i.type)))return{sliceDepth:e,frontierDepth:s,parent:i,inject:c};if(t==2&&o&&(a=u.findWrapping(o.type)))return{sliceDepth:e,frontierDepth:s,parent:i,wrap:a};if(i&&u.matchType(i.type))break}}}openMore(){let{content:n,openStart:t,openEnd:e}=this.unplaced,r=Ia(n,t);return!(!r.childCount||r.firstChild.isLeaf)&&(this.unplaced=new B(n,t+1,Math.max(e,r.size+t>=n.size-e?t+1:0)),!0)}dropNode(){let{content:n,openStart:t,openEnd:e}=this.unplaced,r=Ia(n,t);if(r.childCount<=1&&t>0){let i=n.size-t<=t+r.size;this.unplaced=new B(Ei(n,t-1,1),t-1,i?t-1:e)}else this.unplaced=new B(Ei(n,t,1),t,e)}placeNodes({sliceDepth:n,frontierDepth:t,parent:e,inject:r,wrap:i}){for(;this.depth>t;)this.closeFrontierNode();if(i)for(let f=0;f<i.length;f++)this.openFrontierNode(i[f]);let o=this.unplaced,s=e?e.content:o.content,a=o.openStart-n,l=0,u=[],{match:c,type:d}=this.frontier[t];if(r){for(let f=0;f<r.childCount;f++)u.push(r.child(f));c=c.matchFragment(r)}let h=s.size+n-(o.content.size-o.openEnd);for(;l<s.childCount;){let f=s.child(l),m=c.matchType(f.type);if(!m)break;l++,(l>1||a==0||f.content.size)&&(c=m,u.push(Hm(f.mark(d.allowedMarks(f.marks)),l==1?a:0,l==s.childCount?h:-1)))}let p=l==s.childCount;p||(h=-1),this.placed=gi(this.placed,t,H.from(u)),this.frontier[t].match=c,p&&h<0&&e&&e.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let f=0,m=s;f<h;f++){let E=m.lastChild;this.frontier.push({type:E.type,match:E.contentMatchAt(E.childCount)}),m=E.content}this.unplaced=p?n==0?B.empty:new B(Ei(o.content,n-1,1),n-1,h<0?o.openEnd:n-1):new B(Ei(o.content,n,l),o.openStart,o.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let n,t=this.frontier[this.depth];if(!t.type.isTextblock||!Ra(this.$to,this.$to.depth,t.type,t.match,!1)||this.$to.depth==this.depth&&(n=this.findCloseLevel(this.$to))&&n.depth==this.depth)return-1;let{depth:e}=this.$to,r=this.$to.after(e);for(;e>1&&r==this.$to.end(--e);)++r;return r}findCloseLevel(n){t:for(let t=Math.min(this.depth,n.depth);t>=0;t--){let{match:e,type:r}=this.frontier[t],i=t<n.depth&&n.end(t+1)==n.pos+(n.depth-(t+1)),o=Ra(n,t,r,e,i);if(o){for(let s=t-1;s>=0;s--){let{match:a,type:l}=this.frontier[s],u=Ra(n,s,l,a,!0);if(!u||u.childCount)continue t}return{depth:t,fit:o,move:i?n.doc.resolve(n.after(t+1)):n}}}}close(n){let t=this.findCloseLevel(n);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=gi(this.placed,t.depth,t.fit)),n=t.move;for(let e=t.depth+1;e<=n.depth;e++){let r=n.node(e),i=r.type.contentMatch.fillBefore(r.content,!0,n.index(e));this.openFrontierNode(r.type,r.attrs,i)}return n}openFrontierNode(n,t=null,e){let r=this.frontier[this.depth];r.match=r.match.matchType(n),this.placed=gi(this.placed,this.depth,H.from(n.create(t,e))),this.frontier.push({type:n,match:n.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(H.empty,!0);n.childCount&&(this.placed=gi(this.placed,this.frontier.length,n))}};function Ei(n,t,e){return t==0?n.cutByIndex(e,n.childCount):n.replaceChild(0,n.firstChild.copy(Ei(n.firstChild.content,t-1,e)))}function gi(n,t,e){return t==0?n.append(e):n.replaceChild(n.childCount-1,n.lastChild.copy(gi(n.lastChild.content,t-1,e)))}function Ia(n,t){for(let e=0;e<t;e++)n=n.firstChild.content;return n}function Hm(n,t,e){if(t<=0)return n;let r=n.content;return t>1&&(r=r.replaceChild(0,Hm(r.firstChild,t-1,r.childCount==1?e-1:0))),t>0&&(r=n.type.contentMatch.fillBefore(r).append(r),e<=0&&(r=r.append(n.type.contentMatch.matchFragment(r).fillBefore(H.empty,!0)))),n.copy(r)}function Ra(n,t,e,r,i){let o=n.node(t),s=i?n.indexAfter(t):n.index(t);if(s==o.childCount&&!e.compatibleContent(o.type))return null;let a=r.fillBefore(o.content,!0,s);return a&&!function(l,u,c){for(let d=c;d<u.childCount;d++)if(!l.allowsMarks(u.child(d).marks))return!0;return!1}(e,o.content,s)?a:null}function Um(n,t,e,r,i){if(t<e){let o=n.firstChild;n=n.replaceChild(0,o.copy(Um(o.content,t+1,e,r,o)))}if(t>r){let o=i.contentMatchAt(0),s=o.fillBefore(n).append(n);n=s.append(o.matchFragment(s).fillBefore(H.empty,!0))}return n}function Pd(n,t){let e=[];for(let r=Math.min(n.depth,t.depth);r>=0;r--){let i=n.start(r);if(i<n.pos-(n.depth-r)||t.end(r)>t.pos+(t.depth-r)||n.node(r).type.spec.isolating||t.node(r).type.spec.isolating)break;(i==t.start(r)||r==n.depth&&r==t.depth&&n.parent.inlineContent&&t.parent.inlineContent&&r&&t.start(r-1)==i-1)&&e.push(r)}return e}let $m=class Xo extends zt{constructor(t,e,r){super(),this.pos=t,this.attr=e,this.value=r}apply(t){let e=t.nodeAt(this.pos);if(!e)return Qt.fail("No node at attribute step's position");let r=Object.create(null);for(let o in e.attrs)r[o]=e.attrs[o];r[this.attr]=this.value;let i=e.type.create(r,null,e.marks);return Qt.fromReplace(t,this.pos,this.pos+1,new B(H.from(i),0,e.isLeaf?0:1))}getMap(){return er.empty}invert(t){return new Xo(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let e=t.mapResult(this.pos,1);return e.deletedAfter?null:new Xo(e.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,e){if(typeof e.pos!="number"||typeof e.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new Xo(e.pos,e.attr,e.value)}};zt.jsonID("attr",$m);let jm=class Ll extends zt{constructor(t,e){super(),this.attr=t,this.value=e}apply(t){let e=Object.create(null);for(let i in t.attrs)e[i]=t.attrs[i];e[this.attr]=this.value;let r=t.type.create(e,t.content,t.marks);return Qt.ok(r)}getMap(){return er.empty}invert(t){return new Ll(this.attr,t.attrs[this.attr])}map(t){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(t,e){if(typeof e.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new Ll(e.attr,e.value)}};zt.jsonID("docAttr",jm);let Di=class extends Error{};Di=function n(t){let e=Error.call(this,t);return e.__proto__=n.prototype,e},(Di.prototype=Object.create(Error.prototype)).constructor=Di,Di.prototype.name="TransformError";class y0{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new N0}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let e=this.maybeStep(t);if(e.failed)throw new Di(e.failed);return this}maybeStep(t){let e=t.apply(this.doc);return e.failed||this.addStep(t,e.doc),e}get docChanged(){return this.steps.length>0}addStep(t,e){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=e}replace(t,e=t,r=B.empty){let i=function(o,s,a=s,l=B.empty){if(s==a&&!l.size)return null;let u=o.resolve(s),c=o.resolve(a);return xd(u,c,l)?new en(s,a,l):new C0(u,c,l).fit()}(this.doc,t,e,r);return i&&this.step(i),this}replaceWith(t,e,r){return this.replace(t,e,new B(H.from(r),0,0))}delete(t,e){return this.replace(t,e,B.empty)}insert(t,e){return this.replaceWith(t,t,e)}replaceRange(t,e,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(xd(l,u,a))return i.step(new en(o,s,a));let c=Pd(l,i.doc.resolve(s));c[c.length-1]==0&&c.pop();let d=-(l.depth+1);c.unshift(d);for(let g=l.depth,_=l.pos-1;g>0;g--,_--){let A=l.node(g).type.spec;if(A.defining||A.definingAsContext||A.isolating)break;c.indexOf(g)>-1?d=g:l.before(g)==_&&c.splice(1,0,-g)}let h=c.indexOf(d),p=[],f=a.openStart;for(let g=a.content,_=0;;_++){let A=g.firstChild;if(p.push(A),_==a.openStart)break;g=A.content}for(let g=f-1;g>=0;g--){let _=p[g],A=(m=_.type).spec.defining||m.spec.definingForContent;if(A&&!_.sameMarkup(l.node(Math.abs(d)-1)))f=g;else if(A||!_.type.isTextblock)break}var m;for(let g=a.openStart;g>=0;g--){let _=(g+f+1)%(a.openStart+1),A=p[_];if(A)for(let T=0;T<c.length;T++){let S=c[(T+h)%c.length],v=!0;S<0&&(v=!1,S=-S);let C=l.node(S-1),R=l.index(S-1);if(C.canReplaceWith(R,R,A.type,A.marks))return i.replace(l.before(S),v?u.after(S):s,new B(Um(a.content,0,a.openStart,_),_,a.openEnd))}}let E=i.steps.length;for(let g=c.length-1;g>=0&&(i.replace(o,s,a),!(i.steps.length>E));g--){let _=c[g];_<0||(o=l.before(_),s=u.after(_))}}(this,t,e,r),this}replaceRangeWith(t,e,r){return function(i,o,s,a){if(!a.isInline&&o==s&&i.doc.resolve(o).parent.content.size){let l=function(u,c,d){let h=u.resolve(c);if(h.parent.canReplaceWith(h.index(),h.index(),d))return c;if(h.parentOffset==0)for(let p=h.depth-1;p>=0;p--){let f=h.index(p);if(h.node(p).canReplaceWith(f,f,d))return h.before(p+1);if(f>0)return null}if(h.parentOffset==h.parent.content.size)for(let p=h.depth-1;p>=0;p--){let f=h.indexAfter(p);if(h.node(p).canReplaceWith(f,f,d))return h.after(p+1);if(f<h.node(p).childCount)return null}return null}(i.doc,o,a.type);l!=null&&(o=s=l)}i.replaceRange(o,s,new B(H.from(a),0,0))}(this,t,e,r),this}deleteRange(t,e){return function(r,i,o){let s=r.doc.resolve(i),a=r.doc.resolve(o),l=Pd(s,a);for(let u=0;u<l.length;u++){let c=l[u],d=u==l.length-1;if(d&&c==0||s.node(c).type.contentMatch.validEnd)return r.delete(s.start(c),a.end(c));if(c>0&&(d||s.node(c-1).canReplace(s.index(c-1),a.indexAfter(c-1))))return r.delete(s.before(c),a.after(c))}for(let u=1;u<=s.depth&&u<=a.depth;u++)if(i-s.start(u)==s.depth-u&&o>s.end(u)&&a.end(u)-o!=a.depth-u)return r.delete(s.before(u),o);r.delete(i,o)}(this,t,e),this}lift(t,e){return function(r,i,o){let{$from:s,$to:a,depth:l}=i,u=s.before(l+1),c=a.after(l+1),d=u,h=c,p=H.empty,f=0;for(let g=l,_=!1;g>o;g--)_||s.index(g)>0?(_=!0,p=H.from(s.node(g).copy(p)),f++):d--;let m=H.empty,E=0;for(let g=l,_=!1;g>o;g--)_||a.after(g+1)<a.end(g)?(_=!0,m=H.from(a.node(g).copy(m)),E++):h++;r.step(new $n(d,h,u,c,new B(p.append(m),f,E),p.size-f,!0))}(this,t,e),this}join(t,e=1){return function(r,i,o){let s=new en(i-o,i+o,B.empty,!0);r.step(s)}(this,t,e),this}wrap(t,e){return function(r,i,o){let s=H.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=H.from(o[u].type.create(o[u].attrs,s))}let a=i.start,l=i.end;r.step(new $n(a,l,a,l,new B(s,0,0),o.length,!0))}(this,t,e),this}setBlockType(t,e=t,r,i=null){return function(o,s,a,l,u){if(!l.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let c=o.steps.length;o.doc.nodesBetween(s,a,(d,h)=>{if(d.isTextblock&&!d.hasMarkup(l,u)&&function(p,f,m){let E=p.resolve(f),g=E.index();return E.parent.canReplaceWith(g,g+1,m)}(o.doc,o.mapping.slice(c).map(h),l)){o.clearIncompatible(o.mapping.slice(c).map(h,1),l);let p=o.mapping.slice(c),f=p.map(h,1),m=p.map(h+d.nodeSize,1);return o.step(new $n(f,m,f+1,m-1,new B(H.from(l.create(u,null,d.marks)),0,0),1,!0)),!1}})}(this,t,e,r,i),this}setNodeMarkup(t,e,r=null,i){return function(o,s,a,l,u){let c=o.doc.nodeAt(s);if(!c)throw new RangeError("No node at given position");a||(a=c.type);let d=a.create(l,null,u||c.marks);if(c.isLeaf)return o.replaceWith(s,s+c.nodeSize,d);if(!a.validContent(c.content))throw new RangeError("Invalid content for node type "+a.name);o.step(new $n(s,s+c.nodeSize,s+1,s+c.nodeSize-1,new B(H.from(d),0,0),1,!0))}(this,t,e,r,i),this}setNodeAttribute(t,e,r){return this.step(new $m(t,e,r)),this}setDocAttribute(t,e){return this.step(new jm(t,e)),this}addNodeMark(t,e){return this.step(new Vu(t,e)),this}removeNodeMark(t,e){if(!(e instanceof st)){let r=this.doc.nodeAt(t);if(!r)throw new RangeError("No node at position "+t);if(!(e=e.isInSet(r.marks)))return this}return this.step(new zu(t,e)),this}split(t,e=1,r){return function(i,o,s=1,a){let l=i.doc.resolve(o),u=H.empty,c=H.empty;for(let d=l.depth,h=l.depth-s,p=s-1;d>h;d--,p--){u=H.from(l.node(d).copy(u));let f=a&&a[p];c=H.from(f?f.type.create(f.attrs,c):l.node(d).copy(c))}i.step(new en(o,o,new B(u.append(c),s,s),!0))}(this,t,e,r),this}addMark(t,e,r){return function(i,o,s,a){let l,u,c=[],d=[];i.doc.nodesBetween(o,s,(h,p,f)=>{if(!h.isInline)return;let m=h.marks;if(!a.isInSet(m)&&f.type.allowsMarkType(a.type)){let E=Math.max(p,o),g=Math.min(p+h.nodeSize,s),_=a.addToSet(m);for(let A=0;A<m.length;A++)m[A].isInSet(_)||(l&&l.to==E&&l.mark.eq(m[A])?l.to=g:c.push(l=new Fi(E,g,m[A])));u&&u.to==E?u.to=g:d.push(u=new Yu(E,g,a))}}),c.forEach(h=>i.step(h)),d.forEach(h=>i.step(h))}(this,t,e,r),this}removeMark(t,e,r){return function(i,o,s,a){let l=[],u=0;i.doc.nodesBetween(o,s,(c,d)=>{if(!c.isInline)return;u++;let h=null;if(a instanceof Gs){let p,f=c.marks;for(;p=a.isInSet(f);)(h||(h=[])).push(p),f=p.removeFromSet(f)}else a?a.isInSet(c.marks)&&(h=[a]):h=c.marks;if(h&&h.length){let p=Math.min(d+c.nodeSize,s);for(let f=0;f<h.length;f++){let m,E=h[f];for(let g=0;g<l.length;g++){let _=l[g];_.step==u-1&&E.eq(l[g].style)&&(m=_)}m?(m.to=p,m.step=u):l.push({style:E,from:Math.max(d,o),to:p,step:u})}}}),l.forEach(c=>i.step(new Fi(c.from,c.to,c.style)))}(this,t,e,r),this}clearIncompatible(t,e,r){return function(i,o,s,a=s.contentMatch){let l=i.doc.nodeAt(o),u=[],c=o+1;for(let d=0;d<l.childCount;d++){let h=l.child(d),p=c+h.nodeSize,f=a.matchType(h.type);if(f){a=f;for(let m=0;m<h.marks.length;m++)s.allowsMarkType(h.marks[m].type)||i.step(new Fi(c,p,h.marks[m]));if(h.isText&&!s.spec.code){let m,E,g=/\r?\n|\r/g;for(;m=g.exec(h.text);)E||(E=new B(H.from(s.schema.text(" ",s.allowedMarks(h.marks))),0,0)),u.push(new en(c+m.index,c+m.index+m[0].length,E))}}else u.push(new en(c,p,B.empty));c=p}if(!a.validEnd){let d=a.fillBefore(H.empty,!0);i.replace(c,c,new B(d,0,0))}for(let d=u.length-1;d>=0;d--)i.step(u[d])}(this,t,e,r),this}}const La=Object.create(null);class rt{constructor(t,e,r){this.$anchor=t,this.$head=e,this.ranges=r||[new I0(t.min(e),t.max(e))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let t=this.ranges;for(let e=0;e<t.length;e++)if(t[e].$from.pos!=t[e].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(t,e=B.empty){let r=e.content.lastChild,i=null;for(let a=0;a<e.openEnd;a++)i=r,r=r.lastChild;let o=t.steps.length,s=this.ranges;for(let a=0;a<s.length;a++){let{$from:l,$to:u}=s[a],c=t.mapping.slice(o);t.replaceRange(c.map(l.pos),c.map(u.pos),a?B.empty:e),a==0&&Ud(t,o,(r?r.isInline:i&&i.isTextblock)?-1:1)}}replaceWith(t,e){let r=t.steps.length,i=this.ranges;for(let o=0;o<i.length;o++){let{$from:s,$to:a}=i[o],l=t.mapping.slice(r),u=l.map(s.pos),c=l.map(a.pos);o?t.deleteRange(u,c):(t.replaceRangeWith(u,c,e),Ud(t,r,e.isInline?-1:1))}}static findFrom(t,e,r=!1){let i=t.parent.inlineContent?new lt(t):fr(t.node(0),t.parent,t.pos,t.index(),e,r);if(i)return i;for(let o=t.depth-1;o>=0;o--){let s=e<0?fr(t.node(0),t.node(o),t.before(o+1),t.index(o),e,r):fr(t.node(0),t.node(o),t.after(o+1),t.index(o)+1,e,r);if(s)return s}return null}static near(t,e=1){return this.findFrom(t,e)||this.findFrom(t,-e)||new Ee(t.node(0))}static atStart(t){return fr(t,t,0,0,1)||new Ee(t)}static atEnd(t){return fr(t,t,t.content.size,t.childCount,-1)||new Ee(t)}static fromJSON(t,e){if(!e||!e.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=La[e.type];if(!r)throw new RangeError(`No selection type ${e.type} defined`);return r.fromJSON(t,e)}static jsonID(t,e){if(t in La)throw new RangeError("Duplicate use of selection JSON ID "+t);return La[t]=e,e.prototype.jsonID=t,e}getBookmark(){return lt.between(this.$anchor,this.$head).getBookmark()}}rt.prototype.visible=!0;class I0{constructor(t,e){this.$from=t,this.$to=e}}let Bd=!1;function Hd(n){Bd||n.parent.inlineContent||(Bd=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+n.parent.type.name+")"))}class lt extends rt{constructor(t,e=t){Hd(t),Hd(e),super(t,e)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,e){let r=t.resolve(e.map(this.head));if(!r.parent.inlineContent)return rt.near(r);let i=t.resolve(e.map(this.anchor));return new lt(i.parent.inlineContent?i:r,r)}replace(t,e=B.empty){if(super.replace(t,e),e==B.empty){let r=this.$from.marksAcross(this.$to);r&&t.ensureMarks(r)}}eq(t){return t instanceof lt&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new Xs(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,e){if(typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new lt(t.resolve(e.anchor),t.resolve(e.head))}static create(t,e,r=e){let i=t.resolve(e);return new this(i,r==e?i:t.resolve(r))}static between(t,e,r){let i=t.pos-e.pos;if(r&&!i||(r=i>=0?1:-1),!e.parent.inlineContent){let o=rt.findFrom(e,r,!0)||rt.findFrom(e,-r,!0);if(!o)return rt.near(e,r);e=o.$head}return t.parent.inlineContent||(i==0||(t=(rt.findFrom(t,-r,!0)||rt.findFrom(t,r,!0)).$anchor).pos<e.pos!=i<0)&&(t=e),new lt(t,e)}}rt.jsonID("text",lt);class Xs{constructor(t,e){this.anchor=t,this.head=e}map(t){return new Xs(t.map(this.anchor),t.map(this.head))}resolve(t){return lt.between(t.resolve(this.anchor),t.resolve(this.head))}}class W extends rt{constructor(t){let e=t.nodeAfter,r=t.node(0).resolve(t.pos+e.nodeSize);super(t,r),this.node=e}map(t,e){let{deleted:r,pos:i}=e.mapResult(this.anchor),o=t.resolve(i);return r?rt.near(o):new W(o)}content(){return new B(H.from(this.node),0,0)}eq(t){return t instanceof W&&t.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new Gu(this.anchor)}static fromJSON(t,e){if(typeof e.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new W(t.resolve(e.anchor))}static create(t,e){return new W(t.resolve(e))}static isSelectable(t){return!t.isText&&t.type.spec.selectable!==!1}}W.prototype.visible=!1,rt.jsonID("node",W);class Gu{constructor(t){this.anchor=t}map(t){let{deleted:e,pos:r}=t.mapResult(this.anchor);return e?new Xs(r,r):new Gu(r)}resolve(t){let e=t.resolve(this.anchor),r=e.nodeAfter;return r&&W.isSelectable(r)?new W(e):rt.near(e)}}class Ee extends rt{constructor(t){super(t.resolve(0),t.resolve(t.content.size))}replace(t,e=B.empty){if(e==B.empty){t.delete(0,t.doc.content.size);let r=rt.atStart(t.doc);r.eq(t.selection)||t.setSelection(r)}else super.replace(t,e)}toJSON(){return{type:"all"}}static fromJSON(t){return new Ee(t)}map(t){return new Ee(t)}eq(t){return t instanceof Ee}getBookmark(){return R0}}rt.jsonID("all",Ee);const R0={map(){return this},resolve:n=>new Ee(n)};function fr(n,t,e,r,i,o=!1){if(t.inlineContent)return lt.create(n,e);for(let s=r-(i>0?0:1);i>0?s<t.childCount:s>=0;s+=i){let a=t.child(s);if(a.isAtom){if(!o&&W.isSelectable(a))return W.create(n,e-(i<0?a.nodeSize:0))}else{let l=fr(n,a,e+i,i<0?a.childCount:0,i,o);if(l)return l}e+=a.nodeSize*i}return null}function Ud(n,t,e){let r=n.steps.length-1;if(r<t)return;let i,o=n.steps[r];(o instanceof en||o instanceof $n)&&(n.mapping.maps[r].forEach((s,a,l,u)=>{i==null&&(i=u)}),n.setSelection(rt.near(n.doc.resolve(i),e)))}class L0 extends y0{constructor(t){super(t.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=t.selection,this.storedMarks=t.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(t){if(t.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=t,this.curSelectionFor=this.steps.length,this.updated=-3&this.updated|1,this.storedMarks=null,this}get selectionSet(){return(1&this.updated)>0}setStoredMarks(t){return this.storedMarks=t,this.updated|=2,this}ensureMarks(t){return st.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this}addStoredMark(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(2&this.updated)>0}addStep(t,e){super.addStep(t,e),this.updated=-3&this.updated,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,e=!0){let r=this.selection;return e&&(t=t.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||st.none))),r.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,e,r){let i=this.doc.type.schema;if(e==null)return t?this.replaceSelectionWith(i.text(t),!0):this.deleteSelection();{if(r==null&&(r=e),r=r==null?e:r,!t)return this.deleteRange(e,r);let o=this.storedMarks;if(!o){let s=this.doc.resolve(e);o=r==e?s.marks():s.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(e,r,i.text(t,o)),this.selection.empty||this.setSelection(rt.near(this.selection.$to)),this}}setMeta(t,e){return this.meta[typeof t=="string"?t:t.key]=e,this}getMeta(t){return this.meta[typeof t=="string"?t:t.key]}get isGeneric(){for(let t in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=4,this}get scrolledIntoView(){return(4&this.updated)>0}}function $d(n,t){return t&&n?n.bind(t):n}class _i{constructor(t,e,r){this.name=t,this.init=$d(e.init,r),this.apply=$d(e.apply,r)}}const b0=[new _i("doc",{init:n=>n.doc||n.schema.topNodeType.createAndFill(),apply:n=>n.doc}),new _i("selection",{init:(n,t)=>n.selection||rt.atStart(t.doc),apply:n=>n.selection}),new _i("storedMarks",{init:n=>n.storedMarks||null,apply:(n,t,e,r)=>r.selection.$cursor?n.storedMarks:null}),new _i("scrollToSelection",{init:()=>0,apply:(n,t)=>n.scrolledIntoView?t+1:t})];class ba{constructor(t,e){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=b0.slice(),e&&e.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 _i(r.key,r.spec.state,r))})}}class Tr{constructor(t){this.config=t}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(t){return this.applyTransaction(t).state}filterTransaction(t,e=-1){for(let r=0;r<this.config.plugins.length;r++)if(r!=e){let i=this.config.plugins[r];if(i.spec.filterTransaction&&!i.spec.filterTransaction.call(i,t,this))return!1}return!0}applyTransaction(t){if(!this.filterTransaction(t))return{state:this,transactions:[]};let e=[t],r=this.applyInner(t),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<e.length&&a.spec.appendTransaction.call(a,l?e.slice(l):e,u,r);if(c&&r.filterTransaction(c,s)){if(c.setMeta("appendedTransaction",t),!i){i=[];for(let d=0;d<this.config.plugins.length;d++)i.push(d<s?{state:r,n:e.length}:{state:this,n:0})}e.push(c),r=r.applyInner(c),o=!0}i&&(i[s]={state:r,n:e.length})}}if(!o)return{state:r,transactions:e}}}applyInner(t){if(!t.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let e=new Tr(this.config),r=this.config.fields;for(let i=0;i<r.length;i++){let o=r[i];e[o.name]=o.apply(t,this[o.name],this,e)}return e}get tr(){return new L0(this)}static create(t){let e=new ba(t.doc?t.doc.type.schema:t.schema,t.plugins),r=new Tr(e);for(let i=0;i<e.fields.length;i++)r[e.fields[i].name]=e.fields[i].init(t,r);return r}reconfigure(t){let e=new ba(this.schema,t.plugins),r=e.fields,i=new Tr(e);for(let o=0;o<r.length;o++){let s=r[o].name;i[s]=this.hasOwnProperty(s)?this[s]:r[o].init(t,i)}return i}toJSON(t){let e={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(e.storedMarks=this.storedMarks.map(r=>r.toJSON())),t&&typeof t=="object")for(let r in t){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let i=t[r],o=i.spec.state;o&&o.toJSON&&(e[r]=o.toJSON.call(i,this[i.key]))}return e}static fromJSON(t,e,r){if(!e)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");let i=new ba(t.schema,t.plugins),o=new Tr(i);return i.fields.forEach(s=>{if(s.name=="doc")o.doc=qn.fromJSON(t.schema,e.doc);else if(s.name=="selection")o.selection=rt.fromJSON(o.doc,e.selection);else if(s.name=="storedMarks")e.storedMarks&&(o.storedMarks=e.storedMarks.map(t.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(e,a))return void(o[s.name]=u.fromJSON.call(l,t,e[a],o))}o[s.name]=s.init(t,o)}}),o}}function Ym(n,t,e){for(let r in n){let i=n[r];i instanceof Function?i=i.bind(t):r=="handleDOMEvents"&&(i=Ym(i,t,{})),e[r]=i}return e}class Ws{constructor(t){this.spec=t,this.props={},t.props&&Ym(t.props,this,this.props),this.key=t.key?t.key.key:Vm("plugin")}getState(t){return t[this.key]}}const ka=Object.create(null);function Vm(n){return n in ka?n+"$"+ ++ka[n]:(ka[n]=0,n+"$")}class Ks{constructor(t="key"){this.key=Vm(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}const qt=function(n){for(var t=0;;t++)if(!(n=n.previousSibling))return t},qi=function(n){let t=n.assignedSlot||n.parentNode;return t&&t.nodeType==11?t.host:t};let jd=null;const tn=function(n,t,e){let r=jd||(jd=document.createRange());return r.setEnd(n,e==null?n.nodeValue.length:e),r.setStart(n,t||0),r},nr=function(n,t,e,r){return e&&(Yd(n,t,e,r,-1)||Yd(n,t,e,r,1))},k0=/^(img|br|input|textarea|hr)$/i;function Yd(n,t,e,r,i){for(;;){if(n==e&&t==r)return!0;if(t==(i<0?0:He(n))){let o=n.parentNode;if(!o||o.nodeType!=1||bl(n)||k0.test(n.nodeName)||n.contentEditable=="false")return!1;t=qt(n)+(i<0?0:1),n=o}else{if(n.nodeType!=1||(n=n.childNodes[t+(i<0?-1:0)]).contentEditable=="false")return!1;t=i<0?He(n):0}}}function He(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function bl(n){let t;for(let e=n;e&&!(t=e.pmViewDesc);e=e.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==n||t.contentDOM==n)}const qs=function(n){return n.focusNode&&nr(n.focusNode,n.focusOffset,n.anchorNode,n.anchorOffset)};function Un(n,t){let e=document.createEvent("Event");return e.initEvent("keydown",!0,!0),e.keyCode=n,e.key=e.code=t,e}const ze=typeof navigator!="undefined"?navigator:null,Vd=typeof document!="undefined"?document:null,Ln=ze&&ze.userAgent||"",kl=/Edge\/(\d+)/.exec(Ln),zm=/MSIE \d/.exec(Ln),wl=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Ln),ae=!!(zm||wl||kl),Sn=zm?document.documentMode:wl?+wl[1]:kl?+kl[1]:0,be=!ae&&/gecko\/(\d+)/i.test(Ln);be&&(/Firefox\/(\d+)/.exec(Ln)||[0,0])[1];const Fl=!ae&&/Chrome\/(\d+)/.exec(Ln),jt=!!Fl,w0=Fl?+Fl[1]:0,ne=!ae&&!!ze&&/Apple Computer/.test(ze.vendor),zr=ne&&(/Mobile\/\w+/.test(Ln)||!!ze&&ze.maxTouchPoints>2),_e=zr||!!ze&&/Mac/.test(ze.platform),F0=!!ze&&/Win/.test(ze.platform),Se=/Android \d/.test(Ln),go=!!Vd&&"webkitFontSmoothing"in Vd.documentElement.style,M0=go?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function x0(n){return{left:0,right:n.documentElement.clientWidth,top:0,bottom:n.documentElement.clientHeight}}function Je(n,t){return typeof n=="number"?n:n[t]}function P0(n){let t=n.getBoundingClientRect(),e=t.width/n.offsetWidth||1,r=t.height/n.offsetHeight||1;return{left:t.left,right:t.left+n.clientWidth*e,top:t.top,bottom:t.top+n.clientHeight*r}}function zd(n,t,e){let r=n.someProp("scrollThreshold")||0,i=n.someProp("scrollMargin")||5,o=n.dom.ownerDocument;for(let s=e||n.dom;s;s=qi(s)){if(s.nodeType!=1)continue;let a=s,l=a==o.body,u=l?x0(o):P0(a),c=0,d=0;if(t.top<u.top+Je(r,"top")?d=-(u.top-t.top+Je(i,"top")):t.bottom>u.bottom-Je(r,"bottom")&&(d=t.bottom-t.top>u.bottom-u.top?t.top+Je(i,"top")-u.top:t.bottom-u.bottom+Je(i,"bottom")),t.left<u.left+Je(r,"left")?c=-(u.left-t.left+Je(i,"left")):t.right>u.right-Je(r,"right")&&(c=t.right-u.right+Je(i,"right")),c||d)if(l)o.defaultView.scrollBy(c,d);else{let h=a.scrollLeft,p=a.scrollTop;d&&(a.scrollTop+=d),c&&(a.scrollLeft+=c);let f=a.scrollLeft-h,m=a.scrollTop-p;t={left:t.left-f,top:t.top-m,right:t.right-f,bottom:t.bottom-m}}if(l||/^(fixed|sticky)$/.test(getComputedStyle(s).position))break}}function Gd(n){let t=[],e=n.ownerDocument;for(let r=n;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),n!=e);r=qi(r));return t}function Xd(n,t){for(let e=0;e<n.length;e++){let{dom:r,top:i,left:o}=n[e];r.scrollTop!=i+t&&(r.scrollTop=i+t),r.scrollLeft!=o&&(r.scrollLeft=o)}}let cr=null;function Gm(n,t){let e,r,i,o,s=2e8,a=0,l=t.top,u=t.top;for(let c=n.firstChild,d=0;c;c=c.nextSibling,d++){let h;if(c.nodeType==1)h=c.getClientRects();else{if(c.nodeType!=3)continue;h=tn(c).getClientRects()}for(let p=0;p<h.length;p++){let f=h[p];if(f.top<=l&&f.bottom>=u){l=Math.max(f.bottom,l),u=Math.min(f.top,u);let m=f.left>t.left?f.left-t.left:f.right<t.left?t.left-f.right:0;if(m<s){e=c,s=m,r=m&&e.nodeType==3?{left:f.right<t.left?f.right:f.left,top:t.top}:t,c.nodeType==1&&m&&(a=d+(t.left>=(f.left+f.right)/2?1:0));continue}}else f.top>t.top&&!i&&f.left<=t.left&&f.right>=t.left&&(i=c,o={left:Math.max(f.left,Math.min(f.right,t.left)),top:f.top});!e&&(t.left>=f.right&&t.top>=f.top||t.left>=f.left&&t.top>=f.bottom)&&(a=d+1)}}return!e&&i&&(e=i,r=o,s=0),e&&e.nodeType==3?function(c,d){let h=c.nodeValue.length,p=document.createRange();for(let f=0;f<h;f++){p.setEnd(c,f+1),p.setStart(c,f);let m=mn(p,1);if(m.top!=m.bottom&&Xu(d,m))return{node:c,offset:f+(d.left>=(m.left+m.right)/2?1:0)}}return{node:c,offset:0}}(e,r):!e||s&&e.nodeType==1?{node:n,offset:a}:Gm(e,r)}function Xu(n,t){return n.left>=t.left-1&&n.left<=t.right+1&&n.top>=t.top-1&&n.top<=t.bottom+1}function Xm(n,t,e){let r=n.childNodes.length;if(r&&e.top<e.bottom)for(let i=Math.max(0,Math.min(r-1,Math.floor(r*(t.top-e.top)/(e.bottom-e.top))-2)),o=i;;){let s=n.childNodes[o];if(s.nodeType==1){let a=s.getClientRects();for(let l=0;l<a.length;l++){let u=a[l];if(Xu(t,u))return Xm(s,t,u)}}if((o=(o+1)%r)==i)break}return n}function B0(n,t){let e,r=n.dom.ownerDocument,i=0,o=function(u,c,d){if(u.caretPositionFromPoint)try{let h=u.caretPositionFromPoint(c,d);if(h)return{node:h.offsetNode,offset:h.offset}}catch(h){}if(u.caretRangeFromPoint){let h=u.caretRangeFromPoint(c,d);if(h)return{node:h.startContainer,offset:h.startOffset}}}(r,t.left,t.top);o&&({node:e,offset:i}=o);let s,a=(n.root.elementFromPoint?n.root:r).elementFromPoint(t.left,t.top);if(!a||!n.dom.contains(a.nodeType!=1?a.parentNode:a)){let u=n.dom.getBoundingClientRect();if(!Xu(t,u)||(a=Xm(n.dom,t,u),!a))return null}if(ne)for(let u=a;e&&u;u=qi(u))u.draggable&&(e=void 0);if(a=function(u,c){let d=u.parentNode;return d&&/^li$/i.test(d.nodeName)&&c.left<u.getBoundingClientRect().left?d:u}(a,t),e){if(be&&e.nodeType==1&&(i=Math.min(i,e.childNodes.length),i<e.childNodes.length)){let c,d=e.childNodes[i];d.nodeName=="IMG"&&(c=d.getBoundingClientRect()).right<=t.left&&c.bottom>t.top&&i++}let u;go&&i&&e.nodeType==1&&(u=e.childNodes[i-1]).nodeType==1&&u.contentEditable=="false"&&u.getBoundingClientRect().top>=t.top&&i--,e==n.dom&&i==e.childNodes.length-1&&e.lastChild.nodeType==1&&t.top>e.lastChild.getBoundingClientRect().bottom?s=n.state.doc.content.size:i!=0&&e.nodeType==1&&e.childNodes[i-1].nodeName=="BR"||(s=function(c,d,h,p){let f=-1;for(let m=d,E=!1;m!=c.dom;){let g=c.docView.nearestDesc(m,!0);if(!g)return null;if(g.dom.nodeType==1&&(g.node.isBlock&&g.parent&&!E||!g.contentDOM)){let _=g.dom.getBoundingClientRect();if(g.node.isBlock&&g.parent&&!E&&(E=!0,_.left>p.left||_.top>p.top?f=g.posBefore:(_.right<p.left||_.bottom<p.top)&&(f=g.posAfter)),!g.contentDOM&&f<0&&!g.node.isText)return(g.node.isBlock?p.top<(_.top+_.bottom)/2:p.left<(_.left+_.right)/2)?g.posBefore:g.posAfter}m=g.dom.parentNode}return f>-1?f:c.docView.posFromDOM(d,h,-1)}(n,e,i,t))}s==null&&(s=function(u,c,d){let{node:h,offset:p}=Gm(c,d),f=-1;if(h.nodeType==1&&!h.firstChild){let m=h.getBoundingClientRect();f=m.left!=m.right&&d.left>(m.left+m.right)/2?1:-1}return u.docView.posFromDOM(h,p,f)}(n,a,t));let l=n.docView.nearestDesc(a,!0);return{pos:s,inside:l?l.posAtStart-l.border:-1}}function Wd(n){return n.top<n.bottom||n.left<n.right}function mn(n,t){let e=n.getClientRects();if(e.length){let r=e[t<0?0:e.length-1];if(Wd(r))return r}return Array.prototype.find.call(e,Wd)||n.getBoundingClientRect()}const H0=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function Wm(n,t,e){let{node:r,offset:i,atom:o}=n.docView.domFromPos(t,e<0?-1:1),s=go||be;if(r.nodeType==3){if(!s||!H0.test(r.nodeValue)&&(e<0?i:i!=r.nodeValue.length)){let a=i,l=i,u=e<0?1:-1;return e<0&&!i?(l++,u=-1):e>=0&&i==r.nodeValue.length?(a--,u=1):e<0?a--:l++,li(mn(tn(r,a,l),u),u<0)}{let a=mn(tn(r,i,i),e);if(be&&i&&/\s/.test(r.nodeValue[i-1])&&i<r.nodeValue.length){let l=mn(tn(r,i-1,i-1),-1);if(l.top==a.top){let u=mn(tn(r,i,i+1),-1);if(u.top!=a.top)return li(u,u.left<l.left)}}return a}}if(!n.state.doc.resolve(t-(o||0)).parent.inlineContent){if(o==null&&i&&(e<0||i==He(r))){let a=r.childNodes[i-1];if(a.nodeType==1)return wa(a.getBoundingClientRect(),!1)}if(o==null&&i<He(r)){let a=r.childNodes[i];if(a.nodeType==1)return wa(a.getBoundingClientRect(),!0)}return wa(r.getBoundingClientRect(),e>=0)}if(o==null&&i&&(e<0||i==He(r))){let a=r.childNodes[i-1],l=a.nodeType==3?tn(a,He(a)-(s?0:1)):a.nodeType!=1||a.nodeName=="BR"&&a.nextSibling?null:a;if(l)return li(mn(l,1),!1)}if(o==null&&i<He(r)){let a=r.childNodes[i];for(;a.pmViewDesc&&a.pmViewDesc.ignoreForCoords;)a=a.nextSibling;let l=a?a.nodeType==3?tn(a,0,s?0:1):a.nodeType==1?a:null:null;if(l)return li(mn(l,-1),!0)}return li(mn(r.nodeType==3?tn(r):r,-e),e>=0)}function li(n,t){if(n.width==0)return n;let e=t?n.left:n.right;return{top:n.top,bottom:n.bottom,left:e,right:e}}function wa(n,t){if(n.height==0)return n;let e=t?n.top:n.bottom;return{top:e,bottom:e,left:n.left,right:n.right}}function Kd(n,t,e){let r=n.state,i=n.root.activeElement;r!=t&&n.updateState(t),i!=n.dom&&n.focus();try{return e()}finally{r!=t&&n.updateState(r),i!=n.dom&&i&&i.focus()}}const U0=/[\u0590-\u08ac]/;let qd=null,Jd=null,Zd=!1;function $0(n,t,e){return qd==t&&Jd==e?Zd:(qd=t,Jd=e,Zd=e=="up"||e=="down"?function(r,i,o){let s=i.selection,a=o=="up"?s.$from:s.$to;return Kd(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=Wm(r,a.pos,1);for(let c=l.firstChild;c;c=c.nextSibling){let d;if(c.nodeType==1)d=c.getClientRects();else{if(c.nodeType!=3)continue;d=tn(c,0,c.nodeValue.length).getClientRects()}for(let h=0;h<d.length;h++){let p=d[h];if(p.bottom>p.top+1&&(o=="up"?u.top-p.top>2*(p.bottom-u.top):p.bottom-u.bottom>2*(u.bottom-p.top)))return!1}}return!0})}(n,t,e):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 U0.test(s.parent.textContent)&&c.modify?Kd(r,i,()=>{let{focusNode:d,focusOffset:h,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:g,focusOffset:_}=r.domSelectionRange(),A=g&&!E.contains(g.nodeType==1?g:g.parentNode)||d==g&&h==_;try{c.collapse(p,f),d&&(d!=p||h!=f)&&c.extend&&c.extend(d,h)}catch(T){}return m!=null&&(c.caretBidiLevel=m),A}):o=="left"||o=="backward"?l:u}(n,t,e))}class Do{constructor(t,e,r,i){this.parent=t,this.children=e,this.dom=r,this.contentDOM=i,this.dirty=0,r.pmViewDesc=this}matchesWidget(t){return!1}matchesMark(t){return!1}matchesNode(t,e,r){return!1}matchesHack(t){return!1}parseRule(){return null}stopEvent(t){return!1}get size(){let t=0;for(let e=0;e<this.children.length;e++)t+=this.children[e].size;return t}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let t=0;t<this.children.length;t++)this.children[t].destroy()}posBeforeChild(t){for(let e=0,r=this.posAtStart;;e++){let i=this.children[e];if(i==t)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(t,e,r){if(this.contentDOM&&this.contentDOM.contains(t.nodeType==1?t:t.parentNode)){if(r<0){let o,s;if(t==this.contentDOM)o=t.childNodes[e-1];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;o=t.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(t==this.contentDOM)o=t.childNodes[e];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;o=t.nextSibling}for(;o&&(!(s=o.pmViewDesc)||s.parent!=this);)o=o.nextSibling;return o?this.posBeforeChild(s):this.posAtEnd}}let i;if(t==this.dom&&this.contentDOM)i=e>qt(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))i=2&t.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(e==0)for(let o=t;;o=o.parentNode){if(o==this.dom){i=!1;break}if(o.previousSibling)break}if(i==null&&e==t.childNodes.length)for(let o=t;;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(t,e=!1){for(let r=!0,i=t;i;i=i.parentNode){let o,s=this.getDesc(i);if(s&&(!e||s.node)){if(!r||!(o=s.nodeDOM)||(o.nodeType==1?o.contains(t.nodeType==1?t:t.parentNode):o==t))return s;r=!1}}}getDesc(t){let e=t.pmViewDesc;for(let r=e;r;r=r.parent)if(r==this)return e}posFromDOM(t,e,r){for(let i=t;i;i=i.parentNode){let o=this.getDesc(i);if(o)return o.localPosFromDOM(t,e,r)}return-1}descAt(t){for(let e=0,r=0;e<this.children.length;e++){let i=this.children[e],o=r+i.size;if(r==t&&o!=r){for(;!i.border&&i.children.length;)i=i.children[0];return i}if(t<o)return i.descAt(t-r-i.border);r=o}}domFromPos(t,e){if(!this.contentDOM)return{node:this.dom,offset:0,atom:t+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>t||s instanceof qm){i=t-o;break}o=a}if(i)return this.children[r].domFromPos(i-this.children[r].border,e);for(let o;r&&!(o=this.children[r-1]).size&&o instanceof Km&&o.side>=0;r--);if(e<=0){let o,s=!0;for(;o=r?this.children[r-1]:null,o&&o.dom.parentNode!=this.contentDOM;r--,s=!1);return o&&e&&s&&!o.border&&!o.domAtom?o.domFromPos(o.size,e):{node:this.contentDOM,offset:o?qt(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,e):{node:this.contentDOM,offset:o?qt(o.dom):this.contentDOM.childNodes.length}}}parseRange(t,e,r=0){if(this.children.length==0)return{node:this.contentDOM,from:t,to:e,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&&t<=u){let c=s+l.border;if(t>=c&&e<=u-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(t,e,c);t=s;for(let d=a;d>0;d--){let h=this.children[d-1];if(h.size&&h.dom.parentNode==this.contentDOM&&!h.emptyChildAt(1)){i=qt(h.dom)+1;break}t-=h.size}i==-1&&(i=0)}if(i>-1&&(u>e||a==this.children.length-1)){e=u;for(let c=a+1;c<this.children.length;c++){let d=this.children[c];if(d.size&&d.dom.parentNode==this.contentDOM&&!d.emptyChildAt(-1)){o=qt(d.dom);break}e+=d.size}o==-1&&(o=this.contentDOM.childNodes.length);break}s=u}return{node:this.contentDOM,from:t,to:e,fromOffset:i,toOffset:o}}emptyChildAt(t){if(this.border||!this.contentDOM||!this.children.length)return!1;let e=this.children[t<0?0:this.children.length-1];return e.size==0||e.emptyChildAt(t)}domAfterPos(t){let{node:e,offset:r}=this.domFromPos(t,0);if(e.nodeType!=1||r==e.childNodes.length)throw new RangeError("No node after pos "+t);return e.childNodes[r]}setSelection(t,e,r,i=!1){let o=Math.min(t,e),s=Math.max(t,e);for(let h=0,p=0;h<this.children.length;h++){let f=this.children[h],m=p+f.size;if(o>p&&s<m)return f.setSelection(t-p-f.border,e-p-f.border,r,i);p=m}let a=this.domFromPos(t,t?-1:1),l=e==t?a:this.domFromPos(e,e?-1:1),u=r.getSelection(),c=!1;if((be||ne)&&t==e){let{node:h,offset:p}=a;if(h.nodeType==3){if(c=!(!p||h.nodeValue[p-1]!=`
|
|
11
|
+
`),c&&p==h.nodeValue.length)for(let f,m=h;m;m=m.parentNode){if(f=m.nextSibling){f.nodeName=="BR"&&(a=l={node:f.parentNode,offset:qt(f)+1});break}let E=m.pmViewDesc;if(E&&E.node&&E.node.isBlock)break}}else{let f=h.childNodes[p-1];c=f&&(f.nodeName=="BR"||f.contentEditable=="false")}}if(be&&u.focusNode&&u.focusNode!=l.node&&u.focusNode.nodeType==1){let h=u.focusNode.childNodes[u.focusOffset];h&&h.contentEditable=="false"&&(i=!0)}if(!(i||c&&ne)&&nr(a.node,a.offset,u.anchorNode,u.anchorOffset)&&nr(l.node,l.offset,u.focusNode,u.focusOffset))return;let d=!1;if((u.extend||t==e)&&!c){u.collapse(a.node,a.offset);try{t!=e&&u.extend(l.node,l.offset),d=!0}catch(h){}}if(!d){if(t>e){let p=a;a=l,l=p}let h=document.createRange();h.setEnd(l.node,l.offset),h.setStart(a.node,a.offset),u.removeAllRanges(),u.addRange(h)}}ignoreMutation(t){return!this.contentDOM&&t.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(t,e){for(let r=0,i=0;i<this.children.length;i++){let o=this.children[i],s=r+o.size;if(r==s?t<=s&&e>=r:t<s&&e>r){let a=r+o.border,l=s-o.border;if(t>=a&&e<=l)return this.dirty=t==r||e==s?2:1,void(t!=a||e!=l||!o.contentLost&&o.dom.parentNode==this.contentDOM?o.markDirty(t-a,e-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 t=1;for(let e=this.parent;e;e=e.parent,t++){let r=t==1?2:1;e.dirty<r&&(e.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}}class Km extends Do{constructor(t,e,r,i){let o,s=e.type.toDOM;if(typeof s=="function"&&(s=s(r,()=>o?o.parent?o.parent.posBeforeChild(o):void 0:i)),!e.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(t,[],s,null),this.widget=e,this.widget=e,o=this}matchesWidget(t){return this.dirty==0&&t.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(t){let e=this.widget.spec.stopEvent;return!!e&&e(t)}ignoreMutation(t){return t.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class j0 extends Do{constructor(t,e,r,i){super(t,[],e,null),this.textDOM=r,this.text=i}get size(){return this.text.length}localPosFromDOM(t,e){return t!=this.textDOM?this.posAtStart+(e?this.size:0):this.posAtStart+e}domFromPos(t){return{node:this.textDOM,offset:t}}ignoreMutation(t){return t.type==="characterData"&&t.target.nodeValue==t.oldValue}}class Jn extends Do{constructor(t,e,r,i){super(t,[],r,i),this.mark=e}static create(t,e,r,i){let o=i.nodeViews[e.type.name],s=o&&o(e,i,r);return s&&s.dom||(s=on.renderSpec(document,e.type.spec.toDOM(e,r))),new Jn(t,e,s.dom,s.contentDOM||s.dom)}parseRule(){return 3&this.dirty||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(t){return this.dirty!=3&&this.mark.eq(t)}markDirty(t,e){if(super.markDirty(t,e),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(t,e,r){let i=Jn.create(this.parent,this.mark,!0,r),o=this.children,s=this.size;e<s&&(o=Pl(o,e,s,r)),t>0&&(o=Pl(o,0,t,r));for(let a=0;a<o.length;a++)o[a].parent=i;return i.children=o,i}}class vn extends Do{constructor(t,e,r,i,o,s,a,l,u){super(t,[],o,s),this.node=e,this.outerDeco=r,this.innerDeco=i,this.nodeDOM=a}static create(t,e,r,i,o,s){let a,l=o.nodeViews[e.type.name],u=l&&l(e,o,()=>a?a.parent?a.parent.posBeforeChild(a):void 0:s,r,i),c=u&&u.dom,d=u&&u.contentDOM;if(e.isText)if(c){if(c.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else c=document.createTextNode(e.text);else c||({dom:c,contentDOM:d}=on.renderSpec(document,e.type.spec.toDOM(e)));d||e.isText||c.nodeName=="BR"||(c.hasAttribute("contenteditable")||(c.contentEditable="false"),e.type.spec.draggable&&(c.draggable=!0));let h=c;return c=Qm(c,r,e),u?a=new Y0(t,e,r,i,c,d||null,h,u,o,s+1):e.isText?new Js(t,e,r,i,c,h,o):new vn(t,e,r,i,c,d||null,h,o,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(t.preserveWhitespace="full"),this.contentDOM)if(this.contentLost){for(let e=this.children.length-1;e>=0;e--){let r=this.children[e];if(this.dom.contains(r.dom.parentNode)){t.contentElement=r.dom.parentNode;break}}t.contentElement||(t.getContent=()=>H.empty)}else t.contentElement=this.contentDOM;else t.getContent=()=>this.node.content;return t}matchesNode(t,e,r){return this.dirty==0&&t.eq(this.node)&&xl(e,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(t,e){let r=this.node.inlineContent,i=e,o=t.composing?this.localCompositionInfo(t,e):null,s=o&&o.pos>-1?o:null,a=o&&o.pos<0,l=new z0(this,s&&s.node,t);(function(u,c,d,h){let p=c.locals(u),f=0;if(p.length==0){for(let _=0;_<u.childCount;_++){let A=u.child(_);h(A,p,c.forChild(f,A),_),f+=A.nodeSize}return}let m=0,E=[],g=null;for(let _=0;;){let A,T,S,v;for(;m<p.length&&p[m].to==f;){let D=p[m++];D.widget&&(A?(T||(T=[A])).push(D):A=D)}if(A)if(T){T.sort(G0);for(let D=0;D<T.length;D++)d(T[D],_,!!g)}else d(A,_,!!g);if(g)v=-1,S=g,g=null;else{if(!(_<u.childCount))break;v=_,S=u.child(_++)}for(let D=0;D<E.length;D++)E[D].to<=f&&E.splice(D--,1);for(;m<p.length&&p[m].from<=f&&p[m].to>f;)E.push(p[m++]);let C=f+S.nodeSize;if(S.isText){let D=C;m<p.length&&p[m].from<D&&(D=p[m].from);for(let O=0;O<E.length;O++)E[O].to<D&&(D=E[O].to);D<C&&(g=S.cut(D-f),S=S.cut(0,D-f),C=D,v=-1)}else for(;m<p.length&&p[m].to<=C;)m++;let R=S.isInline&&!S.isLeaf?E.filter(D=>!D.inline):E.slice();h(S,R,c.forChild(f,S),v),f=C}})(this.node,this.innerDeco,(u,c,d)=>{u.spec.marks?l.syncToMarks(u.spec.marks,r,t):u.type.side>=0&&!d&&l.syncToMarks(c==this.node.childCount?st.none:this.node.child(c).marks,r,t),l.placeWidget(u,t,i)},(u,c,d,h)=>{let p;l.syncToMarks(u.marks,r,t),l.findNodeMatch(u,c,d,h)||a&&t.state.selection.from>i&&t.state.selection.to<i+u.nodeSize&&(p=l.findIndexWithChild(o.node))>-1&&l.updateNodeAt(u,c,d,p,t)||l.updateNextNode(u,c,d,t,h,i)||l.addNode(u,c,d,t,i),i+=u.nodeSize}),l.syncToMarks([],r,t),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==2)&&(s&&this.protectLocalComposition(t,s),Jm(this.contentDOM,this.children,t),zr&&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(t,e){let{from:r,to:i}=t.state.selection;if(!(t.state.selection instanceof lt)||r<e||i>e+this.node.content.size)return null;let o=t.domSelectionRange(),s=function(a,l){for(;;){if(a.nodeType==3)return a;if(a.nodeType==1&&l>0){if(a.childNodes.length>l&&a.childNodes[l].nodeType==3)return a.childNodes[l];l=He(a=a.childNodes[l-1])}else{if(!(a.nodeType==1&&l<a.childNodes.length))return null;a=a.childNodes[l],l=0}}}(o.focusNode,o.focusOffset);if(!s||!this.dom.contains(s.parentNode))return null;if(this.node.inlineContent){let a=s.nodeValue,l=function(u,c,d,h){for(let p=0,f=0;p<u.childCount&&f<=h;){let m=u.child(p++),E=f;if(f+=m.nodeSize,!m.isText)continue;let g=m.text;for(;p<u.childCount;){let _=u.child(p++);if(f+=_.nodeSize,!_.isText)break;g+=_.text}if(f>=d){if(f>=h&&g.slice(h-c.length-E,h-E)==c)return h-c.length;let _=E<h?g.lastIndexOf(c,h-E-1):-1;if(_>=0&&_+c.length+E>=d)return E+_;if(d==h&&g.length>=h+c.length-E&&g.slice(h-E,h-E+c.length)==c)return h}}return-1}(this.node.content,a,r-e,i-e);return l<0?null:{node:s,pos:l,text:a}}return{node:s,pos:-1,text:""}}protectLocalComposition(t,{node:e,pos:r,text:i}){if(this.getDesc(e))return;let o=e;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 j0(this,o,e,i);t.input.compositionNodes.push(s),this.children=Pl(this.children,r,r+i.length,t,s)}update(t,e,r,i){return!(this.dirty==3||!t.sameMarkup(this.node))&&(this.updateInner(t,e,r,i),!0)}updateInner(t,e,r,i){this.updateOuterDeco(e),this.node=t,this.innerDeco=r,this.contentDOM&&this.updateChildren(i,this.posAtStart),this.dirty=0}updateOuterDeco(t){if(xl(t,this.outerDeco))return;let e=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=Zm(this.dom,this.nodeDOM,Ml(this.outerDeco,this.node,e),Ml(t,this.node,e)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=t}selectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.dom.draggable=!0)}deselectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||this.dom.removeAttribute("draggable")}get domAtom(){return this.node.isAtom}}function Qd(n,t,e,r,i){Qm(r,t,n);let o=new vn(void 0,n,t,e,r,r,r,i,0);return o.contentDOM&&o.updateChildren(i,0),o}class Js extends vn{constructor(t,e,r,i,o,s,a){super(t,e,r,i,o,null,s,a,0)}parseRule(){let t=this.nodeDOM.parentNode;for(;t&&t!=this.dom&&!t.pmIsDeco;)t=t.parentNode;return{skip:t||!0}}update(t,e,r,i){return!(this.dirty==3||this.dirty!=0&&!this.inParent()||!t.sameMarkup(this.node))&&(this.updateOuterDeco(e),this.dirty==0&&t.text==this.node.text||t.text==this.nodeDOM.nodeValue||(this.nodeDOM.nodeValue=t.text,i.trackWrites==this.nodeDOM&&(i.trackWrites=null)),this.node=t,this.dirty=0,!0)}inParent(){let t=this.parent.contentDOM;for(let e=this.nodeDOM;e;e=e.parentNode)if(e==t)return!0;return!1}domFromPos(t){return{node:this.nodeDOM,offset:t}}localPosFromDOM(t,e,r){return t==this.nodeDOM?this.posAtStart+Math.min(e,this.node.text.length):super.localPosFromDOM(t,e,r)}ignoreMutation(t){return t.type!="characterData"&&t.type!="selection"}slice(t,e,r){let i=this.node.cut(t,e),o=document.createTextNode(i.text);return new Js(this.parent,i,this.outerDeco,this.innerDeco,o,o,r)}markDirty(t,e){super.markDirty(t,e),this.dom==this.nodeDOM||t!=0&&e!=this.nodeDOM.nodeValue.length||(this.dirty=3)}get domAtom(){return!1}}class qm extends Do{parseRule(){return{ignore:!0}}matchesHack(t){return this.dirty==0&&this.dom.nodeName==t}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class Y0 extends vn{constructor(t,e,r,i,o,s,a,l,u,c){super(t,e,r,i,o,s,a,u,c),this.spec=l}update(t,e,r,i){if(this.dirty==3)return!1;if(this.spec.update){let o=this.spec.update(t,e,r);return o&&this.updateInner(t,e,r,i),o}return!(!this.contentDOM&&!t.isLeaf)&&super.update(t,e,r,i)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(t,e,r,i){this.spec.setSelection?this.spec.setSelection(t,e,r):super.setSelection(t,e,r,i)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(t){return!!this.spec.stopEvent&&this.spec.stopEvent(t)}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}}function Jm(n,t,e){let r=n.firstChild,i=!1;for(let o=0;o<t.length;o++){let s=t[o],a=s.dom;if(a.parentNode==n){for(;a!=r;)r=th(r),i=!0;r=r.nextSibling}else i=!0,n.insertBefore(a,r);if(s instanceof Jn){let l=r?r.previousSibling:n.lastChild;Jm(s.contentDOM,s.children,e),r=l?l.nextSibling:n.firstChild}}for(;r;)r=th(r),i=!0;i&&e.trackWrites==n&&(e.trackWrites=null)}const Mi=function(n){n&&(this.nodeName=n)};Mi.prototype=Object.create(null);const jn=[new Mi];function Ml(n,t,e){if(n.length==0)return jn;let r=e?jn[0]:new Mi,i=[r];for(let o=0;o<n.length;o++){let s=n[o].type.attrs;if(s){s.nodeName&&i.push(r=new Mi(s.nodeName));for(let a in s){let l=s[a];l!=null&&(e&&i.length==1&&i.push(r=new Mi(t.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 Zm(n,t,e,r){if(e==jn&&r==jn)return t;let i=t;for(let o=0;o<r.length;o++){let s=r[o],a=e[o];if(o){let l;a&&a.nodeName==s.nodeName&&i!=n&&(l=i.parentNode)&&l.nodeName.toLowerCase()==s.nodeName||(l=document.createElement(s.nodeName),l.pmIsDeco=!0,l.appendChild(i),a=jn[0]),i=l}V0(i,a||jn[0],s)}return i}function V0(n,t,e){for(let r in t)r=="class"||r=="style"||r=="nodeName"||r in e||n.removeAttribute(r);for(let r in e)r!="class"&&r!="style"&&r!="nodeName"&&e[r]!=t[r]&&n.setAttribute(r,e[r]);if(t.class!=e.class){let r=t.class?t.class.split(" ").filter(Boolean):[],i=e.class?e.class.split(" ").filter(Boolean):[];for(let o=0;o<r.length;o++)i.indexOf(r[o])==-1&&n.classList.remove(r[o]);for(let o=0;o<i.length;o++)r.indexOf(i[o])==-1&&n.classList.add(i[o]);n.classList.length==0&&n.removeAttribute("class")}if(t.style!=e.style){if(t.style){let r,i=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g;for(;r=i.exec(t.style);)n.style.removeProperty(r[1])}e.style&&(n.style.cssText+=e.style)}}function Qm(n,t,e){return Zm(n,n,jn,Ml(t,e,n.nodeType!=1))}function xl(n,t){if(n.length!=t.length)return!1;for(let e=0;e<n.length;e++)if(!n[e].type.eq(t[e].type))return!1;return!0}function th(n){let t=n.nextSibling;return n.parentNode.removeChild(n),t}class z0{constructor(t,e,r){this.lock=e,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=t,this.preMatch=function(i,o){let s=o,a=s.children.length,l=i.childCount,u=new Map,c=[];t:for(;l>0;){let d;for(;;)if(a){let p=s.children[a-1];if(!(p instanceof Jn)){d=p,a--;break}s=p,a=p.children.length}else{if(s==o)break t;a=s.parent.children.indexOf(s),s=s.parent}let h=d.node;if(h){if(h!=i.child(l-1))break;--l,u.set(d,l),c.push(d)}}return{index:l,matched:u,matches:c.reverse()}}(t.node.content,t)}destroyBetween(t,e){if(t!=e){for(let r=t;r<e;r++)this.top.children[r].destroy();this.top.children.splice(t,e-t),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(t,e,r){let i=0,o=this.stack.length>>1,s=Math.min(o,t.length);for(;i<s&&(i==o-1?this.top:this.stack[i+1<<1]).matchesMark(t[i])&&t[i].type.spec.spanning!==!1;)i++;for(;i<o;)this.destroyRest(),this.top.dirty=0,this.index=this.stack.pop(),this.top=this.stack.pop(),o--;for(;o<t.length;){this.stack.push(this.top,this.index+1);let a=-1;for(let l=this.index;l<Math.min(this.index+3,this.top.children.length);l++){let u=this.top.children[l];if(u.matchesMark(t[o])&&!this.isLocked(u.dom)){a=l;break}}if(a>-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{let l=Jn.create(this.top,t[o],e,r);this.top.children.splice(this.index,0,l),this.top=l,this.changed=!0}this.index=0,o++}}findNodeMatch(t,e,r,i){let o,s=-1;if(i>=this.preMatch.index&&(o=this.preMatch.matches[i-this.preMatch.index]).parent==this.top&&o.matchesNode(t,e,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(t,e,r)&&!this.preMatch.matched.has(u)){s=a;break}}return!(s<0)&&(this.destroyBetween(this.index,s),this.index++,!0)}updateNodeAt(t,e,r,i,o){let s=this.top.children[i];return s.dirty==3&&s.dom==s.contentDOM&&(s.dirty=2),!!s.update(t,e,r,o)&&(this.destroyBetween(this.index,i),this.index++,!0)}findIndexWithChild(t){for(;;){let e=t.parentNode;if(!e)return-1;if(e==this.top.contentDOM){let r=t.pmViewDesc;if(r){for(let i=this.index;i<this.top.children.length;i++)if(this.top.children[i]==r)return i}return-1}t=e}}updateNextNode(t,e,r,i,o,s){for(let a=this.index;a<this.top.children.length;a++){let l=this.top.children[a];if(l instanceof vn){let u=this.preMatch.matched.get(l);if(u!=null&&u!=o)return!1;let c,d=l.dom,h=this.isLocked(d)&&!(t.isText&&l.node&&l.node.isText&&l.nodeDOM.nodeValue==t.text&&l.dirty!=3&&xl(e,l.outerDeco));if(!h&&l.update(t,e,r,i))return this.destroyBetween(this.index,a),l.dom!=d&&(this.changed=!0),this.index++,!0;if(!h&&(c=this.recreateWrapper(l,t,e,r,i,s)))return 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(t,e,r,i,o,s){if(t.dirty||e.isAtom||!t.children.length||!t.node.content.eq(e.content))return null;let a=vn.create(this.top,e,r,i,o,s);if(a.contentDOM){a.children=t.children,t.children=[];for(let l of a.children)l.parent=a}return t.destroy(),a}addNode(t,e,r,i,o){let s=vn.create(this.top,t,e,r,i,o);s.contentDOM&&s.updateChildren(i,o+1),this.top.children.splice(this.index++,0,s),this.changed=!0}placeWidget(t,e,r){let i=this.index<this.top.children.length?this.top.children[this.index]:null;if(!i||!i.matchesWidget(t)||t!=i.widget&&i.widget.type.toDOM.parentNode){let o=new Km(this.top,t,e,r);this.top.children.splice(this.index++,0,o),this.changed=!0}else this.index++}addTextblockHacks(){let t=this.top.children[this.index-1],e=this.top;for(;t instanceof Jn;)e=t,t=e.children[e.children.length-1];(!t||!(t instanceof Js)||/\n$/.test(t.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(t.node.text))&&((ne||jt)&&t&&t.dom.contentEditable=="false"&&this.addHackNode("IMG",e),this.addHackNode("BR",this.top))}addHackNode(t,e){if(e==this.top&&this.index<e.children.length&&e.children[this.index].matchesHack(t))this.index++;else{let r=document.createElement(t);t=="IMG"&&(r.className="ProseMirror-separator",r.alt=""),t=="BR"&&(r.className="ProseMirror-trailingBreak");let i=new qm(this.top,[],r,null);e!=this.top?e.children.push(i):e.children.splice(this.index++,0,i),this.changed=!0}}isLocked(t){return this.lock&&(t==this.lock||t.nodeType==1&&t.contains(this.lock.parentNode))}}function G0(n,t){return n.type.side-t.type.side}function Pl(n,t,e,r,i){let o=[];for(let s=0,a=0;s<n.length;s++){let l=n[s],u=a,c=a+=l.size;u>=e||c<=t?o.push(l):(u<t&&o.push(l.slice(0,t-u,r)),i&&(o.push(i),i=void 0),c>e&&o.push(l.slice(e-u,l.size,r)))}return o}function Wu(n,t=null){let e=n.domSelectionRange(),r=n.state.doc;if(!e.focusNode)return null;let i=n.docView.nearestDesc(e.focusNode),o=i&&i.size==0,s=n.docView.posFromDOM(e.focusNode,e.focusOffset,1);if(s<0)return null;let a,l,u=r.resolve(s);if(qs(e)){for(a=u;i&&!i.node;)i=i.parent;let c=i.node;if(i&&c.isAtom&&W.isSelectable(c)&&i.parent&&(!c.isInline||!function(d,h,p){for(let f=h==0,m=h==He(d);f||m;){if(d==p)return!0;let E=qt(d);if(!(d=d.parentNode))return!1;f=f&&E==0,m=m&&E==He(d)}}(e.focusNode,e.focusOffset,i.dom))){let d=i.posBefore;l=new W(s==d?u:r.resolve(d))}}else{let c=n.docView.posFromDOM(e.anchorNode,e.anchorOffset,1);if(c<0)return null;a=r.resolve(c)}return l||(l=Ku(n,a,u,t=="pointer"||n.state.selection.head<u.pos&&!o?1:-1)),l}function eh(n){return n.editable?n.hasFocus():eE(n)&&document.activeElement&&document.activeElement.contains(n.dom)}function un(n,t=!1){let e=n.state.selection;if(tE(n,e),eh(n)){if(!t&&n.input.mouseDown&&n.input.mouseDown.allowDefault&&jt){let r=n.domSelectionRange(),i=n.domObserver.currentSelection;if(r.anchorNode&&i.anchorNode&&nr(r.anchorNode,r.anchorOffset,i.anchorNode,i.anchorOffset))return n.input.mouseDown.delayedSelectionSync=!0,void n.domObserver.setCurSelection()}if(n.domObserver.disconnectSelection(),n.cursorWrapper)(function(r){let i=r.domSelection(),o=document.createRange(),s=r.cursorWrapper.dom,a=s.nodeName=="IMG";a?o.setEnd(s.parentNode,qt(s)+1):o.setEnd(s,0),o.collapse(!1),i.removeAllRanges(),i.addRange(o),!a&&!r.state.selection.visible&&ae&&Sn<=11&&(s.disabled=!0,s.disabled=!1)})(n);else{let r,i,{anchor:o,head:s}=e;!nh||e instanceof lt||(e.$from.parent.inlineContent||(r=rh(n,e.from)),e.empty||e.$from.parent.inlineContent||(i=rh(n,e.to))),n.docView.setSelection(o,s,n.root,t),nh&&(r&&ih(r),i&&ih(i)),e.visible?n.dom.classList.remove("ProseMirror-hideselection"):(n.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&function(a){let l=a.dom.ownerDocument;l.removeEventListener("selectionchange",a.input.hideSelectionGuard);let u=a.domSelectionRange(),c=u.anchorNode,d=u.anchorOffset;l.addEventListener("selectionchange",a.input.hideSelectionGuard=()=>{u.anchorNode==c&&u.anchorOffset==d||(l.removeEventListener("selectionchange",a.input.hideSelectionGuard),setTimeout(()=>{eh(a)&&!a.state.selection.visible||a.dom.classList.remove("ProseMirror-hideselection")},20))})}(n))}n.domObserver.setCurSelection(),n.domObserver.connectSelection()}}const nh=ne||jt&&w0<63;function rh(n,t){let{node:e,offset:r}=n.docView.domFromPos(t,0),i=r<e.childNodes.length?e.childNodes[r]:null,o=r?e.childNodes[r-1]:null;if(ne&&i&&i.contentEditable=="false")return Fa(i);if(!(i&&i.contentEditable!="false"||o&&o.contentEditable!="false")){if(i)return Fa(i);if(o)return Fa(o)}}function Fa(n){return n.contentEditable="true",ne&&n.draggable&&(n.draggable=!1,n.wasDraggable=!0),n}function ih(n){n.contentEditable="false",n.wasDraggable&&(n.draggable=!0,n.wasDraggable=null)}function tE(n,t){if(t instanceof W){let e=n.docView.descAt(t.from);e!=n.lastSelectedViewDesc&&(oh(n),e&&e.selectNode(),n.lastSelectedViewDesc=e)}else oh(n)}function oh(n){n.lastSelectedViewDesc&&(n.lastSelectedViewDesc.parent&&n.lastSelectedViewDesc.deselectNode(),n.lastSelectedViewDesc=void 0)}function Ku(n,t,e,r){return n.someProp("createSelectionBetween",i=>i(n,t,e))||lt.between(t,e,r)}function sh(n){return!(n.editable&&!n.hasFocus())&&eE(n)}function eE(n){let t=n.domSelectionRange();if(!t.anchorNode)return!1;try{return n.dom.contains(t.anchorNode.nodeType==3?t.anchorNode.parentNode:t.anchorNode)&&(n.editable||n.dom.contains(t.focusNode.nodeType==3?t.focusNode.parentNode:t.focusNode))}catch(e){return!1}}function Bl(n,t){let{$anchor:e,$head:r}=n.selection,i=t>0?e.max(r):e.min(r),o=i.parent.inlineContent?i.depth?n.doc.resolve(t>0?i.after():i.before()):null:i;return o&&rt.findFrom(o,t)}function gn(n,t){return n.dispatch(n.state.tr.setSelection(t).scrollIntoView()),!0}function ah(n,t,e){let r=n.state.selection;if(!(r instanceof lt)){if(r instanceof W&&r.node.isInline)return gn(n,new lt(t>0?r.$to:r.$from));{let i=Bl(n.state,t);return!!i&&gn(n,i)}}if(e.indexOf("s")>-1){let{$head:i}=r,o=i.textOffset?null:t<0?i.nodeBefore:i.nodeAfter;if(!o||o.isText||!o.isLeaf)return!1;let s=n.state.doc.resolve(i.pos+o.nodeSize*(t<0?-1:1));return gn(n,new lt(r.$anchor,s))}if(!r.empty)return!1;if(n.endOfTextblock(t>0?"forward":"backward")){let i=Bl(n.state,t);return!!(i&&i instanceof W)&&gn(n,i)}if(!(_e&&e.indexOf("m")>-1)){let i,o=r.$head,s=o.textOffset?null:t<0?o.nodeBefore:o.nodeAfter;if(!s||s.isText)return!1;let a=t<0?o.pos-s.nodeSize:o.pos;return!!(s.isAtom||(i=n.docView.descAt(a))&&!i.contentDOM)&&(W.isSelectable(s)?gn(n,new W(t<0?n.state.doc.resolve(o.pos-s.nodeSize):o)):!!go&&gn(n,new lt(n.state.doc.resolve(t<0?a:a+s.nodeSize))))}}function wo(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function ui(n,t){let e=n.pmViewDesc;return e&&e.size==0&&(t<0||n.nextSibling||n.nodeName!="BR")}function dr(n,t){return t<0?function(e){let r=e.domSelectionRange(),i=r.focusNode,o=r.focusOffset;if(!i)return;let s,a,l=!1;for(be&&i.nodeType==1&&o<wo(i)&&ui(i.childNodes[o],-1)&&(l=!0);;)if(o>0){if(i.nodeType!=1)break;{let u=i.childNodes[o-1];if(ui(u,-1))s=i,a=--o;else{if(u.nodeType!=3)break;i=u,o=i.nodeValue.length}}}else{if(lh(i))break;{let u=i.previousSibling;for(;u&&ui(u,-1);)s=i.parentNode,a=qt(u),u=u.previousSibling;if(u)i=u,o=wo(i);else{if(i=i.parentNode,i==e.dom)break;o=0}}}l?Ma(e,i,o):s&&Ma(e,s,a)}(n):function(e){let r=e.domSelectionRange(),i=r.focusNode,o=r.focusOffset;if(!i)return;let s,a,l=wo(i);for(;;)if(o<l){if(i.nodeType!=1||!ui(i.childNodes[o],1))break;s=i,a=++o}else{if(lh(i))break;{let u=i.nextSibling;for(;u&&ui(u,1);)s=u.parentNode,a=qt(u)+1,u=u.nextSibling;if(u)i=u,o=0,l=wo(i);else{if(i=i.parentNode,i==e.dom)break;o=l=0}}}s&&Ma(e,s,a)}(n)}function lh(n){let t=n.pmViewDesc;return t&&t.node&&t.node.isBlock}function Ma(n,t,e){if(t.nodeType!=3){let o,s;(s=function(a,l){for(;a&&l==a.childNodes.length&&!bl(a);)l=qt(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}}(t,e))?(t=s,e=0):(o=function(a,l){for(;a&&!l&&!bl(a);)l=qt(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}}(t,e))&&(t=o,e=o.nodeValue.length)}let r=n.domSelection();if(qs(r)){let o=document.createRange();o.setEnd(t,e),o.setStart(t,e),r.removeAllRanges(),r.addRange(o)}else r.extend&&r.extend(t,e);n.domObserver.setCurSelection();let{state:i}=n;setTimeout(()=>{n.state==i&&un(n)},50)}function uh(n,t){let e=n.state.doc.resolve(t);if(!jt&&!F0&&e.parent.inlineContent){let r=n.coordsAtPos(t);if(t>e.start()){let i=n.coordsAtPos(t-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(t<e.end()){let i=n.coordsAtPos(t+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(n.dom).direction=="rtl"?"rtl":"ltr"}function ch(n,t,e){let r=n.state.selection;if(r instanceof lt&&!r.empty||e.indexOf("s")>-1||_e&&e.indexOf("m")>-1)return!1;let{$from:i,$to:o}=r;if(!i.parent.inlineContent||n.endOfTextblock(t<0?"up":"down")){let s=Bl(n.state,t);if(s&&s instanceof W)return gn(n,s)}if(!i.parent.inlineContent){let s=t<0?i:o,a=r instanceof Ee?rt.near(s,t):rt.findFrom(s,t);return!!a&&gn(n,a)}return!1}function dh(n,t){if(!(n.state.selection instanceof lt))return!0;let{$head:e,$anchor:r,empty:i}=n.state.selection;if(!e.sameParent(r))return!0;if(!i)return!1;if(n.endOfTextblock(t>0?"forward":"backward"))return!0;let o=!e.textOffset&&(t<0?e.nodeBefore:e.nodeAfter);if(o&&!o.isText){let s=n.state.tr;return t<0?s.delete(e.pos-o.nodeSize,e.pos):s.delete(e.pos,e.pos+o.nodeSize),n.dispatch(s),!0}return!1}function hh(n,t,e){n.domObserver.stop(),t.contentEditable=e,n.domObserver.start()}function X0(n,t){let e=t.keyCode,r=function(i){let o="";return i.ctrlKey&&(o+="c"),i.metaKey&&(o+="m"),i.altKey&&(o+="a"),i.shiftKey&&(o+="s"),o}(t);if(e==8||_e&&e==72&&r=="c")return dh(n,-1)||dr(n,-1);if(e==46&&!t.shiftKey||_e&&e==68&&r=="c")return dh(n,1)||dr(n,1);if(e==13||e==27)return!0;if(e==37||_e&&e==66&&r=="c"){let i=e==37?uh(n,n.state.selection.from)=="ltr"?-1:1:-1;return ah(n,i,r)||dr(n,i)}if(e==39||_e&&e==70&&r=="c"){let i=e==39?uh(n,n.state.selection.from)=="ltr"?1:-1:1;return ah(n,i,r)||dr(n,i)}return e==38||_e&&e==80&&r=="c"?ch(n,-1,r)||dr(n,-1):e==40||_e&&e==78&&r=="c"?function(i){if(!ne||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;hh(i,a,"true"),setTimeout(()=>hh(i,a,"false"),20)}return!1}(n)||ch(n,1,r)||dr(n,1):r==(_e?"m":"c")&&(e==66||e==73||e==89||e==90)}function nE(n,t){n.someProp("transformCopied",p=>{t=p(t,n)});let e=[],{content:r,openStart:i,openEnd:o}=t;for(;i>1&&o>1&&r.childCount==1&&r.firstChild.childCount==1;){i--,o--;let p=r.firstChild;e.push(p.type.name,p.attrs!=p.type.defaultAttrs?p.attrs:null),r=p.content}let s=n.someProp("clipboardSerializer")||on.fromSchema(n.state.schema),a=lE(),l=a.createElement("div");l.appendChild(s.serializeFragment(r,{document:a}));let u,c=l.firstChild,d=0;for(;c&&c.nodeType==1&&(u=aE[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),d++}c=l.firstChild}c&&c.nodeType==1&&c.setAttribute("data-pm-slice",`${i} ${o}${d?` -${d}`:""} ${JSON.stringify(e)}`);let h=n.someProp("clipboardTextSerializer",p=>p(t,n))||t.content.textBetween(0,t.content.size,`
|
|
12
|
+
|
|
13
|
+
`);return{dom:l,text:h}}function rE(n,t,e,r,i){let o,s,a=i.parent.type.spec.code;if(!e&&!t)return null;let l=t&&(r||a||!e);if(l){if(n.someProp("transformPastedText",h=>{t=h(t,a||r,n)}),a)return t?new B(H.from(n.state.schema.text(t.replace(/\r\n?/g,`
|
|
14
|
+
`))),0,0):B.empty;let d=n.someProp("clipboardTextParser",h=>h(t,i,r,n));if(d)s=d;else{let h=i.marks(),{schema:p}=n.state,f=on.fromSchema(p);o=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(m=>{let E=o.appendChild(document.createElement("p"));m&&E.appendChild(f.serializeNode(p.text(m,h)))})}}else n.someProp("transformPastedHTML",d=>{e=d(e,n)}),o=function(d){let h=/^(\s*<meta [^>]*>)*/.exec(d);h&&(d=d.slice(h[0].length));let p,f=lE().createElement("div"),m=/<([a-z][^>\s]+)/i.exec(d);if((p=m&&aE[m[1].toLowerCase()])&&(d=p.map(E=>"<"+E+">").join("")+d+p.map(E=>"</"+E+">").reverse().join("")),f.innerHTML=d,p)for(let E=0;E<p.length;E++)f=f.querySelector(p[E])||f;return f}(e),go&&function(d){let h=d.querySelectorAll(jt?"span:not([class]):not([style])":"span.Apple-converted-space");for(let p=0;p<h.length;p++){let f=h[p];f.childNodes.length==1&&f.textContent==" "&&f.parentNode&&f.parentNode.replaceChild(d.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 d=+c[3];d>0;d--){let h=o.firstChild;for(;h&&h.nodeType!=1;)h=h.nextSibling;if(!h)break;o=h}if(s||(s=(n.someProp("clipboardParser")||n.someProp("domParser")||Ki.fromSchema(n.state.schema)).parseSlice(o,{preserveWhitespace:!(!l&&!c),context:i,ruleFromNode:h=>h.nodeName!="BR"||h.nextSibling||!h.parentNode||W0.test(h.parentNode.nodeName)?null:{ignore:!0}})),c)s=function(d,h){if(!d.size)return d;let p,f=d.content.firstChild.type.schema;try{p=JSON.parse(h)}catch(_){return d}let{content:m,openStart:E,openEnd:g}=d;for(let _=p.length-2;_>=0;_-=2){let A=f.nodes[p[_]];if(!A||A.hasRequiredAttrs())break;m=H.from(A.create(p[_+1],m)),E++,g++}return new B(m,E,g)}(ph(s,+c[1],+c[2]),c[4]);else if(s=B.maxOpen(function(d,h){if(d.childCount<2)return d;for(let p=h.depth;p>=0;p--){let f,m=h.node(p).contentMatchAt(h.index(p)),E=[];if(d.forEach(g=>{if(!E)return;let _,A=m.findWrapping(g.type);if(!A)return E=null;if(_=E.length&&f.length&&oE(A,f,g,E[E.length-1],0))E[E.length-1]=_;else{E.length&&(E[E.length-1]=sE(E[E.length-1],f.length));let T=iE(g,A);E.push(T),m=m.matchType(T.type),f=A}}),E)return H.from(E)}return d}(s.content,i),!0),s.openStart||s.openEnd){let d=0,h=0;for(let p=s.content.firstChild;d<s.openStart&&!p.type.spec.isolating;d++,p=p.firstChild);for(let p=s.content.lastChild;h<s.openEnd&&!p.type.spec.isolating;h++,p=p.lastChild);s=ph(s,d,h)}return n.someProp("transformPasted",d=>{s=d(s,n)}),s}const W0=/^(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 iE(n,t,e=0){for(let r=t.length-1;r>=e;r--)n=t[r].create(null,H.from(n));return n}function oE(n,t,e,r,i){if(i<n.length&&i<t.length&&n[i]==t[i]){let o=oE(n,t,e,r.lastChild,i+1);if(o)return r.copy(r.content.replaceChild(r.childCount-1,o));if(r.contentMatchAt(r.childCount).matchType(i==n.length-1?e.type:n[i+1]))return r.copy(r.content.append(H.from(iE(e,n,i+1))))}}function sE(n,t){if(t==0)return n;let e=n.content.replaceChild(n.childCount-1,sE(n.lastChild,t-1)),r=n.contentMatchAt(n.childCount).fillBefore(H.empty,!0);return n.copy(e.append(r))}function Hl(n,t,e,r,i,o){let s=t<0?n.firstChild:n.lastChild,a=s.content;return n.childCount>1&&(o=0),i<r-1&&(a=Hl(a,t,e,r,i+1,o)),i>=e&&(a=t<0?s.contentMatchAt(0).fillBefore(a,o<=i).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(H.empty,!0))),n.replaceChild(t<0?0:n.childCount-1,s.copy(a))}function ph(n,t,e){return t<n.openStart&&(n=new B(Hl(n.content,-1,t,n.openStart,0,n.openEnd),t,n.openEnd)),e<n.openEnd&&(n=new B(Hl(n.content,1,e,n.openEnd,0,0),n.openStart,e)),n}const aE={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 fh=null;function lE(){return fh||(fh=document.implementation.createHTMLDocument("title"))}const Jt={},ee={},K0={touchstart:!0,touchmove:!0};class q0{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastAndroidDelete=0,this.composing=!1,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function On(n,t){n.input.lastSelectionOrigin=t,n.input.lastSelectionTime=Date.now()}function xa(n){n.someProp("handleDOMEvents",t=>{for(let e in t)n.input.eventHandlers[e]||n.dom.addEventListener(e,n.input.eventHandlers[e]=r=>Ul(n,r))})}function Ul(n,t){return n.someProp("handleDOMEvents",e=>{let r=e[t.type];return!!r&&(r(n,t)||t.defaultPrevented)})}function J0(n,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let e=t.target;e!=n.dom;e=e.parentNode)if(!e||e.nodeType==11||e.pmViewDesc&&e.pmViewDesc.stopEvent(t))return!1;return!0}function gs(n){return{left:n.clientX,top:n.clientY}}function qu(n,t,e,r,i){if(r==-1)return!1;let o=n.state.doc.resolve(r);for(let s=o.depth+1;s>0;s--)if(n.someProp(t,a=>s>o.depth?a(n,e,o.nodeAfter,o.before(s),i,!0):a(n,e,o.node(s),o.before(s),i,!1)))return!0;return!1}function Ir(n,t,e){n.focused||n.focus();let r=n.state.tr.setSelection(t);r.setMeta("pointer",!0),n.dispatch(r)}function Z0(n,t,e,r,i){return qu(n,"handleClickOn",t,e,r)||n.someProp("handleClick",o=>o(n,t,r))||(i?function(o,s){if(s==-1)return!1;let a,l,u=o.state.selection;u instanceof W&&(a=u.node);let c=o.state.doc.resolve(s);for(let d=c.depth+1;d>0;d--){let h=d>c.depth?c.nodeAfter:c.node(d);if(W.isSelectable(h)){l=a&&u.$from.depth>0&&d>=u.$from.depth&&c.before(u.$from.depth+1)==u.$from.pos?c.before(u.$from.depth):c.before(d);break}}return l!=null&&(Ir(o,W.create(o.state.doc,l)),!0)}(n,e):function(o,s){if(s==-1)return!1;let a=o.state.doc.resolve(s),l=a.nodeAfter;return!!(l&&l.isAtom&&W.isSelectable(l))&&(Ir(o,new W(a)),!0)}(n,e))}function Q0(n,t,e,r){return qu(n,"handleDoubleClickOn",t,e,r)||n.someProp("handleDoubleClick",i=>i(n,t,r))}function tA(n,t,e,r){return qu(n,"handleTripleClickOn",t,e,r)||n.someProp("handleTripleClick",i=>i(n,t,r))||function(i,o,s){if(s.button!=0)return!1;let a=i.state.doc;if(o==-1)return!!a.inlineContent&&(Ir(i,lt.create(a,0,a.content.size)),!0);let l=a.resolve(o);for(let u=l.depth+1;u>0;u--){let c=u>l.depth?l.nodeAfter:l.node(u),d=l.before(u);if(c.inlineContent)Ir(i,lt.create(a,d+1,d+1+c.content.size));else{if(!W.isSelectable(c))continue;Ir(i,W.create(a,d))}return!0}}(n,e,r)}function $l(n){return Ds(n)}ee.keydown=(n,t)=>{let e=t;if(n.input.shiftKey=e.keyCode==16||e.shiftKey,!mh(n,e)&&(n.input.lastKeyCode=e.keyCode,n.input.lastKeyCodeTime=Date.now(),!Se||!jt||e.keyCode!=13))if(e.keyCode!=229&&n.domObserver.forceFlush(),!zr||e.keyCode!=13||e.ctrlKey||e.altKey||e.metaKey)n.someProp("handleKeyDown",r=>r(n,e))||X0(n,e)?e.preventDefault():On(n,"key");else{let r=Date.now();n.input.lastIOSEnter=r,n.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{n.input.lastIOSEnter==r&&(n.someProp("handleKeyDown",i=>i(n,Un(13,"Enter"))),n.input.lastIOSEnter=0)},200)}},ee.keyup=(n,t)=>{t.keyCode==16&&(n.input.shiftKey=!1)},ee.keypress=(n,t)=>{let e=t;if(mh(n,e)||!e.charCode||e.ctrlKey&&!e.altKey||_e&&e.metaKey)return;if(n.someProp("handleKeyPress",i=>i(n,e)))return void e.preventDefault();let r=n.state.selection;if(!(r instanceof lt&&r.$from.sameParent(r.$to))){let i=String.fromCharCode(e.charCode);/[\r\n]/.test(i)||n.someProp("handleTextInput",o=>o(n,r.$from.pos,r.$to.pos,i))||n.dispatch(n.state.tr.insertText(i).scrollIntoView()),e.preventDefault()}};const uE=_e?"metaKey":"ctrlKey";Jt.mousedown=(n,t)=>{let e=t;n.input.shiftKey=e.shiftKey;let r=$l(n),i=Date.now(),o="singleClick";i-n.input.lastClick.time<500&&function(a,l){let u=l.x-a.clientX,c=l.y-a.clientY;return u*u+c*c<100}(e,n.input.lastClick)&&!e[uE]&&(n.input.lastClick.type=="singleClick"?o="doubleClick":n.input.lastClick.type=="doubleClick"&&(o="tripleClick")),n.input.lastClick={time:i,x:e.clientX,y:e.clientY,type:o};let s=n.posAtCoords(gs(e));s&&(o=="singleClick"?(n.input.mouseDown&&n.input.mouseDown.done(),n.input.mouseDown=new eA(n,s,e,!!r)):(o=="doubleClick"?Q0:tA)(n,s.pos,s.inside,e)?e.preventDefault():On(n,"pointer"))};class eA{constructor(t,e,r,i){let o,s;if(this.view=t,this.pos=e,this.event=r,this.flushed=i,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!r[uE],this.allowDefault=r.shiftKey,e.inside>-1)o=t.state.doc.nodeAt(e.inside),s=e.inside;else{let c=t.state.doc.resolve(e.pos);o=c.parent,s=c.depth?c.before():0}const a=i?null:r.target,l=a?t.docView.nearestDesc(a,!0):null;this.target=l?l.dom:null;let{selection:u}=t.state;(r.button==0&&o.type.spec.draggable&&o.type.spec.selectable!==!1||u instanceof W&&u.from<=s&&u.to>s)&&(this.mightDrag={node:o,pos:s,addAttr:!(!this.target||this.target.draggable),setUneditable:!(!this.target||!be||this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),On(t,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>un(this.view)),this.view.input.mouseDown=null}up(t){if(this.done(),!this.view.dom.contains(t.target))return;let e=this.pos;this.view.state.doc!=this.startDoc&&(e=this.view.posAtCoords(gs(t))),this.updateAllowDefault(t),this.allowDefault||!e?On(this.view,"pointer"):Z0(this.view,e.pos,e.inside,t,this.selectNode)?t.preventDefault():t.button==0&&(this.flushed||ne&&this.mightDrag&&!this.mightDrag.node.isAtom||jt&&!this.view.state.selection.visible&&Math.min(Math.abs(e.pos-this.view.state.selection.from),Math.abs(e.pos-this.view.state.selection.to))<=2)?(Ir(this.view,rt.near(this.view.state.doc.resolve(e.pos))),t.preventDefault()):On(this.view,"pointer")}move(t){this.updateAllowDefault(t),On(this.view,"pointer"),t.buttons==0&&this.done()}updateAllowDefault(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0)}}function mh(n,t){return!!n.composing||!!(ne&&Math.abs(t.timeStamp-n.input.compositionEndedAt)<500)&&(n.input.compositionEndedAt=-2e8,!0)}Jt.touchstart=n=>{n.input.lastTouch=Date.now(),$l(n),On(n,"pointer")},Jt.touchmove=n=>{n.input.lastTouch=Date.now(),On(n,"pointer")},Jt.contextmenu=n=>$l(n);const nA=Se?5e3:-1;function Eh(n,t){clearTimeout(n.input.composingTimeout),t>-1&&(n.input.composingTimeout=setTimeout(()=>Ds(n),t))}function cE(n){for(n.composing&&(n.input.composing=!1,n.input.compositionEndedAt=function(){let t=document.createEvent("Event");return t.initEvent("event",!0,!0),t.timeStamp}());n.input.compositionNodes.length>0;)n.input.compositionNodes.pop().markParentsDirty()}function Ds(n,t=!1){if(!(Se&&n.domObserver.flushingSoon>=0)){if(n.domObserver.forceFlush(),cE(n),t||n.docView&&n.docView.dirty){let e=Wu(n);return e&&!e.eq(n.state.selection)?n.dispatch(n.state.tr.setSelection(e)):n.updateState(n.state),!0}return!1}}ee.compositionstart=ee.compositionupdate=n=>{if(!n.composing){n.domObserver.flush();let{state:t}=n,e=t.selection.$from;if(t.selection.empty&&(t.storedMarks||!e.textOffset&&e.parentOffset&&e.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)))n.markCursor=n.state.storedMarks||e.marks(),Ds(n,!0),n.markCursor=null;else if(Ds(n),be&&t.selection.empty&&e.parentOffset&&!e.textOffset&&e.nodeBefore.marks.length){let r=n.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){n.domSelection().collapse(s,s.nodeValue.length);break}i=s,o=-1}}n.input.composing=!0}Eh(n,nA)},ee.compositionend=(n,t)=>{n.composing&&(n.input.composing=!1,n.input.compositionEndedAt=t.timeStamp,n.input.compositionPendingChanges=n.domObserver.pendingRecords().length?n.input.compositionID:0,n.input.compositionPendingChanges&&Promise.resolve().then(()=>n.domObserver.flush()),n.input.compositionID++,Eh(n,20))};const xi=ae&&Sn<15||zr&&M0<604;function Pi(n,t,e,r,i){let o=rE(n,t,e,r,n.state.selection.$from);if(n.someProp("handlePaste",l=>l(n,i,o||B.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?n.state.tr.replaceSelectionWith(s,r):n.state.tr.replaceSelection(o);return n.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function dE(n){let t=n.getData("text/plain")||n.getData("Text");if(t)return t;let e=n.getData("text/uri-list");return e?e.replace(/\r?\n/g," "):""}Jt.copy=ee.cut=(n,t)=>{let e=t,r=n.state.selection,i=e.type=="cut";if(r.empty)return;let o=xi?null:e.clipboardData,s=r.content(),{dom:a,text:l}=nE(n,s);o?(e.preventDefault(),o.clearData(),o.setData("text/html",a.innerHTML),o.setData("text/plain",l)):function(u,c){if(!u.dom.parentNode)return;let d=u.dom.parentNode.appendChild(document.createElement("div"));d.appendChild(c),d.style.cssText="position: fixed; left: -10000px; top: 10px";let h=getSelection(),p=document.createRange();p.selectNodeContents(c),u.dom.blur(),h.removeAllRanges(),h.addRange(p),setTimeout(()=>{d.parentNode&&d.parentNode.removeChild(d),u.focus()},50)}(n,a),i&&n.dispatch(n.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))},ee.paste=(n,t)=>{let e=t;if(n.composing&&!Se)return;let r=xi?null:e.clipboardData,i=n.input.shiftKey&&n.input.lastKeyCode!=45;r&&Pi(n,dE(r),r.getData("text/html"),i,e)?e.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?Pi(o,l.value,null,u,s):Pi(o,l.textContent,l.innerHTML,u,s)},50)}(n,e)};class hE{constructor(t,e,r){this.slice=t,this.move=e,this.node=r}}const gh=_e?"altKey":"ctrlKey";Jt.dragstart=(n,t)=>{let e=t,r=n.input.mouseDown;if(r&&r.done(),!e.dataTransfer)return;let i,o=n.state.selection,s=o.empty?null:n.posAtCoords(gs(e));if(!(s&&s.pos>=o.from&&s.pos<=(o instanceof W?o.to-1:o.to))){if(r&&r.mightDrag)i=W.create(n.state.doc,r.mightDrag.pos);else if(e.target&&e.target.nodeType==1){let c=n.docView.nearestDesc(e.target,!0);c&&c.node.type.spec.draggable&&c!=n.docView&&(i=W.create(n.state.doc,c.posBefore))}}let a=(i||n.state.selection).content(),{dom:l,text:u}=nE(n,a);e.dataTransfer.clearData(),e.dataTransfer.setData(xi?"Text":"text/html",l.innerHTML),e.dataTransfer.effectAllowed="copyMove",xi||e.dataTransfer.setData("text/plain",u),n.dragging=new hE(a,!e[gh],i)},Jt.dragend=n=>{let t=n.dragging;window.setTimeout(()=>{n.dragging==t&&(n.dragging=null)},50)},ee.dragover=ee.dragenter=(n,t)=>t.preventDefault(),ee.drop=(n,t)=>{let e=t,r=n.dragging;if(n.dragging=null,!e.dataTransfer)return;let i=n.posAtCoords(gs(e));if(!i)return;let o=n.state.doc.resolve(i.pos),s=r&&r.slice;s?n.someProp("transformPasted",f=>{s=f(s,n)}):s=rE(n,dE(e.dataTransfer),xi?null:e.dataTransfer.getData("text/html"),!1,o);let a=!(!r||e[gh]);if(n.someProp("handleDrop",f=>f(n,e,s||B.empty,a)))return void e.preventDefault();if(!s)return;e.preventDefault();let l=s?function(f,m,E){let g=f.resolve(m);if(!E.content.size)return m;let _=E.content;for(let A=0;A<E.openStart;A++)_=_.firstChild.content;for(let A=1;A<=(E.openStart==0&&E.size?2:1);A++)for(let T=g.depth;T>=0;T--){let S=T==g.depth?0:g.pos<=(g.start(T+1)+g.end(T+1))/2?-1:1,v=g.index(T)+(S>0?1:0),C=g.node(T),R=!1;if(A==1)R=C.canReplace(v,v,_);else{let D=C.contentMatchAt(v).findWrapping(_.firstChild.type);R=D&&C.canReplaceWith(v,v,D[0])}if(R)return S==0?g.pos:S<0?g.before(T+1):g.after(T+1)}return null}(n.state.doc,o.pos,s):o.pos;l==null&&(l=o.pos);let u=n.state.tr;if(a){let{node:f}=r;f?f.replace(u):u.deleteSelection()}let c=u.mapping.map(l),d=s.openStart==0&&s.openEnd==0&&s.content.childCount==1,h=u.doc;if(d?u.replaceRangeWith(c,c,s.content.firstChild):u.replaceRange(c,c,s),u.doc.eq(h))return;let p=u.doc.resolve(c);if(d&&W.isSelectable(s.content.firstChild)&&p.nodeAfter&&p.nodeAfter.sameMarkup(s.content.firstChild))u.setSelection(new W(p));else{let f=u.mapping.map(l);u.mapping.maps[u.mapping.maps.length-1].forEach((m,E,g,_)=>f=_),u.setSelection(Ku(n,p,u.doc.resolve(f)))}n.focus(),n.dispatch(u.setMeta("uiEvent","drop"))},Jt.focus=n=>{n.input.lastFocus=Date.now(),n.focused||(n.domObserver.stop(),n.dom.classList.add("ProseMirror-focused"),n.domObserver.start(),n.focused=!0,setTimeout(()=>{n.docView&&n.hasFocus()&&!n.domObserver.currentSelection.eq(n.domSelectionRange())&&un(n)},20))},Jt.blur=(n,t)=>{let e=t;n.focused&&(n.domObserver.stop(),n.dom.classList.remove("ProseMirror-focused"),n.domObserver.start(),e.relatedTarget&&n.dom.contains(e.relatedTarget)&&n.domObserver.currentSelection.clear(),n.focused=!1)},Jt.beforeinput=(n,t)=>{if(jt&&Se&&t.inputType=="deleteContentBackward"){n.domObserver.flushSoon();let{domChangeCount:e}=n.input;setTimeout(()=>{if(n.input.domChangeCount!=e||(n.dom.blur(),n.focus(),n.someProp("handleKeyDown",i=>i(n,Un(8,"Backspace")))))return;let{$cursor:r}=n.state.selection;r&&r.pos>0&&n.dispatch(n.state.tr.delete(r.pos-1,r.pos).scrollIntoView())},50)}};for(let n in ee)Jt[n]=ee[n];function Ji(n,t){if(n==t)return!0;for(let e in n)if(n[e]!==t[e])return!1;for(let e in t)if(!(e in n))return!1;return!0}class _s{constructor(t,e){this.toDOM=t,this.spec=e||Zn,this.side=this.spec.side||0}map(t,e,r,i){let{pos:o,deleted:s}=t.mapResult(e.from+i,this.side<0?-1:1);return s?null:new fe(o-r,o-r,this)}valid(){return!0}eq(t){return this==t||t instanceof _s&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&Ji(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}}class Nn{constructor(t,e){this.attrs=t,this.spec=e||Zn}map(t,e,r,i){let o=t.map(e.from+i,this.spec.inclusiveStart?-1:1)-r,s=t.map(e.to+i,this.spec.inclusiveEnd?1:-1)-r;return o>=s?null:new fe(o,s,this)}valid(t,e){return e.from<e.to}eq(t){return this==t||t instanceof Nn&&Ji(this.attrs,t.attrs)&&Ji(this.spec,t.spec)}static is(t){return t.type instanceof Nn}destroy(){}}class Ju{constructor(t,e){this.attrs=t,this.spec=e||Zn}map(t,e,r,i){let o=t.mapResult(e.from+i,1);if(o.deleted)return null;let s=t.mapResult(e.to+i,-1);return s.deleted||s.pos<=o.pos?null:new fe(o.pos-r,s.pos-r,this)}valid(t,e){let r,{index:i,offset:o}=t.content.findIndex(e.from);return o==e.from&&!(r=t.child(i)).isText&&o+r.nodeSize==e.to}eq(t){return this==t||t instanceof Ju&&Ji(this.attrs,t.attrs)&&Ji(this.spec,t.spec)}destroy(){}}class fe{constructor(t,e,r){this.from=t,this.to=e,this.type=r}copy(t,e){return new fe(t,e,this.type)}eq(t,e=0){return this.type.eq(t.type)&&this.from+e==t.from&&this.to+e==t.to}map(t,e,r){return this.type.map(t,this,e,r)}static widget(t,e,r){return new fe(t,t,new _s(e,r))}static inline(t,e,r,i){return new fe(t,e,new Nn(r,i))}static node(t,e,r,i){return new fe(t,e,new Ju(r,i))}get spec(){return this.type.spec}get inline(){return this.type instanceof Nn}get widget(){return this.type instanceof _s}}const mr=[],Zn={};class vt{constructor(t,e){this.local=t.length?t:mr,this.children=e.length?e:mr}static create(t,e){return e.length?Wo(e,t,0,Zn):$t}find(t,e,r){let i=[];return this.findInner(t==null?0:t,e==null?1e9:e,i,0,r),i}findInner(t,e,r,i,o){for(let s=0;s<this.local.length;s++){let a=this.local[s];a.from<=e&&a.to>=t&&(!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]<e&&this.children[s+1]>t){let a=this.children[s]+1;this.children[s+2].findInner(t-a,e-a,r,i+a,o)}}map(t,e,r){return this==$t||t.maps.length==0?this:this.mapInner(t,e,0,0,r||Zn)}mapInner(t,e,r,i,o){let s;for(let a=0;a<this.local.length;a++){let l=this.local[a].map(t,r,i);l&&l.type.valid(e,l)?(s||(s=[])).push(l):o.onRemove&&o.onRemove(this.local[a].spec)}return this.children.length?function(a,l,u,c,d,h,p){let f=a.slice();for(let E=0,g=h;E<u.maps.length;E++){let _=0;u.maps[E].forEach((A,T,S,v)=>{let C=v-S-(T-A);for(let R=0;R<f.length;R+=3){let D=f[R+1];if(D<0||A>D+g-_)continue;let O=f[R]+g-_;T>=O?f[R+1]=A<=O?-2:-1:A>=g&&C&&(f[R]+=C,f[R+1]+=C)}_+=C}),g=u.maps[E].map(g,-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 g=u.map(a[E]+h),_=g-d;if(_<0||_>=c.content.size){m=!0;continue}let A=u.map(a[E+1]+h,-1)-d,{index:T,offset:S}=c.content.findIndex(_),v=c.maybeChild(T);if(v&&S==_&&S+v.nodeSize==A){let C=f[E+2].mapInner(u,v,g+1,a[E]+h+1,p);C!=$t?(f[E]=_,f[E+1]=A,f[E+2]=C):(f[E+1]=-2,m=!0)}else m=!0}if(m){let E=function(_,A,T,S,v,C,R){function D(O,k){for(let w=0;w<O.local.length;w++){let U=O.local[w].map(S,v,k);U?T.push(U):R.onRemove&&R.onRemove(O.local[w].spec)}for(let w=0;w<O.children.length;w+=3)D(O.children[w+2],O.children[w]+k+1)}for(let O=0;O<_.length;O+=3)_[O+1]==-1&&D(_[O+2],A[O]+C+1);return T}(f,a,l,u,d,h,p),g=Wo(E,c,0,p);l=g.local;for(let _=0;_<f.length;_+=3)f[_+1]<0&&(f.splice(_,3),_-=3);for(let _=0,A=0;_<g.children.length;_+=3){let T=g.children[_];for(;A<f.length&&f[A]<T;)A+=3;f.splice(A,0,g.children[_],g.children[_+1],g.children[_+2])}}return new vt(l.sort(Yn),f)}(this.children,s||[],t,e,r,i,o):s?new vt(s.sort(Yn),mr):$t}add(t,e){return e.length?this==$t?vt.create(t,e):this.addInner(t,e,0):this}addInner(t,e,r){let i,o=0;t.forEach((a,l)=>{let u,c=l+r;if(u=fE(e,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,Wo(u,a,c+1,Zn)),o+=3}});let s=pE(o?mE(e):e,-r);for(let a=0;a<s.length;a++)s[a].type.valid(t,s[a])||s.splice(a--,1);return new vt(s.length?this.local.concat(s).sort(Yn):this.local,i||this.children)}remove(t){return t.length==0||this==$t?this:this.removeInner(t,0)}removeInner(t,e){let r=this.children,i=this.local;for(let o=0;o<r.length;o+=3){let s,a=r[o]+e,l=r[o+1]+e;for(let c,d=0;d<t.length;d++)(c=t[d])&&c.from>a&&c.to<l&&(t[d]=null,(s||(s=[])).push(c));if(!s)continue;r==this.children&&(r=this.children.slice());let u=r[o+2].removeInner(s,a+1);u!=$t?r[o+2]=u:(r.splice(o,3),o-=3)}if(i.length){for(let o,s=0;s<t.length;s++)if(o=t[s])for(let a=0;a<i.length;a++)i[a].eq(o,e)&&(i==this.local&&(i=this.local.slice()),i.splice(a--,1))}return r==this.children&&i==this.local?this:i.length||r.length?new vt(i,r):$t}forChild(t,e){if(this==$t)return this;if(e.isLeaf)return vt.empty;let r,i;for(let a=0;a<this.children.length;a+=3)if(this.children[a]>=t){this.children[a]==t&&(r=this.children[a+2]);break}let o=t+1,s=o+e.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 Nn){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 vt(i.sort(Yn),mr);return r?new _n([a,r]):a}return r||$t}eq(t){if(this==t)return!0;if(!(t instanceof vt)||this.local.length!=t.local.length||this.children.length!=t.children.length)return!1;for(let e=0;e<this.local.length;e++)if(!this.local[e].eq(t.local[e]))return!1;for(let e=0;e<this.children.length;e+=3)if(this.children[e]!=t.children[e]||this.children[e+1]!=t.children[e+1]||!this.children[e+2].eq(t.children[e+2]))return!1;return!0}locals(t){return Zu(this.localsInner(t))}localsInner(t){if(this==$t)return mr;if(t.inlineContent||!this.local.some(Nn.is))return this.local;let e=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof Nn||e.push(this.local[r]);return e}}vt.empty=new vt([],[]),vt.removeOverlap=Zu;const $t=vt.empty;class _n{constructor(t){this.members=t}map(t,e){const r=this.members.map(i=>i.map(t,e,Zn));return _n.from(r)}forChild(t,e){if(e.isLeaf)return vt.empty;let r=[];for(let i=0;i<this.members.length;i++){let o=this.members[i].forChild(t,e);o!=$t&&(o instanceof _n?r=r.concat(o.members):r.push(o))}return _n.from(r)}eq(t){if(!(t instanceof _n)||t.members.length!=this.members.length)return!1;for(let e=0;e<this.members.length;e++)if(!this.members[e].eq(t.members[e]))return!1;return!0}locals(t){let e,r=!0;for(let i=0;i<this.members.length;i++){let o=this.members[i].localsInner(t);if(o.length)if(e){r&&(e=e.slice(),r=!1);for(let s=0;s<o.length;s++)e.push(o[s])}else e=o}return e?Zu(r?e:e.sort(Yn)):mr}static from(t){switch(t.length){case 0:return $t;case 1:return t[0];default:return new _n(t.every(e=>e instanceof vt)?t:t.reduce((e,r)=>e.concat(r instanceof vt?r:r.members),[]))}}}function pE(n,t){if(!t||!n.length)return n;let e=[];for(let r=0;r<n.length;r++){let i=n[r];e.push(new fe(i.from+t,i.to+t,i.type))}return e}function fE(n,t,e){if(t.isLeaf)return null;let r=e+t.nodeSize,i=null;for(let o,s=0;s<n.length;s++)(o=n[s])&&o.from>e&&o.to<r&&((i||(i=[])).push(o),n[s]=null);return i}function mE(n){let t=[];for(let e=0;e<n.length;e++)n[e]!=null&&t.push(n[e]);return t}function Wo(n,t,e,r){let i=[],o=!1;t.forEach((a,l)=>{let u=fE(n,a,l+e);if(u){o=!0;let c=Wo(u,a,e+l+1,r);c!=$t&&i.push(l,l+a.nodeSize,c)}});let s=pE(o?mE(n):n,-e).sort(Yn);for(let a=0;a<s.length;a++)s[a].type.valid(t,s[a])||(r.onRemove&&r.onRemove(s[a].spec),s.splice(a--,1));return s.length||i.length?new vt(s,i):$t}function Yn(n,t){return n.from-t.from||n.to-t.to}function Zu(n){let t=n;for(let e=0;e<t.length-1;e++){let r=t[e];if(r.from!=r.to)for(let i=e+1;i<t.length;i++){let o=t[i];if(o.from!=r.from){o.from<r.to&&(t==n&&(t=n.slice()),t[e]=r.copy(r.from,o.from),Dh(t,i,r.copy(o.from,r.to)));break}o.to!=r.to&&(t==n&&(t=n.slice()),t[i]=o.copy(o.from,r.to),Dh(t,i+1,o.copy(r.to,o.to)))}}return t}function Dh(n,t,e){for(;t<n.length&&Yn(e,n[t])>0;)t++;n.splice(t,0,e)}function Pa(n){let t=[];return n.someProp("decorations",e=>{let r=e(n.state);r&&r!=$t&&t.push(r)}),n.cursorWrapper&&t.push(vt.create(n.state.doc,[n.cursorWrapper.deco])),_n.from(t)}const rA={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},iA=ae&&Sn<=11;class oA{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(t){this.anchorNode=t.anchorNode,this.anchorOffset=t.anchorOffset,this.focusNode=t.focusNode,this.focusOffset=t.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(t){return t.anchorNode==this.anchorNode&&t.anchorOffset==this.anchorOffset&&t.focusNode==this.focusNode&&t.focusOffset==this.focusOffset}}class sA{constructor(t,e){this.view=t,this.handleDOMChange=e,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new oA,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let i=0;i<r.length;i++)this.queue.push(r[i]);ae&&Sn<=11&&r.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),iA&&(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,rA)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let t=this.observer.takeRecords();if(t.length){for(let e=0;e<t.length;e++)this.queue.push(t[e]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(sh(this.view)){if(this.suppressingSelectionUpdates)return un(this.view);if(ae&&Sn<=11&&!this.view.state.selection.empty){let t=this.view.domSelectionRange();if(t.focusNode&&nr(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(t){if(!t.focusNode)return!0;let e,r=new Set;for(let o=t.focusNode;o;o=qi(o))r.add(o);for(let o=t.anchorNode;o;o=qi(o))if(r.has(o)){e=o;break}let i=e&&this.view.docView.nearestDesc(e);return i&&i.ignoreMutation({type:"selection",target:e.nodeType==3?e.parentNode:e})?(this.setCurSelection(),!0):void 0}pendingRecords(){if(this.observer)for(let t of this.observer.takeRecords())this.queue.push(t);return this.queue}flush(){let{view:t}=this;if(!t.docView||this.flushingSoon>-1)return;let e=this.pendingRecords();e.length&&(this.queue=[]);let r=t.domSelectionRange(),i=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&sh(t)&&!this.ignoreSelectionChange(r),o=-1,s=-1,a=!1,l=[];if(t.editable)for(let c=0;c<e.length;c++){let d=this.registerMutation(e[c],l);d&&(o=o<0?d.from:Math.min(d.from,o),s=s<0?d.to:Math.max(d.to,s),d.typeOver&&(a=!0))}if(be&&l.length>1){let c=l.filter(d=>d.nodeName=="BR");if(c.length==2){let d=c[0],h=c[1];d.parentNode&&d.parentNode.parentNode==h.parentNode?h.remove():d.remove()}}let u=null;o<0&&i&&t.input.lastFocus>Date.now()-200&&Math.max(t.input.lastTouch,t.input.lastClick.time)<Date.now()-300&&qs(r)&&(u=Wu(t))&&u.eq(rt.near(t.state.doc.resolve(0),1))?(t.input.lastFocus=0,un(t),this.currentSelection.set(r),t.scrollToSelection()):(o>-1||i)&&(o>-1&&(t.docView.markDirty(o,s),function(c){if(!_h.has(c)&&(_h.set(c,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(c.dom).whiteSpace)!==-1)){if(c.requiresGeckoHackNode=be,Ah)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."),Ah=!0}}(t)),this.handleDOMChange(o,s,a,l),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(r)||un(t),this.currentSelection.set(r))}registerMutation(t,e){if(e.indexOf(t.target)>-1)return null;let r=this.view.docView.nearestDesc(t.target);if(t.type=="attributes"&&(r==this.view.docView||t.attributeName=="contenteditable"||t.attributeName=="style"&&!t.oldValue&&!t.target.getAttribute("style"))||!r||r.ignoreMutation(t))return null;if(t.type=="childList"){for(let u=0;u<t.addedNodes.length;u++)e.push(t.addedNodes[u]);if(r.contentDOM&&r.contentDOM!=r.dom&&!r.contentDOM.contains(t.target))return{from:r.posBefore,to:r.posAfter};let i=t.previousSibling,o=t.nextSibling;if(ae&&Sn<=11&&t.addedNodes.length)for(let u=0;u<t.addedNodes.length;u++){let{previousSibling:c,nextSibling:d}=t.addedNodes[u];(!c||Array.prototype.indexOf.call(t.addedNodes,c)<0)&&(i=c),(!d||Array.prototype.indexOf.call(t.addedNodes,d)<0)&&(o=d)}let s=i&&i.parentNode==t.target?qt(i)+1:0,a=r.localPosFromDOM(t.target,s,-1),l=o&&o.parentNode==t.target?qt(o):t.target.childNodes.length;return{from:a,to:r.localPosFromDOM(t.target,l,1)}}return t.type=="attributes"?{from:r.posAtStart-r.border,to:r.posAtEnd+r.border}:{from:r.posAtStart,to:r.posAtEnd,typeOver:t.target.nodeValue==t.oldValue}}}let _h=new WeakMap,Ah=!1;function aA(n){let t=n.pmViewDesc;if(t)return t.parseRule();if(n.nodeName=="BR"&&n.parentNode){if(ne&&/^(ul|ol)$/i.test(n.parentNode.nodeName)){let e=document.createElement("div");return e.appendChild(document.createElement("li")),{skip:e}}if(n.parentNode.lastChild==n||ne&&/^(tr|table)$/i.test(n.parentNode.nodeName))return{ignore:!0}}else if(n.nodeName=="IMG"&&n.getAttribute("mark-placeholder"))return{ignore:!0};return null}const lA=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function uA(n,t,e,r,i){let o=n.input.compositionPendingChanges||(n.composing?n.input.compositionID:0);if(n.input.compositionPendingChanges=0,t<0){let D=n.input.lastSelectionTime>Date.now()-50?n.input.lastSelectionOrigin:null,O=Wu(n,D);if(O&&!n.state.selection.eq(O)){if(jt&&Se&&n.input.lastKeyCode===13&&Date.now()-100<n.input.lastKeyCodeTime&&n.someProp("handleKeyDown",w=>w(n,Un(13,"Enter"))))return;let k=n.state.tr.setSelection(O);D=="pointer"?k.setMeta("pointer",!0):D=="key"&&k.scrollIntoView(),o&&k.setMeta("composition",o),n.dispatch(k)}return}let s=n.state.doc.resolve(t),a=s.sharedDepth(e);t=s.before(a+1),e=n.state.doc.resolve(e).after(a+1);let l,u,c=n.state.selection,d=function(D,O,k){let w,{node:U,fromOffset:I,toOffset:F,from:j,to:$}=D.docView.parseRange(O,k),X=D.domSelectionRange(),V=X.anchorNode;if(V&&D.dom.contains(V.nodeType==1?V:V.parentNode)&&(w=[{node:V,offset:X.anchorOffset}],qs(X)||w.push({node:X.focusNode,offset:X.focusOffset})),jt&&D.input.lastKeyCode===8)for(let ut=F;ut>I;ut--){let It=U.childNodes[ut-1],Rt=It.pmViewDesc;if(It.nodeName=="BR"&&!Rt){F=ut;break}if(!Rt||Rt.size)break}let z=D.state.doc,q=D.someProp("domParser")||Ki.fromSchema(D.state.schema),J=z.resolve(j),ot=null,M=q.parse(U,{topNode:J.parent,topMatch:J.parent.contentMatchAt(J.index()),topOpen:!0,from:I,to:F,preserveWhitespace:J.parent.type.whitespace!="pre"||"full",findPositions:w,ruleFromNode:aA,context:J});if(w&&w[0].pos!=null){let ut=w[0].pos,It=w[1]&&w[1].pos;It==null&&(It=ut),ot={anchor:ut+j,head:It+j}}return{doc:M,sel:ot,from:j,to:$}}(n,t,e),h=n.state.doc,p=h.slice(d.from,d.to);n.input.lastKeyCode===8&&Date.now()-100<n.input.lastKeyCodeTime?(l=n.state.selection.to,u="end"):(l=n.state.selection.from,u="start"),n.input.lastKeyCode=null;let f=function(D,O,k,w,U){let I=D.findDiffStart(O,k);if(I==null)return null;let{a:F,b:j}=D.findDiffEnd(O,k+D.size,k+O.size);if(U=="end"&&(w-=F+Math.max(0,I-Math.min(F,j))-I),F<I&&D.size<O.size){let $=w<=I&&w>=F?I-w:0;I-=$,I&&I<O.size&&Th(O.textBetween(I-1,I+1))&&(I+=$?1:-1),j=I+(j-F),F=I}else if(j<I){let $=w<=I&&w>=j?I-w:0;I-=$,I&&I<D.size&&Th(D.textBetween(I-1,I+1))&&(I+=$?1:-1),F=I+(F-j),j=I}return{start:I,endA:F,endB:j}}(p.content,d.doc.content,d.from,l,u);if((zr&&n.input.lastIOSEnter>Date.now()-225||Se)&&i.some(D=>D.nodeType==1&&!lA.test(D.nodeName))&&(!f||f.endA>=f.endB)&&n.someProp("handleKeyDown",D=>D(n,Un(13,"Enter"))))return void(n.input.lastIOSEnter=0);if(!f){if(!(r&&c instanceof lt&&!c.empty&&c.$head.sameParent(c.$anchor))||n.composing||d.sel&&d.sel.anchor!=d.sel.head){if(d.sel){let D=Oh(n,n.state.doc,d.sel);if(D&&!D.eq(n.state.selection)){let O=n.state.tr.setSelection(D);o&&O.setMeta("composition",o),n.dispatch(O)}}return}f={start:c.from,endA:c.to,endB:c.to}}if(jt&&n.cursorWrapper&&d.sel&&d.sel.anchor==n.cursorWrapper.deco.from&&d.sel.head==d.sel.anchor){let D=f.endB-f.start;d.sel={anchor:d.sel.anchor+D,head:d.sel.anchor+D}}n.input.domChangeCount++,n.state.selection.from<n.state.selection.to&&f.start==f.endB&&n.state.selection instanceof lt&&(f.start>n.state.selection.from&&f.start<=n.state.selection.from+2&&n.state.selection.from>=d.from?f.start=n.state.selection.from:f.endA<n.state.selection.to&&f.endA>=n.state.selection.to-2&&n.state.selection.to<=d.to&&(f.endB+=n.state.selection.to-f.endA,f.endA=n.state.selection.to)),ae&&Sn<=11&&f.endB==f.start+1&&f.endA==f.start&&f.start>d.from&&d.doc.textBetween(f.start-d.from-1,f.start-d.from+1)==" "&&(f.start--,f.endA--,f.endB--);let m,E=d.doc.resolveNoCache(f.start-d.from),g=d.doc.resolveNoCache(f.endB-d.from),_=h.resolve(f.start),A=E.sameParent(g)&&E.parent.inlineContent&&_.end()>=f.endA;if((zr&&n.input.lastIOSEnter>Date.now()-225&&(!A||i.some(D=>D.nodeName=="DIV"||D.nodeName=="P"))||!A&&E.pos<d.doc.content.size&&!E.sameParent(g)&&(m=rt.findFrom(d.doc.resolve(E.pos+1),1,!0))&&m.head==g.pos)&&n.someProp("handleKeyDown",D=>D(n,Un(13,"Enter"))))return void(n.input.lastIOSEnter=0);if(n.state.selection.anchor>f.start&&function(D,O,k,w,U){if(!w.parent.isTextblock||k-O<=U.pos-w.pos||Ba(w,!0,!1)<U.pos)return!1;let I=D.resolve(O);if(I.parentOffset<I.parent.content.size||!I.parent.isTextblock)return!1;let F=D.resolve(Ba(I,!0,!0));return!(!F.parent.isTextblock||F.pos>k||Ba(F,!0,!1)<k)&&w.parent.content.cut(w.parentOffset).eq(F.parent.content)}(h,f.start,f.endA,E,g)&&n.someProp("handleKeyDown",D=>D(n,Un(8,"Backspace"))))return void(Se&&jt&&n.domObserver.suppressSelectionUpdates());jt&&Se&&f.endB==f.start&&(n.input.lastAndroidDelete=Date.now()),Se&&!A&&E.start()!=g.start()&&g.parentOffset==0&&E.depth==g.depth&&d.sel&&d.sel.anchor==d.sel.head&&d.sel.head==f.endA&&(f.endB-=2,g=d.doc.resolveNoCache(f.endB-d.from),setTimeout(()=>{n.someProp("handleKeyDown",function(D){return D(n,Un(13,"Enter"))})},20));let T,S,v,C=f.start,R=f.endA;if(A){if(E.pos==g.pos)ae&&Sn<=11&&E.parentOffset==0&&(n.domObserver.suppressSelectionUpdates(),setTimeout(()=>un(n),20)),T=n.state.tr.delete(C,R),S=h.resolve(f.start).marksAcross(h.resolve(f.endA));else if(f.endA==f.endB&&(v=function(D,O){let k,w,U,I=D.firstChild.marks,F=O.firstChild.marks,j=I,$=F;for(let V=0;V<F.length;V++)j=F[V].removeFromSet(j);for(let V=0;V<I.length;V++)$=I[V].removeFromSet($);if(j.length==1&&$.length==0)w=j[0],k="add",U=V=>V.mark(w.addToSet(V.marks));else{if(j.length!=0||$.length!=1)return null;w=$[0],k="remove",U=V=>V.mark(w.removeFromSet(V.marks))}let X=[];for(let V=0;V<O.childCount;V++)X.push(U(O.child(V)));if(H.from(X).eq(D))return{mark:w,type:k}}(E.parent.content.cut(E.parentOffset,g.parentOffset),_.parent.content.cut(_.parentOffset,f.endA-_.start()))))T=n.state.tr,v.type=="add"?T.addMark(C,R,v.mark):T.removeMark(C,R,v.mark);else if(E.parent.child(E.index()).isText&&E.index()==g.index()-(g.textOffset?0:1)){let D=E.parent.textBetween(E.parentOffset,g.parentOffset);if(n.someProp("handleTextInput",O=>O(n,C,R,D)))return;T=n.state.tr.insertText(D,C,R)}}if(T||(T=n.state.tr.replace(C,R,d.doc.slice(f.start-d.from,f.endB-d.from))),d.sel){let D=Oh(n,T.doc,d.sel);D&&!(jt&&Se&&n.composing&&D.empty&&(f.start!=f.endB||n.input.lastAndroidDelete<Date.now()-100)&&(D.head==C||D.head==T.mapping.map(R)-1)||ae&&D.empty&&D.head==C)&&T.setSelection(D)}S&&T.ensureMarks(S),o&&T.setMeta("composition",o),n.dispatch(T.scrollIntoView())}function Oh(n,t,e){return Math.max(e.anchor,e.head)>t.content.size?null:Ku(n,t.resolve(e.anchor),t.resolve(e.head))}function Ba(n,t,e){let r=n.depth,i=t?n.end():n.pos;for(;r>0&&(t||n.indexAfter(r)==n.node(r).childCount);)r--,i++,t=!1;if(e){let o=n.node(r).maybeChild(n.indexAfter(r));for(;o&&!o.isLeaf;)o=o.firstChild,i++}return i}function Th(n){if(n.length!=2)return!1;let t=n.charCodeAt(0),e=n.charCodeAt(1);return t>=56320&&t<=57343&&e>=55296&&e<=56319}class cA{constructor(t,e){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new q0,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=e,this.state=e.state,this.directPlugins=e.plugins||[],this.directPlugins.forEach(yh),this.dispatch=this.dispatch.bind(this),this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):typeof t=="function"?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=Nh(this),vh(this),this.nodeViews=Ch(this),this.docView=Qd(this.state.doc,Sh(this),Pa(this),this.dom,this),this.domObserver=new sA(this,(r,i,o,s)=>uA(this,r,i,o,s)),this.domObserver.start(),function(r){for(let i in Jt){let o=Jt[i];r.dom.addEventListener(i,r.input.eventHandlers[i]=s=>{!J0(r,s)||Ul(r,s)||!r.editable&&s.type in ee||o(r,s)},K0[i]?{passive:!0}:void 0)}ne&&r.dom.addEventListener("input",()=>null),xa(r)}(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let t=this._props;this._props={};for(let e in t)this._props[e]=t[e];this._props.state=this.state}return this._props}update(t){t.handleDOMEvents!=this._props.handleDOMEvents&&xa(this);let e=this._props;this._props=t,t.plugins&&(t.plugins.forEach(yh),this.directPlugins=t.plugins),this.updateStateInner(t.state,e)}setProps(t){let e={};for(let r in this._props)e[r]=this._props[r];e.state=this.state;for(let r in t)e[r]=t[r];this.update(e)}updateState(t){this.updateStateInner(t,this._props)}updateStateInner(t,e){var r;let i=this.state,o=!1,s=!1;t.storedMarks&&this.composing&&(cE(this),s=!0),this.state=t;let a=i.plugins!=t.plugins||this._props.plugins!=e.plugins;if(a||this._props.plugins!=e.plugins||this._props.nodeViews!=e.nodeViews){let p=Ch(this);(function(f,m){let E=0,g=0;for(let _ in f){if(f[_]!=m[_])return!0;E++}for(let _ in m)g++;return E!=g})(p,this.nodeViews)&&(this.nodeViews=p,o=!0)}(a||e.handleDOMEvents!=this._props.handleDOMEvents)&&xa(this),this.editable=Nh(this),vh(this);let l=Pa(this),u=Sh(this),c=i.plugins==t.plugins||i.doc.eq(t.doc)?t.scrollToSelection>i.scrollToSelection?"to selection":"preserve":"reset",d=o||!this.docView.matchesNode(t.doc,u,l);!d&&t.selection.eq(i.selection)||(s=!0);let h=c=="preserve"&&s&&this.dom.style.overflowAnchor==null&&function(p){let f,m,E=p.dom.getBoundingClientRect(),g=Math.max(0,E.top);for(let _=(E.left+E.right)/2,A=g+1;A<Math.min(innerHeight,E.bottom);A+=5){let T=p.root.elementFromPoint(_,A);if(!T||T==p.dom||!p.dom.contains(T))continue;let S=T.getBoundingClientRect();if(S.top>=g-20){f=T,m=S.top;break}}return{refDOM:f,refTop:m,stack:Gd(p.dom)}}(this);if(s){this.domObserver.stop();let p=d&&(ae||jt)&&!this.composing&&!i.selection.empty&&!t.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,t.selection);if(d){let f=jt?this.trackWrites=this.domSelectionRange().focusNode:null;!o&&this.docView.update(t.doc,u,l,this)||(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=Qd(t.doc,u,l,this.dom,this)),f&&!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 nr(m.node,m.offset,E.anchorNode,E.anchorOffset)}(this))?un(this,p):(tE(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(i),!((r=this.dragging)===null||r===void 0)&&r.node&&!i.doc.eq(t.doc)&&this.updateDraggedNode(this.dragging,i),c=="reset"?this.dom.scrollTop=0:c=="to selection"?this.scrollToSelection():h&&function({refDOM:p,refTop:f,stack:m}){let E=p?p.getBoundingClientRect().top:0;Xd(m,E==0?0:E-f)}(h)}scrollToSelection(){let t=this.domSelectionRange().focusNode;if(!this.someProp("handleScrollToSelection",e=>e(this)))if(this.state.selection instanceof W){let e=this.docView.domAfterPos(this.state.selection.from);e.nodeType==1&&zd(this,e.getBoundingClientRect(),t)}else zd(this,this.coordsAtPos(this.state.selection.head,1),t)}destroyPluginViews(){let t;for(;t=this.pluginViews.pop();)t.destroy&&t.destroy()}updatePluginViews(t){if(t&&t.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(let e=0;e<this.pluginViews.length;e++){let r=this.pluginViews[e];r.update&&r.update(this,t)}else{this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let e=0;e<this.directPlugins.length;e++){let r=this.directPlugins[e];r.spec.view&&this.pluginViews.push(r.spec.view(this))}for(let e=0;e<this.state.plugins.length;e++){let r=this.state.plugins[e];r.spec.view&&this.pluginViews.push(r.spec.view(this))}}}updateDraggedNode(t,e){let r=t.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-e.doc.content.size);(o>0&&this.state.doc.nodeAt(o))==r.node&&(i=o)}this.dragging=new hE(t.slice,t.move,i<0?void 0:W.create(this.state.doc,i))}someProp(t,e){let r,i=this._props&&this._props[t];if(i!=null&&(r=e?e(i):i))return r;for(let s=0;s<this.directPlugins.length;s++){let a=this.directPlugins[s].props[t];if(a!=null&&(r=e?e(a):a))return r}let o=this.state.plugins;if(o)for(let s=0;s<o.length;s++){let a=o[s].props[t];if(a!=null&&(r=e?e(a):a))return r}}hasFocus(){if(ae){let t=this.root.activeElement;if(t==this.dom)return!0;if(!t||!this.dom.contains(t))return!1;for(;t&&this.dom!=t&&this.dom.contains(t);){if(t.contentEditable=="false")return!1;t=t.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&function(t){if(t.setActive)return t.setActive();if(cr)return t.focus(cr);let e=Gd(t);t.focus(cr==null?{get preventScroll(){return cr={preventScroll:!0},!0}}:void 0),cr||(cr=!1,Xd(e,0))}(this.dom),un(this),this.domObserver.start()}get root(){let t=this._root;if(t==null){for(let e=this.dom.parentNode;e;e=e.parentNode)if(e.nodeType==9||e.nodeType==11&&e.host)return e.getSelection||(Object.getPrototypeOf(e).getSelection=()=>e.ownerDocument.getSelection()),this._root=e}return t||document}updateRoot(){this._root=null}posAtCoords(t){return B0(this,t)}coordsAtPos(t,e=1){return Wm(this,t,e)}domAtPos(t,e=0){return this.docView.domFromPos(t,e)}nodeDOM(t){let e=this.docView.descAt(t);return e?e.nodeDOM:null}posAtDOM(t,e,r=-1){let i=this.docView.posFromDOM(t,e,r);if(i==null)throw new RangeError("DOM position not inside the editor");return i}endOfTextblock(t,e){return $0(this,e||this.state,t)}pasteHTML(t,e){return Pi(this,"",t,!1,e||new ClipboardEvent("paste"))}pasteText(t,e){return Pi(this,t,null,!0,e||new ClipboardEvent("paste"))}destroy(){this.docView&&(function(t){t.domObserver.stop();for(let e in t.input.eventHandlers)t.dom.removeEventListener(e,t.input.eventHandlers[e]);clearTimeout(t.input.composingTimeout),clearTimeout(t.input.lastIOSEnterFallbackTimeout)}(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Pa(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)}get isDestroyed(){return this.docView==null}dispatchEvent(t){return function(e,r){Ul(e,r)||!Jt[r.type]||!e.editable&&r.type in ee||Jt[r.type](e,r)}(this,t)}dispatch(t){let e=this._props.dispatchTransaction;e?e.call(this,t):this.updateState(this.state.apply(t))}domSelectionRange(){return ne&&this.root.nodeType===11&&function(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}(this.dom.ownerDocument)==this.dom?function(t){let e;function r(u){u.preventDefault(),u.stopImmediatePropagation(),e=u.getTargetRanges()[0]}t.dom.addEventListener("beforeinput",r,!0),document.execCommand("indent"),t.dom.removeEventListener("beforeinput",r,!0);let i=e.startContainer,o=e.startOffset,s=e.endContainer,a=e.endOffset,l=t.domAtPos(t.state.selection.anchor);return nr(l.node,l.offset,s,a)&&([i,o,s,a]=[s,a,i,o]),{anchorNode:i,anchorOffset:o,focusNode:s,focusOffset:a}}(this):this.domSelection()}domSelection(){return this.root.getSelection()}}function Sh(n){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(n.editable),n.someProp("attributes",e=>{if(typeof e=="function"&&(e=e(n.state)),e)for(let r in e)r=="class"?t.class+=" "+e[r]:r=="style"?t.style=(t.style?t.style+";":"")+e[r]:t[r]||r=="contenteditable"||r=="nodeName"||(t[r]=String(e[r]))}),t.translate||(t.translate="no"),[fe.node(0,n.state.doc.content.size,t)]}function vh(n){if(n.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),n.cursorWrapper={dom:t,deco:fe.widget(n.state.selection.head,t,{raw:!0,marks:n.markCursor})}}else n.cursorWrapper=null}function Nh(n){return!n.someProp("editable",t=>t(n.state)===!1)}function Ch(n){let t=Object.create(null);function e(r){for(let i in r)Object.prototype.hasOwnProperty.call(t,i)||(t[i]=r[i])}return n.someProp("nodeViews",e),n.someProp("markViews",e),t}function yh(n){if(n.spec.state||n.spec.filterTransaction||n.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}const Lt=new class{constructor(n){this.cached=Object.create(null);let t=this.spec={};for(let r in n)t[r]=n[r];t.nodes=Mt.from(n.nodes),t.marks=Mt.from(n.marks||{}),this.nodes=Id.compile(this.spec.nodes,this),this.marks=Gs.compile(this.spec.marks,this);let e=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;i.contentMatch=e[o]||(e[o]=tr.parse(o,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.markSet=s=="_"?null:s?Rd(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==""?[]:Rd(this,o.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(n,t=null,e,r){if(typeof n=="string")n=this.nodeType(n);else{if(!(n instanceof Id))throw new RangeError("Invalid node type: "+n);if(n.schema!=this)throw new RangeError("Node type from different schema used ("+n.name+")")}return n.createChecked(t,e,r)}text(n,t){let e=this.nodes.text;return new Es(e,e.defaultAttrs,n,st.setFrom(t))}mark(n,t){return typeof n=="string"&&(n=this.marks[n]),n.create(t)}nodeFromJSON(n){return qn.fromJSON(this,n)}markFromJSON(n){return st.fromJSON(this,n)}nodeType(n){let t=this.nodes[n];if(!t)throw new RangeError("Unknown node type: "+n);return t}}({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:n=>["span",{"data-mention-id":n.attrs.id,class:"t-mention"},`@${n.attrs.name}`],parseDOM:[{tag:"span[data-mention-id]",getAttrs:n=>({id:n.dataset["mention-id"]})}]},customemoji:{group:"inline",inline:!0,attrs:{name:{},url:{}},content:"text*",selectable:!1,toDOM:n=>["img",{src:n.attrs.url,alt:n.attrs.name,"data-custom-emoji":n.attrs.name}],parseDOM:[{tag:"img[data-custom-emoji]",getAttrs:n=>{const t=n;return{name:t.dataset.customEmoji,url:t.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:n=>["span",{"data-emoji":n.attrs.emoji},n.attrs.emoji],parseDOM:[{tag:"span[data-emoji]",getAttrs:n=>({emoji:n.dataset.emoji})}]}}}),Ha=new Ks("placeholder"),Ih=new Ws({key:Ha,props:{decorations(n){if(EE(n.doc))return;const t=n.doc.firstChild,e=fe.node(0,t.nodeSize,{class:"empty-node","data-placeholder":Ha.getState(n)});return vt.create(n.doc,[e])}},state:{init:()=>"",apply:(n,t)=>{var e;return(e=n.getMeta(Ha))!=null?e:t}}});function EE(n){return n.childCount!==1||n.firstChild.childCount!==0}for(var In={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:"'",229:"q"},As={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"',229:"Q"},Rh=typeof navigator!="undefined"&&/Chrome\/(\d+)/.exec(navigator.userAgent),dA=typeof navigator!="undefined"&&/Apple Computer/.test(navigator.vendor),hA=typeof navigator!="undefined"&&/Gecko\/\d+/.test(navigator.userAgent),Lh=typeof navigator!="undefined"&&/Mac/.test(navigator.platform),pA=typeof navigator!="undefined"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),fA=Rh&&(Lh||+Rh[1]<57)||hA&&Lh,Pt=0;Pt<10;Pt++)In[48+Pt]=In[96+Pt]=String(Pt);for(Pt=1;Pt<=24;Pt++)In[Pt+111]="F"+Pt;for(Pt=65;Pt<=90;Pt++)In[Pt]=String.fromCharCode(Pt+32),As[Pt]=String.fromCharCode(Pt);for(var Ua in In)As.hasOwnProperty(Ua)||(As[Ua]=In[Ua]);const mA=typeof navigator!="undefined"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function EA(n){let t,e,r,i,o=n.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))t=!0;else if(/^(c|ctrl|control)$/i.test(l))e=!0;else if(/^s(hift)?$/i.test(l))r=!0;else{if(!/^mod$/i.test(l))throw new Error("Unrecognized modifier name: "+l);mA?i=!0:e=!0}}return t&&(s="Alt-"+s),e&&(s="Ctrl-"+s),i&&(s="Meta-"+s),r&&(s="Shift-"+s),s}function $a(n,t,e=!0){return t.altKey&&(n="Alt-"+n),t.ctrlKey&&(n="Ctrl-"+n),t.metaKey&&(n="Meta-"+n),e&&t.shiftKey&&(n="Shift-"+n),n}function bh(n){return new Ws({props:{handleKeyDown:gA(n)}})}function gA(n){let t=function(e){let r=Object.create(null);for(let i in e)r[EA(i)]=e[i];return r}(n);return function(e,r){let i,o=function(a){var l=!(fA&&(a.ctrlKey||a.altKey||a.metaKey)||(dA||pA)&&a.shiftKey&&a.key&&a.key.length==1)&&a.key||(a.shiftKey?As:In)[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=t[$a(o,r)];if(s&&s(e.state,e.dispatch,e))return!0;if(o.length==1&&o!=" "){if(r.shiftKey){let a=t[$a(o,r,!1)];if(a&&a(e.state,e.dispatch,e))return!0}if((r.shiftKey||r.altKey||r.metaKey||o.charCodeAt(0)>127)&&(i=In[r.keyCode])&&i!=o){let a=t[$a(i,r)];if(a&&a(e.state,e.dispatch,e))return!0}}return!1}}var Os=200,xt=function(){};xt.prototype.append=function(n){return n.length?(n=xt.from(n),!this.length&&n||n.length<Os&&this.leafAppend(n)||this.length<Os&&n.leafPrepend(this)||this.appendInner(n)):this},xt.prototype.prepend=function(n){return n.length?xt.from(n).append(this):this},xt.prototype.appendInner=function(n){return new DA(this,n)},xt.prototype.slice=function(n,t){return n===void 0&&(n=0),t===void 0&&(t=this.length),n>=t?xt.empty:this.sliceInner(Math.max(0,n),Math.min(this.length,t))},xt.prototype.get=function(n){if(!(n<0||n>=this.length))return this.getInner(n)},xt.prototype.forEach=function(n,t,e){t===void 0&&(t=0),e===void 0&&(e=this.length),t<=e?this.forEachInner(n,t,e,0):this.forEachInvertedInner(n,t,e,0)},xt.prototype.map=function(n,t,e){t===void 0&&(t=0),e===void 0&&(e=this.length);var r=[];return this.forEach(function(i,o){return r.push(n(i,o))},t,e),r},xt.from=function(n){return n instanceof xt?n:n&&n.length?new gE(n):xt.empty};var gE=function(n){function t(r){n.call(this),this.values=r}n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t;var e={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(r,i){return r==0&&i==this.length?this:new t(this.values.slice(r,i))},t.prototype.getInner=function(r){return this.values[r]},t.prototype.forEachInner=function(r,i,o,s){for(var a=i;a<o;a++)if(r(this.values[a],s+a)===!1)return!1},t.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},t.prototype.leafAppend=function(r){if(this.length+r.length<=Os)return new t(this.values.concat(r.flatten()))},t.prototype.leafPrepend=function(r){if(this.length+r.length<=Os)return new t(r.flatten().concat(this.values))},e.length.get=function(){return this.values.length},e.depth.get=function(){return 0},Object.defineProperties(t.prototype,e),t}(xt);xt.empty=new gE([]);var DA=function(n){function t(e,r){n.call(this),this.left=e,this.right=r,this.length=e.length+r.length,this.depth=Math.max(e.depth,r.depth)+1}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(e){return e<this.left.length?this.left.get(e):this.right.get(e-this.left.length)},t.prototype.forEachInner=function(e,r,i,o){var s=this.left.length;return!(r<s&&this.left.forEachInner(e,r,Math.min(i,s),o)===!1)&&!(i>s&&this.right.forEachInner(e,Math.max(r-s,0),Math.min(this.length,i)-s,o+s)===!1)&&void 0},t.prototype.forEachInvertedInner=function(e,r,i,o){var s=this.left.length;return!(r>s&&this.right.forEachInvertedInner(e,r-s,Math.max(i,s)-s,o+s)===!1)&&!(i<s&&this.left.forEachInvertedInner(e,Math.min(r,s),i,o)===!1)&&void 0},t.prototype.sliceInner=function(e,r){if(e==0&&r==this.length)return this;var i=this.left.length;return r<=i?this.left.slice(e,r):e>=i?this.right.slice(e-i,r-i):this.left.slice(e,i).append(this.right.slice(0,r-i))},t.prototype.leafAppend=function(e){var r=this.right.leafAppend(e);if(r)return new t(this.left,r)},t.prototype.leafPrepend=function(e){var r=this.left.leafPrepend(e);if(r)return new t(r,this.right)},t.prototype.appendInner=function(e){return this.left.depth>=Math.max(this.right.depth,e.depth)+1?new t(this.left,new t(this.right,e)):new t(this,e)},t}(xt),DE=xt;const _E=Math.pow(2,16);function _A(n,t){return n+t*_E}function kh(n){return 65535&n}let jl=class{constructor(n,t,e){this.pos=n,this.delInfo=t,this.recover=e}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}},rr=class Er{constructor(t,e=!1){if(this.ranges=t,this.inverted=e,!t.length&&Er.empty)return Er.empty}recover(t){let e=0,r=kh(t);if(!this.inverted)for(let i=0;i<r;i++)e+=this.ranges[3*i+2]-this.ranges[3*i+1];return this.ranges[3*r]+e+function(i){return(i-(65535&i))/_E}(t)}mapResult(t,e=1){return this._map(t,e,!1)}map(t,e=1){return this._map(t,e,!0)}_map(t,e,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>t)break;let u=this.ranges[a+o],c=this.ranges[a+s],d=l+u;if(t<=d){let h=l+i+((u?t==l?-1:t==d?1:e:e)<0?0:c);if(r)return h;let p=t==(e<0?l:d)?null:_A(a/3,t-l),f=t==l?2:t==d?1:4;return(e<0?t!=l:t!=d)&&(f|=8),new jl(h,f,p)}i+=c-u}return r?t+i:new jl(t+i,0,null)}touches(t,e){let r=0,i=kh(e),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>t)break;let u=this.ranges[a+o];if(t<=l+u&&a==3*i)return!0;r+=this.ranges[a+s]-u}return!1}forEach(t){let e=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+e],c=this.ranges[i+r];t(a,a+u,l,l+c),o+=c-u}}invert(){return new Er(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(t){return t==0?Er.empty:new Er(t<0?[0,-t,0]:[0,0,t])}};rr.empty=new rr([]);class Bi{constructor(t=[],e,r=0,i=t.length){this.maps=t,this.mirror=e,this.from=r,this.to=i}slice(t=0,e=this.maps.length){return new Bi(this.maps,this.mirror,t,e)}copy(){return new Bi(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}appendMap(t,e){this.to=this.maps.push(t),e!=null&&this.setMirror(this.maps.length-1,e)}appendMapping(t){for(let e=0,r=this.maps.length;e<t.maps.length;e++){let i=t.getMirror(e);this.appendMap(t.maps[e],i!=null&&i<e?r+i:void 0)}}getMirror(t){if(this.mirror){for(let e=0;e<this.mirror.length;e++)if(this.mirror[e]==t)return this.mirror[e+(e%2?-1:1)]}}setMirror(t,e){this.mirror||(this.mirror=[]),this.mirror.push(t,e)}appendMappingInverted(t){for(let e=t.maps.length-1,r=this.maps.length+t.maps.length;e>=0;e--){let i=t.getMirror(e);this.appendMap(t.maps[e].invert(),i!=null&&i>e?r-i-1:void 0)}}invert(){let t=new Bi;return t.appendMappingInverted(this),t}map(t,e=1){if(this.mirror)return this._map(t,e,!0);for(let r=this.from;r<this.to;r++)t=this.maps[r].map(t,e);return t}mapResult(t,e=1){return this._map(t,e,!1)}_map(t,e,r){let i=0;for(let o=this.from;o<this.to;o++){let s=this.maps[o].mapResult(t,e);if(s.recover!=null){let a=this.getMirror(o);if(a!=null&&a>o&&a<this.to){o=a,t=this.maps[a].recover(s.recover);continue}}i|=s.delInfo,t=s.pos}return r?t:new jl(t,i,null)}}const ja=Object.create(null);let Vt=class{getMap(){return rr.empty}merge(n){return null}static fromJSON(n,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let e=ja[t.stepType];if(!e)throw new RangeError(`No step type ${t.stepType} defined`);return e.fromJSON(n,t)}static jsonID(n,t){if(n in ja)throw new RangeError("Duplicate use of step JSON ID "+n);return ja[n]=t,t.prototype.jsonID=n,t}},te=class Ai{constructor(t,e){this.doc=t,this.failed=e}static ok(t){return new Ai(t,null)}static fail(t){return new Ai(null,t)}static fromReplace(t,e,r,i){try{return Ai.ok(t.replace(e,r,i))}catch(o){if(o instanceof Vr)return Ai.fail(o.message);throw o}}};function Qu(n,t,e){let r=[];for(let i=0;i<n.childCount;i++){let o=n.child(i);o.content.size&&(o=o.copy(Qu(o.content,t,o))),o.isInline&&(o=t(o,e,i)),r.push(o)}return H.fromArray(r)}let AE=class Oi extends Vt{constructor(t,e,r){super(),this.from=t,this.to=e,this.mark=r}apply(t){let e=t.slice(this.from,this.to),r=t.resolve(this.from),i=r.node(r.sharedDepth(this.to)),o=new B(Qu(e.content,(s,a)=>s.isAtom&&a.type.allowsMarkType(this.mark.type)?s.mark(this.mark.addToSet(s.marks)):s,i),e.openStart,e.openEnd);return te.fromReplace(t,this.from,this.to,o)}invert(){return new OE(this.from,this.to,this.mark)}map(t){let e=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return e.deleted&&r.deleted||e.pos>=r.pos?null:new Oi(e.pos,r.pos,this.mark)}merge(t){return t instanceof Oi&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new Oi(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,e){if(typeof e.from!="number"||typeof e.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Oi(e.from,e.to,t.markFromJSON(e.mark))}};Vt.jsonID("addMark",AE);let OE=class Ti extends Vt{constructor(t,e,r){super(),this.from=t,this.to=e,this.mark=r}apply(t){let e=t.slice(this.from,this.to),r=new B(Qu(e.content,i=>i.mark(this.mark.removeFromSet(i.marks)),t),e.openStart,e.openEnd);return te.fromReplace(t,this.from,this.to,r)}invert(){return new AE(this.from,this.to,this.mark)}map(t){let e=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return e.deleted&&r.deleted||e.pos>=r.pos?null:new Ti(e.pos,r.pos,this.mark)}merge(t){return t instanceof Ti&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new Ti(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,e){if(typeof e.from!="number"||typeof e.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Ti(e.from,e.to,t.markFromJSON(e.mark))}};Vt.jsonID("removeMark",OE);let TE=class Si extends Vt{constructor(t,e){super(),this.pos=t,this.mark=e}apply(t){let e=t.nodeAt(this.pos);if(!e)return te.fail("No node at mark step's position");let r=e.type.create(e.attrs,null,this.mark.addToSet(e.marks));return te.fromReplace(t,this.pos,this.pos+1,new B(H.from(r),0,e.isLeaf?0:1))}invert(t){let e=t.nodeAt(this.pos);if(e){let r=this.mark.addToSet(e.marks);if(r.length==e.marks.length){for(let i=0;i<e.marks.length;i++)if(!e.marks[i].isInSet(r))return new Si(this.pos,e.marks[i]);return new Si(this.pos,this.mark)}}return new SE(this.pos,this.mark)}map(t){let e=t.mapResult(this.pos,1);return e.deletedAfter?null:new Si(e.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,e){if(typeof e.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new Si(e.pos,t.markFromJSON(e.mark))}};Vt.jsonID("addNodeMark",TE);let SE=class Yl extends Vt{constructor(t,e){super(),this.pos=t,this.mark=e}apply(t){let e=t.nodeAt(this.pos);if(!e)return te.fail("No node at mark step's position");let r=e.type.create(e.attrs,null,this.mark.removeFromSet(e.marks));return te.fromReplace(t,this.pos,this.pos+1,new B(H.from(r),0,e.isLeaf?0:1))}invert(t){let e=t.nodeAt(this.pos);return e&&this.mark.isInSet(e.marks)?new TE(this.pos,this.mark):this}map(t){let e=t.mapResult(this.pos,1);return e.deletedAfter?null:new Yl(e.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,e){if(typeof e.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Yl(e.pos,t.markFromJSON(e.mark))}};Vt.jsonID("removeNodeMark",SE);Vt.jsonID("replace",class Mn extends Vt{constructor(t,e,r,i=!1){super(),this.from=t,this.to=e,this.slice=r,this.structure=i}apply(t){return this.structure&&Vl(t,this.from,this.to)?te.fail("Structure replace would overwrite content"):te.fromReplace(t,this.from,this.to,this.slice)}getMap(){return new rr([this.from,this.to-this.from,this.slice.size])}invert(t){return new Mn(this.from,this.from+this.slice.size,t.slice(this.from,this.to))}map(t){let e=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return e.deletedAcross&&r.deletedAcross?null:new Mn(e.pos,Math.max(e.pos,r.pos),this.slice)}merge(t){if(!(t instanceof Mn)||t.structure||this.structure)return null;if(this.from+this.slice.size!=t.from||this.slice.openEnd||t.slice.openStart){if(t.to!=this.from||this.slice.openStart||t.slice.openEnd)return null;{let e=this.slice.size+t.slice.size==0?B.empty:new B(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new Mn(t.from,this.to,e,this.structure)}}{let e=this.slice.size+t.slice.size==0?B.empty:new B(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new Mn(this.from,this.to+(t.to-t.from),e,this.structure)}}toJSON(){let t={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,e){if(typeof e.from!="number"||typeof e.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new Mn(e.from,e.to,B.fromJSON(t,e.slice),!!e.structure)}});function Vl(n,t,e){let r=n.resolve(t),i=e-t,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}Vt.jsonID("replaceAround",class Ko extends Vt{constructor(t,e,r,i,o,s,a=!1){super(),this.from=t,this.to=e,this.gapFrom=r,this.gapTo=i,this.slice=o,this.insert=s,this.structure=a}apply(t){if(this.structure&&(Vl(t,this.from,this.gapFrom)||Vl(t,this.gapTo,this.to)))return te.fail("Structure gap-replace would overwrite content");let e=t.slice(this.gapFrom,this.gapTo);if(e.openStart||e.openEnd)return te.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,e.content);return r?te.fromReplace(t,this.from,this.to,r):te.fail("Content does not fit in gap")}getMap(){return new rr([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(t){let e=this.gapTo-this.gapFrom;return new Ko(this.from,this.from+this.slice.size+e,this.from+this.insert,this.from+this.insert+e,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(t){let e=t.mapResult(this.from,1),r=t.mapResult(this.to,-1),i=t.map(this.gapFrom,-1),o=t.map(this.gapTo,1);return e.deletedAcross&&r.deletedAcross||i<e.pos||o>r.pos?null:new Ko(e.pos,r.pos,i,o,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,e){if(typeof e.from!="number"||typeof e.to!="number"||typeof e.gapFrom!="number"||typeof e.gapTo!="number"||typeof e.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Ko(e.from,e.to,e.gapFrom,e.gapTo,B.fromJSON(t,e.slice),e.insert,!!e.structure)}});Vt.jsonID("attr",class qo extends Vt{constructor(t,e,r){super(),this.pos=t,this.attr=e,this.value=r}apply(t){let e=t.nodeAt(this.pos);if(!e)return te.fail("No node at attribute step's position");let r=Object.create(null);for(let o in e.attrs)r[o]=e.attrs[o];r[this.attr]=this.value;let i=e.type.create(r,null,e.marks);return te.fromReplace(t,this.pos,this.pos+1,new B(H.from(i),0,e.isLeaf?0:1))}getMap(){return rr.empty}invert(t){return new qo(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let e=t.mapResult(this.pos,1);return e.deletedAfter?null:new qo(e.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,e){if(typeof e.pos!="number"||typeof e.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new qo(e.pos,e.attr,e.value)}});Vt.jsonID("docAttr",class zl extends Vt{constructor(t,e){super(),this.attr=t,this.value=e}apply(t){let e=Object.create(null);for(let i in t.attrs)e[i]=t.attrs[i];e[this.attr]=this.value;let r=t.type.create(e,t.content,t.marks);return te.ok(r)}getMap(){return rr.empty}invert(t){return new zl(this.attr,t.attrs[this.attr])}map(t){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(t,e){if(typeof e.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new zl(e.attr,e.value)}});let Fo=class extends Error{};Fo=function n(t){let e=Error.call(this,t);return e.__proto__=n.prototype,e},(Fo.prototype=Object.create(Error.prototype)).constructor=Fo,Fo.prototype.name="TransformError";class Ne{constructor(t,e){this.items=t,this.eventCount=e}popEvent(t,e){if(this.eventCount==0)return null;let r,i,o=this.items.length;for(;;o--)if(this.items.get(o-1).selection){--o;break}e&&(r=this.remapping(o,this.items.length),i=r.maps.length);let s,a,l=t.tr,u=[],c=[];return this.items.forEach((d,h)=>{if(!d.step)return r||(r=this.remapping(o,h+1),i=r.maps.length),i--,void c.push(d);if(r){c.push(new Be(d.map));let p,f=d.step.map(r.slice(i));f&&l.maybeStep(f).doc&&(p=l.mapping.maps[l.mapping.maps.length-1],u.push(new Be(p,void 0,void 0,u.length+c.length))),i--,p&&r.appendMap(p,i)}else l.maybeStep(d.step);return d.selection?(s=r?d.selection.map(r.slice(i)):d.selection,a=new Ne(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(t,e,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<t.steps.length;c++){let d,h=t.steps[c].invert(t.docs[c]),p=new Be(t.mapping.maps[c],h,e);(d=l&&l.merge(p))&&(p=d,c?o.pop():a=a.slice(0,a.length-1)),o.push(p),e&&(s++,e=void 0),i||(l=p)}let u=s-r.depth;return u>AA&&(a=function(c,d){let h;return c.forEach((p,f)=>{if(p.selection&&d--==0)return h=f,!1}),c.slice(h)}(a,u),s-=u),new Ne(a.append(o),s)}remapping(t,e){let r=new Bi;return this.items.forEach((i,o)=>{let s=i.mirrorOffset!=null&&o-i.mirrorOffset>=t?r.maps.length-i.mirrorOffset:void 0;r.appendMap(i.map,s)},t,e),r}addMaps(t){return this.eventCount==0?this:new Ne(this.items.append(t.map(e=>new Be(e))),this.eventCount)}rebased(t,e){if(!this.eventCount)return this;let r=[],i=Math.max(0,this.items.length-e),o=t.mapping,s=t.steps.length,a=this.eventCount;this.items.forEach(h=>{h.selection&&a--},i);let l=e;this.items.forEach(h=>{let p=o.getMirror(--l);if(p==null)return;s=Math.min(s,p);let f=o.maps[p];if(h.step){let m=t.steps[p].invert(t.docs[p]),E=h.selection&&h.selection.map(o.slice(l+1,p));E&&a++,r.push(new Be(f,m,E))}else r.push(new Be(f))},i);let u=[];for(let h=e;h<s;h++)u.push(new Be(o.maps[h]));let c=this.items.slice(0,i).append(u).append(r),d=new Ne(c,a);return d.emptyItemCount()>500&&(d=d.compress(this.items.length-r.length)),d}emptyItemCount(){let t=0;return this.items.forEach(e=>{e.step||t++}),t}compress(t=this.items.length){let e=this.remapping(0,t),r=e.maps.length,i=[],o=0;return this.items.forEach((s,a)=>{if(a>=t)i.push(s),s.selection&&o++;else if(s.step){let l=s.step.map(e.slice(r)),u=l&&l.getMap();if(r--,u&&e.appendMap(u,r),l){let c=s.selection&&s.selection.map(e.slice(r));c&&o++;let d,h=new Be(u.invert(),l,c),p=i.length-1;(d=i.length&&i[p].merge(h))?i[p]=d:i.push(h)}}else s.map&&r--},this.items.length,0),new Ne(DE.from(i.reverse()),o)}}Ne.empty=new Ne(DE.empty,0);class Be{constructor(t,e,r,i){this.map=t,this.step=e,this.selection=r,this.mirrorOffset=i}merge(t){if(this.step&&t.step&&!t.selection){let e=t.step.merge(this.step);if(e)return new Be(e.getMap().invert(),e,this.selection)}}}class En{constructor(t,e,r,i,o){this.done=t,this.undone=e,this.prevRanges=r,this.prevTime=i,this.prevComposition=o}}const AA=20;function wh(n){let t=[];for(let e=n.length-1;e>=0&&t.length==0;e--)n[e].forEach((r,i,o,s)=>t.push(o,s));return t}function Ya(n,t){if(!n)return null;let e=[];for(let r=0;r<n.length;r+=2){let i=t.map(n[r],1),o=t.map(n[r+1],-1);i<=o&&e.push(i,o)}return e}let Va=!1,Fh=null;function Jo(n){let t=n.plugins;if(Fh!=t){Va=!1,Fh=t;for(let e=0;e<t.length;e++)if(t[e].spec.historyPreserveItems){Va=!0;break}}return Va}const Vn=new Ks("history"),OA=new Ks("closeHistory");function TA(n={}){return n={depth:n.depth||100,newGroupDelay:n.newGroupDelay||500},new Ws({key:Vn,state:{init:()=>new En(Ne.empty,Ne.empty,null,0,-1),apply:(t,e,r)=>function(i,o,s,a){let l,u=s.getMeta(Vn);if(u)return u.historyState;s.getMeta(OA)&&(i=new En(i.done,i.undone,null,0,-1));let c=s.getMeta("appendedTransaction");if(s.steps.length==0)return i;if(c&&c.getMeta(Vn))return c.getMeta(Vn).redo?new En(i.done.addTransform(s,void 0,a,Jo(o)),i.undone,wh(s.mapping.maps),i.prevTime,i.prevComposition):new En(i.done,i.undone.addTransform(s,void 0,a,Jo(o)),null,i.prevTime,i.prevComposition);if(s.getMeta("addToHistory")===!1||c&&c.getMeta("addToHistory")===!1)return(l=s.getMeta("rebased"))?new En(i.done.rebased(s,l),i.undone.rebased(s,l),Ya(i.prevRanges,s.mapping),i.prevTime,i.prevComposition):new En(i.done.addMaps(s.mapping.maps),i.undone.addMaps(s.mapping.maps),Ya(i.prevRanges,s.mapping),i.prevTime,i.prevComposition);{let d=s.getMeta("composition"),h=i.prevTime==0||!c&&i.prevComposition!=d&&(i.prevTime<(s.time||0)-a.newGroupDelay||!function(f,m){if(!m)return!1;if(!f.docChanged)return!0;let E=!1;return f.mapping.maps[0].forEach((g,_)=>{for(let A=0;A<m.length;A+=2)g<=m[A+1]&&_>=m[A]&&(E=!0)}),E}(s,i.prevRanges)),p=c?Ya(i.prevRanges,s.mapping):wh(s.mapping.maps);return new En(i.done.addTransform(s,h?o.selection.getBookmark():void 0,a,Jo(o)),Ne.empty,p,s.time,d==null?i.prevComposition:d)}}(e,r,t,n)},config:n,props:{handleDOMEvents:{beforeinput(t,e){let r=e.inputType,i=r=="historyUndo"?NE:r=="historyRedo"?CE:null;return!!i&&(e.preventDefault(),i(t.state,t.dispatch))}}}})}function vE(n,t){return(e,r)=>{let i=Vn.getState(e);if(!i||(n?i.undone:i.done).eventCount==0)return!1;if(r){let o=function(s,a,l){let u=Jo(a),c=Vn.get(a).spec.config,d=(l?s.undone:s.done).popEvent(a,u);if(!d)return null;let h=d.selection.resolve(d.transform.doc),p=(l?s.done:s.undone).addTransform(d.transform,a.selection.getBookmark(),c,u),f=new En(l?p:d.remaining,l?d.remaining:p,null,0,-1);return d.transform.setSelection(h).setMeta(Vn,{redo:l,historyState:f})}(i,e,n);o&&r(t?o.scrollIntoView():o)}return!0}}const NE=vE(!1,!0),CE=vE(!0,!0),yE=Math.pow(2,16);function SA(n,t){return n+t*yE}function Mh(n){return 65535&n}class xh{constructor(t,e,r){this.pos=t,this.delInfo=e,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 pe{constructor(t,e=!1){if(this.ranges=t,this.inverted=e,!t.length&&pe.empty)return pe.empty}recover(t){let e=0,r=Mh(t);if(!this.inverted)for(let i=0;i<r;i++)e+=this.ranges[3*i+2]-this.ranges[3*i+1];return this.ranges[3*r]+e+function(i){return(i-(65535&i))/yE}(t)}mapResult(t,e=1){return this._map(t,e,!1)}map(t,e=1){return this._map(t,e,!0)}_map(t,e,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>t)break;let u=this.ranges[a+o],c=this.ranges[a+s],d=l+u;if(t<=d){let h=l+i+((u?t==l?-1:t==d?1:e:e)<0?0:c);if(r)return h;let p=t==(e<0?l:d)?null:SA(a/3,t-l),f=t==l?2:t==d?1:4;return(e<0?t!=l:t!=d)&&(f|=8),new xh(h,f,p)}i+=c-u}return r?t+i:new xh(t+i,0,null)}touches(t,e){let r=0,i=Mh(e),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>t)break;let u=this.ranges[a+o];if(t<=l+u&&a==3*i)return!0;r+=this.ranges[a+s]-u}return!1}forEach(t){let e=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+e],c=this.ranges[i+r];t(a,a+u,l,l+c),o+=c-u}}invert(){return new pe(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(t){return t==0?pe.empty:new pe(t<0?[0,-t,0]:[0,0,t])}}pe.empty=new pe([]);const za=Object.create(null);class Gt{getMap(){return pe.empty}merge(t){return null}static fromJSON(t,e){if(!e||!e.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=za[e.stepType];if(!r)throw new RangeError(`No step type ${e.stepType} defined`);return r.fromJSON(t,e)}static jsonID(t,e){if(t in za)throw new RangeError("Duplicate use of step JSON ID "+t);return za[t]=e,e.prototype.jsonID=t,e}}class Ct{constructor(t,e){this.doc=t,this.failed=e}static ok(t){return new Ct(t,null)}static fail(t){return new Ct(null,t)}static fromReplace(t,e,r,i){try{return Ct.ok(t.replace(e,r,i))}catch(o){if(o instanceof Vr)return Ct.fail(o.message);throw o}}}function tc(n,t,e){let r=[];for(let i=0;i<n.childCount;i++){let o=n.child(i);o.content.size&&(o=o.copy(tc(o.content,t,o))),o.isInline&&(o=t(o,e,i)),r.push(o)}return H.fromArray(r)}class zn extends Gt{constructor(t,e,r){super(),this.from=t,this.to=e,this.mark=r}apply(t){let e=t.slice(this.from,this.to),r=t.resolve(this.from),i=r.node(r.sharedDepth(this.to)),o=new B(tc(e.content,(s,a)=>s.isAtom&&a.type.allowsMarkType(this.mark.type)?s.mark(this.mark.addToSet(s.marks)):s,i),e.openStart,e.openEnd);return Ct.fromReplace(t,this.from,this.to,o)}invert(){return new Gn(this.from,this.to,this.mark)}map(t){let e=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return e.deleted&&r.deleted||e.pos>=r.pos?null:new zn(e.pos,r.pos,this.mark)}merge(t){return t instanceof zn&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new zn(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,e){if(typeof e.from!="number"||typeof e.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new zn(e.from,e.to,t.markFromJSON(e.mark))}}Gt.jsonID("addMark",zn);class Gn extends Gt{constructor(t,e,r){super(),this.from=t,this.to=e,this.mark=r}apply(t){let e=t.slice(this.from,this.to),r=new B(tc(e.content,i=>i.mark(this.mark.removeFromSet(i.marks)),t),e.openStart,e.openEnd);return Ct.fromReplace(t,this.from,this.to,r)}invert(){return new zn(this.from,this.to,this.mark)}map(t){let e=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return e.deleted&&r.deleted||e.pos>=r.pos?null:new Gn(e.pos,r.pos,this.mark)}merge(t){return t instanceof Gn&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new Gn(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,e){if(typeof e.from!="number"||typeof e.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Gn(e.from,e.to,t.markFromJSON(e.mark))}}Gt.jsonID("removeMark",Gn);class Xn extends Gt{constructor(t,e){super(),this.pos=t,this.mark=e}apply(t){let e=t.nodeAt(this.pos);if(!e)return Ct.fail("No node at mark step's position");let r=e.type.create(e.attrs,null,this.mark.addToSet(e.marks));return Ct.fromReplace(t,this.pos,this.pos+1,new B(H.from(r),0,e.isLeaf?0:1))}invert(t){let e=t.nodeAt(this.pos);if(e){let r=this.mark.addToSet(e.marks);if(r.length==e.marks.length){for(let i=0;i<e.marks.length;i++)if(!e.marks[i].isInSet(r))return new Xn(this.pos,e.marks[i]);return new Xn(this.pos,this.mark)}}return new Zi(this.pos,this.mark)}map(t){let e=t.mapResult(this.pos,1);return e.deletedAfter?null:new Xn(e.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,e){if(typeof e.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new Xn(e.pos,t.markFromJSON(e.mark))}}Gt.jsonID("addNodeMark",Xn);class Zi extends Gt{constructor(t,e){super(),this.pos=t,this.mark=e}apply(t){let e=t.nodeAt(this.pos);if(!e)return Ct.fail("No node at mark step's position");let r=e.type.create(e.attrs,null,this.mark.removeFromSet(e.marks));return Ct.fromReplace(t,this.pos,this.pos+1,new B(H.from(r),0,e.isLeaf?0:1))}invert(t){let e=t.nodeAt(this.pos);return e&&this.mark.isInSet(e.marks)?new Xn(this.pos,this.mark):this}map(t){let e=t.mapResult(this.pos,1);return e.deletedAfter?null:new Zi(e.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,e){if(typeof e.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Zi(e.pos,t.markFromJSON(e.mark))}}Gt.jsonID("removeNodeMark",Zi);class ve extends Gt{constructor(t,e,r,i=!1){super(),this.from=t,this.to=e,this.slice=r,this.structure=i}apply(t){return this.structure&&Gl(t,this.from,this.to)?Ct.fail("Structure replace would overwrite content"):Ct.fromReplace(t,this.from,this.to,this.slice)}getMap(){return new pe([this.from,this.to-this.from,this.slice.size])}invert(t){return new ve(this.from,this.from+this.slice.size,t.slice(this.from,this.to))}map(t){let e=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return e.deletedAcross&&r.deletedAcross?null:new ve(e.pos,Math.max(e.pos,r.pos),this.slice)}merge(t){if(!(t instanceof ve)||t.structure||this.structure)return null;if(this.from+this.slice.size!=t.from||this.slice.openEnd||t.slice.openStart){if(t.to!=this.from||this.slice.openStart||t.slice.openEnd)return null;{let e=this.slice.size+t.slice.size==0?B.empty:new B(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new ve(t.from,this.to,e,this.structure)}}{let e=this.slice.size+t.slice.size==0?B.empty:new B(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new ve(this.from,this.to+(t.to-t.from),e,this.structure)}}toJSON(){let t={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,e){if(typeof e.from!="number"||typeof e.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new ve(e.from,e.to,B.fromJSON(t,e.slice),!!e.structure)}}Gt.jsonID("replace",ve);class Cn extends Gt{constructor(t,e,r,i,o,s,a=!1){super(),this.from=t,this.to=e,this.gapFrom=r,this.gapTo=i,this.slice=o,this.insert=s,this.structure=a}apply(t){if(this.structure&&(Gl(t,this.from,this.gapFrom)||Gl(t,this.gapTo,this.to)))return Ct.fail("Structure gap-replace would overwrite content");let e=t.slice(this.gapFrom,this.gapTo);if(e.openStart||e.openEnd)return Ct.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,e.content);return r?Ct.fromReplace(t,this.from,this.to,r):Ct.fail("Content does not fit in gap")}getMap(){return new pe([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(t){let e=this.gapTo-this.gapFrom;return new Cn(this.from,this.from+this.slice.size+e,this.from+this.insert,this.from+this.insert+e,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(t){let e=t.mapResult(this.from,1),r=t.mapResult(this.to,-1),i=this.from==this.gapFrom?e.pos:t.map(this.gapFrom,-1),o=this.to==this.gapTo?r.pos:t.map(this.gapTo,1);return e.deletedAcross&&r.deletedAcross||i<e.pos||o>r.pos?null:new Cn(e.pos,r.pos,i,o,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,e){if(typeof e.from!="number"||typeof e.to!="number"||typeof e.gapFrom!="number"||typeof e.gapTo!="number"||typeof e.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Cn(e.from,e.to,e.gapFrom,e.gapTo,B.fromJSON(t,e.slice),e.insert,!!e.structure)}}function Gl(n,t,e){let r=n.resolve(t),i=e-t,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 vA(n,t,e){return(t==0||n.canReplace(t,n.childCount))&&(e==n.childCount||n.canReplace(0,e))}function ec(n){let t=n.parent.content.cutByIndex(n.startIndex,n.endIndex);for(let e=n.depth;;--e){let r=n.$from.node(e),i=n.$from.index(e),o=n.$to.indexAfter(e);if(e<n.depth&&r.canReplace(i,o,t))return e;if(e==0||r.type.spec.isolating||!vA(r,i,o))break}return null}function Zo(n,t,e=1,r){let i=n.resolve(t),o=i.depth-e,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=e-2;u>o;u--,c--){let d=i.node(u),h=i.index(u);if(d.type.spec.isolating)return!1;let p=d.content.cutByIndex(h,d.childCount),f=r&&r[c+1];f&&(p=p.replaceChild(0,f.type.create(f.attrs)));let m=r&&r[c]||d;if(!d.canReplace(h+1,d.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 Ph(n,t){let e=n.resolve(t),r=e.index();return function(i,o){return!(!i||!o||i.isLeaf||!function(s,a){a.content.size||s.type.compatibleContent(a.type);let l=s.contentMatchAt(s.childCount),{linebreakReplacement:u}=s.type.schema;for(let c=0;c<a.childCount;c++){let d=a.child(c),h=d.type==u?s.type.schema.nodes.text:d.type;if(l=l.matchType(h),!l||!s.type.allowsMarks(d.marks))return!1}return l.validEnd}(i,o))}(e.nodeBefore,e.nodeAfter)&&e.parent.canReplace(r,r+1)}function IE(n,t,e=t,r=B.empty){if(t==e&&!r.size)return null;let i=n.resolve(t),o=n.resolve(e);return function(s,a,l){return!l.openStart&&!l.openEnd&&s.start()==a.start()&&s.parent.canReplace(s.index(),a.index(),l.content)}(i,o,r)?new ve(t,e,r):new NA(i,o,r).fit()}Gt.jsonID("replaceAround",Cn);class NA{constructor(t,e,r){this.$from=t,this.$to=e,this.unplaced=r,this.frontier=[],this.placed=H.empty;for(let i=0;i<=t.depth;i++){let o=t.node(i);this.frontier.push({type:o.type,match:o.contentMatchAt(t.indexAfter(i))})}for(let i=t.depth;i>0;i--)this.placed=H.from(t.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 t=this.mustMoveInline(),e=this.placed.size-this.depth-this.$from.depth,r=this.$from,i=this.close(t<0?this.$to:r.doc.resolve(t));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 B(o,s,a);return t>-1?new Cn(r.pos,t,this.$to.pos,this.$to.end(),l,e):l.size||r.pos!=this.$to.pos?new ve(r.pos,i.pos,l):null}findFittable(){let t=this.unplaced.openStart;for(let e=this.unplaced.content,r=0,i=this.unplaced.openEnd;r<t;r++){let o=e.firstChild;if(e.childCount>1&&(i=0),o.type.spec.isolating&&i<=r){t=r;break}e=o.content}for(let e=1;e<=2;e++)for(let r=e==1?t: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],d=null;if(e==1&&(s?c.matchType(s.type)||(d=c.fillBefore(H.from(s),!1)):o&&u.compatibleContent(o.type)))return{sliceDepth:r,frontierDepth:a,parent:o,inject:d};if(e==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:t,openStart:e,openEnd:r}=this.unplaced,i=Ga(t,e);return!(!i.childCount||i.firstChild.isLeaf)&&(this.unplaced=new B(t,e+1,Math.max(r,i.size+e>=t.size-r?e+1:0)),!0)}dropNode(){let{content:t,openStart:e,openEnd:r}=this.unplaced,i=Ga(t,e);if(i.childCount<=1&&e>0){let o=t.size-e<=e+i.size;this.unplaced=new B(vi(t,e-1,1),e-1,o?e-1:r)}else this.unplaced=new B(vi(t,e,1),e,r)}placeNodes({sliceDepth:t,frontierDepth:e,parent:r,inject:i,wrap:o}){for(;this.depth>e;)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-t,u=0,c=[],{match:d,type:h}=this.frontier[e];if(i){for(let m=0;m<i.childCount;m++)c.push(i.child(m));d=d.matchFragment(i)}let p=a.size+t-(s.content.size-s.openEnd);for(;u<a.childCount;){let m=a.child(u),E=d.matchType(m.type);if(!E)break;u++,(u>1||l==0||m.content.size)&&(d=E,c.push(RE(m.mark(h.allowedMarks(m.marks)),u==1?l:0,u==a.childCount?p:-1)))}let f=u==a.childCount;f||(p=-1),this.placed=Ni(this.placed,e,H.from(c)),this.frontier[e].match=d,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 g=E.lastChild;this.frontier.push({type:g.type,match:g.contentMatchAt(g.childCount)}),E=g.content}this.unplaced=f?t==0?B.empty:new B(vi(s.content,t-1,1),t-1,p<0?s.openEnd:t-1):new B(vi(s.content,t,u),s.openStart,s.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let t,e=this.frontier[this.depth];if(!e.type.isTextblock||!Xa(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(t=this.findCloseLevel(this.$to))&&t.depth==this.depth)return-1;let{depth:r}=this.$to,i=this.$to.after(r);for(;r>1&&i==this.$to.end(--r);)++i;return i}findCloseLevel(t){t:for(let e=Math.min(this.depth,t.depth);e>=0;e--){let{match:r,type:i}=this.frontier[e],o=e<t.depth&&t.end(e+1)==t.pos+(t.depth-(e+1)),s=Xa(t,e,i,r,o);if(s){for(let a=e-1;a>=0;a--){let{match:l,type:u}=this.frontier[a],c=Xa(t,a,u,l,!0);if(!c||c.childCount)continue t}return{depth:e,fit:s,move:o?t.doc.resolve(t.after(e+1)):t}}}}close(t){let e=this.findCloseLevel(t);if(!e)return null;for(;this.depth>e.depth;)this.closeFrontierNode();e.fit.childCount&&(this.placed=Ni(this.placed,e.depth,e.fit)),t=e.move;for(let r=e.depth+1;r<=t.depth;r++){let i=t.node(r),o=i.type.contentMatch.fillBefore(i.content,!0,t.index(r));this.openFrontierNode(i.type,i.attrs,o)}return t}openFrontierNode(t,e=null,r){let i=this.frontier[this.depth];i.match=i.match.matchType(t),this.placed=Ni(this.placed,this.depth,H.from(t.create(e,r))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let t=this.frontier.pop().match.fillBefore(H.empty,!0);t.childCount&&(this.placed=Ni(this.placed,this.frontier.length,t))}}function vi(n,t,e){return t==0?n.cutByIndex(e,n.childCount):n.replaceChild(0,n.firstChild.copy(vi(n.firstChild.content,t-1,e)))}function Ni(n,t,e){return t==0?n.append(e):n.replaceChild(n.childCount-1,n.lastChild.copy(Ni(n.lastChild.content,t-1,e)))}function Ga(n,t){for(let e=0;e<t;e++)n=n.firstChild.content;return n}function RE(n,t,e){if(t<=0)return n;let r=n.content;return t>1&&(r=r.replaceChild(0,RE(r.firstChild,t-1,r.childCount==1?e-1:0))),t>0&&(r=n.type.contentMatch.fillBefore(r).append(r),e<=0&&(r=r.append(n.type.contentMatch.matchFragment(r).fillBefore(H.empty,!0)))),n.copy(r)}function Xa(n,t,e,r,i){let o=n.node(t),s=i?n.indexAfter(t):n.index(t);if(s==o.childCount&&!e.compatibleContent(o.type))return null;let a=r.fillBefore(o.content,!0,s);return a&&!function(l,u,c){for(let d=c;d<u.childCount;d++)if(!l.allowsMarks(u.child(d).marks))return!0;return!1}(e,o.content,s)?a:null}class Hi extends Gt{constructor(t,e,r){super(),this.pos=t,this.attr=e,this.value=r}apply(t){let e=t.nodeAt(this.pos);if(!e)return Ct.fail("No node at attribute step's position");let r=Object.create(null);for(let o in e.attrs)r[o]=e.attrs[o];r[this.attr]=this.value;let i=e.type.create(r,null,e.marks);return Ct.fromReplace(t,this.pos,this.pos+1,new B(H.from(i),0,e.isLeaf?0:1))}getMap(){return pe.empty}invert(t){return new Hi(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let e=t.mapResult(this.pos,1);return e.deletedAfter?null:new Hi(e.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,e){if(typeof e.pos!="number"||typeof e.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new Hi(e.pos,e.attr,e.value)}}Gt.jsonID("attr",Hi);class Ts extends Gt{constructor(t,e){super(),this.attr=t,this.value=e}apply(t){let e=Object.create(null);for(let i in t.attrs)e[i]=t.attrs[i];e[this.attr]=this.value;let r=t.type.create(e,t.content,t.marks);return Ct.ok(r)}getMap(){return pe.empty}invert(t){return new Ts(this.attr,t.attrs[this.attr])}map(t){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(t,e){if(typeof e.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new Ts(e.attr,e.value)}}Gt.jsonID("docAttr",Ts);let Mo=class extends Error{};Mo=function n(t){let e=Error.call(this,t);return e.__proto__=n.prototype,e},(Mo.prototype=Object.create(Error.prototype)).constructor=Mo,Mo.prototype.name="TransformError";const LE=(n,t)=>!n.selection.empty&&(t&&t(n.tr.deleteSelection().scrollIntoView()),!0);function Gr(n,t,e=!1){for(let r=n;r;r=t=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(e&&r.childCount!=1)return!1}return!1}function Bh(n){if(!n.parent.type.spec.isolating)for(let t=n.depth-1;t>=0;t--){if(n.index(t)>0)return n.doc.resolve(n.before(t+1));if(n.node(t).type.spec.isolating)break}return null}function Hh(n){if(!n.parent.type.spec.isolating)for(let t=n.depth-1;t>=0;t--){let e=n.node(t);if(n.index(t)+1<e.childCount)return n.doc.resolve(n.after(t+1));if(e.type.spec.isolating)break}return null}function Xl(n){for(let t=0;t<n.edgeCount;t++){let{type:e}=n.edge(t);if(e.isTextblock&&!e.hasRequiredAttrs())return e}return null}const CA=(n,t)=>{let{$from:e,$to:r}=n.selection;if(n.selection instanceof W&&n.selection.node.isBlock)return!(!e.parentOffset||!Zo(n.doc,e.pos)||(t&&t(n.tr.split(e.pos).scrollIntoView()),0));if(!e.depth)return!1;let i,o,s=[],a=!1,l=!1;for(let h=e.depth;;h--){if(e.node(h).isBlock){a=e.end(h)==e.pos+(e.depth-h),l=e.start(h)==e.pos-(e.depth-h),o=Xl(e.node(h-1).contentMatchAt(e.indexAfter(h-1))),s.unshift(a&&o?{type:o}:null),i=h;break}if(h==1)return!1;s.unshift(null)}let u=n.tr;(n.selection instanceof lt||n.selection instanceof Ee)&&u.deleteSelection();let c=u.mapping.map(e.pos),d=Zo(u.doc,c,s.length,s);if(d||(s[0]=o?{type:o}:null,d=Zo(u.doc,c,s.length,s)),u.split(c,s.length,s),!a&&l&&e.node(i).type!=o){let h=u.mapping.map(e.before(i)),p=u.doc.resolve(h);o&&e.node(i-1).canReplaceWith(p.index(),p.index()+1,o)&&u.setNodeMarkup(u.mapping.map(e.before(i)),o)}return t&&t(u.scrollIntoView()),!0};function bE(n,t,e,r){let i,o,s=t.nodeBefore,a=t.nodeAfter,l=s.type.spec.isolating||a.type.spec.isolating;if(!l&&function(p,f,m){let E=f.nodeBefore,g=f.nodeAfter,_=f.index();return!(!(E&&g&&E.type.compatibleContent(g.type))||(!E.content.size&&f.parent.canReplace(_-1,_)?(m&&m(p.tr.delete(f.pos-E.nodeSize,f.pos).scrollIntoView()),0):!f.parent.canReplace(_,_+1)||!g.isTextblock&&!Ph(p.doc,f.pos)||(m&&m(p.tr.join(f.pos).scrollIntoView()),0)))}(n,t,e))return!0;let u=!l&&t.parent.canReplace(t.index(),t.index()+1);if(u&&(i=(o=s.contentMatchAt(s.childCount)).findWrapping(a.type))&&o.matchType(i[0]||a.type).validEnd){if(e){let p=t.pos+a.nodeSize,f=H.empty;for(let g=i.length-1;g>=0;g--)f=H.from(i[g].create(null,f));f=H.from(s.copy(f));let m=n.tr.step(new Cn(t.pos-1,p,t.pos,p,new B(f,1,0),i.length,!0)),E=m.doc.resolve(p+2*i.length);E.nodeAfter&&E.nodeAfter.type==s.type&&Ph(m.doc,E.pos)&&m.join(E.pos),e(m.scrollIntoView())}return!0}let c=a.type.spec.isolating||r>0&&l?null:rt.findFrom(t,1),d=c&&c.$from.blockRange(c.$to),h=d&&ec(d);if(h!=null&&h>=t.depth)return e&&e(n.tr.lift(d,h).scrollIntoView()),!0;if(u&&Gr(a,"start",!0)&&Gr(s,"end")){let p=s,f=[];for(;f.push(p),!p.isTextblock;)p=p.lastChild;let m=a,E=1;for(;!m.isTextblock;m=m.firstChild)E++;if(p.canReplace(p.childCount,p.childCount,m.content)){if(e){let g=H.empty;for(let _=f.length-1;_>=0;_--)g=H.from(f[_].copy(g));e(n.tr.step(new Cn(t.pos-f.length,t.pos+a.nodeSize,t.pos+E,t.pos+a.nodeSize-E,new B(g,f.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function kE(n){return function(t,e){let r=t.selection,i=n<0?r.$from:r.$to,o=i.depth;for(;i.node(o).isInline;){if(!o)return!1;o--}return!!i.node(o).isTextblock&&(e&&e(t.tr.setSelection(lt.create(t.doc,n<0?i.start(o):i.end(o)))),!0)}}const yA=kE(-1),IA=kE(1);function nc(...n){return function(t,e,r){for(let i=0;i<n.length;i++)if(n[i](t,e,r))return!0;return!1}}let Wa=nc(LE,(n,t,e)=>{let r=function(s,a){let{$cursor:l}=s.selection;return!l||(a?!a.endOfTextblock("backward",s):l.parentOffset>0)?null:l}(n,e);if(!r)return!1;let i=Bh(r);if(!i){let s=r.blockRange(),a=s&&ec(s);return a!=null&&(t&&t(n.tr.lift(s,a).scrollIntoView()),!0)}let o=i.nodeBefore;if(bE(n,i,t,-1))return!0;if(r.parent.content.size==0&&(Gr(o,"end")||W.isSelectable(o)))for(let s=r.depth;;s--){let a=IE(n.doc,r.before(s),r.after(s),B.empty);if(a&&a.slice.size<a.to-a.from){if(t){let l=n.tr.step(a);l.setSelection(Gr(o,"end")?rt.findFrom(l.doc.resolve(l.mapping.map(i.pos,-1)),-1):W.create(l.doc,i.pos-o.nodeSize)),t(l.scrollIntoView())}return!0}if(s==1||r.node(s-1).childCount>1)break}return!(!o.isAtom||i.depth!=r.depth-1)&&(t&&t(n.tr.delete(i.pos-o.nodeSize,i.pos).scrollIntoView()),!0)},(n,t,e)=>{let{$head:r,empty:i}=n.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(e?!e.endOfTextblock("backward",n):r.parentOffset>0)return!1;o=Bh(r)}let s=o&&o.nodeBefore;return!(!s||!W.isSelectable(s))&&(t&&t(n.tr.setSelection(W.create(n.doc,o.pos-s.nodeSize)).scrollIntoView()),!0)}),Uh=nc(LE,(n,t,e)=>{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}(n,e);if(!r)return!1;let i=Hh(r);if(!i)return!1;let o=i.nodeAfter;if(bE(n,i,t,1))return!0;if(r.parent.content.size==0&&(Gr(o,"start")||W.isSelectable(o))){let s=IE(n.doc,r.before(),r.after(),B.empty);if(s&&s.slice.size<s.to-s.from){if(t){let a=n.tr.step(s);a.setSelection(Gr(o,"start")?rt.findFrom(a.doc.resolve(a.mapping.map(i.pos)),1):W.create(a.doc,a.mapping.map(i.pos))),t(a.scrollIntoView())}return!0}}return!(!o.isAtom||i.depth!=r.depth-1)&&(t&&t(n.tr.delete(i.pos,i.pos+o.nodeSize).scrollIntoView()),!0)},(n,t,e)=>{let{$head:r,empty:i}=n.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(e?!e.endOfTextblock("forward",n):r.parentOffset<r.parent.content.size)return!1;o=Hh(r)}let s=o&&o.nodeAfter;return!(!s||!W.isSelectable(s))&&(t&&t(n.tr.setSelection(W.create(n.doc,o.pos)).scrollIntoView()),!0)});const nn={Enter:nc((n,t)=>{let{$head:e,$anchor:r}=n.selection;return!(!e.parent.type.spec.code||!e.sameParent(r))&&(t&&t(n.tr.insertText(`
|
|
15
|
+
`).scrollIntoView()),!0)},(n,t)=>{let e=n.selection,{$from:r,$to:i}=e;if(e instanceof Ee||r.parent.inlineContent||i.parent.inlineContent)return!1;let o=Xl(i.parent.contentMatchAt(i.indexAfter()));if(!o||!o.isTextblock)return!1;if(t){let s=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,a=n.tr.insert(s,o.createAndFill());a.setSelection(lt.create(a.doc,s+1)),t(a.scrollIntoView())}return!0},(n,t)=>{let{$cursor:e}=n.selection;if(!e||e.parent.content.size)return!1;if(e.depth>1&&e.after()!=e.end(-1)){let o=e.before();if(Zo(n.doc,o))return t&&t(n.tr.split(o).scrollIntoView()),!0}let r=e.blockRange(),i=r&&ec(r);return i!=null&&(t&&t(n.tr.lift(r,i).scrollIntoView()),!0)},CA),"Mod-Enter":(n,t)=>{let{$head:e,$anchor:r}=n.selection;if(!e.parent.type.spec.code||!e.sameParent(r))return!1;let i=e.node(-1),o=e.indexAfter(-1),s=Xl(i.contentMatchAt(o));if(!s||!i.canReplaceWith(o,o,s))return!1;if(t){let a=e.after(),l=n.tr.replaceWith(a,a,s.createAndFill());l.setSelection(rt.near(l.doc.resolve(a),1)),t(l.scrollIntoView())}return!0},Backspace:Wa,"Mod-Backspace":Wa,"Shift-Backspace":Wa,Delete:Uh,"Mod-Delete":Uh,"Mod-a":(n,t)=>(t&&t(n.tr.setSelection(new Ee(n.doc))),!0)},wE={"Ctrl-h":nn.Backspace,"Alt-Backspace":nn["Mod-Backspace"],"Ctrl-d":nn.Delete,"Ctrl-Alt-Backspace":nn["Mod-Delete"],"Alt-Delete":nn["Mod-Delete"],"Alt-d":nn["Mod-Delete"],"Ctrl-a":yA,"Ctrl-e":IA};for(let n in nn)wE[n]=nn[n];const xo=(typeof navigator!="undefined"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!(typeof os=="undefined"||!os.platform)&&os.platform()=="darwin")?wE:nn;function rc(n,t){return n.reduce((e,r,i)=>e.concat(t(r,i)),[])}const Ui=(n,t,e=void 0)=>rc(n,r=>{if(typeof r=="string")return t(r,e);switch(r.type){case"bold":case"italic":case"strikethrough":case"blockquote":case"bulletlist":case"bulletList":case"bulletpoint":case"bulletPoint":return[{type:r.type,children:Ui(r.children,t,r.type)}];case"link":return[{type:r.type,url:r.url,children:Ui(r.children,t,r.type)}];case"actionlink":case"actionLink":case"actionbutton":case"actionButton":return[{type:r.type,action:r.action,params:r.params,children:Ui(r.children,t,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 pn(n,t){return e=>{const r=e;let i=0;const o=[];for(const s of zs(e,n)){s.index-i>0&&o.push(r.substring(i,s.index));const a=t(s);Array.isArray(a)?o.push(...a):o.push(a),i=s.index+s[0].length}return i<e.length&&o.push(e.substring(i)),o}}function FE(n){return n.replace(/<!!mention:.*?\|([^>]*)>/gim,"@$1").replace(/<!!customemoji:(.*?)>/gim,"$1")}const $h="’'()[]{}<>:,‒–—―…!.«»-‐?‘’“”;/⁄␠·&@*\\•^¤¢$€£¥₩₪†‡°¡¿¬#№%‰‱¶′§~¨_|¦⁂☞∴‽※".replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");var Wl=(n=>(n[n.italic=1]="italic",n[n.strikethrough=2]="strikethrough",n[n.bold=4]="bold",n))(Wl||{});const RA=[0,1,2,3,4,5,6].map(n=>{const t=[];return 1&n||t.push(/_([^\s_].*?[^\s_])_|_([^\s_])_/),2&n||t.push(/~([^\s~].*?[^\s~])~|~([^\s~])~/),4&n||t.push(/\*([^\s*].*?[^\s*])\*|\*([^\s*])\*/),new RegExp(t.map(e=>e.source).join("|"),"g")}),LA={_:1,"*":4,"~":2};function bA(n){return ME(n,0)}function ME(n,t=0){const e=RA[t],r=e?function(i){const o=kA.getOrCompute(i,()=>new RegExp(`(?:^|[\\s${$h}])(?:${i.source})(?=[\\s${$h}]|$)`,"g")),s=pn(o,a=>{const l=a[0][1],u=a[1]||a[2]||a[3]||a[4]||a[5]||a[6];return[" ",{type:Wl[LA[l]],children:[u]}]});return a=>{const[l,...u]=s(" "+a);return l.length>1&&u.unshift(l.substring(1)),u}}(e):()=>[n];return Ui(r(n),(i,o)=>o==="bold"||o==="italic"||o==="strikethrough"?ME(i,t|Wl[o]):[i])}const kA=function(){const n=function(){try{return new WeakMap}catch(t){const e={has:()=>!1,get:()=>{},set:()=>e};return e}}();return{getOrCompute(t,e){if(n.has(t))return n.get(t);const r=e();return n.set(t,r),r}}}();function jh(n,t){if(Array.prototype.indexOf)return n.indexOf(t);for(var e=0,r=n.length;e<r;e++)if(n[e]===t)return e;return-1}function kn(n,t){for(var e=n.length-1;e>=0;e--)t(n[e])===!0&&n.splice(e,1)}function xE(n){throw new Error("Unhandled case for value: '"+n+"'")}var Kl=function(){function n(t){t===void 0&&(t={}),this.tagName="",this.attrs={},this.innerHTML="",this.whitespaceRegex=/\s+/,this.tagName=t.tagName||"",this.attrs=t.attrs||{},this.innerHTML=t.innerHtml||t.innerHTML||""}return n.prototype.setTagName=function(t){return this.tagName=t,this},n.prototype.getTagName=function(){return this.tagName||""},n.prototype.setAttr=function(t,e){return this.getAttrs()[t]=e,this},n.prototype.getAttr=function(t){return this.getAttrs()[t]},n.prototype.setAttrs=function(t){return Object.assign(this.getAttrs(),t),this},n.prototype.getAttrs=function(){return this.attrs||(this.attrs={})},n.prototype.setClass=function(t){return this.setAttr("class",t)},n.prototype.addClass=function(t){for(var e,r=this.getClass(),i=this.whitespaceRegex,o=r?r.split(i):[],s=t.split(i);e=s.shift();)jh(o,e)===-1&&o.push(e);return this.getAttrs().class=o.join(" "),this},n.prototype.removeClass=function(t){for(var e,r=this.getClass(),i=this.whitespaceRegex,o=r?r.split(i):[],s=t.split(i);o.length&&(e=s.shift());){var a=jh(o,e);a!==-1&&o.splice(a,1)}return this.getAttrs().class=o.join(" "),this},n.prototype.getClass=function(){return this.getAttrs().class||""},n.prototype.hasClass=function(t){return(" "+this.getClass()+" ").indexOf(" "+t+" ")!==-1},n.prototype.setInnerHTML=function(t){return this.innerHTML=t,this},n.prototype.setInnerHtml=function(t){return this.setInnerHTML(t)},n.prototype.getInnerHTML=function(){return this.innerHTML||""},n.prototype.getInnerHtml=function(){return this.getInnerHTML()},n.prototype.toAnchorString=function(){var t=this.getTagName(),e=this.buildAttrsStr();return["<",t,e=e?" "+e:"",">",this.getInnerHtml(),"</",t,">"].join("")},n.prototype.buildAttrsStr=function(){if(!this.attrs)return"";var t=this.getAttrs(),e=[];for(var r in t)t.hasOwnProperty(r)&&e.push(r+'="'+t[r]+'"');return e.join(" ")},n}(),Yh=function(){function n(t){t===void 0&&(t={}),this.newWindow=!1,this.truncate={},this.className="",this.newWindow=t.newWindow||!1,this.truncate=t.truncate||{},this.className=t.className||""}return n.prototype.build=function(t){return new Kl({tagName:"a",attrs:this.createAttrs(t),innerHtml:this.processAnchorText(t.getAnchorText())})},n.prototype.createAttrs=function(t){var e={href:t.getAnchorHref()},r=this.createCssClass(t);return r&&(e.class=r),this.newWindow&&(e.target="_blank",e.rel="noopener noreferrer"),this.truncate&&this.truncate.length&&this.truncate.length<t.getAnchorText().length&&(e.title=t.getAnchorHref()),e},n.prototype.createCssClass=function(t){var e=this.className;if(e){for(var r=[e],i=t.getCssClassSuffixes(),o=0,s=i.length;o<s;o++)r.push(e+"-"+i[o]);return r.join(" ")}return""},n.prototype.processAnchorText=function(t){return t=this.doTruncate(t)},n.prototype.doTruncate=function(t){var e=this.truncate;if(!e||!e.length)return t;var r=e.length,i=e.location;return i==="smart"?function(o,s,a){var l,u;a==null?(a="…",u=3,l=8):(u=a.length,l=a.length);var c=function(T){var S="";return T.scheme&&T.host&&(S+=T.scheme+"://"),T.host&&(S+=T.host),T.path&&(S+="/"+T.path),T.query&&(S+="?"+T.query),T.fragment&&(S+="#"+T.fragment),S},d=function(T,S){var v=S/2,C=Math.ceil(v),R=-1*Math.floor(v),D="";return R<0&&(D=T.substr(R)),T.substr(0,C)+a+D};if(o.length<=s)return o;var h=s-u,p=function(T){var S={},v=T,C=v.match(/^([a-z]+):\/\//i);return C&&(S.scheme=C[1],v=v.substr(C[0].length)),(C=v.match(/^(.*?)(?=(\?|#|\/|$))/i))&&(S.host=C[1],v=v.substr(C[0].length)),(C=v.match(/^\/(.*?)(?=(\?|#|$))/i))&&(S.path=C[1],v=v.substr(C[0].length)),(C=v.match(/^\?(.*?)(?=(#|$))/i))&&(S.query=C[1],v=v.substr(C[0].length)),(C=v.match(/^#(.*?)$/i))&&(S.fragment=C[1]),S}(o);if(p.query){var f=p.query.match(/^(.*?)(?=(\?|\#))(.*?)$/i);f&&(p.query=p.query.substr(0,f[1].length),o=c(p))}if(o.length<=s||(p.host&&(p.host=p.host.replace(/^www\./,""),o=c(p)),o.length<=s))return o;var m="";if(p.host&&(m+=p.host),m.length>=h)return p.host.length==s?(p.host.substr(0,s-u)+a).substr(0,h+l):d(m,h).substr(0,h+l);var E="";if(p.path&&(E+="/"+p.path),p.query&&(E+="?"+p.query),E){if((m+E).length>=h)return(m+E).length==s?(m+E).substr(0,s):(m+d(E,h-m.length)).substr(0,h+l);m+=E}if(p.fragment){var g="#"+p.fragment;if((m+g).length>=h)return(m+g).length==s?(m+g).substr(0,s):(m+d(g,h-m.length)).substr(0,h+l);m+=g}if(p.scheme&&p.host){var _=p.scheme+"://";if((m+_).length<h)return(_+m).substr(0,s)}if(m.length<=s)return m;var A="";return h>0&&(A=m.substr(-1*Math.floor(h/2))),(m.substr(0,Math.ceil(h/2))+a+A).substr(0,h+l)}(t,r):i==="middle"?function(o,s,a){if(o.length<=s)return o;var l,u;a==null?(a="…",l=8,u=3):(l=a.length,u=a.length);var c=s-u,d="";return c>0&&(d=o.substr(-1*Math.floor(c/2))),(o.substr(0,Math.ceil(c/2))+a+d).substr(0,c+l)}(t,r):function(o,s,a){return function(l,u,c){var d;return l.length>u&&(c==null?(c="…",d=3):d=c.length,l=l.substring(0,u-d)+c),l}(o,s,a)}(t,r)},n}(),Qr=function(){function n(t){this.__jsduckDummyDocProp=null,this.matchedText="",this.offset=0,this.tagBuilder=t.tagBuilder,this.matchedText=t.matchedText,this.offset=t.offset}return n.prototype.getMatchedText=function(){return this.matchedText},n.prototype.setOffset=function(t){this.offset=t},n.prototype.getOffset=function(){return this.offset},n.prototype.getCssClassSuffixes=function(){return[this.getType()]},n.prototype.buildTag=function(){return this.tagBuilder.build(this)},n}(),ql=function(n,t){return ql=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var i in r)r.hasOwnProperty(i)&&(e[i]=r[i])},ql(n,t)};function We(n,t){function e(){this.constructor=n}ql(n,t),n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var Vh,Dt=function(){return Dt=Object.assign||function(n){for(var t,e=1,r=arguments.length;e<r;e++)for(var i in t=arguments[e])Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i]);return n},Dt.apply(this,arguments)},ic=function(n){function t(e){var r=n.call(this,e)||this;return r.email="",r.email=e.email,r}return We(t,n),t.prototype.getType=function(){return"email"},t.prototype.getEmail=function(){return this.email},t.prototype.getAnchorHref=function(){return"mailto:"+this.email},t.prototype.getAnchorText=function(){return this.email},t}(Qr),PE=function(n){function t(e){var r=n.call(this,e)||this;return r.serviceName="",r.hashtag="",r.serviceName=e.serviceName,r.hashtag=e.hashtag,r}return We(t,n),t.prototype.getType=function(){return"hashtag"},t.prototype.getServiceName=function(){return this.serviceName},t.prototype.getHashtag=function(){return this.hashtag},t.prototype.getAnchorHref=function(){var e=this.serviceName,r=this.hashtag;switch(e){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;default:throw new Error("Unknown service name to point hashtag to: "+e)}},t.prototype.getAnchorText=function(){return"#"+this.hashtag},t}(Qr),BE=function(n){function t(e){var r=n.call(this,e)||this;return r.serviceName="twitter",r.mention="",r.mention=e.mention,r.serviceName=e.serviceName,r}return We(t,n),t.prototype.getType=function(){return"mention"},t.prototype.getMention=function(){return this.mention},t.prototype.getServiceName=function(){return this.serviceName},t.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;default:throw new Error("Unknown service name to point mention to: "+this.serviceName)}},t.prototype.getAnchorText=function(){return"@"+this.mention},t.prototype.getCssClassSuffixes=function(){var e=n.prototype.getCssClassSuffixes.call(this),r=this.getServiceName();return r&&e.push(r),e},t}(Qr),HE=function(n){function t(e){var r=n.call(this,e)||this;return r.number="",r.plusSign=!1,r.number=e.number,r.plusSign=e.plusSign,r}return We(t,n),t.prototype.getType=function(){return"phone"},t.prototype.getPhoneNumber=function(){return this.number},t.prototype.getNumber=function(){return this.getPhoneNumber()},t.prototype.getAnchorHref=function(){return"tel:"+(this.plusSign?"+":"")+this.number},t.prototype.getAnchorText=function(){return this.matchedText},t}(Qr),oc=function(n){function t(e){var r=n.call(this,e)||this;return r.url="",r.urlMatchType="scheme",r.protocolUrlMatch=!1,r.protocolRelativeMatch=!1,r.stripPrefix={scheme:!0,www:!0},r.stripTrailingSlash=!0,r.decodePercentEncoding=!0,r.schemePrefixRegex=/^(https?:\/\/)?/i,r.wwwPrefixRegex=/^(https?:\/\/)?(www\.)?/i,r.protocolRelativeRegex=/^\/\//,r.protocolPrepended=!1,r.urlMatchType=e.urlMatchType,r.url=e.url,r.protocolUrlMatch=e.protocolUrlMatch,r.protocolRelativeMatch=e.protocolRelativeMatch,r.stripPrefix=e.stripPrefix,r.stripTrailingSlash=e.stripTrailingSlash,r.decodePercentEncoding=e.decodePercentEncoding,r}return We(t,n),t.prototype.getType=function(){return"url"},t.prototype.getUrlMatchType=function(){return this.urlMatchType},t.prototype.getUrl=function(){var e=this.url;return this.protocolRelativeMatch||this.protocolUrlMatch||this.protocolPrepended||(e=this.url="http://"+e,this.protocolPrepended=!0),e},t.prototype.getAnchorHref=function(){return this.getUrl().replace(/&/g,"&")},t.prototype.getAnchorText=function(){var e=this.getMatchedText();return this.protocolRelativeMatch&&(e=this.stripProtocolRelativePrefix(e)),this.stripPrefix.scheme&&(e=this.stripSchemePrefix(e)),this.stripPrefix.www&&(e=this.stripWwwPrefix(e)),this.stripTrailingSlash&&(e=this.removeTrailingSlash(e)),this.decodePercentEncoding&&(e=this.removePercentEncoding(e)),e},t.prototype.stripSchemePrefix=function(e){return e.replace(this.schemePrefixRegex,"")},t.prototype.stripWwwPrefix=function(e){return e.replace(this.wwwPrefixRegex,"$1")},t.prototype.stripProtocolRelativePrefix=function(e){return e.replace(this.protocolRelativeRegex,"")},t.prototype.removeTrailingSlash=function(e){return e.charAt(e.length-1)==="/"&&(e=e.slice(0,-1)),e},t.prototype.removePercentEncoding=function(e){var r=e.replace(/%22/gi,""").replace(/%26/gi,"&").replace(/%27/gi,"'").replace(/%3C/gi,"<").replace(/%3E/gi,">");try{return decodeURIComponent(r)}catch(i){return r}},t}(Qr),ti=function(n){this.__jsduckDummyDocProp=null,this.tagBuilder=n.tagBuilder},Ka=/[A-Za-z]/,wA=/[\d]/,FA=/[\D]/,wn=/\s/,qa=/['"]/,MA=/[\x00-\x1F\x7F]/,UE=/A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC/.source,$E=UE+/\u2700-\u27bf\udde6-\uddff\ud800-\udbff\udc00-\udfff\ufe0e\ufe0f\u0300-\u036f\ufe20-\ufe23\u20d0-\u20f0\ud83c\udffb-\udfff\u200d\u3299\u3297\u303d\u3030\u24c2\ud83c\udd70-\udd71\udd7e-\udd7f\udd8e\udd91-\udd9a\udde6-\uddff\ude01-\ude02\ude1a\ude2f\ude32-\ude3a\ude50-\ude51\u203c\u2049\u25aa-\u25ab\u25b6\u25c0\u25fb-\u25fe\u00a9\u00ae\u2122\u2139\udc04\u2600-\u26FF\u2b05\u2b06\u2b07\u2b1b\u2b1c\u2b50\u2b55\u231a\u231b\u2328\u23cf\u23e9-\u23f3\u23f8-\u23fa\udccf\u2935\u2934\u2190-\u21ff/.source+/\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D4-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D01-\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF5\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F/.source,Ss=/0-9\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0BE6-\u0BEF\u0C66-\u0C6F\u0CE6-\u0CEF\u0D66-\u0D6F\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F29\u1040-\u1049\u1090-\u1099\u17E0-\u17E9\u1810-\u1819\u1946-\u194F\u19D0-\u19D9\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\uA620-\uA629\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19/.source,xA=$E+Ss,St=$E+Ss,PA="(?:["+Ss+"]{1,3}\\.){3}["+Ss+"]{1,3}",BA="["+St+"](?:["+St+"\\-]{0,61}["+St+"])?",zh=function(n){return"(?=("+BA+"))\\"+n},Ja=function(n){return"(?:"+zh(n)+"(?:\\."+zh(n+1)+"){0,126}|"+PA+")"},Po=new RegExp("["+St+"]"),jE=/(?:xn--vermgensberatung-pwb|xn--vermgensberater-ctb|xn--clchc0ea0b2g2a9gcd|xn--w4r85el8fhu5dnra|northwesternmutual|travelersinsurance|vermögensberatung|xn--3oq18vl8pn36a|xn--5su34j936bgsg|xn--bck1b9a5dre4c|xn--mgbai9azgqp6j|xn--mgberp4a5d4ar|xn--xkc2dl3a5ee0h|vermögensberater|xn--fzys8d69uvgm|xn--mgba7c0bbn0a|xn--xkc2al3hye2a|americanexpress|kerryproperties|sandvikcoromant|xn--i1b6b1a6a2e|xn--kcrx77d1x4a|xn--lgbbat1ad8j|xn--mgba3a4f16a|xn--mgbaakc7dvf|xn--mgbc0a9azcg|xn--nqv7fs00ema|afamilycompany|americanfamily|bananarepublic|cancerresearch|cookingchannel|kerrylogistics|weatherchannel|xn--54b7fta0cc|xn--6qq986b3xl|xn--80aqecdr1a|xn--b4w605ferd|xn--fiq228c5hs|xn--h2breg3eve|xn--jlq61u9w7b|xn--mgba3a3ejt|xn--mgbaam7a8h|xn--mgbayh7gpa|xn--mgbb9fbpob|xn--mgbbh1a71e|xn--mgbca7dzdo|xn--mgbi4ecexp|xn--mgbx4cd0ab|xn--rvc1e0am3e|international|lifeinsurance|spreadbetting|travelchannel|wolterskluwer|xn--eckvdtc9d|xn--fpcrj9c3d|xn--fzc2c9e2c|xn--h2brj9c8c|xn--tiq49xqyj|xn--yfro4i67o|xn--ygbi2ammx|construction|lplfinancial|scholarships|versicherung|xn--3e0b707e|xn--45br5cyl|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|foodnetwork|investments|kerryhotels|lamborghini|motorcycles|olayangroup|photography|playstation|productions|progressive|redumbrella|rightathome|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--estv75g|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--kpu716f|xn--mgbbh1a|xn--mgbtx2b|xn--mix891f|xn--nyqy26a|xn--otu796d|xn--pbt977c|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|nationwide|newholland|nextdirect|onyourside|properties|protection|prudential|realestate|republican|restaurant|schaeffler|swiftcover|tatamotors|technology|telefonica|university|vistaprint|vlaanderen|volkswagen|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--unup4y|xn--wgbh1c|xn--wgbl6a|xn--y9a3aq|accenture|alfaromeo|allfinanz|amsterdam|analytics|aquarelle|barcelona|bloomberg|christmas|community|directory|education|equipment|fairwinds|financial|firestone|fresenius|frontdoor|fujixerox|furniture|goldpoint|hisamitsu|homedepot|homegoods|homesense|honeywell|institute|insurance|kuokgroup|ladbrokes|lancaster|landrover|lifestyle|marketing|marshalls|melbourne|microsoft|panasonic|passagens|pramerica|richardli|scjohnson|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--tckwe|xn--vhquv|yodobashi|abudhabi|airforce|allstate|attorney|barclays|barefoot|bargains|baseball|boutique|bradesco|broadway|brussels|budapest|builders|business|capetown|catering|catholic|chrysler|cipriani|cityeats|cleaning|clinique|clothing|commbank|computer|delivery|deloitte|democrat|diamonds|discount|discover|download|engineer|ericsson|esurance|etisalat|everbank|exchange|feedback|fidelity|firmdale|football|frontier|goodyear|grainger|graphics|guardian|hdfcbank|helsinki|holdings|hospital|infiniti|ipiranga|istanbul|jpmorgan|lighting|lundbeck|marriott|maserati|mckinsey|memorial|merckmsd|mortgage|movistar|observer|partners|pharmacy|pictures|plumbing|property|redstone|reliance|saarland|samsclub|security|services|shopping|showtime|softbank|software|stcgroup|supplies|symantec|training|uconnect|vanguard|ventures|verisign|woodside|xn--90ae|xn--node|xn--p1ai|xn--qxam|yokohama|السعودية|abogado|academy|agakhan|alibaba|android|athleta|auction|audible|auspost|avianca|banamex|bauhaus|bentley|bestbuy|booking|brother|bugatti|capital|caravan|careers|cartier|channel|charity|chintai|citadel|clubmed|college|cologne|comcast|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|hoteles|hotmail|hyundai|iselect|ismaili|jewelry|juniper|kitchen|komatsu|lacaixa|lancome|lanxess|lasalle|latrobe|leclerc|liaison|limited|lincoln|markets|metlife|monster|netbank|netflix|network|neustar|okinawa|oldnavy|organic|origins|philips|pioneer|politie|realtor|recipes|rentals|reviews|rexroth|samsung|sandvik|schmidt|schwarz|science|shiksha|shriram|singles|staples|starhub|storage|support|surgery|systems|temasek|theater|theatre|tickets|tiffany|toshiba|trading|walmart|wanggou|watches|weather|website|wedding|whoswho|windows|winners|xfinity|yamaxun|youtube|zuerich|католик|اتصالات|الجزائر|العليان|پاکستان|كاثوليك|موبايلي|இந்தியா|abarth|abbott|abbvie|active|africa|agency|airbus|airtel|alipay|alsace|alstom|anquan|aramco|author|bayern|beauty|berlin|bharti|blanco|bostik|boston|broker|camera|career|caseih|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|kinder|kindle|kosher|lancia|latino|lawyer|lefrak|living|locker|london|luxury|madrid|maison|makeup|market|mattel|mobile|mobily|monash|mormon|moscow|museum|mutual|nagoya|natura|nissan|nissay|norton|nowruz|office|olayan|online|oracle|orange|otsuka|pfizer|photos|physio|piaget|pictet|quebec|racing|realty|reisen|repair|report|review|rocher|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|vuelos|walter|warman|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|dabur|dance|deals|delta|dodge|drive|dubai|earth|edeka|email|epost|epson|faith|fedex|final|forex|forum|gallo|games|gifts|gives|glade|glass|globo|gmail|green|gripe|group|gucci|guide|homes|honda|horse|house|hyatt|ikano|intel|irish|iveco|jetzt|koeln|kyoto|lamer|lease|legal|lexus|lilly|linde|lipsy|lixil|loans|locus|lotte|lotto|lupin|macys|mango|media|miami|money|mopar|movie|nadex|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|zippo|ایران|بازار|بھارت|سودان|سورية|همراه|भारोत|संगठन|বাংলা|భారత్|ഭാരതം|嘉里大酒店|aarp|able|adac|aero|aigo|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|doha|duck|duns|dvag|erni|fage|fail|fans|farm|fast|fiat|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|hgtv|host|hsbc|icbc|ieee|imdb|immo|info|itau|java|jeep|jobs|jprs|kddi|kiwi|kpmg|kred|land|lego|lgbt|lidl|life|like|limo|link|live|loan|loft|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|raid|read|reit|rent|rest|rich|rmit|room|rsvp|ruhr|safe|sale|sarl|save|saxo|scor|scot|seat|seek|sexy|shaw|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|bnl|bom|boo|bot|box|buy|bzh|cab|cal|cam|car|cat|cba|cbn|cbs|ceb|ceo|cfa|cfd|com|crs|csc|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|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|jcp|jio|jll|jmp|jnj|jot|joy|kfh|kia|kim|kpn|krd|lat|law|lds|llc|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|off|one|ong|onl|ooo|org|ott|ovh|pay|pet|phd|pid|pin|pnc|pro|pru|pub|pwc|qvc|red|ren|ril|rio|rip|run|rwe|sap|sas|sbi|sbs|sca|scb|ses|sew|sex|sfr|ski|sky|soy|srl|srt|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|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|ελ|бг|ею|рф|გე|닷넷|닷컴|삼성|한국|コム|世界|中信|中国|中國|企业|佛山|信息|健康|八卦|公司|公益|台湾|台灣|商城|商店|商标|嘉里|在线|大拿|娱乐|家電|工行|广东|微博|慈善|手机|手表|招聘|政务|政府|新闻|时尚|書籍|机构|游戏|澳門|点看|珠宝|移动|网址|网店|网站|网络|联通|谷歌|购物|通販|集团|食品|餐厅|香港)/,HA=new RegExp("["+St+"!#$%&'*+/=?^_`{|}~-]"),UA=new RegExp("^"+jE.source+"$"),Gh=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.localPartCharRegex=HA,e.strictTldRegex=UA,e}return We(t,n),t.prototype.parseMatches=function(e){for(var r=this.tagBuilder,i=this.localPartCharRegex,o=this.strictTldRegex,s=[],a=e.length,l=new Bo,u={m:"a",a:"i",i:"l",l:"t",t:"o",o:":"},c=0,d=0,h=l;c<a;){var p=e.charAt(c);switch(d){case 0:f(p);break;case 1:m(e.charAt(c-1),p);break;case 2:E(p);break;case 3:g(p);break;case 4:_(p);break;case 5:A(p);break;case 6:T(p);break;case 7:S(p);break;default:xE(d)}c++}return R(),s;function f(D){D==="m"?v(1):i.test(D)&&v()}function m(D,O){D===":"?i.test(O)?(d=2,h=new Bo(Dt(Dt({},h),{hasMailtoPrefix:!0}))):C():u[D]===O||(i.test(O)?d=2:O==="."?d=3:O==="@"?d=4:C())}function E(D){D==="."?d=3:D==="@"?d=4:i.test(D)||C()}function g(D){D==="."||D==="@"?C():i.test(D)?d=2:C()}function _(D){Po.test(D)?d=5:C()}function A(D){D==="."?d=7:D==="-"?d=6:Po.test(D)||R()}function T(D){D==="-"||D==="."?R():Po.test(D)?d=5:R()}function S(D){D==="."||D==="-"?R():Po.test(D)?(d=5,h=new Bo(Dt(Dt({},h),{hasDomainDot:!0}))):R()}function v(D){D===void 0&&(D=2),d=D,h=new Bo({idx:c})}function C(){d=0,h=l}function R(){if(h.hasDomainDot){var D=e.slice(h.idx,c);/[-.]$/.test(D)&&(D=D.slice(0,-1));var O=h.hasMailtoPrefix?D.slice(7):D;(function(k){var w=k.split(".").pop()||"",U=w.toLowerCase();return o.test(U)})(O)&&s.push(new ic({tagBuilder:r,matchedText:D,offset:h.idx,email:O}))}C()}},t}(ti),Bo=function(n){n===void 0&&(n={}),this.idx=n.idx!==void 0?n.idx:-1,this.hasMailtoPrefix=!!n.hasMailtoPrefix,this.hasDomainDot=!!n.hasDomainDot},$A=function(){function n(){}return n.isValid=function(t,e){return!(e&&!this.isValidUriScheme(e)||this.urlMatchDoesNotHaveProtocolOrDot(t,e)||this.urlMatchDoesNotHaveAtLeastOneWordChar(t,e)&&!this.isValidIpAddress(t)||this.containsMultipleDots(t))},n.isValidIpAddress=function(t){var e=new RegExp(this.hasFullProtocolRegex.source+this.ipRegex.source);return t.match(e)!==null},n.containsMultipleDots=function(t){var e=t;return this.hasFullProtocolRegex.test(t)&&(e=t.split("://")[1]),e.split("/")[0].indexOf("..")>-1},n.isValidUriScheme=function(t){var e=t.match(this.uriSchemeRegex),r=e&&e[0].toLowerCase();return r!=="javascript:"&&r!=="vbscript:"},n.urlMatchDoesNotHaveProtocolOrDot=function(t,e){return!(!t||e&&this.hasFullProtocolRegex.test(e)||t.indexOf(".")!==-1)},n.urlMatchDoesNotHaveAtLeastOneWordChar=function(t,e){return!(!t||!e)&&!this.hasFullProtocolRegex.test(e)&&!this.hasWordCharAfterProtocolRegex.test(t)},n.hasFullProtocolRegex=/^[A-Za-z][-.+A-Za-z0-9]*:\/\//,n.uriSchemeRegex=/^[A-Za-z][-.+A-Za-z0-9]*:/,n.hasWordCharAfterProtocolRegex=new RegExp(":[^\\s]*?["+UE+"]"),n.ipRegex=/[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?(:[0-9]*)?\/?$/,n}(),jA=(Vh=new RegExp("[/?#](?:["+St+"\\-+&@#/%=~_()|'$*\\[\\]{}?!:,.;^✓]*["+St+"\\-+&@#/%=~_()|'$*\\[\\]{}✓])?"),new RegExp(["(?:","(",/(?:[A-Za-z][-.+A-Za-z0-9]{0,63}:(?![A-Za-z][-.+A-Za-z0-9]{0,63}:\/\/)(?!\d+\/?)(?:\/\/)?)/.source,Ja(2),")","|","(","(//)?",/(?:www\.)/.source,Ja(6),")","|","(","(//)?",Ja(10)+"\\.",jE.source,"(?![-"+xA+"])",")",")","(?::[0-9]+)?","(?:"+Vh.source+")?"].join(""),"gi")),YA=new RegExp("["+St+"]"),Xh=function(n){function t(e){var r=n.call(this,e)||this;return r.stripPrefix={scheme:!0,www:!0},r.stripTrailingSlash=!0,r.decodePercentEncoding=!0,r.matcherRegex=jA,r.wordCharRegExp=YA,r.stripPrefix=e.stripPrefix,r.stripTrailingSlash=e.stripTrailingSlash,r.decodePercentEncoding=e.decodePercentEncoding,r}return We(t,n),t.prototype.parseMatches=function(e){for(var r,i=this.matcherRegex,o=this.stripPrefix,s=this.stripTrailingSlash,a=this.decodePercentEncoding,l=this.tagBuilder,u=[],c=function(){var h=r[0],p=r[1],f=r[4],m=r[5],E=r[9],g=r.index,_=m||E,A=e.charAt(g-1);if(!$A.isValid(h,p)||g>0&&A==="@"||g>0&&_&&d.wordCharRegExp.test(A))return"continue";if(/\?$/.test(h)&&(h=h.substr(0,h.length-1)),d.matchHasUnbalancedClosingParen(h))h=h.substr(0,h.length-1);else{var T=d.matchHasInvalidCharAfterTld(h,p);T>-1&&(h=h.substr(0,T))}var S=["http://","https://"].find(function(D){return!!p&&p.indexOf(D)!==-1});if(S){var v=h.indexOf(S);h=h.substr(v),p=p.substr(v),g+=v}var C=p?"scheme":f?"www":"tld",R=!!p;u.push(new oc({tagBuilder:l,matchedText:h,offset:g,urlMatchType:C,url:h,protocolUrlMatch:R,protocolRelativeMatch:!!_,stripPrefix:o,stripTrailingSlash:s,decodePercentEncoding:a}))},d=this;(r=i.exec(e))!==null;)c();return u},t.prototype.matchHasUnbalancedClosingParen=function(e){var r,i=e.charAt(e.length-1);if(i===")")r="(";else if(i==="]")r="[";else{if(i!=="}")return!1;r="{"}for(var o=0,s=0,a=e.length-1;s<a;s++){var l=e.charAt(s);l===r?o++:l===i&&(o=Math.max(o-1,0))}return o===0},t.prototype.matchHasInvalidCharAfterTld=function(e,r){if(!e)return-1;var i=0;r&&(i=e.indexOf(":"),e=e.slice(i));var o=new RegExp("^((.?//)?[-."+St+"]*[-"+St+"]\\.[-"+St+"]+)").exec(e);return o===null?-1:(i+=o[1].length,e=e.slice(o[1].length),/^[^-.A-Za-z0-9:\/?#]/.test(e)?i:-1)},t}(ti),VA=new RegExp("#[_"+St+"]{1,139}(?![_"+St+"])","g"),zA=new RegExp("[^"+St+"]"),Wh=function(n){function t(e){var r=n.call(this,e)||this;return r.serviceName="twitter",r.matcherRegex=VA,r.nonWordCharRegex=zA,r.serviceName=e.serviceName,r}return We(t,n),t.prototype.parseMatches=function(e){for(var r,i=this.matcherRegex,o=this.nonWordCharRegex,s=this.serviceName,a=this.tagBuilder,l=[];(r=i.exec(e))!==null;){var u=r.index,c=e.charAt(u-1);if(u===0||o.test(c)){var d=r[0],h=r[0].slice(1);l.push(new PE({tagBuilder:a,matchedText:d,offset:u,serviceName:s,hashtag:h}))}}return l},t}(ti),GA=new RegExp(/(?:(?:(?:(\+)?\d{1,3}[-\040.]?)?\(?\d{3}\)?[-\040.]?\d{3}[-\040.]?\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)[-\040.]?(?:\d[-\040.]?){6,12}\d+))([,;]+[0-9]+#?)*/.source+"|"+/(0([1-9]{1}-?[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,"g"),Kh=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.matcherRegex=GA,e}return We(t,n),t.prototype.parseMatches=function(e){for(var r,i=this.matcherRegex,o=this.tagBuilder,s=[];(r=i.exec(e))!==null;){var a=r[0],l=a.replace(/[^0-9,;#]/g,""),u=!(!r[1]&&!r[2]),c=r.index==0?"":e.substr(r.index-1,1),d=e.substr(r.index+a.length,1),h=!c.match(/\d/)&&!d.match(/\d/);this.testMatch(r[3])&&this.testMatch(a)&&h&&s.push(new HE({tagBuilder:o,matchedText:a,offset:r.index,number:l,plusSign:u}))}return s},t.prototype.testMatch=function(e){return FA.test(e)},t}(ti),XA=new RegExp("@[_"+St+"]{1,50}(?![_"+St+"])","g"),WA=new RegExp("@[_."+St+"]{1,30}(?![_"+St+"])","g"),KA=new RegExp("@[-_."+St+"]{1,50}(?![-_"+St+"])","g"),qA=new RegExp("[^"+St+"]"),qh=function(n){function t(e){var r=n.call(this,e)||this;return r.serviceName="twitter",r.matcherRegexes={twitter:XA,instagram:WA,soundcloud:KA},r.nonWordCharRegex=qA,r.serviceName=e.serviceName,r}return We(t,n),t.prototype.parseMatches=function(e){var r,i=this.serviceName,o=this.matcherRegexes[this.serviceName],s=this.nonWordCharRegex,a=this.tagBuilder,l=[];if(!o)return l;for(;(r=o.exec(e))!==null;){var u=r.index,c=e.charAt(u-1);if(u===0||s.test(c)){var d=r[0].replace(/\.+$/g,""),h=d.slice(1);l.push(new BE({tagBuilder:a,matchedText:d,offset:u,serviceName:i,mention:h}))}}return l},t}(ti);function JA(n,t){for(var e,r=t.onOpenTag,i=t.onCloseTag,o=t.onText,s=t.onComment,a=t.onDoctype,l=new xe,u=0,c=n.length,d=0,h=0,p=l;u<c;){var f=n.charAt(u);switch(d){case 0:m(f);break;case 1:E(f);break;case 2:_(f);break;case 3:g(f);break;case 4:A(f);break;case 5:T(f);break;case 6:S(f);break;case 7:v(f);break;case 8:C(f);break;case 9:R(f);break;case 10:D(f);break;case 11:O(f);break;case 12:k(f);break;case 13:w();break;case 14:U(f);break;case 15:I(f);break;case 16:F(f);break;case 17:j(f);break;case 18:$(f);break;case 19:X(f);break;case 20:V(f);break;default:xE(d)}u++}function m(M){M==="<"&&q()}function E(M){M==="!"?d=13:M==="/"?(d=2,p=new xe(Dt(Dt({},p),{isClosing:!0}))):M==="<"?q():Ka.test(M)?(d=3,p=new xe(Dt(Dt({},p),{isOpening:!0}))):(d=0,p=l)}function g(M){wn.test(M)?(p=new xe(Dt(Dt({},p),{name:ot()})),d=4):M==="<"?q():M==="/"?(p=new xe(Dt(Dt({},p),{name:ot()})),d=12):M===">"?(p=new xe(Dt(Dt({},p),{name:ot()})),J()):Ka.test(M)||wA.test(M)||M===":"||z()}function _(M){M===">"?z():Ka.test(M)?d=3:z()}function A(M){wn.test(M)||(M==="/"?d=12:M===">"?J():M==="<"?q():M==="="||qa.test(M)||MA.test(M)?z():d=5)}function T(M){wn.test(M)?d=6:M==="/"?d=12:M==="="?d=7:M===">"?J():M==="<"?q():qa.test(M)&&z()}function S(M){wn.test(M)||(M==="/"?d=12:M==="="?d=7:M===">"?J():M==="<"?q():qa.test(M)?z():d=5)}function v(M){wn.test(M)||(M==='"'?d=8:M==="'"?d=9:/[>=`]/.test(M)?z():M==="<"?q():d=10)}function C(M){M==='"'&&(d=11)}function R(M){M==="'"&&(d=11)}function D(M){wn.test(M)?d=4:M===">"?J():M==="<"&&q()}function O(M){wn.test(M)?d=4:M==="/"?d=12:M===">"?J():M==="<"?q():(d=4,u--)}function k(M){M===">"?(p=new xe(Dt(Dt({},p),{isClosing:!0})),J()):d=4}function w(M){n.substr(u,2)==="--"?(u+=2,p=new xe(Dt(Dt({},p),{type:"comment"})),d=14):n.substr(u,7).toUpperCase()==="DOCTYPE"?(u+=7,p=new xe(Dt(Dt({},p),{type:"doctype"})),d=20):z()}function U(M){M==="-"?d=15:M===">"?z():d=16}function I(M){M==="-"?d=18:M===">"?z():d=16}function F(M){M==="-"&&(d=17)}function j(M){d=M==="-"?18:16}function $(M){M===">"?J():M==="!"?d=19:M==="-"||(d=16)}function X(M){M==="-"?d=17:M===">"?J():d=16}function V(M){M===">"?J():M==="<"&&q()}function z(){d=0,p=l}function q(){d=1,p=new xe({idx:u})}function J(){var M=n.slice(h,p.idx);M&&o(M,h),p.type==="comment"?s(p.idx):p.type==="doctype"?a(p.idx):(p.isOpening&&r(p.name,p.idx),p.isClosing&&i(p.name,p.idx)),z(),h=u+1}function ot(){var M=p.idx+(p.isClosing?2:1);return n.slice(M,u).toLowerCase()}h<u&&(e=n.slice(h,u),o(e,h),h=u+1)}var xe=function(n){n===void 0&&(n={}),this.idx=n.idx!==void 0?n.idx:-1,this.type=n.type||"tag",this.name=n.name||"",this.isOpening=!!n.isOpening,this.isClosing=!!n.isClosing},ZA=function(){function n(t){t===void 0&&(t={}),this.version=n.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.matchers=null,this.tagBuilder=null,this.urls=this.normalizeUrlsCfg(t.urls),this.email=typeof t.email=="boolean"?t.email:this.email,this.phone=typeof t.phone=="boolean"?t.phone:this.phone,this.hashtag=t.hashtag||this.hashtag,this.mention=t.mention||this.mention,this.newWindow=typeof t.newWindow=="boolean"?t.newWindow:this.newWindow,this.stripPrefix=this.normalizeStripPrefixCfg(t.stripPrefix),this.stripTrailingSlash=typeof t.stripTrailingSlash=="boolean"?t.stripTrailingSlash:this.stripTrailingSlash,this.decodePercentEncoding=typeof t.decodePercentEncoding=="boolean"?t.decodePercentEncoding:this.decodePercentEncoding,this.sanitizeHtml=t.sanitizeHtml||!1;var e=this.mention;if(e!==!1&&e!=="twitter"&&e!=="instagram"&&e!=="soundcloud")throw new Error("invalid `mention` cfg - see docs");var r=this.hashtag;if(r!==!1&&r!=="twitter"&&r!=="facebook"&&r!=="instagram")throw new Error("invalid `hashtag` cfg - see docs");this.truncate=this.normalizeTruncateCfg(t.truncate),this.className=t.className||this.className,this.replaceFn=t.replaceFn||this.replaceFn,this.context=t.context||this}return n.link=function(t,e){return new n(e).link(t)},n.parse=function(t,e){return new n(e).parse(t)},n.prototype.normalizeUrlsCfg=function(t){return t==null&&(t=!0),typeof t=="boolean"?{schemeMatches:t,wwwMatches:t,tldMatches:t}:{schemeMatches:typeof t.schemeMatches!="boolean"||t.schemeMatches,wwwMatches:typeof t.wwwMatches!="boolean"||t.wwwMatches,tldMatches:typeof t.tldMatches!="boolean"||t.tldMatches}},n.prototype.normalizeStripPrefixCfg=function(t){return t==null&&(t=!0),typeof t=="boolean"?{scheme:t,www:t}:{scheme:typeof t.scheme!="boolean"||t.scheme,www:typeof t.www!="boolean"||t.www}},n.prototype.normalizeTruncateCfg=function(t){return typeof t=="number"?{length:t,location:"end"}:function(e,r){for(var i in r)r.hasOwnProperty(i)&&e[i]===void 0&&(e[i]=r[i]);return e}(t||{},{length:Number.POSITIVE_INFINITY,location:"end"})},n.prototype.parse=function(t){var e=this,r=["a","style","script"],i=0,o=[];return JA(t,{onOpenTag:function(s){r.indexOf(s)>=0&&i++},onText:function(s,a){if(i===0){var l=function(c,d){if(!d.global)throw new Error("`splitRegex` must have the 'g' flag set");for(var h,p=[],f=0;h=d.exec(c);)p.push(c.substring(f,h.index)),p.push(h[0]),f=h.index+h[0].length;return p.push(c.substring(f)),p}(s,/( | |<|<|>|>|"|"|')/gi),u=a;l.forEach(function(c,d){if(d%2==0){var h=e.parseText(c,u);o.push.apply(o,h)}u+=c.length})}},onCloseTag:function(s){r.indexOf(s)>=0&&(i=Math.max(i-1,0))},onComment:function(s){},onDoctype:function(s){}}),o=this.compactMatches(o),o=this.removeUnwantedMatches(o)},n.prototype.compactMatches=function(t){t.sort(function(l,u){return l.getOffset()-u.getOffset()});for(var e=0;e<t.length-1;e++){var r=t[e],i=r.getOffset(),o=r.getMatchedText().length,s=i+o;if(e+1<t.length){if(t[e+1].getOffset()===i){var a=t[e+1].getMatchedText().length>o?e:e+1;t.splice(a,1);continue}t[e+1].getOffset()<s&&t.splice(e+1,1)}}return t},n.prototype.removeUnwantedMatches=function(t){return this.hashtag||kn(t,function(e){return e.getType()==="hashtag"}),this.email||kn(t,function(e){return e.getType()==="email"}),this.phone||kn(t,function(e){return e.getType()==="phone"}),this.mention||kn(t,function(e){return e.getType()==="mention"}),this.urls.schemeMatches||kn(t,function(e){return e.getType()==="url"&&e.getUrlMatchType()==="scheme"}),this.urls.wwwMatches||kn(t,function(e){return e.getType()==="url"&&e.getUrlMatchType()==="www"}),this.urls.tldMatches||kn(t,function(e){return e.getType()==="url"&&e.getUrlMatchType()==="tld"}),t},n.prototype.parseText=function(t,e){e===void 0&&(e=0),e=e||0;for(var r=this.getMatchers(),i=[],o=0,s=r.length;o<s;o++){for(var a=r[o].parseMatches(t),l=0,u=a.length;l<u;l++)a[l].setOffset(e+a[l].getOffset());i.push.apply(i,a)}return i},n.prototype.link=function(t){if(!t)return"";this.sanitizeHtml&&(t=t.replace(/</g,"<").replace(/>/g,">"));for(var e=this.parse(t),r=[],i=0,o=0,s=e.length;o<s;o++){var a=e[o];r.push(t.substring(i,a.getOffset())),r.push(this.createMatchReturnVal(a)),i=a.getOffset()+a.getMatchedText().length}return r.push(t.substring(i)),r.join("")},n.prototype.createMatchReturnVal=function(t){var e;return this.replaceFn&&(e=this.replaceFn.call(this.context,t)),typeof e=="string"?e:e===!1?t.getMatchedText():e instanceof Kl?e.toAnchorString():t.buildTag().toAnchorString()},n.prototype.getMatchers=function(){if(this.matchers)return this.matchers;var t=this.getTagBuilder(),e=[new Wh({tagBuilder:t,serviceName:this.hashtag}),new Gh({tagBuilder:t}),new Kh({tagBuilder:t}),new qh({tagBuilder:t,serviceName:this.mention}),new Xh({tagBuilder:t,stripPrefix:this.stripPrefix,stripTrailingSlash:this.stripTrailingSlash,decodePercentEncoding:this.decodePercentEncoding})];return this.matchers=e},n.prototype.getTagBuilder=function(){var t=this.tagBuilder;return t||(t=this.tagBuilder=new Yh({newWindow:this.newWindow,truncate:this.truncate,className:this.className})),t},n.version="3.14.3",n.AnchorTagBuilder=Yh,n.HtmlTag=Kl,n.matcher={Email:Gh,Hashtag:Wh,Matcher:ti,Mention:qh,Phone:Kh,Url:Xh},n.match={Email:ic,Hashtag:PE,Match:Qr,Mention:BE,Phone:HE,Url:oc},n}();function YE(n,t=n){return{type:"autolink",url:n,text:t}}const QA=()=>pn(/```([^]+?)```/g,([n,t])=>({type:"codespan",text:FE(t)})),tO=pn(/<!!mention:([^>\s]*?)\|(.*?)>/gm,([n,t,e])=>function(r,i){return{type:"mention",id:r,text:i}}(decodeURIComponent(t),e)),eO=pn(/<!!customemoji:(.*?)>/gm,([n,t])=>function(e){return{type:"customemoji",text:e}}(t)),VE=pn(/<((?:https?|mailto):.*?)\|(.*?)>/gi,([n,t,e])=>function(r,i=[]){return{type:"link",url:r,children:i}}(t,[e])),nO=pn(/<actionlink:([^|]+)[|]([^>]*)>/gi,([n,t,e])=>{const{action:r,params:i}=zE(t);return function(o,s,a=[]){return{type:"actionlink",action:o,params:s,children:a}}(r,i,[e])}),rO=pn(/<actionbutton:([^|]+)[|]([^>]*)>/gi,([n,t,e])=>{const{action:r,params:i}=zE(t);return function(o,s,a=[]){return{type:"actionbutton",action:o,params:s,children:a}}(r,i,[e])});function zE(n){const t=n.indexOf("?");return t===-1?{action:n,params:{}}:{action:n.slice(0,t),params:Object.fromEntries(new URLSearchParams(n.slice(t)))}}const iO=pn(/(?:^|\n)(?:\s*[-*+]\s+[^\n]+(?:\n|$))+/g,([n])=>function(t=[]){return{type:"bulletlist",children:t}}([n.startsWith(`
|
|
16
|
+
`)?n.slice(1):n])),oO=pn(/^\s*[-*+]\s+([^\n]+)(?:\n|$)/gm,([n,t])=>({type:"bulletpoint",children:[t]})),GE=n=>{const t=/(?:^|[^-:/\w])([(+]?[0-9](?:[-_+ ().]?[0-9]){5,11}[0-9])(?:[^-:/\w]|$)/g;let e=0;const r=[];for(const i of zs(n,t)){const o=i[0],s=i[1],a=o.startsWith(s)?i.index:i.index+1;a-e>0&&r.push(n.substring(e,a));const l=YE("tel:"+s.replace(/[^0-9+]/g,""),s);r.push(l),e=a+s.length}return e<n.length&&r.push(n.substring(e)),r},XE=n=>VE(n).flatMap(t=>typeof t=="string"?Za(t):["<",...Za(t.url),...Za("|"+t.children[0]+">")]),Za=n=>{const t=ZA.parse(n,{urls:!0,email:!0,phone:!1,hashtag:!1,mention:!1}),e=[];let r=0;for(const i of t){const o=i.getOffset(),s=i.getMatchedText(),a=s.length;let l=s;i instanceof ic?l="mailto:"+i.getEmail():i instanceof oc&&(l=i.getUrl()),o>r&&e.push(n.substring(r,o)),e.push(YE(l,s)),r=o+a}return r<n.length&&e.push(n.substring(r)),e},sO=["Codeblock","Codespan","FormattedLink","Wikitext","Autolink","Actions","Mention","Mention","BulletPoint","CustomEmoji"],aO=function(n){const t=RegExp(`[^${n}]+${n}?|${n}`,"g");return e=>Array.from(e.match(t)||[])}(`
|
|
17
|
+
`);function WE(n,t={except:[]}){const e=function(i={except:[]}){var a;const o={multilineSteps:[],singlelineSteps:[]},s=(a=i.except)!=null?a:sO.filter(l=>!i.only.includes(l));return s.includes("BulletPoint")||o.multilineSteps.push(iO,oO),s.includes("Mention")||o.singlelineSteps.push(tO),s.includes("CustomEmoji")||o.singlelineSteps.push(eO),s.includes("Codespan")||o.multilineSteps.push(QA()),s.includes("FormattedLink")||o.singlelineSteps.push(VE),s.includes("Actions")||(o.singlelineSteps.push(nO),o.singlelineSteps.push(rO)),s.includes("Wikitext")||o.singlelineSteps.push(bA),s.includes("Autolink")||o.singlelineSteps.push(XE,GE),o}(t);let r=KE(n,e);return r=qE(r,!1),r}function KE(n,t){let e=[n];return e=Qa(e,t.multilineSteps),e=Qa(e,[aO]),e=Qa(e,t.singlelineSteps),e=sc(e),e}function Qa(n,t){return t.reduce((e,r)=>Ui(e,r),n)}function sc(n){const t=[];let e=-1;for(const r of n)typeof r=="string"?typeof t[e]=="string"?t[e]+=r:t[++e]=r:t[++e]="children"in r?{...r,children:sc(r.children)}:r;return t}function qE(n,t){const e=[];let r=[];for(let i=0;i<n.length;i++){const o=n[i];if(typeof o=="string")r.push(o);else if("children"in o){r.length>0&&(e.push(r.join("")),r=[]);const s=qE(o.children,t||o.type==="link"||o.type==="actionbutton"||o.type==="actionlink");e.push({...o,children:s})}else o.type==="autolink"&&t?r.push(o.text):(r.length>0&&(e.push(r.join("")),r=[]),e.push(o))}return r.length>0&&(e.push(r.join("")),r=[]),e}function lO(){let n,t=0;return e=>{const r=(o=Date.now())=>{if(window.clearTimeout(n),n=void 0,t=o,e.isDestroyed)return;const s=function(a){a=a.removeMark(0,a.doc.content.size,Lt.marks.bold),a=a.removeMark(0,a.doc.content.size,Lt.marks.italic),a=a.removeMark(0,a.doc.content.size,Lt.marks.strikethrough),a.doc.firstChild;const l=function(u){const c=[];let d,h="";return u.descendants((p,f)=>(p.isText?(h+=p.text,d!=null||(d=f)):h&&d!==void 0&&(c.push({text:h,pos:d}),h="",d=void 0),p.type!==Lt.nodes.mention)),h&&d!==void 0&&c.push({text:h,pos:d}),c}(a.doc);for(const{text:u,pos:c}of l){const d=WE(u,{only:["Wikitext"]});[a]=JE(a,c,d)}return a}(e.state.tr);e.dispatch(s)},i=Date.now();i-t<300?n||(n=window.setTimeout(r,300)):r(i)}}function JE(n,t,e,r=0,i=[]){for(const o of e)if(typeof o=="string"){for(const s of i)n.addMark(t+r,t+r+o.length,s.create());r+=o.length}else if(o.type==="bold"||o.type==="italic"||o.type==="strikethrough"){r+=1;const s=Lt.marks[o.type],a=[...i,s];[n,r]=JE(n,t,o.children,r,a),r+=1}else pt.unreachable();return[n,r]}function Jh(n){return(t,e)=>{if(!e)return!0;let r=t.tr;const i=lt.between(t.selection.$from,t.selection.$to);return r=r.replaceRangeWith(i.from,i.from,Lt.text(n,r.storedMarks)),r=r.replaceRangeWith(i.to+1,i.to+1,Lt.text(n,r.storedMarks)),r=r.setSelection(lt.near(r.doc.resolve(i.to+1))),e(r),!0}}function uO(n,t,e){const r=t.clipboardData;if(!r)return!1;const i=function(o){const s=o.items||[],a={"image/gif":"gif","image/png":"png","image/jpeg":"jpg","image/svg+xml":"svg"},l=Array.from(s).filter(d=>d.kind==="file"&&a[d.type]);if(l.length===0||o.types.includes("text/rtf"))return;const u=l[0];let c=u.getAsFile();if(!c.name){const d="image."+a[u.type];c=new File([c],d,{type:u.type,lastModified:Date.now()})}return c}(r);return i?e(i):function(o,s){const a=o.state.tr.insertText(s).scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste");o.dispatch(a)}(n,r.getData("text/plain")),!0}function cO(n,{allowSpaces:t=!1}){return e=>{const r=new RegExp(`\\s${n}$`),i=t?new RegExp(`${n}.*?(?=\\s${n}|$)`,"g"):new RegExp(`(?:^)?${n}[^\\s${n}]*`,"g"),o=e.before(),s=e.end(),a=e.doc.textBetween(o,s,"\0","\0");let l;for(;l=i.exec(a);){const u=l.input.slice(Math.max(0,l.index-1),l.index);if(!/^[\s\0]?$/.test(u))continue;const c=l.index+e.start();let d=c+l[0].length;if(t&&r.test(a.slice(d-1,d+1))&&(l[0]+=" ",d++),c<e.pos&&d>=e.pos)return{range:{from:c,to:d},text:l[0]}}}}function Zh({matcher:n=cO("#"),suggestionClass:t="ProseMirror-suggestion",onEnter:e=()=>!1,onChange:r=()=>!1,onExit:i=()=>!1,onKeyDown:o=()=>!1,debug:s=!1}){return new Ws({key:new Ks("suggestions"),view(){return{update:(a,l)=>{const u=this.key.getState(l),c=this.key.getState(a.state),d=u.active&&c.active&&u.range.from!==c.range.from,h=!u.active&&c.active,p=u.active&&!c.active,f=!h&&!p&&u.text!==c.text;(p||d)&&i({view:a,range:u.range,text:u.text}),f&&!d&&r({view:a,range:c.range,text:c.text}),(h||d)&&e({view:a,range:c.range,text:c.text})}}},state:{init:()=>({active:!1,range:{},text:null}),apply(a,l){const{selection:u}=a,c={...l};if(u.from===u.to){(u.from<l.range.from||u.from>l.range.to)&&(c.active=!1);const d=u.$from,h=n(d);h?(c.active=!0,c.range=h.range,c.text=h.text):c.active=!1}else c.active=!1;return c.active||(c.range={},c.text=null),c}},props:{handleKeyDown(a,l){const{active:u}=this.getState(a.state);return!!u&&o({view:a,event:l})},decorations(a){const{active:l,range:u}=this.getState(a);return l?vt.create(a.doc,[fe.inline(u.from,u.to,{nodeName:"span",class:t,style:s?"background: rgba(0, 0, 255, 0.05); color: blue; border: 2px solid blue;":null})]):null}}})}function ZE({placeholder:n,disabled:t,className:e="",characterLimit:r,spellcheck:i}){const o=fo(),s=tt(),a=tt(null);return G(()=>(s.current=function(l,u,c,d,h){const p=Tr.create({schema:Lt,plugins:[...h.filter(dO),TA(),bh({...xo,"Mod-z":NE,"Mod-y":CE,"Mod-b":Jh("*"),"Mod-i":Jh("_"),"Mod-Enter":xo.Enter,"Shift-Enter":xo.Enter,Enter:c}),bh({Enter:xo.Enter}),Ih]}),f=lO(),m=new cA(l,{handlePaste:(E,g,_)=>uO(E,g,d),clipboardTextSerializer(E){const g=[];return E.content.forEach(_=>{_&&g.push(FE(_.textContent))}),g.join()},state:p,dispatchTransaction(E){E=(E=E.removeStoredMark(Lt.marks.literal)).removeStoredMark(Lt.marks.emoji);const g=m.state.apply(E);m.state.doc.eq(g.doc)||u(new vs(g.doc)),m.updateState(g),E.steps.some(_=>_ instanceof ve)&&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]),G(()=>{var l;(l=s.current)==null||l.setProps({editable:()=>!t})},[t]),G(()=>Xi(()=>{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]),G(()=>Xi(()=>{var u;const l=s.current;l==null||l.dispatch(l.state.tr.setMeta(Ih,(u=o.placeholder$.get())!=null?u:n))}),[o,n]),G(()=>{r&&Number.isInteger(r)&&o.setMaxLength(r)},[r,o]),y("div",{className:`t-editor ${e}`,ref:a})}function Qh(n){if(n.startsWith(":"))throw new Error("Not implemented");{const t=Lt.marks.emoji.create({emoji:n});return Lt.text(n,[t])}}function tp(n,t){const e=encodeURIComponent(n);return Lt.nodes.mention.create({id:n,name:t},Lt.text(`<!!mention:${e}|${t}>`))}const xs=class xs{constructor(t){this.doc=t,this.size=this.doc.content.size,this.hasContent=EE(this.doc)}hasNonWhitespaceContent(){return this.hasContent&&function(t){let e=!1;return t.descendants(r=>!(r.isText&&r.text&&/\S/.test(r.text))||(e=!0,!1)),e}(this.doc)}asText(){return this.doc.textContent.replace(/\xa0/g," ")}};xs.EMPTY=new xs(Lt.topNodeType.create());let vs=xs;function dO(n){return n!=null}const ep=(n,t)=>e=>{var l;const r=(l=e.nodeBefore)==null?void 0:l.text;if(!r)return;const i=r.match(n);if(!i)return;const o=i[2],s=e.pos-o.length,a=e.pos;if(!e.doc.rangeHasMark(s,a,t.marks.literal))return{range:{from:s,to:a},text:o}},hO=/(^|\s)(:[^:\s]+:?)$/,pO=/(^|\s)(@[^@]*)$/;class QE{constructor(t,e,r){this.state$=t,this.device$=e,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$=Ot(),this.placeholder$=Ot()}setEditorView(t){this.editorView=t}emojiSuggesterPlugin(){if(this.device$.peek().supportsEmojiPicker)return Zh({debug:!1,matcher:ep(hO,Lt),onEnter:t=>this.suggestEmoji(t.text,t.range),onChange:t=>this.suggestEmoji(t.text,t.range),onExit:()=>this.onExitSuggester(),onKeyDown:({event:t})=>{var e,r,i;return(i=(r=(e=this._suggesterKeydownHandlers).emoji)==null?void 0:r.call(e,t.key))!=null?i:!1}})}mentionsPlugin(){const t=this.userPermissions$.peek();if(pt.defined(t),t.canMention)return Zh({debug:!1,matcher:ep(pO,Lt),onEnter:e=>this.suggestMention(e.text,e.range),onChange:e=>this.suggestMention(e.text,e.range),onExit:()=>this.onExitSuggester(),onKeyDown:({event:e})=>{var r,i,o;return(o=(i=(r=this._suggesterKeydownHandlers).mention)==null?void 0:i.call(r,e.key))!=null?o:!1}})}closeSuggester(){pt.defined(this._suggestionRange),function(t,e){const{from:r,to:i}=e,o=t.state.tr.addMark(r,i,Lt.marks.literal.create());t.dispatch(o)}(this.editorView,this._suggestionRange)}listenKeydown(t,e){this._suggesterKeydownHandlers[t]=e}onExitSuggester(){this._suggestionRange=void 0,this.state$.suggestEmojiQuery.set(void 0),this.state$.suggestMentionQuery.set(void 0)}suggestEmoji(t,e){t.length<2||(this._suggestionRange=e,this.state$.suggestEmojiQuery.set(t))}suggestMention(t,e){t.length<1||(this._suggestionRange=e,this.state$.suggestMentionQuery.set(t))}onPasteImage(t){pt.defined(this.uploadFile),this.uploadFile(t)}onChange(t){var r;this.currentDoc=t;const e=t.size>this.maxLength&&t.asText().length>this.maxLength;t.hasContent&&this.markAsTyping(),this.state$.assign({isTyping:t.hasContent,atTextLimit:e,isEmpty:!t.hasNonWhitespaceContent(),characterCount:t.size===0?0:t.size-2}),(r=this.controller)==null||r.storeDraft(()=>t.asText())}setMaxLength(t){this.maxLength=t}focus({skipProseMirrorStuff:t}={skipProseMirrorStuff:!1}){var e,r;t?(e=this.editorView)==null||e.dom.focus():(r=this.editorView)==null||r.focus()}setText(t){this.editorView&&function(e,r){const i=e.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 tp(u,c);const[d,h]=a.match(/<!!customemoji:(.*?)>/)||[null];return d&&h?Qh(h):Lt.text(a)}),s=e.state.tr.replaceWith(0,i,o);e.dispatch(s)}(this.editorView,t)}typeText(t){this.editorView&&function(e,r,i="replace"){const o=e.state.doc.content.size,s=i=="insert"?e.state.tr.insertText(r):e.state.tr.insertText(r,0,o);e.dispatch(s)}(this.editorView,t,"insert")}getText(){return this.currentDoc.asText().trim()}clearText(){this.editorView&&function(t){const e=t.state.doc.content.size,r=t.state.tr.insertText("",0,e);t.dispatch(r)}(this.editorView)}selectEmoji(t){pt.defined(this.editorView),function(e,r,i){const o=Qh(r);let s;if(i){const{from:a,to:l}=i;s=e.state.tr.replaceRangeWith(a,l,o)}else s=e.state.tr.replaceSelectionWith(o,!1);e.dispatch(s)}(this.editorView,t,this._suggestionRange),this.focus()}selectMention(t){pt.defined(this.editorView),function(e,r,i){const o=tp(r.id,r.name);let s=e.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(" "),e.dispatch(s)}(this.editorView,t,this._suggestionRange),this.focus()}}const fO=Symbol("no_render");function de(n){const t=Ce(!1),e=tt({_value:typeof n=="function"?n():n.peek(),get value(){return setTimeout(()=>{t.set(!0)}),e.current._value},set value(r){e.current._value=r}});return it(()=>{if(!t.get())return fO;const r=typeof n=="function"?n():n.get();return e.current.value=r,r}),e.current}function ei(){const n=mo(),t=ft(),e=pm(),r=ke(),i=de(t.app$.appMetadata),o=de(t.currentUser$),s=de(t.state$.currentConversation),a=de(t.t$),l=de(t.device$),u=de(t.themeCustom$),c=de(()=>t.state$.typing.child(t.state$.extCurrentConversationId.get()).get()),d=de(()=>t.state$.participants.child(t.state$.extCurrentConversationId.get()).get());return Q(()=>({session:n,store:t,chatbox:e,theme:r,get app(){return i.value},get currentUser(){return o.value},get conversation(){return s.value},get t(){return a.value},get device(){return l.value},get themeCustom(){return u.value.value},get typing(){return c.value},get participants(){return d.value}}),[i,e,s,o,l,t,a,r,u,c,d,n])}function tg(){const n=mo(),t=ft(),e=ke(),r=pm(),i=de(t.app$.appMetadata),o=de(t.currentUser$),s=de(t.t$),a=de(t.device$),l=de(t.themeCustom$);return Q(()=>({session:n,store:t,theme:e,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,n,t,s,e,l])}const mO=(()=>{if(typeof window!="undefined"){let n;try{n=window.localStorage;const t="__storage_test__";return n.setItem(t,t),n.removeItem(t),!0}catch(t){return t instanceof DOMException&&(t.code===22||t.code===1014||t.name==="QuotaExceededError"||t.name==="NS_ERROR_DOM_QUOTA_REACHED")&&n&&n.length!==0}}return!1})(),Wt={};mO?(Wt.setItem=window.localStorage.setItem.bind(window.localStorage),Wt.getItem=window.localStorage.getItem.bind(window.localStorage),Wt.removeItem=window.localStorage.removeItem.bind(window.localStorage),Wt.isSupported=!0):(Wt.setItem=function(){},Wt.getItem=function(){return null},Wt.removeItem=function(){},Wt.isSupported=!1),Wt.set=(n,t)=>Wt.setItem(n,JSON.stringify(t)),Wt.get=n=>JSON.parse(Wt.getItem(n)||"null");const Jl="talkjs_drafts",EO=function(n,t){let e;return(...r)=>{clearTimeout(e),e=setTimeout(()=>t(...r),n)}}(200,(n,t,e,r)=>{const i=eg(n,t,e),o=JSON.parse(Wt.getItem(Jl)||"{}"),s=r();s.match(/^\s*$/)?delete o[i]:o[i]=s,Wt.setItem(Jl,JSON.stringify(o))}),eg=(n,t,e)=>`draft_${n}_${t}_${e}`;function ng(n){const t=ke(),e=ft(),r=ei(),i=it(e.referencedMessage$),o=it(e.state$.userPermissions),s=fo(),{sendMessage:a}=g_(),l=it(Ce(()=>{const c=s.state$.get();return n.editMessageId===void 0?new Nd(c,a,n.attachFile,n.shareLocation,s.toggleEmojiPicker):new Nd(c,n.onEditMessage,()=>{},()=>{},()=>{})},[s.state$,s.toggleEmojiPicker,n.attachFile,n.editMessageId,n.onEditMessage,n.shareLocation,a])),u=et(c=>s.setText(c),[s]);return function({appId:c,conversationId:d,meId:h,setText:p,enabled:f}){const m=Q(()=>eg(d,h,c),[c,d,h]);G(()=>{var g;if(!m||!f)return;const E=(g=JSON.parse(Wt.getItem(Jl)||"{}")[m])!=null?g:"";p(E)},[m,f,p])}({appId:r.app.id,conversationId:r.conversation.id,meId:r.currentUser.id,setText:u,enabled:!n.editMessageId}),y(fm.Provider,{value:{onClose:()=>s.toggleEmojiPicker(!1),onEmojiSelected:c=>s.selectEmoji(c)},children:y(t.MessageField,{common:r,referencedMessage:i,permissions:o,editor:l,editMessageId:n.editMessageId})})}function gO({message:n}){const t=ft(),e=Eo(),r=it(t.state$.editingMessageId),i=Q(()=>Pe(n.content[0].children),[n]),o=Ce({isEmpty:i.length===0,isTyping:!1,atTextLimit:!1,characterCount:i.length,showEmojiPicker:!1,suggestEmojiQuery:void 0,suggestMentionQuery:void 0}),s=Q(()=>new QE(o,t.device$,t.state$.userPermissions),[o,t]),a=et(async()=>{const l=s.state$;if(l.isEmpty.peek()||l.atTextLimit.peek())return;const u=s.getText();u&&await e.editMessage(n.id,{text:u}),t.state$.editingMessageId.set(null)},[t,e,s,n.id]);return G(()=>{s.onEnter=a},[s,a]),G(()=>{s.focus(),s.setText(Pe(n.content[0].children,!0))},[s,n]),y(am.Provider,{value:s,children:y(ng,{editMessageId:r,onEditMessage:a})})}function DO(){const n=ke(),t=ei();return y(n.MessageListFooter,{common:t})}function _O(n){const t=ke(),e=ei();return y(t.MessageDivider,{common:e,...n})}function AO({message:n}){const t=ke(),e=ft(),r=ei(),[i,o]=at("sent");return Yr(s=>{if(n.id.startsWith("ephemeral-"))return o("sending");const a=e.state$.currentConversation.everyoneReadUntil.get();return a!==void 0?n.createdAt<=a?o("everyoneRead"):o("sent"):void 0}),y(t.Message,{common:r,message:n,messageStatus:i,permissions:e.messagePermissions$(n).get()})}function OO({extConversationId:n}){const t=mo(),e=ft(),r=Eo(),i=tt(!0),o=tt(null);ge(()=>{i.current=o.current.scrollTop>-30}),G(()=>{i.current&&(o.current.scrollTop=0)}),G(()=>{const c=new IntersectionObserver(d=>e.state$.visibility.isInView.set(d[0].isIntersecting),{threshold:.9});return c.observe(o.current),()=>c.disconnect()},[e]),G(()=>{const c=()=>e.state$.visibility.tabFocused.set(!document.hidden);return document.addEventListener("visibilitychange",c),()=>document.removeEventListener("visibilitychange",c)},[e]);const[s,a]=at(!1);G(()=>{a(!1);const c=e.state$.currentConversation.peek();(c==null?void 0:c.isUnread)===!0&&t.conversation(n).markAsRead().catch(d=>{ps.warn("Could not mark conversation as read",d)})},[n,t,e]),Yr(c=>{if(!o.current)return;const d=e.state$.currentConversation.get(),h=!(!d||!d.isUnread),p=d==null?void 0:d.unreadMessageCount;if(h&&p===0)return void a(!0);if(h&&s)return;if(!h)return void a(!1);const f=e.state$.visibility.tabFocused.get(),m=e.state$.visibility.isInView.get(),E=function(g){if(g.checkVisibility)return g.checkVisibility({contentVisibilityAuto:!0,opacityProperty:!0,visibilityProperty:!0,checkOpacity:!0,checkVisibilityCSS:!0});{const _=window.getComputedStyle(g),A=_.visibility,T=_.opacity;return!(g.getClientRects().length===0||A==="hidden"||T==="0")}}(o.current);return f&&m&&E?t.conversation(d.id).markAsRead():void 0});const l=et(c=>{const d=c.currentTarget;d.scrollHeight-d.clientHeight+d.scrollTop<90&&e.messageSubscription&&e.messageSubscription.loadMore(10)},[e.messageSubscription]),u=it(e.state$.typing.child(n));return y("div",{className:"t-message-list",ref:o,"t-menu-boundary":"",onScroll:l,children:[u&&y(DO,{}),y(Tl,{each:e.chatItems$,children:c=>y("div",{className:"t-message-group",children:y(Tl,{each:c,item:TO,itemProps:{controller:r,extConversationId:n}})})})]})}function TO({item$:n}){const t=ft(),e=it(n),r=it(t.state$.editingMessageId);return e instanceof vl?y(_O,{timestamp:e.timestamp,isReadMarker:e.isReadMarker,isDayMarker:e.isDayMarker}):r===e.id?y(gO,{message:e}):y(AO,{message:e})}function Ns(n){return y(ft()instanceof Tm?SO:vO,{...n})}function SO(n){const t=ke(),e=ei();return y(t.Icon,{common:e,...n})}function vO(n){const t=ke(),e=tg();return y(t.Icon,{common:e,...n})}function ac(){return y(Ns,{type:"spinner","aria-label":it(ft().t$).LOADING,className:"t-loading-icon"})}const NO=new Set(["ByV39eoc","B1FxElnd","aW4c49tW","qGfuGtx","SbERe5ee","ilaVEa15","FOlWOSaH","dao5gGmT","DLUgAhzL","fqXFumr6","FtiWHMYT","66iWOyWt","1375amYi","mWbJgzpt","jO7GqAvL","SkFIKxo5","2z4ILc3y","aDr8oPL1","Hku1c4Pt"]);function Zs({appId:n,chatboxState:t}){const e=n.charAt(0)==="t"||NO.has(n);return G(()=>{switch(t.type){case"auth-failed":rn.error("Could not authenticate user. Check if you are authenticating correctly.");break;case"unknown-user":rn.error(`User \`${t.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":rn.error(t.error);break;case"wrong-app-id":rn.error(`Could not find given appId: "${t.appId}". You can find your appId on https://talkjs.com/dashboard.`);break;case"server-error":break;default:pt.never(t)}},[t]),y("div",{className:"t-panel t-error-panel",children:[y("span",{className:"t-heading",children:"Something went wrong."}),y("p",{children:"Please reload the page and try again."}),y("p",e?{style:{fontStyle:"italic"},children:["Developer note: check your browser's developer tools console for messages that may help solve the problem.",y("br",{}),y("small",{children:"This message only shows up in test mode."})]}:{children:"If things keep not working, do not hesitate to get in touch with us."})]})}function CO(){return y("div",{className:"t-panel t-error-panel",children:y("span",{className:"t-heading",style:{fontStyle:"italic"},children:it(ft().t$).CHAT_NOT_FOUND})})}function rg(){return y("div",{className:"t-panel t-loading-panel",children:y(ac,{})})}function ig(){const n=it(ft().t$);return y("div",{className:"t-panel t-error-panel",children:[y("span",{className:"t-heading",style:{fontStyle:"italic"},children:n.AUTH_EXPIRED_OVERLAY_TITLE}),y("p",{children:n.AUTH_EXPIRED_OVERLAY_DESCRIPTION})]})}const yO=()=>!0;async function lc(n,t,{initialDelay:e,maxDelay:r,log:i,shouldRetry:o=yO}){return t().catch(async s=>{if(i&&i(`[TalkJS] Retries left: ${n}. Error: ${JSON.stringify(s)}.`),n===0||!await o(s))throw s;const a=1e3*e*1.2,l=r?Math.min(1e3*r,a):a,u=l*(1-(c=.05)+2*Math.random()*c);var c,d;return(d=u,d<=0?Promise.resolve():new Promise(h=>setTimeout(h,d))).then(()=>lc(n-1,t,{initialDelay:u/1e3,maxDelay:r,log:i,shouldRetry:o}))})}function Qi(){const n={},t=new Promise(function(e,r){n.resolve=e,n.reject=r});return n.promise=t,n}function IO(n,t,e){const{beforeBrowserPermissionPrompt:r,onMissingBrowserPermissionCallback:i}=qr(lm);return et(async()=>{function o(c){c==="denied"&&i({type:n})}if(!r||!await async function(c){if(!("permissions"in navigator))return!1;const d=c;try{return(await navigator.permissions.query({name:d})).state==="prompt"}catch(h){return!1}}(n))return t(c=>{o(c)});const s=Qi(),a=Qi(),l={type:n,showPrompt:async()=>(a.resolve({cancelled:!1}),await s.promise),cancel:()=>{a.resolve({cancelled:!0})}};try{r(l)}catch(c){rn.error("Your beforeBrowserPermissionPrompt callback threw an error: ",c),a.resolve({cancelled:!0})}const{cancelled:u}=await a.promise;return u?void 0:t(c=>{s.resolve(c),o(c)})},[r,i,n,t,...e])}function RO({onClose:n}){const t=ft(),e=Eo(),r=mo(),[i,o]=at(null),s=et(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 g=m.name;if(function(S){return/\.(mp4|ts|mov|webm|ogv)$/i.test(S)}(m.name)){const S=await tl("video",m,R=>({width:R.videoWidth,height:R.videoHeight,duration:R.duration,filename:g})),v=E.uploadVideo(m,S),C=function(R){switch(R.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:v,upload:{type:"video",file:m,metadata:S,temporaryBlobUrl:URL.createObjectURL(new Blob([m],{type:C}))}}}if(function(S){return/\.(mp3|m4a|ogg|oga|opus|flac|wav)$/i.test(S)}(m.name)){const S=await tl("audio",m,v=>({duration:v.duration,filename:g}));return{uploadPromise:E.uploadAudio(m,S),upload:{type:"audio",file:m,metadata:S,temporaryBlobUrl:URL.createObjectURL(new Blob([m]))}}}if(function(S){return/(gif|png|jpg|jpeg|svg|bmp|webp)$/i.test(S)}(m.name)){const S=await tl("img",m,v=>({width:v.naturalWidth,height:v.naturalHeight,filename:g}));return{uploadPromise:E.uploadImage(m,S),upload:{type:"image",file:m,metadata:S,temporaryBlobUrl:URL.createObjectURL(new Blob([m]))}}}const _={filename:g},A=E.uploadFile(m,_),T=URL.createObjectURL(new Blob([m]));return{uploadPromise:A,upload:{type:"file",file:m,metadata:_,temporaryBlobUrl:T}}}(l,r),d=c.file.size+","+c.file.name;t.state$.localFileBlobUrls.child(t.state$.extCurrentConversationId.peek()).child(d).set({url:c.temporaryBlobUrl,fetching:!1}),t.latestFileUpload=c;const h=Qi(),p={upload:c,closePreview:h.resolve,uploaded:!1};let f;o(p);try{f=await np(u,h.promise),o({...p,uploaded:!0})}catch(m){if(m===Zl)return;o(E=>({...E,error:m.toString()}))}if(await h.promise==="cancel")return;pt.defined(f),e.sendFileMessage({fileToken:f})}finally{n(),o(null)}},[e,r,o,t,n]),a=IO("geolocation",async l=>{try{const u=Qi(),c={upload:{type:"location",location:void 0},uploaded:!1,closePreview:u.resolve};o(c);const{permissionResult:d,location:h}=await np(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(d),!h||(o({...c,upload:{type:"location",location:h},uploaded:!0}),await u.promise==="cancel"))return;e.sendLocationMessage({location:h})}catch(u){if(u===Zl)return;throw u}finally{n(),o(null)}},[e,o,n]);return{attachFile:s,shareLocation:a,uploadState:i}}const Zl=Symbol("cancelled");function np(n,t){return Promise.race([n,t.then(()=>Promise.reject(Zl))])}async function tl(n,t,e){const r=document.createElement(n);try{return r.src=URL.createObjectURL(t),await new Promise((i,o)=>{const s=n==="img"?"load":"loadedmetadata";r.addEventListener(s,()=>{try{i(e(r))}catch(a){o(a)}},{once:!0})})}finally{URL.revokeObjectURL(r.src)}}var og=function(n,t,e,r){var i;t[0]=0;for(var o=1;o<t.length;o++){var s=t[o++],a=t[o]?(t[0]|=s?1:2,e[t[o++]]):t[++o];s===3?r[0]=a:s===4?r[1]=Object.assign(r[1]||{},a):s===5?(r[1]=r[1]||{})[t[++o]]=a:s===6?r[1][t[++o]]+=a+"":s?(i=n.apply(a,og(n,a,e,["",null])),r.push(i),a[0]?t[0]|=2:(t[o-2]=0,t[o]=i)):r.push(a)}return r},rp=new Map;function LO(n){var t=rp.get(this);return t||(t=new Map,rp.set(this,t)),(t=og(this,t.get(n)||(t.set(n,t=function(e){for(var r,i,o=1,s="",a="",l=[0],u=function(h){o===1&&(h||(s=s.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?l.push(0,h,s):o===3&&(h||s)?(l.push(3,h,s),o=2):o===2&&s==="..."&&h?l.push(4,h,0):o===2&&s&&!h?l.push(5,0,!0,s):o>=5&&((s||!h&&o===5)&&(l.push(o,0,s,i),o=6),h&&(l.push(o,h,0,i),o=6)),s=""},c=0;c<e.length;c++){c&&(o===1&&u(),u(c));for(var d=0;d<e[c].length;d++)r=e[c][d],o===1?r==="<"?(u(),l=[l],o=3):s+=r:o===4?s==="--"&&r===">"?(o=1,s=""):s=r+s[0]:a?r===a?a="":s+=r:r==='"'||r==="'"?a=r:r===">"?(u(),o=1):o&&(r==="="?(o=5,i=s,s=""):r==="/"&&(o<5||e[c][d+1]===">")?(u(),o===3&&(l=l[0]),o=l,(l=l[0]).push(2,0,o),o=0):r===" "||r===" "||r===`
|
|
18
|
+
`||r==="\r"?(u(),o=2):s+=r),o===3&&s==="!--"&&(o=4,l=l[0])}return u(),l}(n)),t),arguments,[])).length>1?t:t[0]}var bO={TALK_GMK:"AIzaSyAs_WXNLlj31EHJI_Lw8siO2B3ZJLUzBH0",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const kO=function(n){return bO[n]}("TALK_GMK");function Yt(n,t,e,r){return new(e||(e=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 e?c:new e(function(d){d(c)})).then(s,a)}l((r=r.apply(n,t||[])).next())})}class _o{constructor(){this.listeners={}}on(t,e,r){if(this.listeners[t]||(this.listeners[t]=new Set),this.listeners[t].add(e),r==null?void 0:r.once){const i=()=>{this.un(t,i),this.un(t,e)};return this.on(t,i),i}return()=>this.un(t,e)}un(t,e){var r;(r=this.listeners[t])===null||r===void 0||r.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(r=>r(...e))}}const ip={decode:function(n,t){return Yt(this,void 0,void 0,function*(){const e=new AudioContext({sampleRate:t});return e.decodeAudioData(n).finally(()=>e.close())})},createBuffer:function(n,t){return typeof n[0]=="number"&&(n=[n]),function(e){const r=e[0];if(r.some(i=>i>1||i<-1)){const i=r.length;let o=0;for(let s=0;s<i;s++){const a=Math.abs(r[s]);a>o&&(o=a)}for(const s of e)for(let a=0;a<i;a++)s[a]/=o}}(n),{duration:t,length:n[0].length,sampleRate:n[0].length/t,numberOfChannels:n.length,getChannelData:e=>n==null?void 0:n[e],copyFromChannel:AudioBuffer.prototype.copyFromChannel,copyToChannel:AudioBuffer.prototype.copyToChannel}}};function sg(n,t){const e=t.xmlns?document.createElementNS(t.xmlns,n):document.createElement(n);for(const[r,i]of Object.entries(t))if(r==="children")for(const[o,s]of Object.entries(t))typeof s=="string"?e.appendChild(document.createTextNode(s)):e.appendChild(sg(o,s));else r==="style"?Object.assign(e.style,i):r==="textContent"?e.textContent=i:e.setAttribute(r,i.toString());return e}function op(n,t,e){const r=sg(n,t||{});return e==null||e.appendChild(r),r}var wO=Object.freeze({__proto__:null,createElement:op,default:op});const FO={fetchBlob:function(n,t,e){return Yt(this,void 0,void 0,function*(){const r=yield fetch(n,e);if(r.status>=400)throw new Error(`Failed to fetch ${n}: ${r.status} (${r.statusText})`);return function(i,o){Yt(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=d=>Yt(this,void 0,void 0,function*(){l+=(d==null?void 0:d.length)||0;const h=Math.round(l/a*100);o(h)}),c=()=>Yt(this,void 0,void 0,function*(){let d;try{d=yield s.read()}catch(h){return}d.done||(u(d.value),yield c())});c()})}(r.clone(),t),r.blob()})}};class MO extends _o{constructor(t){super(),this.isExternalMedia=!1,t.media?(this.media=t.media,this.isExternalMedia=!0):this.media=document.createElement("audio"),t.mediaControls&&(this.media.controls=!0),t.autoplay&&(this.media.autoplay=!0),t.playbackRate!=null&&this.onMediaEvent("canplay",()=>{t.playbackRate!=null&&(this.media.playbackRate=t.playbackRate)},{once:!0})}onMediaEvent(t,e,r){return this.media.addEventListener(t,e,r),()=>this.media.removeEventListener(t,e,r)}getSrc(){return this.media.currentSrc||this.media.src||""}revokeSrc(){const t=this.getSrc();t.startsWith("blob:")&&URL.revokeObjectURL(t)}canPlayType(t){return this.media.canPlayType(t)!==""}setSrc(t,e){const r=this.getSrc();if(t&&r===t)return;this.revokeSrc();const i=e instanceof Blob&&(this.canPlayType(e.type)||!t)?URL.createObjectURL(e):t;try{this.media.src=i}catch(o){this.media.src=t}}destroy(){this.media.pause(),this.isExternalMedia||(this.media.remove(),this.revokeSrc(),this.media.src="",this.media.load())}setMediaElement(t){this.media=t}play(){return Yt(this,void 0,void 0,function*(){return this.media.play()})}pause(){this.media.pause()}isPlaying(){return!this.media.paused&&!this.media.ended}setTime(t){this.media.currentTime=t}getDuration(){return this.media.duration}getCurrentTime(){return this.media.currentTime}getVolume(){return this.media.volume}setVolume(t){this.media.volume=t}getMuted(){return this.media.muted}setMuted(t){this.media.muted=t}getPlaybackRate(){return this.media.playbackRate}isSeeking(){return this.media.seeking}setPlaybackRate(t,e){e!=null&&(this.media.preservesPitch=e),this.media.playbackRate=t}getMediaElement(){return this.media}setSinkId(t){return this.media.setSinkId(t)}}class Xr extends _o{constructor(t,e){super(),this.timeouts=[],this.isScrollable=!1,this.audioData=null,this.resizeObserver=null,this.lastContainerWidth=0,this.isDragging=!1,this.subscriptions=[],this.subscriptions=[],this.options=t;const r=this.parentFromOptionsContainer(t.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"),e&&o.appendChild(e),this.initEvents()}parentFromOptionsContainer(t){let e;if(typeof t=="string"?e=document.querySelector(t):t instanceof HTMLElement&&(e=t),!e)throw new Error("Container not found");return e}initEvents(){const t=e=>{const r=this.wrapper.getBoundingClientRect(),i=e.clientX-r.left,o=e.clientY-r.top;return[i/r.width,o/r.height]};if(this.wrapper.addEventListener("click",e=>{const[r,i]=t(e);this.emit("click",r,i)}),this.wrapper.addEventListener("dblclick",e=>{const[r,i]=t(e);this.emit("dblclick",r,i)}),this.options.dragToSeek!==!0&&typeof this.options.dragToSeek!="object"||this.initDrag(),this.scrollContainer.addEventListener("scroll",()=>{const{scrollLeft:e,scrollWidth:r,clientWidth:i}=this.scrollContainer,o=e/r,s=(e+i)/r;this.emit("scroll",o,s,e,e+i)}),typeof ResizeObserver=="function"){const e=this.createDelay(100);this.resizeObserver=new ResizeObserver(()=>{e().then(()=>this.onContainerResize()).catch(()=>{})}),this.resizeObserver.observe(this.scrollContainer)}}onContainerResize(){const t=this.parent.clientWidth;t===this.lastContainerWidth&&this.options.height!=="auto"||(this.lastContainerWidth=t,this.reRender())}initDrag(){this.subscriptions.push(function(t,e,r,i,o=3,s=0,a=100){if(!t)return()=>{};const l=matchMedia("(pointer: coarse)").matches;let u=()=>{};const c=d=>{if(d.button!==s)return;d.preventDefault(),d.stopPropagation();let h=d.clientX,p=d.clientY,f=!1;const m=Date.now(),E=S=>{if(S.preventDefault(),S.stopPropagation(),l&&Date.now()-m<a)return;const v=S.clientX,C=S.clientY,R=v-h,D=C-p;if(f||Math.abs(R)>o||Math.abs(D)>o){const O=t.getBoundingClientRect(),{left:k,top:w}=O;f||(r==null||r(h-k,p-w),f=!0),e(R,D,v-k,C-w),h=v,p=C}},g=S=>{if(f){const v=S.clientX,C=S.clientY,R=t.getBoundingClientRect(),{left:D,top:O}=R;i==null||i(v-D,C-O)}u()},_=S=>{S.relatedTarget&&S.relatedTarget!==document.documentElement||g(S)},A=S=>{f&&(S.stopPropagation(),S.preventDefault())},T=S=>{f&&S.preventDefault()};document.addEventListener("pointermove",E),document.addEventListener("pointerup",g),document.addEventListener("pointerout",_),document.addEventListener("pointercancel",_),document.addEventListener("touchmove",T,{passive:!1}),document.addEventListener("click",A,{capture:!0}),u=()=>{document.removeEventListener("pointermove",E),document.removeEventListener("pointerup",g),document.removeEventListener("pointerout",_),document.removeEventListener("pointercancel",_),document.removeEventListener("touchmove",T),setTimeout(()=>{document.removeEventListener("click",A,{capture:!0})},10)}};return t.addEventListener("pointerdown",c),()=>{u(),t.removeEventListener("pointerdown",c)}}(this.wrapper,(t,e,r)=>{this.emit("drag",Math.max(0,Math.min(1,r/this.wrapper.getBoundingClientRect().width)))},t=>{this.isDragging=!0,this.emit("dragstart",Math.max(0,Math.min(1,t/this.wrapper.getBoundingClientRect().width)))},t=>{this.isDragging=!1,this.emit("dragend",Math.max(0,Math.min(1,t/this.wrapper.getBoundingClientRect().width)))}))}getHeight(t,e){var r;const i=((r=this.audioData)===null||r===void 0?void 0:r.numberOfChannels)||1;if(t==null)return 128;if(!isNaN(Number(t)))return Number(t);if(t==="auto"){const o=this.parent.clientHeight||128;return e!=null&&e.every(s=>!s.overlay)?o/i:o}return 128}initHtml(){const t=document.createElement("div"),e=t.attachShadow({mode:"open"});return e.innerHTML=`
|
|
19
|
+
<style>
|
|
20
|
+
:host {
|
|
21
|
+
user-select: none;
|
|
22
|
+
min-width: 1px;
|
|
23
|
+
}
|
|
24
|
+
:host audio {
|
|
25
|
+
display: block;
|
|
26
|
+
width: 100%;
|
|
27
|
+
}
|
|
28
|
+
:host .scroll {
|
|
29
|
+
overflow-x: auto;
|
|
30
|
+
overflow-y: hidden;
|
|
31
|
+
width: 100%;
|
|
32
|
+
position: relative;
|
|
33
|
+
}
|
|
34
|
+
:host .noScrollbar {
|
|
35
|
+
scrollbar-color: transparent;
|
|
36
|
+
scrollbar-width: none;
|
|
37
|
+
}
|
|
38
|
+
:host .noScrollbar::-webkit-scrollbar {
|
|
39
|
+
display: none;
|
|
40
|
+
-webkit-appearance: none;
|
|
41
|
+
}
|
|
42
|
+
:host .wrapper {
|
|
43
|
+
position: relative;
|
|
44
|
+
overflow: visible;
|
|
45
|
+
z-index: 2;
|
|
46
|
+
}
|
|
47
|
+
:host .canvases {
|
|
48
|
+
min-height: ${this.getHeight(this.options.height,this.options.splitChannels)}px;
|
|
49
|
+
}
|
|
50
|
+
:host .canvases > div {
|
|
51
|
+
position: relative;
|
|
52
|
+
}
|
|
53
|
+
:host canvas {
|
|
54
|
+
display: block;
|
|
55
|
+
position: absolute;
|
|
56
|
+
top: 0;
|
|
57
|
+
image-rendering: pixelated;
|
|
58
|
+
}
|
|
59
|
+
:host .progress {
|
|
60
|
+
pointer-events: none;
|
|
61
|
+
position: absolute;
|
|
62
|
+
z-index: 2;
|
|
63
|
+
top: 0;
|
|
64
|
+
left: 0;
|
|
65
|
+
width: 0;
|
|
66
|
+
height: 100%;
|
|
67
|
+
overflow: hidden;
|
|
68
|
+
}
|
|
69
|
+
:host .progress > div {
|
|
70
|
+
position: relative;
|
|
71
|
+
}
|
|
72
|
+
:host .cursor {
|
|
73
|
+
pointer-events: none;
|
|
74
|
+
position: absolute;
|
|
75
|
+
z-index: 5;
|
|
76
|
+
top: 0;
|
|
77
|
+
left: 0;
|
|
78
|
+
height: 100%;
|
|
79
|
+
border-radius: 2px;
|
|
80
|
+
}
|
|
81
|
+
</style>
|
|
82
|
+
|
|
83
|
+
<div class="scroll" part="scroll">
|
|
84
|
+
<div class="wrapper" part="wrapper">
|
|
85
|
+
<div class="canvases" part="canvases"></div>
|
|
86
|
+
<div class="progress" part="progress"></div>
|
|
87
|
+
<div class="cursor" part="cursor"></div>
|
|
88
|
+
</div>
|
|
89
|
+
</div>
|
|
90
|
+
`,[t,e]}setOptions(t){if(this.options.container!==t.container){const e=this.parentFromOptionsContainer(t.container);e.appendChild(this.container),this.parent=e}t.dragToSeek!==!0&&typeof this.options.dragToSeek!="object"||this.initDrag(),this.options=t,this.reRender()}getWrapper(){return this.wrapper}getWidth(){return this.scrollContainer.clientWidth}getScroll(){return this.scrollContainer.scrollLeft}setScroll(t){this.scrollContainer.scrollLeft=t}setScrollPercentage(t){const{scrollWidth:e}=this.scrollContainer,r=e*t;this.setScroll(r)}destroy(){var t,e;this.subscriptions.forEach(r=>r()),this.container.remove(),(t=this.resizeObserver)===null||t===void 0||t.disconnect(),(e=this.unsubscribeOnScroll)===null||e===void 0||e.call(this)}createDelay(t=10){let e,r;const i=()=>{e&&clearTimeout(e),r&&r()};return this.timeouts.push(i),()=>new Promise((o,s)=>{i(),r=s,e=setTimeout(()=>{e=void 0,r=void 0,o()},t)})}convertColorValues(t){if(!Array.isArray(t))return t||"";if(t.length<2)return t[0]||"";const e=document.createElement("canvas"),r=e.getContext("2d"),i=e.height*(window.devicePixelRatio||1),o=r.createLinearGradient(0,0,0,i),s=1/(t.length-1);return t.forEach((a,l)=>{const u=l*s;o.addColorStop(u,a)}),o}getPixelRatio(){return Math.max(1,window.devicePixelRatio||1)}renderBarWaveform(t,e,r,i){const o=t[0],s=t[1]||t[0],a=o.length,{width:l,height:u}=r.canvas,c=u/2,d=this.getPixelRatio(),h=e.barWidth?e.barWidth*d:1,p=e.barGap?e.barGap*d:e.barWidth?h/2:0,f=e.barRadius||0,m=l/(h+p)/a,E=f&&"roundRect"in r?"roundRect":"rect";r.beginPath();let g=0,_=0,A=0;for(let T=0;T<=a;T++){const S=Math.round(T*m);if(S>g){const R=Math.round(_*c*i),D=R+Math.round(A*c*i)||1;let O=c-R;e.barAlign==="top"?O=0:e.barAlign==="bottom"&&(O=u-D),r[E](g*(h+p),O,h,D,f),g=S,_=0,A=0}const v=Math.abs(o[T]||0),C=Math.abs(s[T]||0);v>_&&(_=v),C>A&&(A=C)}r.fill(),r.closePath()}renderLineWaveform(t,e,r,i){const o=s=>{const a=t[s]||t[0],l=a.length,{height:u}=r.canvas,c=u/2,d=r.canvas.width/l;r.moveTo(0,c);let h=0,p=0;for(let f=0;f<=l;f++){const m=Math.round(f*d);if(m>h){const g=c+(Math.round(p*c*i)||1)*(s===0?-1:1);r.lineTo(h,g),h=m,p=0}const E=Math.abs(a[f]||0);E>p&&(p=E)}r.lineTo(h,c)};r.beginPath(),o(0),o(1),r.fill(),r.closePath()}renderWaveform(t,e,r){if(r.fillStyle=this.convertColorValues(e.waveColor),e.renderFunction)return void e.renderFunction(t,r);let i=e.barHeight||1;if(e.normalize){const o=Array.from(t[0]).reduce((s,a)=>Math.max(s,Math.abs(a)),0);i=o?1/o:1}e.barWidth||e.barGap||e.barAlign?this.renderBarWaveform(t,e,r,i):this.renderLineWaveform(t,e,r,i)}renderSingleCanvas(t,e,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(this.renderWaveform(t,e,c),u.width>0&&u.height>0){const d=u.cloneNode(),h=d.getContext("2d");h.drawImage(u,0,0),h.globalCompositeOperation="source-in",h.fillStyle=this.convertColorValues(e.progressColor),h.fillRect(0,0,u.width,u.height),a.appendChild(d)}}renderMultiCanvas(t,e,r,i,o,s){const a=this.getPixelRatio(),{clientWidth:l}=this.scrollContainer;if(l*a>=r)return void this.renderSingleCanvas(t,e,l,i,0,o,s);const u=r/a;let c=Math.min(Xr.MAX_CANVAS_WIDTH,l,u),d={};if(e.barWidth||e.barGap){const E=e.barWidth||.5,g=E+(e.barGap||E/2);c%g!=0&&(c=Math.floor(c/g)*g)}const h=E=>{if(E<0||E>=p||d[E])return;d[E]=!0;const g=E*c,_=Math.min(u-g,c);if(_<=0)return;const A=t.map(T=>{const S=Math.floor(g/u*T.length),v=Math.floor((g+_)/u*T.length);return T.slice(S,v)});this.renderSingleCanvas(A,e,_,i,g,o,s)},p=Math.ceil(u/c),f=this.scrollContainer.scrollLeft/u,m=Math.floor(f*p);h(m-1),h(m),h(m+1),p>1&&(this.unsubscribeOnScroll=this.on("scroll",()=>{const{scrollLeft:E}=this.scrollContainer,g=Math.floor(E/u*p);Object.keys(d).length>Xr.MAX_NODES&&(o.innerHTML="",s.innerHTML="",d={}),h(g-1),h(g),h(g+1)}))}renderChannel(t,e,r,i){var{overlay:o}=e,s=function(c,d){var h={};for(var p in c)Object.prototype.hasOwnProperty.call(c,p)&&d.indexOf(p)<0&&(h[p]=c[p]);if(c!=null&&typeof Object.getOwnPropertySymbols=="function"){var f=0;for(p=Object.getOwnPropertySymbols(c);f<p.length;f++)d.indexOf(p[f])<0&&Object.prototype.propertyIsEnumerable.call(c,p[f])&&(h[p[f]]=c[p[f]])}return h}(e,["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(t,s,r,l,a,u)}render(t){return Yt(this,void 0,void 0,function*(){var e;this.timeouts.forEach(l=>l()),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,o=Math.ceil(t.duration*(this.options.minPxPerSec||0));this.isScrollable=o>i;const s=this.options.fillParent&&!this.isScrollable,a=(s?i:o)*r;if(this.wrapper.style.width=s?"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=t,this.emit("render"),this.options.splitChannels)for(let l=0;l<t.numberOfChannels;l++){const u=Object.assign(Object.assign({},this.options),(e=this.options.splitChannels)===null||e===void 0?void 0:e[l]);this.renderChannel([t.getChannelData(l)],u,a,l)}else{const l=[t.getChannelData(0)];t.numberOfChannels>1&&l.push(t.getChannelData(1)),this.renderChannel(l,this.options,a,0)}Promise.resolve().then(()=>this.emit("rendered"))})}reRender(){var t;if((t=this.unsubscribeOnScroll)===null||t===void 0||t.call(this),delete this.unsubscribeOnScroll,!this.audioData)return;const{scrollWidth:e}=this.scrollContainer,{right:r}=this.progressWrapper.getBoundingClientRect();if(this.render(this.audioData),this.isScrollable&&e!==this.scrollContainer.scrollWidth){const{right:i}=this.progressWrapper.getBoundingClientRect();let o=i-r;o*=2,o=o<0?Math.floor(o):Math.ceil(o),o/=2,this.scrollContainer.scrollLeft+=o}}zoom(t){this.options.minPxPerSec=t,this.reRender()}scrollIntoView(t,e=!1){const{scrollLeft:r,scrollWidth:i,clientWidth:o}=this.scrollContainer,s=t*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;e&&this.options.autoCenter&&c>0&&(this.scrollContainer.scrollLeft+=Math.min(c,10))}{const c=this.scrollContainer.scrollLeft,d=c/i,h=(c+o)/i;this.emit("scroll",d,h,c,c+o)}}renderProgress(t,e){if(isNaN(t))return;const r=100*t;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=`translateX(-${Math.round(r)===100?this.options.cursorWidth:0}px)`,this.isScrollable&&this.options.autoScroll&&this.scrollIntoView(t,e)}exportImage(t,e,r){return Yt(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(t,e));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"))},t,e)})))})}}Xr.MAX_CANVAS_WIDTH=8e3,Xr.MAX_NODES=10;class xO extends _o{constructor(){super(...arguments),this.unsubscribe=()=>{}}start(){this.unsubscribe=this.on("tick",()=>{requestAnimationFrame(()=>{this.emit("tick")})}),this.emit("tick")}stop(){this.unsubscribe()}destroy(){this.unsubscribe()}}class sp extends _o{constructor(t=new AudioContext){super(),this.bufferNode=null,this.playStartTime=0,this.playedDuration=0,this._muted=!1,this._playbackRate=1,this._duration=void 0,this.buffer=null,this.currentSrc="",this.paused=!0,this.crossOrigin=null,this.seeking=!1,this.autoplay=!1,this.addEventListener=this.on,this.removeEventListener=this.un,this.audioContext=t,this.gainNode=this.audioContext.createGain(),this.gainNode.connect(this.audioContext.destination)}load(){return Yt(this,void 0,void 0,function*(){})}get src(){return this.currentSrc}set src(t){if(this.currentSrc=t,this._duration=void 0,!t)return this.buffer=null,void this.emit("emptied");fetch(t).then(e=>{if(e.status>=400)throw new Error(`Failed to fetch ${t}: ${e.status} (${e.statusText})`);return e.arrayBuffer()}).then(e=>this.currentSrc!==t?null:this.audioContext.decodeAudioData(e)).then(e=>{this.currentSrc===t&&(this.buffer=e,this.emit("loadedmetadata"),this.emit("canplay"),this.autoplay&&this.play())})}_play(){var t;if(!this.paused)return;this.paused=!1,(t=this.bufferNode)===null||t===void 0||t.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,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 t;this.paused=!0,(t=this.bufferNode)===null||t===void 0||t.stop(),this.playedDuration+=this.audioContext.currentTime-this.playStartTime}play(){return Yt(this,void 0,void 0,function*(){this.paused&&(this._play(),this.emit("play"))})}pause(){this.paused||(this._pause(),this.emit("pause"))}stopAt(t){var e,r;const i=t-this.currentTime;(e=this.bufferNode)===null||e===void 0||e.stop(this.audioContext.currentTime+i),(r=this.bufferNode)===null||r===void 0||r.addEventListener("ended",()=>{this.bufferNode=null,this.pause()},{once:!0})}setSinkId(t){return Yt(this,void 0,void 0,function*(){return this.audioContext.setSinkId(t)})}get playbackRate(){return this._playbackRate}set playbackRate(t){this._playbackRate=t,this.bufferNode&&(this.bufferNode.playbackRate.value=t)}get currentTime(){return(this.paused?this.playedDuration:this.playedDuration+(this.audioContext.currentTime-this.playStartTime))*this._playbackRate}set currentTime(t){const e=!this.paused;e&&this._pause(),this.playedDuration=t/this._playbackRate,e&&this._play(),this.emit("seeking"),this.emit("timeupdate")}get duration(){var t,e;return(t=this._duration)!==null&&t!==void 0?t:((e=this.buffer)===null||e===void 0?void 0:e.duration)||0}set duration(t){this._duration=t}get volume(){return this.gainNode.gain.value}set volume(t){this.gainNode.gain.value=t,this.emit("volumechange")}get muted(){return this._muted}set muted(t){this._muted!==t&&(this._muted=t,this._muted?this.gainNode.disconnect():this.gainNode.connect(this.audioContext.destination))}canPlayType(t){return/^(audio|video)\//.test(t)}getGainNode(){return this.gainNode}getChannelData(){const t=[];if(!this.buffer)return t;const e=this.buffer.numberOfChannels;for(let r=0;r<e;r++)t.push(this.buffer.getChannelData(r));return t}}const PO={waveColor:"#999",progressColor:"#555",cursorWidth:1,minPxPerSec:0,fillParent:!0,interact:!0,dragToSeek:!1,autoScroll:!0,autoCenter:!0,sampleRate:8e3};class to extends MO{static create(t){return new to(t)}constructor(t){const e=t.media||(t.backend==="WebAudio"?new sp:void 0);super({media:e,mediaControls:t.mediaControls,autoplay:t.autoplay,playbackRate:t.audioRate}),this.plugins=[],this.decodedData=null,this.subscriptions=[],this.mediaSubscriptions=[],this.abortController=null,this.options=Object.assign({},PO,t),this.timer=new xO;const r=e?void 0:this.getMediaElement();this.renderer=new Xr(this.options,r),this.initPlayerEvents(),this.initRendererEvents(),this.initTimerEvents(),this.initPlugins();const i=this.options.url||this.getSrc()||"";Promise.resolve().then(()=>{this.emit("init");const{peaks:o,duration:s}=this.options;(i||o&&s)&&this.load(i,o,s).catch(()=>null)})}updateProgress(t=this.getCurrentTime()){return this.renderer.renderProgress(t/this.getDuration(),this.isPlaying()),t}initTimerEvents(){this.subscriptions.push(this.timer.on("tick",()=>{if(!this.isSeeking()){const t=this.updateProgress();this.emit("timeupdate",t),this.emit("audioprocess",t)}}))}initPlayerEvents(){this.isPlaying()&&(this.emit("play"),this.timer.start()),this.mediaSubscriptions.push(this.onMediaEvent("timeupdate",()=>{const t=this.updateProgress();this.emit("timeupdate",t)}),this.onMediaEvent("play",()=>{this.emit("play"),this.timer.start()}),this.onMediaEvent("pause",()=>{this.emit("pause"),this.timer.stop()}),this.onMediaEvent("emptied",()=>{this.timer.stop()}),this.onMediaEvent("ended",()=>{this.emit("finish")}),this.onMediaEvent("seeking",()=>{this.emit("seeking",this.getCurrentTime())}),this.onMediaEvent("error",t=>{this.emit("error",t.error)}))}initRendererEvents(){this.subscriptions.push(this.renderer.on("click",(t,e)=>{this.options.interact&&(this.seekTo(t),this.emit("interaction",t*this.getDuration()),this.emit("click",t,e))}),this.renderer.on("dblclick",(t,e)=>{this.emit("dblclick",t,e)}),this.renderer.on("scroll",(t,e,r,i)=>{const o=this.getDuration();this.emit("scroll",t*o,e*o,r,i)}),this.renderer.on("render",()=>{this.emit("redraw")}),this.renderer.on("rendered",()=>{this.emit("redrawcomplete")}),this.renderer.on("dragstart",t=>{this.emit("dragstart",t)}),this.renderer.on("dragend",t=>{this.emit("dragend",t)}));{let t;this.subscriptions.push(this.renderer.on("drag",e=>{if(!this.options.interact)return;let r;this.renderer.renderProgress(e),clearTimeout(t),this.isPlaying()?r=0:this.options.dragToSeek===!0?r=200:typeof this.options.dragToSeek=="object"&&this.options.dragToSeek!==void 0&&(r=this.options.dragToSeek.debounceTime),t=setTimeout(()=>{this.seekTo(e)},r),this.emit("interaction",e*this.getDuration()),this.emit("drag",e)}))}}initPlugins(){var t;!((t=this.options.plugins)===null||t===void 0)&&t.length&&this.options.plugins.forEach(e=>{this.registerPlugin(e)})}unsubscribePlayerEvents(){this.mediaSubscriptions.forEach(t=>t()),this.mediaSubscriptions=[]}setOptions(t){this.options=Object.assign({},this.options,t),this.renderer.setOptions(this.options),t.audioRate&&this.setPlaybackRate(t.audioRate),t.mediaControls!=null&&(this.getMediaElement().controls=t.mediaControls)}registerPlugin(t){return t._init(this),this.plugins.push(t),this.subscriptions.push(t.once("destroy",()=>{this.plugins=this.plugins.filter(e=>e!==t)})),t}getWrapper(){return this.renderer.getWrapper()}getWidth(){return this.renderer.getWidth()}getScroll(){return this.renderer.getScroll()}setScroll(t){return this.renderer.setScroll(t)}setScrollTime(t){const e=t/this.getDuration();this.renderer.setScrollPercentage(e)}getActivePlugins(){return this.plugins}loadAudio(t,e,r,i){return Yt(this,void 0,void 0,function*(){var o;if(this.emit("load",t),!this.options.media&&this.isPlaying()&&this.pause(),this.decodedData=null,!e&&!r){const a=this.options.fetchParams||{};window.AbortController&&!a.signal&&(this.abortController=new AbortController,a.signal=(o=this.abortController)===null||o===void 0?void 0:o.signal);const l=u=>this.emit("loading",u);e=yield FO.fetchBlob(t,l,a)}this.setSrc(t,e);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(!t&&!e){const a=this.getMediaElement();a instanceof sp&&(a.duration=s)}if(r)this.decodedData=ip.createBuffer(r,s||0);else if(e){const a=yield e.arrayBuffer();this.decodedData=yield ip.decode(a,this.options.sampleRate)}this.decodedData&&(this.emit("decode",this.getDuration()),this.renderer.render(this.decodedData)),this.emit("ready",this.getDuration())})}load(t,e,r){return Yt(this,void 0,void 0,function*(){try{return yield this.loadAudio(t,void 0,e,r)}catch(i){throw this.emit("error",i),i}})}loadBlob(t,e,r){return Yt(this,void 0,void 0,function*(){try{return yield this.loadAudio("",t,e,r)}catch(i){throw this.emit("error",i),i}})}zoom(t){if(!this.decodedData)throw new Error("No audio loaded");this.renderer.zoom(t),this.emit("zoom",t)}getDecodedData(){return this.decodedData}exportPeaks({channels:t=2,maxLength:e=8e3,precision:r=1e4}={}){if(!this.decodedData)throw new Error("The audio has not been decoded yet");const i=Math.min(t,this.decodedData.numberOfChannels),o=[];for(let s=0;s<i;s++){const a=this.decodedData.getChannelData(s),l=[],u=a.length/e;for(let c=0;c<e;c++){const d=a.slice(Math.floor(c*u),Math.ceil((c+1)*u));let h=0;for(let p=0;p<d.length;p++){const f=d[p];Math.abs(f)>Math.abs(h)&&(h=f)}l.push(Math.round(h*r)/r)}o.push(l)}return o}getDuration(){let t=super.getDuration()||0;return t!==0&&t!==1/0||!this.decodedData||(t=this.decodedData.duration),t}toggleInteraction(t){this.options.interact=t}setTime(t){super.setTime(t),this.updateProgress(t),this.emit("timeupdate",t)}seekTo(t){const e=this.getDuration()*t;this.setTime(e)}playPause(){return Yt(this,void 0,void 0,function*(){return this.isPlaying()?this.pause():this.play()})}stop(){this.pause(),this.setTime(0)}skip(t){this.setTime(this.getCurrentTime()+t)}empty(){this.load("",[[0]],.001)}setMediaElement(t){this.unsubscribePlayerEvents(),super.setMediaElement(t),this.initPlayerEvents()}exportImage(){return Yt(this,arguments,void 0,function*(t="image/png",e=1,r="dataURL"){return this.renderer.exportImage(t,e,r)})}destroy(){var t;this.emit("destroy"),(t=this.abortController)===null||t===void 0||t.abort(),this.plugins.forEach(e=>e.destroy()),this.subscriptions.forEach(e=>e()),this.unsubscribePlayerEvents(),this.timer.destroy(),this.renderer.destroy(),super.destroy()}}function Qs({src:n,onError:t,filename:e,className:r=""}){const i=tt(null),o=tt(),s=tt(),[a,l]=at(!1),[u,c]=at(0),[d,h]=at(1),p=tt(),[f,m]=at(!1);G(()=>{o.current=new Audio;const _={normalize:!0,height:50,container:i.current};function A(){const v=o.current;v&&(v.error.message==="PIPELINE_ERROR_READ: FFmpegDemuxer: demuxer seek failed"?(v.load(),l(!1)):(m(!0),l(!1),t==null||t()))}const T=e.slice(e.lastIndexOf(".")+1);if(function(v){return/(?:^|\/)talkjs_audio_message_[0-9]+_([0-9]+)[.](?:mp3|webm)$/.test(v)}(e)&&T==="webm"&&!o.current.canPlayType("audio/webm;codecs=opus"))_.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 v=o.current;v.addEventListener("error",A),v.src=n,v.preload="auto",v.preservesPitch=!0,_.media=v}p.current=function(v){var O,k,w,U,I,F,j,$;if(!v.container)return;const C=getComputedStyle(v.container),R=(O=eo.parse(C.color))!=null?O:new eo(255,255,255,1),D=R.withAlpha(R.alpha/2);return to.create({...v,barGap:(k=v.barGap)!=null?k:2,barRadius:(w=v.barRadius)!=null?w:0,barWidth:(U=v.barWidth)!=null?U:2,barHeight:v.barHeight,hideScrollbar:!0,cursorWidth:(I=v.cursorWidth)!=null?I:0,cursorColor:v.cursorColor,height:(F=v.height)!=null?F:24,progressColor:(j=v.progressColor)!=null?j:D.toRgbaString(),waveColor:($=v.waveColor)!=null?$:D.toRgbaString()})}(_);const S=p.current;return S.on("finish",()=>{o.current.loop=!0,l(!1)}),S.on("ready",v=>c(Math.trunc(v))),S.on("timeupdate",v=>c(Math.trunc(v))),_.backend==="WebAudio"&&S.load(n).catch(()=>{m(!0),l(!1),t==null||t()}),()=>{var v;(v=o.current)==null||v.removeEventListener("error",A),o.current=void 0,S.destroy(),p.current=void 0}},[n,e,t]);const E=et(()=>{var _;if(p.current.options.backend==="WebAudio")p.current.isPlaying()||s.current.play(),p.current.playPause(),l((_=p.current.isPlaying())!=null?_:!1);else{const A=o.current;A.paused?A.play():A.pause(),A.loop=!1,!A.paused&&A.ended&&(A.load(),A.play()),l(!A.paused)}},[]),g=et(_=>{p.current.setPlaybackRate(_),h(_)},[]);return y("div",f?{}:{className:`t-audio-player ${r}`,children:[y("button",{onClick:E,children:y(Ns,{className:"t-play-pause-icon",type:a?"pause":"play","aria-label":a?"pause audio":"play audio"})}),y("div",{className:"t-waveform",ref:i}),y("div",{className:"t-duration",children:Dc(u)}),y(vr,{type:"menu",popoverComponent:HO,popoverProps:{playbackSpeed:d,selectPlaybackSpeed:g},className:"t-playback-speed","aria-label":"set playback speed",children:[d,"x",y(Ns,{type:"updown",className:"t-up-down-icon","aria-hidden":!0})]})]})}to.BasePlugin=class extends _o{constructor(n){super(),this.subscriptions=[],this.options=n}onInit(){}_init(n){this.wavesurfer=n,this.onInit()}destroy(){this.emit("destroy"),this.subscriptions.forEach(n=>n())}},to.dom=wO;const BO=[.25,.5,.75,1,1.25,1.5,2];function HO({playbackSpeed:n,selectPlaybackSpeed:t}){return y("div",{className:"t-playback-speed-menu",children:[y("div",{className:"t-playback-heading",children:"Playback Speed"}),BO.map(e=>y(Dn,{className:"t-menu-item",onSelect:()=>t(e),children:[y("span",{className:"t-playback-checkmark",children:n===e?"✓ ":""}),e,"x"]},e))]})}const UO=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/,$O=/^rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)$/;class eo{constructor(t,e,r,i){this.red=t,this.green=e,this.blue=r,this.alpha=i}static parse(t){var r;const e=(r=t.match(UO))!=null?r:t.match($O);if(e){const[i,o,s,a,l="1"]=e;return new eo(Number(o),Number(s),Number(a),Number(l))}return null}withAlpha(t){return new eo(this.red,this.green,this.blue,t)}toRgbaString(){const{red:t,green:e,blue:r,alpha:i}=this;return i!==1?`rgba(${t}, ${e}, ${r}, ${i})`:`rgb(${t}, ${e}, ${r})`}}const ag=/^\/.*[^\\]\/[im]*$/;function ap(n){return ag.test(n)?!Cs(n).test(""):!1}function Cs(n){const t=n.match(/^\/(.*[^\\])\/(.*)$/);if(!t)throw new Error(`Expected ${n} to be a (non-empty) regex`);let e=t[2]||"";return e=e.replace(/[^im]/g,"")+"g",new RegExp(t[1],e)}function lg(n){const t=n.replace(/\./g,"\\.").replace(/\*/g,".*");return new RegExp("^"+t+"$","i")}function jO(n,t){const e=Om(t),r=lg(n);return e!==void 0&&r.test(e)}const YO=/^[]/g;function VO(n){return n.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}function Ql(n,t){!n()&&!t&&(t=n.toString().replace(/^function\s*\(\)\s*\{\s*return\s*(.*);\s*\}\s*$/,"`$1`")+" was not true")}(n=>{function t(r){}function e(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))}n.defined=t,n.has=function(r,i){r[i]},n.is=e,n.equals=function(r,i){},n.oneOf=function(r,i){i.includes(r)||JSON.stringify(i)},n.isArray=function(r,i){e(r,Array),r&&r.length>0&&e(r[0],i)},n.optional=function(r,i){r!==void 0&&e(r,i)},n.falsy=function(r){},n.never=function(r){}})(Ql||(Ql={}));const Rr=Ql,zO=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"),GO=/\uFE0F/g,XO="";function WO(n){if(n===":arslan:")return"https://cdn.talkjs.com/__assets/5461191341cea882b3f227c085d5772c.gif";const t=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("-")}((e=n).indexOf(XO)<0?e.replace(GO,""):e);var e;return`https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/svg/${t}.svg`}class ug{constructor({mode:t,allowedHostnames:e,allowedPhoneNrs:r,allowedMatches:i,forbiddenMatches:o,suppressLinks:s,suppressEmailAddresses:a,suppressPhoneNumbers:l,replacement:u}){Rr.oneOf(t,["all","otherOnly","off"]),this.mode=t,this.suppressLinks=s!==!1,this.suppressEmailAddresses=a!==!1,this.suppressPhoneNumbers=l!==!1,this.allowedHostnames=e||[],this.allowedPhoneNrs=(r||[]).filter(c=>c).map(c=>c.replace(/[^0-9]/g,"")),this.allowedMatches=(i||[]).filter(ap).map(c=>Cs(c)),this.forbiddenMatches=(o||[]).filter(ap).map(c=>Cs(c)),Rr(()=>this.allowedMatches.every(c=>c.flags.includes("g")),"All regexes in `suppressContactInfo.allowedMatches` must be global. Check `allowedMatches`!"),Rr(()=>this.forbiddenMatches.every(c=>c.flags.includes("g")),"All regexes in `suppressContactInfo.forbiddenMatches` must be global. Check `forbiddenMatches`!"),u=u==null?void 0:u.trim(),this.replacement=u&&u.length>0?u:void 0}shouldSuppress({isContentBySender:t}){return this.mode==="all"||this.mode==="otherOnly"&&!t}}function uc(n){var e,r,i,o,s,a,l,u,c,d,h,p,f;let t="";return n.t&&(t=`(${n.t("CONTACT_INFORMATION_HIDDEN")})`),{formattedLinks:(e=n.formattedLinks)!=null?e:"plaintext",markup:(r=n.markup)!=null?r:!1,useFallbackMentions:(i=n.useFallbackMentions)!=null?i:!1,sameTabLinkRules:(o=n.sameTabLinkRules)!=null?o:[],enableEmojiImageFallback:(s=n.enableEmojiImageFallback)!=null?s:!1,highlight:(a=n.highlight)!=null?a:[],contactInfo:(l=n.contactInfo)!=null?l:!1,suppression:(u=n.suppression)!=null?u:new ug({mode:"off"}),contactInfoHiddenText:(h=(d=n.contactInfoHiddenText)!=null?d:(c=n.suppression)==null?void 0:c.replacement)!=null?h:t,customEmojiUrls:(p=n.customEmojiUrls)!=null?p:{},enableActions:(f=n.enableActions)!=null?f:!0}}function KO({id:n,text:t}){var i;const e=ft(),r=it(()=>{var a;if(e.type==="ConversationListStore")return;const o=e.state$.extCurrentConversationId.get(),s=o&&e.state$.participants.child(o).get();return(a=s==null?void 0:s.find(l=>l.user.id===n))==null?void 0:a.user});return y("span",{className:"t-mention","t-is-current-user":it(e.extUserId$)===n?"":void 0,children:`@${(i=r==null?void 0:r.name)!=null?i:t}`})}function qO({message:n,type:t,action:e,params:r,children:i}){const o=Eo(),s=et(l=>{l.preventDefault(),o.triggerMessageAction(n,e,r)},[o,n,e,r]),a={"t-action":e,onClick:s};return t==="actionButton"?y("button",{...a,type:"button",children:i}):y("a",{...a,href:"#",children:i})}function Wr(n,t){const e=n.flatMap(r=>{if(typeof r=="string")return el(r,t.highlight);switch(r.type){case"bold":case"italic":case"strikethrough":case"blockquote":case"bulletpoint":case"bulletPoint":return JO(r,t);case"bulletlist":case"bulletList":return[dt("ul",null,...Wr(r.children,t))];case"autolink":case"autoLink":case"link":return QO(r,t);case"codeblock":case"codeBlock":return[y("code",{"data-language":r.language,children:el(r.text,t.highlight)})];case"codespan":case"codeSpan":return y("code",{children:el((i=r.text,i.replace(/^\s*\n/m,"").replace(/\n\s*$/m,"")),t.highlight)});case"mention":return Rr.falsy(t.useFallbackMentions),y(KO,{id:r.id,text:r.text},r.id);case"suppressed":return[y("i",{children:t.contactInfoHiddenText})];case"emoji":return t.enableEmojiImageFallback?[y(ZO,{unicode:r.text})]:[r.text];case"actionlink":case"actionLink":case"actionbutton":case"actionButton":return tT(r,t);case"customemoji":case"customEmoji":return r.text;default:Rr.never(r)}var i});return e.every(r=>typeof r=="string")?[e.join("")]:e}function el(n,t){if(t.length===0)return[n];const e=function(i){const o=i.map(a=>a.trim()).filter(a=>a);if(o.length===0)return YO;const s=o.map(VO).join("|");return new RegExp(s,"gi")}(t),r=zs(n,e).map(i=>({offset:i.index,matchedText:i[0]}));return Sl(n,r,({matchedText:i})=>[y("span",{className:"highlighted-text",children:i})])}const JO=(n,t)=>[dt({bold:"strong",italic:"em",strikethrough:"del",blockquote:"blockquote",bulletpoint:"li",bulletPoint:"li"}[n.type],null,...Wr(n.children,t))];function ZO({unicode:n}){const[t,e]=at(()=>n!==":arslan:");return G(()=>{t&&!gm(n)&&e(!1)},[]),t?y("span",{className:"t-emoji",children:n}):y("img",{className:"t-emoji",src:WO(n),alt:n})}const QO=(n,t)=>{const e="children"in n?n.children:[n.text];switch(t.formattedLinks){case"link":return[dt("a",{target:function(r,i){for(const o of r)if(ag.test(o)){if(Cs(o).test(i))return"_top"}else if(jO(o,i))return"_top";return"_blank"}(t.sameTabLinkRules,n.url),href:n.url,rel:"noreferrer"},...Wr(e,t))];case"plaintext":return"children"in n&&n.children.every(r=>typeof r=="string")?[n.children.join("")]:[dt(Bt,null,...Wr(e,t))];default:Rr.never(t.formattedLinks)}},tT=(n,t)=>t.enableActions?[dt(qO,{type:n.type==="actionlink"?"actionLink":n.type==="actionbutton"?"actionButton":n.type,action:n.action,params:n.params,message:t.message},...Wr(n.children,t))]:n.children;function eT(n,t){return Qo(n,uc(t))}function Qo(n,t){return n.flatMap(e=>{if(typeof e=="string"){let r=[e];return r=nl(r,i=>function(o,s){const{suppression:{forbiddenMatches:a,allowedMatches:l}}=s,u=rc(a,c=>zs(o,c)).filter(([c])=>!l.some(d=>c.match(d)!==null)).map(c=>({offset:c.index,matchedText:c[0]}));return Sl(o,u,()=>[{type:"suppressed",text:"CONTACT_INFORMATION_HIDDEN"}])}(i,t)),r=nl(r,i=>function(o){return Sl(o,function(s){const a=[];let l;for(;l=zO.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=nl(r,i=>function(o,s){if(s.contactInfo!=="suppress")return[o];const a=[];if((s.suppression.suppressEmailAddresses||s.suppression.suppressLinks)&&a.push(XE),s.suppression.suppressPhoneNumbers&&a.push(GE),a.length===0)return[o];const l=KE(o,{multilineSteps:[],singlelineSteps:a}),u=l.map(c=>typeof c=="string"?c:lp(c.url,s.suppression)?c.text:{type:"suppressed",text:"CONTACT_INFORMATION_HIDDEN"});return sc(u)}(i,t)),r}switch(e.type){case"bold":case"italic":case"strikethrough":case"blockquote":case"bulletlist":case"bulletList":case"bulletpoint":case"bulletPoint":return{type:e.type,children:Qo(e.children,t)};case"codespan":case"codeSpan":case"codeblock":case"codeBlock":case"suppressed":case"emoji":case"customemoji":case"customEmoji":return e;case"mention":return{type:"mention",id:e.id,text:e.text};case"autolink":case"autoLink":return function(r,i){return i.contactInfo==="link"?r:i.contactInfo==="suppress"?lp(r.url,i.suppression)?r:{type:"suppressed",text:"CONTACT_INFORMATION_HIDDEN"}:r.text}(e,t);case"link":return{type:"link",url:e.url,children:Qo(e.children,t)};case"actionlink":case"actionLink":case"actionbutton":case"actionButton":return{type:e.type,action:e.action,params:e.params,children:Qo(e.children,t)}}})}function nl(n,t){return rc(n,e=>typeof e=="string"?t(e):[e])}function lp(n,t){if(t.allowedMatches.some(e=>n.match(e)!==null))return!0;if(t.forbiddenMatches.some(e=>n.match(e)!==null))return!1;if(n.startsWith("mailto:")){const e=n.substring(7).replace(/^.*@/,"");return!t.suppressEmailAddresses||up(t.allowedHostnames,e)}if(n.startsWith("tel:")){const e=n.substring(4).replace(/[^0-9]/g,"");return!t.suppressPhoneNumbers||t.allowedPhoneNrs.some(r=>e.endsWith(r))}{const e=Om(n);return!t.suppressLinks||!e||up(t.allowedHostnames,e)}}function up(n,t){for(const e of n)if(lg(e).test(t))return!0;return!1}function cc({block:n,nonInteractive:t,message:e,className:r=""}){const i=!t,{nodes:o,roleOptions:s}=function(l,u){var _;const c=ft(),d=it(c.app$.role);pt.defined(d);const h=u.type==="UserMessage",p=((_=u.sender)==null?void 0:_.id)===c.extUserId$.peek(),f=d.suppressContactInfo,m=h&&f.shouldSuppress({isContentBySender:p}),E=eT(l.children,{contactInfo:m?"suppress":"link",suppression:f}),g={sameTabLinkRules:d.sameTabLinkRules,contactInfoHiddenText:d.suppressContactInfo.replacement||`(${c.t$.peek().CONTACT_INFORMATION_HIDDEN})`};return{nodes:E,roleOptions:g}}(n,e),a=function(l,u={},c){return Wr(l,{...uc(u),message:c})}(o,{enableEmojiImageFallback:!0,formattedLinks:i?"link":"plaintext",enableActions:i,...s},e);return dt("span",{className:`t-text ${r}`},...a)}function cg(n){const t=ke(),e=ft(),{className:r="",...i}=n,o=it(()=>e.state$.messages.child(e.state$.extCurrentConversationId.get()).lookup.child(n.message.id).content.child(0).url.get());return y("div",{className:`t-message-content ${r}`,children:n.message.content.map(s=>{var a;return y(nT,{block:s,theme:t,downloadUrl:o,...i},n.message.createdAt+((a=n.message.editedAt)!=null?a:0))})})}function nT({common:n,block:t,message:e,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:pt.never(a)}}(r,t);return y(o,{block:t,common:n,message:e,downloadUrl:i})}const rT=27;function Ao(n,t,e=!0){const r=et(o=>{o.keyCode===rT&&n()},[n]),i=et(o=>{o.target.closest(t)===null&&n()},[t,n]);G(()=>{if(e)return window.addEventListener("keydown",r,!0),document.addEventListener("mousedown",i,!0),()=>{window.removeEventListener("keydown",r,!0),document.removeEventListener("mousedown",i,!0)}},[r,i,e])}const iT=".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 dg(n){const[t,e]=at();return G(()=>{let r=!0;return n().then(i=>{r&&e({value:i})}),()=>{r=!1}},[n]),t}function dc(n){const{onClose:t,onEmojiSelected:e}=D_(),r=tt(null),i=dg(Bu);return G(()=>{if(!i)return;pt.defined(r.current);const o=r.current,s=o.shadowRoot;(function(u,c){const d=document.createElement("style");d.textContent=c,u.appendChild(d)})(s,iT);const a=u=>{var d;const c=(d=u.detail.unicode)!=null?d:u.detail.name;e(c)};function l(u){u.pointerType==="mouse"&&(s.querySelector("section").dataset.hasMouse="true")}return o.addEventListener("emoji-click",a),o.addEventListener("pointermove",l,{once:!0}),()=>{o.removeEventListener("emoji-click",a),o.removeEventListener("pointermove",l)}},[i,e]),G(()=>{var o;i&&r.current&&((o=r.current.shadowRoot.getElementById("search"))==null||o.focus())},[i]),Ao(()=>t(),".t-emoji-picker"),y("div",i?{className:"t-emoji-picker",children:y("emoji-picker",{ref:r,class:n.colorScheme})}:{className:"t-emoji-picker","t-loading":"",children:y(ac,{})})}function hg({messageId:n,colorScheme:t}){const{closePopover:e}=Uu(),r=Eo();return y("div",{className:"t-reaction-picker",children:y(fm.Provider,{value:{onClose:e,onEmojiSelected:i=>{r.addReaction(n,i),e()}},children:y(dc,{colorScheme:t})})})}function tu(){return tu=Object.assign||function(n){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r])}return n},tu.apply(this,arguments)}function pg(n,t){if(n==null)return{};var e,r,i={},o=Object.keys(n);for(r=0;r<o.length;r++)e=o[r],t.indexOf(e)>=0||(i[e]=n[e]);return i}function eu(n,t){return eu=Object.setPrototypeOf||function(e,r){return e.__proto__=r,e},eu(n,t)}function fg(n,t){n.prototype=Object.create(t.prototype),n.prototype.constructor=n,eu(n,t)}function mg(){}function Eg(){}Eg.resetWarningCache=mg;function cp(n,t){return n.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}(function(){function n(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 t(){return n}n.isRequired=n;var e={array:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:t,element:n,elementType:n,instanceOf:t,node:n,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Eg,resetWarningCache:mg};e.PropTypes=e})();const dp=!1,gg=he.createContext(null);var Ci="unmounted",xn="exited",Pn="entering",gr="entered",nu="exiting",Ze=function(n){function t(r,i){var o;o=n.call(this,r,i)||this;var s,a=i&&!i.isMounting?r.enter:r.appear;return o.appearStatus=null,r.in?a?(s=xn,o.appearStatus=Pn):s=gr:s=r.unmountOnExit||r.mountOnEnter?Ci:xn,o.state={status:s},o.nextCallback=null,o}fg(t,n),t.getDerivedStateFromProps=function(r,i){return r.in&&i.status===Ci?{status:xn}:null};var e=t.prototype;return e.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},e.componentDidUpdate=function(r){var i=null;if(r!==this.props){var o=this.state.status;this.props.in?o!==Pn&&o!==gr&&(i=Pn):o!==Pn&&o!==gr||(i=nu)}this.updateStatus(!1,i)},e.componentWillUnmount=function(){this.cancelNextCallback()},e.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}},e.updateStatus=function(r,i){r===void 0&&(r=!1),i!==null?(this.cancelNextCallback(),i===Pn?this.performEnter(r):this.performExit()):this.props.unmountOnExit&&this.state.status===xn&&this.setState({status:Ci})},e.performEnter=function(r){var i=this,o=this.props.enter,s=this.context?this.context.isMounting:r,a=this.props.nodeRef?[s]:[he.findDOMNode(this),s],l=a[0],u=a[1],c=this.getTimeouts(),d=s?c.appear:c.enter;!r&&!o||dp?this.safeSetState({status:gr},function(){i.props.onEntered(l)}):(this.props.onEnter(l,u),this.safeSetState({status:Pn},function(){i.props.onEntering(l,u),i.onTransitionEnd(d,function(){i.safeSetState({status:gr},function(){i.props.onEntered(l,u)})})}))},e.performExit=function(){var r=this,i=this.props.exit,o=this.getTimeouts(),s=this.props.nodeRef?void 0:he.findDOMNode(this);i&&!dp?(this.props.onExit(s),this.safeSetState({status:nu},function(){r.props.onExiting(s),r.onTransitionEnd(o.exit,function(){r.safeSetState({status:xn},function(){r.props.onExited(s)})})})):this.safeSetState({status:xn},function(){r.props.onExited(s)})},e.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},e.safeSetState=function(r,i){i=this.setNextCallback(i),this.setState(r,i)},e.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},e.onTransitionEnd=function(r,i){this.setNextCallback(i);var o=this.props.nodeRef?this.props.nodeRef.current:he.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)},e.render=function(){var r=this.state.status;if(r===Ci)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=pg(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return he.createElement(gg.Provider,{value:null},typeof o=="function"?o(r,s):he.cloneElement(he.Children.only(o),s))},t}(he.Component);function hr(){}Ze.contextType=gg,Ze.propTypes={},Ze.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:hr,onEntering:hr,onEntered:hr,onExit:hr,onExiting:hr,onExited:hr},Ze.UNMOUNTED=Ci,Ze.EXITED=xn,Ze.ENTERING=Pn,Ze.ENTERED=gr,Ze.EXITING=nu;var rl=function(n,t){return n&&t&&t.split(" ").forEach(function(e){return i=e,void((r=n).classList?r.classList.remove(i):typeof r.className=="string"?r.className=cp(r.className,i):r.setAttribute("class",cp(r.className&&r.className.baseVal||"",i)));var r,i})},ru=function(n){function t(){for(var r,i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return(r=n.call.apply(n,[this].concat(o))||this).appliedClasses={appear:{},enter:{},exit:{}},r.onEnter=function(a,l){var u=r.resolveArguments(a,l),c=u[0],d=u[1];r.removeClasses(c,"exit"),r.addClass(c,d?"appear":"enter","base"),r.props.onEnter&&r.props.onEnter(a,l)},r.onEntering=function(a,l){var u=r.resolveArguments(a,l),c=u[0],d=u[1]?"appear":"enter";r.addClass(c,d,"active"),r.props.onEntering&&r.props.onEntering(a,l)},r.onEntered=function(a,l){var u=r.resolveArguments(a,l),c=u[0],d=u[1]?"appear":"enter";r.removeClasses(c,d),r.addClass(c,d,"done"),r.props.onEntered&&r.props.onEntered(a,l)},r.onExit=function(a){var l=r.resolveArguments(a)[0];r.removeClasses(l,"appear"),r.removeClasses(l,"enter"),r.addClass(l,"exit","base"),r.props.onExit&&r.props.onExit(a)},r.onExiting=function(a){var l=r.resolveArguments(a)[0];r.addClass(l,"exit","active"),r.props.onExiting&&r.props.onExiting(a)},r.onExited=function(a){var l=r.resolveArguments(a)[0];r.removeClasses(l,"exit"),r.addClass(l,"exit","done"),r.props.onExited&&r.props.onExited(a)},r.resolveArguments=function(a,l){return r.props.nodeRef?[r.props.nodeRef.current,a]:[a,l]},r.getClassNames=function(a){var l=r.props.classNames,u=typeof l=="string",c=u?(u&&l?l+"-":"")+a:l[a];return{baseClassName:c,activeClassName:u?c+"-active":l[a+"Active"],doneClassName:u?c+"-done":l[a+"Done"]}},r}fg(t,n);var e=t.prototype;return e.addClass=function(r,i,o){var s=this.getClassNames(i)[o+"ClassName"],a=this.getClassNames("enter").doneClassName;i==="appear"&&o==="done"&&a&&(s+=" "+a),o==="active"&&r&&r.scrollTop,s&&(this.appliedClasses[i][o]=s,function(l,u){l&&u&&u.split(" ").forEach(function(c){return h=c,void((d=l).classList?d.classList.add(h):function(p,f){return p.classList?!!f&&p.classList.contains(f):(" "+(p.className.baseVal||p.className)+" ").indexOf(" "+f+" ")!==-1}(d,h)||(typeof d.className=="string"?d.className=d.className+" "+h:d.setAttribute("class",(d.className&&d.className.baseVal||"")+" "+h)));var d,h})}(r,s))},e.removeClasses=function(r,i){var o=this.appliedClasses[i],s=o.base,a=o.active,l=o.done;this.appliedClasses[i]={},s&&rl(r,s),a&&rl(r,a),l&&rl(r,l)},e.render=function(){var r=this.props;r.classNames;var i=pg(r,["classNames"]);return he.createElement(Ze,tu({},i,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(he.Component);ru.defaultProps={classNames:""},ru.propTypes={};const oT={ltr:["ArrowLeft","ArrowRight"],rtl:["ArrowRight","ArrowLeft"],ttb:["ArrowUp","ArrowDown"]};function Dg(n,{focused:t,setFocused:e,itemCount:r,dir:i,onConfirm:o,onSpace:s}){if(r===0)return!1;const a=c=>{var d,h,p;d=0,h=c,p=r-1,c=Math.max(d,Math.min(h,p)),e(c)},[l,u]=oT[i];switch(n){case l:return a(t-1),!0;case u:return a(t+1),!0;case" ":return!!s&&s();case"Enter":case"Tab":return o(),!0}return!1}function _g({focused:n,setFocused:t,buttonId:e}){ge(()=>{var a;const s=e(n);s&&((a=document.getElementById(s))==null||a.scrollIntoView({block:"nearest"}))},[n,e]);const r=et(s=>{const a=s.currentTarget.dataset.index;t(+a)},[t]),i=Q(()=>({role:"menu","aria-activedescendant":e(n)}),[n,e]),o=et(s=>({onMouseMove:r,id:e(s),"data-index":s}),[r,e]);return{containerProps:i,itemProps:o}}function Ag(n){const[t,e]=at([]),[r,i]=at([]),[o,s]=at(0),[a,l]=at(0),u=dg(Bu),c=Q(()=>u&&new u.value.Database({}),[u]),d=fo(),h=it(d.state$.suggestEmojiQuery);G(()=>{c&&(h?async function(){const _=await c.getPreferredSkinTone();l(_);let A=await c.getEmojiBySearchQuery(h);if(A=A.filter(T=>T.url||function(S){return S.version<=Dm&&!aT.includes(S.unicode)}(T)),function(T,S){S.sort((v,C)=>{var O,k;const R=(O=v.shortcodes)==null?void 0:O.find(w=>w.startsWith(T)),D=(k=C.shortcodes)==null?void 0:k.find(w=>w.startsWith(T));return R&&!D?-1:!R&&D?1:R&&D?R.length-D.length:0})}(h.substring(1),A),s(0),e(A),A.length>0&&i(A),h.endsWith(":")){const T=h.slice(1,-1),S=A.find(v=>{var C;return(C=v.shortcodes)==null?void 0:C.includes(T)});S&&d.selectEmoji(yi(S,_))}}():e([]))},[h,d,c]);const p=et(_=>{const A=t[_];return A&&"emoji-button-"+yi(A,a)},[t,a]),{containerProps:f,itemProps:m}=_g({focused:o,setFocused:s,buttonId:p}),E=t.length>0;Ao(()=>d.closeSuggester(),".t-emoji-suggest-bar",E),G(()=>{if(E)return d.listenKeydown("emoji",_=>Dg(_,{dir:"ltr",focused:o,setFocused:s,itemCount:t.length,onConfirm(){const A=t[o];pt.defined(A),d.selectEmoji(yi(A,a))}})),()=>{d.listenKeydown("emoji",void 0)};d.listenKeydown("emoji",void 0)},[d,t,o,E,a]);const g=tt(null);return y(ru,{in:E,timeout:100,classNames:"slide",mountOnEnter:!0,unmountOnExit:!0,nodeRef:g,children:y("div",{className:"t-emoji-suggest-bar",ref:g,...f,children:r.map((_,A)=>y(sT,{emoji:_,skinTone:a,focused:A===o,onSelect:T=>d.selectEmoji(T),...m(A)},yi(_,a)))})})}function yi(n,t){return iu(n)?Og(n,t):n.name}function iu(n){return!!n.unicode}function sT(n){var l;const{emoji:t,focused:e,skinTone:r,onSelect:i,...o}=n,s=((l=t.shortcodes)!=null?l:[]).join(", "),a=iu(t)?[t.unicode,s].join(", "):s;return y("button",{"t-focused":e?"":void 0,title:s,"aria-label":a,onClick:()=>i(yi(t,r)),...o,children:iu(t)?Og(t,r):null})}function Og(n,t){var r,i;const e=(r=n.skins)==null?void 0:r.find(o=>o.tone===t);return(i=e==null?void 0:e.unicode)!=null?i:n.unicode}const aT=["🏻","🏼","🏽","🏾","🏿"],lT=["top","right","bottom","left"],ou=Math.min,Lr=Math.max,ys=Math.round,Ho=Math.floor,Ye=n=>({x:n,y:n}),uT={left:"right",right:"left",bottom:"top",top:"bottom"},cT={start:"end",end:"start"};function hc(n,t){return typeof n=="function"?n(t):n}function no(n){return n.split("-")[0]}function pc(n){return n.split("-")[1]}function Tg(n){return n==="y"?"height":"width"}const dT=new Set(["top","bottom"]);function Sr(n){return dT.has(no(n))?"y":"x"}function Sg(n){return Sr(n)==="x"?"y":"x"}function su(n){return n.replace(/start|end/g,t=>cT[t])}const hp=["left","right"],pp=["right","left"],hT=["top","bottom"],pT=["bottom","top"];function fT(n,t,e,r){const i=pc(n);let o=function(s,a,l){switch(s){case"top":case"bottom":return l?a?pp:hp:a?hp:pp;case"left":case"right":return a?hT:pT;default:return[]}}(no(n),e==="start",r);return i&&(o=o.map(s=>s+"-"+i),t&&(o=o.concat(o.map(su)))),o}function Uo(n){return n.replace(/left|right|bottom|top/g,t=>uT[t])}function Is(n){const{x:t,y:e,width:r,height:i}=n;return{width:r,height:i,top:e,left:t,right:t+r,bottom:e+i,x:t,y:e}}function fp(n,t,e){let{reference:r,floating:i}=n;const o=Sr(t),s=Sg(t),a=Tg(s),l=no(t),u=o==="y",c=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,h=r[a]/2-i[a]/2;let p;switch(l){case"top":p={x:c,y:r.y-i.height};break;case"bottom":p={x:c,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(pc(t)){case"start":p[s]-=h*(e&&u?-1:1);break;case"end":p[s]+=h*(e&&u?-1:1)}return p}async function au(n,t){var e;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:s,elements:a,strategy:l}=n,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:h=!1,padding:p=0}=hc(t,n),f=function(S){return typeof S!="number"?function(v){return{top:0,right:0,bottom:0,left:0,...v}}(S):{top:S,right:S,bottom:S,left:S}}(p),m=a[h?d==="floating"?"reference":"floating":d],E=Is(await o.getClippingRect({element:(e=await(o.isElement==null?void 0:o.isElement(m)))==null||e?m:m.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),g=d==="floating"?{x:r,y:i,width:s.floating.width,height:s.floating.height}:s.reference,_=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),A=await(o.isElement==null?void 0:o.isElement(_))&&await(o.getScale==null?void 0:o.getScale(_))||{x:1,y:1},T=Is(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:_,strategy:l}):g);return{top:(E.top-T.top+f.top)/A.y,bottom:(T.bottom-E.bottom+f.bottom)/A.y,left:(E.left-T.left+f.left)/A.x,right:(T.right-E.right+f.right)/A.x}}function mp(n,t){return{top:n.top-t.height,right:n.right-t.width,bottom:n.bottom-t.height,left:n.left-t.width}}function Ep(n){return lT.some(t=>n[t]>=0)}function ta(){return typeof window!="undefined"}function Kr(n){return vg(n)?(n.nodeName||"").toLowerCase():"#document"}function me(n){var t;return(n==null||(t=n.ownerDocument)==null?void 0:t.defaultView)||window}function Ve(n){var t;return(t=(vg(n)?n.ownerDocument:n.document)||window.document)==null?void 0:t.documentElement}function vg(n){return!!ta()&&(n instanceof Node||n instanceof me(n).Node)}function ye(n){return!!ta()&&(n instanceof Element||n instanceof me(n).Element)}function Ge(n){return!!ta()&&(n instanceof HTMLElement||n instanceof me(n).HTMLElement)}function gp(n){return!(!ta()||typeof ShadowRoot=="undefined")&&(n instanceof ShadowRoot||n instanceof me(n).ShadowRoot)}const mT=new Set(["inline","contents"]);function ro(n){const{overflow:t,overflowX:e,overflowY:r,display:i}=Ie(n);return/auto|scroll|overlay|hidden|clip/.test(t+r+e)&&!mT.has(i)}const ET=new Set(["table","td","th"]);function gT(n){return ET.has(Kr(n))}const DT=[":popover-open",":modal"];function Rs(n){return DT.some(t=>{try{return n.matches(t)}catch(e){return!1}})}const _T=["transform","translate","scale","rotate","perspective"],AT=["transform","translate","scale","rotate","perspective","filter"],OT=["paint","layout","strict","content"];function lu(n){const t=fc(),e=ye(n)?Ie(n):n;return _T.some(r=>!!e[r]&&e[r]!=="none")||!!e.containerType&&e.containerType!=="normal"||!t&&!!e.backdropFilter&&e.backdropFilter!=="none"||!t&&!!e.filter&&e.filter!=="none"||AT.some(r=>(e.willChange||"").includes(r))||OT.some(r=>(e.contain||"").includes(r))}function fc(){return!(typeof CSS=="undefined"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const TT=new Set(["html","body","#document"]);function br(n){return TT.has(Kr(n))}function Ie(n){return me(n).getComputedStyle(n)}function ea(n){return ye(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function Tn(n){if(Kr(n)==="html")return n;const t=n.assignedSlot||n.parentNode||gp(n)&&n.host||Ve(n);return gp(t)?t.host:t}function Ng(n){const t=Tn(n);return br(t)?n.ownerDocument?n.ownerDocument.body:n.body:Ge(t)&&ro(t)?t:Ng(t)}function io(n,t,e){var r;t===void 0&&(t=[]),e===void 0&&(e=!0);const i=Ng(n),o=i===((r=n.ownerDocument)==null?void 0:r.body),s=me(i);if(o){const a=uu(s);return t.concat(s,s.visualViewport||[],ro(i)?i:[],a&&e?io(a):[])}return t.concat(i,io(i,[],e))}function uu(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function Cg(n){const t=Ie(n);let e=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Ge(n),o=i?n.offsetWidth:e,s=i?n.offsetHeight:r,a=ys(e)!==o||ys(r)!==s;return a&&(e=o,r=s),{width:e,height:r,$:a}}function mc(n){return ye(n)?n:n.contextElement}function kr(n){const t=mc(n);if(!Ge(t))return Ye(1);const e=t.getBoundingClientRect(),{width:r,height:i,$:o}=Cg(t);let s=(o?ys(e.width):e.width)/r,a=(o?ys(e.height):e.height)/i;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const ST=Ye(0);function yg(n){const t=me(n);return fc()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:ST}function ir(n,t,e,r){t===void 0&&(t=!1),e===void 0&&(e=!1);const i=n.getBoundingClientRect(),o=mc(n);let s=Ye(1);t&&(r?ye(r)&&(s=kr(r)):s=kr(n));const a=function(h,p,f){return p===void 0&&(p=!1),!(!f||p&&f!==me(h))&&p}(o,e,r)?yg(o):Ye(0);let l=(i.left+a.x)/s.x,u=(i.top+a.y)/s.y,c=i.width/s.x,d=i.height/s.y;if(o){const h=me(o),p=r&&ye(r)?me(r):r;let f=h,m=uu(f);for(;m&&r&&p!==f;){const E=kr(m),g=m.getBoundingClientRect(),_=Ie(m),A=g.left+(m.clientLeft+parseFloat(_.paddingLeft))*E.x,T=g.top+(m.clientTop+parseFloat(_.paddingTop))*E.y;l*=E.x,u*=E.y,c*=E.x,d*=E.y,l+=A,u+=T,f=me(m),m=uu(f)}}return Is({width:c,height:d,x:l,y:u})}function Ls(n,t){const e=ea(n).scrollLeft;return t?t.left+e:ir(Ve(n)).left+e}function Ig(n,t){const e=n.getBoundingClientRect();return{x:e.left+t.scrollLeft-Ls(n,e),y:e.top+t.scrollTop}}const vT=new Set(["absolute","fixed"]);function Dp(n,t,e){let r;if(t==="viewport")r=function(i,o){const s=me(i),a=Ve(i),l=s.visualViewport;let u=a.clientWidth,c=a.clientHeight,d=0,h=0;if(l){u=l.width,c=l.height;const f=fc();(!f||f&&o==="fixed")&&(d=l.offsetLeft,h=l.offsetTop)}const p=Ls(a);if(p<=0){const f=a.ownerDocument,m=f.body,E=getComputedStyle(m),g=f.compatMode==="CSS1Compat"&&parseFloat(E.marginLeft)+parseFloat(E.marginRight)||0,_=Math.abs(a.clientWidth-m.clientWidth-g);_<=25&&(u-=_)}else p<=25&&(u+=p);return{width:u,height:c,x:d,y:h}}(n,e);else if(t==="document")r=function(i){const o=Ve(i),s=ea(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+Ls(i);const d=-s.scrollTop;return Ie(a).direction==="rtl"&&(c+=Lr(o.clientWidth,a.clientWidth)-l),{width:l,height:u,x:c,y:d}}(Ve(n));else if(ye(t))r=function(i,o){const s=ir(i,!0,o==="fixed"),a=s.top+i.clientTop,l=s.left+i.clientLeft,u=Ge(i)?kr(i):Ye(1);return{width:i.clientWidth*u.x,height:i.clientHeight*u.y,x:l*u.x,y:a*u.y}}(t,e);else{const i=yg(n);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Is(r)}function Rg(n,t){const e=Tn(n);return!(e===t||!ye(e)||br(e))&&(Ie(e).position==="fixed"||Rg(e,t))}function NT(n,t,e){const r=Ge(t),i=Ve(t),o=e==="fixed",s=ir(n,!0,o,t);let a={scrollLeft:0,scrollTop:0};const l=Ye(0);function u(){l.x=Ls(i)}if(r||!r&&!o)if((Kr(t)!=="body"||ro(i))&&(a=ea(t)),r){const d=ir(t,!0,o,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else i&&u();o&&!r&&i&&u();const c=!i||r||o?Ye(0):Ig(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 il(n){return Ie(n).position==="static"}function _p(n,t){if(!Ge(n)||Ie(n).position==="fixed")return null;if(t)return t(n);let e=n.offsetParent;return Ve(n)===e&&(e=e.ownerDocument.body),e}function Ap(n,t){const e=me(n);if(Rs(n))return e;if(!Ge(n)){let i=Tn(n);for(;i&&!br(i);){if(ye(i)&&!il(i))return i;i=Tn(i)}return e}let r=_p(n,t);for(;r&&gT(r)&&il(r);)r=_p(r,t);return r&&br(r)&&il(r)&&!lu(r)?e:r||function(i){let o=Tn(i);for(;Ge(o)&&!br(o);){if(lu(o))return o;if(Rs(o))return null;o=Tn(o)}return null}(n)||e}const CT={convertOffsetParentRelativeRectToViewportRelativeRect:function(n){let{elements:t,rect:e,offsetParent:r,strategy:i}=n;const o=i==="fixed",s=Ve(r),a=!!t&&Rs(t.floating);if(r===s||a&&o)return e;let l={scrollLeft:0,scrollTop:0},u=Ye(1);const c=Ye(0),d=Ge(r);if((d||!d&&!o)&&((Kr(r)!=="body"||ro(s))&&(l=ea(r)),Ge(r))){const p=ir(r);u=kr(r),c.x=p.x+r.clientLeft,c.y=p.y+r.clientTop}const h=!s||d||o?Ye(0):Ig(s,l);return{width:e.width*u.x,height:e.height*u.y,x:e.x*u.x-l.scrollLeft*u.x+c.x+h.x,y:e.y*u.y-l.scrollTop*u.y+c.y+h.y}},getDocumentElement:Ve,getClippingRect:function(n){let{element:t,boundary:e,rootBoundary:r,strategy:i}=n;const o=e==="clippingAncestors"?Rs(t)?[]:function(u,c){const d=c.get(u);if(d)return d;let h=io(u,[],!1).filter(E=>ye(E)&&Kr(E)!=="body"),p=null;const f=Ie(u).position==="fixed";let m=f?Tn(u):u;for(;ye(m)&&!br(m);){const E=Ie(m),g=lu(m);g||E.position!=="fixed"||(p=null),(f?!g&&!p:!g&&E.position==="static"&&p&&vT.has(p.position)||ro(m)&&!g&&Rg(u,m))?h=h.filter(_=>_!==m):p=E,m=Tn(m)}return c.set(u,h),h}(t,this._c):[].concat(e),s=[...o,r],a=s[0],l=s.reduce((u,c)=>{const d=Dp(t,c,i);return u.top=Lr(d.top,u.top),u.right=ou(d.right,u.right),u.bottom=ou(d.bottom,u.bottom),u.left=Lr(d.left,u.left),u},Dp(t,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:Ap,getElementRects:async function(n){const t=this.getOffsetParent||Ap,e=this.getDimensions,r=await e(n.floating);return{reference:NT(n.reference,await t(n.floating),n.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(n){return Array.from(n.getClientRects())},getDimensions:function(n){const{width:t,height:e}=Cg(n);return{width:t,height:e}},getScale:kr,isElement:ye,isRTL:function(n){return Ie(n).direction==="rtl"}};function Op(n,t){return n.x===t.x&&n.y===t.y&&n.width===t.width&&n.height===t.height}function yT(n,t,e,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=mc(n),c=i||o?[...u?io(u):[],...io(t)]:[];c.forEach(E=>{i&&E.addEventListener("scroll",e,{passive:!0}),o&&E.addEventListener("resize",e)});const d=u&&a?function(E,g){let _,A=null;const T=Ve(E);function S(){var v;clearTimeout(_),(v=A)==null||v.disconnect(),A=null}return function v(C,R){C===void 0&&(C=!1),R===void 0&&(R=1),S();const D=E.getBoundingClientRect(),{left:O,top:k,width:w,height:U}=D;if(C||g(),!w||!U)return;const I={rootMargin:-Ho(k)+"px "+-Ho(T.clientWidth-(O+w))+"px "+-Ho(T.clientHeight-(k+U))+"px "+-Ho(O)+"px",threshold:Lr(0,ou(1,R))||1};let F=!0;function j($){const X=$[0].intersectionRatio;if(X!==R){if(!F)return v();X?v(!1,X):_=setTimeout(()=>{v(!1,1e-7)},1e3)}X!==1||Op(D,E.getBoundingClientRect())||v(),F=!1}try{A=new IntersectionObserver(j,{...I,root:T.ownerDocument})}catch($){A=new IntersectionObserver(j,I)}A.observe(E)}(!0),S}(u,e):null;let h,p=-1,f=null;s&&(f=new ResizeObserver(E=>{let[g]=E;g&&g.target===u&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var _;(_=f)==null||_.observe(t)})),e()}),u&&!l&&f.observe(u),f.observe(t));let m=l?ir(n):null;return l&&function E(){const g=ir(n);m&&!Op(m,g)&&e(),m=g,h=requestAnimationFrame(E)}(),e(),()=>{var E;c.forEach(g=>{i&&g.removeEventListener("scroll",e),o&&g.removeEventListener("resize",e)}),d==null||d(),(E=f)==null||E.disconnect(),f=null,l&&cancelAnimationFrame(h)}}const IT=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(t){var e,r;const{placement:i,middlewareData:o,rects:s,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:m=!0,...E}=hc(n,t);if((e=o.arrow)!=null&&e.alignmentOffset)return{};const g=no(i),_=Sr(a),A=no(a)===a,T=await(l.isRTL==null?void 0:l.isRTL(u.floating)),S=h||(A||!m?[Uo(a)]:function(I){const F=Uo(I);return[su(I),F,su(F)]}(a)),v=f!=="none";!h&&v&&S.push(...fT(a,m,f,T));const C=[a,...S],R=await au(t,E),D=[];let O=((r=o.flip)==null?void 0:r.overflows)||[];if(c&&D.push(R[g]),d){const I=function(F,j,$){$===void 0&&($=!1);const X=pc(F),V=Sg(F),z=Tg(V);let q=V==="x"?X===($?"end":"start")?"right":"left":X==="start"?"bottom":"top";return j.reference[z]>j.floating[z]&&(q=Uo(q)),[q,Uo(q)]}(i,s,T);D.push(R[I[0]],R[I[1]])}if(O=[...O,{placement:i,overflows:D}],!D.every(I=>I<=0)){var k,w;const I=(((k=o.flip)==null?void 0:k.index)||0)+1,F=C[I];if(F&&(!(d==="alignment"&&_!==Sr(F))||O.every($=>Sr($.placement)!==_||$.overflows[0]>0)))return{data:{index:I,overflows:O},reset:{placement:F}};let j=(w=O.filter($=>$.overflows[0]<=0).sort(($,X)=>$.overflows[1]-X.overflows[1])[0])==null?void 0:w.placement;if(!j)switch(p){case"bestFit":{var U;const $=(U=O.filter(X=>{if(v){const V=Sr(X.placement);return V===_||V==="y"}return!0}).map(X=>[X.placement,X.overflows.filter(V=>V>0).reduce((V,z)=>V+z,0)]).sort((X,V)=>X[1]-V[1])[0])==null?void 0:U[0];$&&(j=$);break}case"initialPlacement":j=a}if(i!==j)return{reset:{placement:j}}}return{}}}},RT=function(n){return n===void 0&&(n={}),{name:"hide",options:n,async fn(t){const{rects:e}=t,{strategy:r="referenceHidden",...i}=hc(n,t);switch(r){case"referenceHidden":{const o=mp(await au(t,{...i,elementContext:"reference"}),e.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Ep(o)}}}case"escaped":{const o=mp(await au(t,{...i,altBoundary:!0}),e.floating);return{data:{escapedOffsets:o,escaped:Ep(o)}}}default:return{}}}}},LT=(n,t,e)=>{const r=new Map,i={platform:CT,...e},o={...i.platform,_c:r};return(async(s,a,l)=>{const{placement:u="bottom",strategy:c="absolute",middleware:d=[],platform:h}=l,p=d.filter(Boolean),f=await(h.isRTL==null?void 0:h.isRTL(a));let m=await h.getElementRects({reference:s,floating:a,strategy:c}),{x:E,y:g}=fp(m,u,f),_=u,A={},T=0;for(let S=0;S<p.length;S++){const{name:v,fn:C}=p[S],{x:R,y:D,data:O,reset:k}=await C({x:E,y:g,initialPlacement:u,placement:_,strategy:c,middlewareData:A,rects:m,platform:h,elements:{reference:s,floating:a}});E=R!=null?R:E,g=D!=null?D:g,A={...A,[v]:{...A[v],...O}},k&&T<=50&&(T++,typeof k=="object"&&(k.placement&&(_=k.placement),k.rects&&(m=k.rects===!0?await h.getElementRects({reference:s,floating:a,strategy:c}):k.rects),{x:E,y:g}=fp(m,_,f)),S=-1)}return{x:E,y:g,placement:_,strategy:c,middlewareData:A}})(n,t,{...i,platform:o})};var ts=typeof document!="undefined"?ge:function(){};function bs(n,t){if(n===t)return!0;if(typeof n!=typeof t)return!1;if(typeof n=="function"&&n.toString()===t.toString())return!0;let e,r,i;if(n&&t&&typeof n=="object"){if(Array.isArray(n)){if(e=n.length,e!==t.length)return!1;for(r=e;r--!=0;)if(!bs(n[r],t[r]))return!1;return!0}if(i=Object.keys(n),e=i.length,e!==Object.keys(t).length)return!1;for(r=e;r--!=0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=e;r--!=0;){const o=i[r];if((o!=="_owner"||!n.$$typeof)&&!bs(n[o],t[o]))return!1}return!0}return n!=n&&t!=t}function Lg(n){return typeof window=="undefined"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function Tp(n,t){const e=Lg(n);return Math.round(t*e)/e}function ol(n){const t=tt(n);return ts(()=>{t.current=n}),t}const bT=(n,t)=>({...IT(n),options:[n,t]}),kT=(n,t)=>({...RT(n),options:[n,t]});var bg={exports:{}},kg=["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])"],ks=kg.join(","),wg=typeof Element=="undefined",or=wg?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,es=!wg&&Element.prototype.getRootNode?function(n){var t;return n==null||(t=n.getRootNode)===null||t===void 0?void 0:t.call(n)}:function(n){return n==null?void 0:n.ownerDocument},oo=function(n,t){var e;t===void 0&&(t=!0);var r=n==null||(e=n.getAttribute)===null||e===void 0?void 0:e.call(n,"inert");return r===""||r==="true"||t&&n&&oo(n.parentNode)},Fg=function(n,t,e){if(oo(n))return[];var r=Array.prototype.slice.apply(n.querySelectorAll(ks));return t&&or.call(n,ks)&&r.unshift(n),r=r.filter(e)},ws=function(n,t,e){for(var r=[],i=Array.from(n);i.length;){var o=i.shift();if(!oo(o,!1))if(o.tagName==="SLOT"){var s=o.assignedElements(),a=s.length?s:o.children,l=ws(a,!0,e);e.flatten?r.push.apply(r,l):r.push({scopeParent:o,candidates:l})}else{or.call(o,ks)&&e.filter(o)&&(t||!n.includes(o))&&r.push(o);var u=o.shadowRoot||typeof e.getShadowRoot=="function"&&e.getShadowRoot(o),c=!oo(u,!1)&&(!e.shadowRootFilter||e.shadowRootFilter(o));if(u&&c){var d=ws(u===!0?o.children:u.children,!0,e);e.flatten?r.push.apply(r,d):r.push({scopeParent:o,candidates:d})}else i.unshift.apply(i,o.children)}}return r},Mg=function(n){return!isNaN(parseInt(n.getAttribute("tabindex"),10))},An=function(n){if(!n)throw new Error("No node provided");return n.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(n.tagName)||function(t){var e,r=t==null||(e=t.getAttribute)===null||e===void 0?void 0:e.call(t,"contenteditable");return r===""||r==="true"}(n))&&!Mg(n)?0:n.tabIndex},wT=function(n,t){return n.tabIndex===t.tabIndex?n.documentOrder-t.documentOrder:n.tabIndex-t.tabIndex},xg=function(n){return n.tagName==="INPUT"},FT=function(n){return function(t){return xg(t)&&t.type==="radio"}(n)&&!function(t){if(!t.name)return!0;var e,r=t.form||es(t),i=function(s){return r.querySelectorAll('input[type="radio"][name="'+s+'"]')};if(typeof window!="undefined"&&window.CSS!==void 0&&typeof window.CSS.escape=="function")e=i(window.CSS.escape(t.name));else try{e=i(t.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]}(e,t.form);return!o||o===t}(n)},Sp=function(n){var t=n.getBoundingClientRect(),e=t.width,r=t.height;return e===0&&r===0},MT=function(n,t){var e=t.displayCheck,r=t.getShadowRoot;if(e==="full-native"&&"checkVisibility"in n)return!n.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if(getComputedStyle(n).visibility==="hidden")return!0;var i=or.call(n,"details>summary:first-of-type")?n.parentElement:n;if(or.call(i,"details:not([open]) *"))return!0;if(e&&e!=="full"&&e!=="full-native"&&e!=="legacy-full"){if(e==="non-zero-area")return Sp(n)}else{if(typeof r=="function"){for(var o=n;n;){var s=n.parentElement,a=es(n);if(s&&!s.shadowRoot&&r(s)===!0)return Sp(n);n=n.assignedSlot?n.assignedSlot:s||a===n.ownerDocument?s:a.host}n=o}if(function(l){var u,c,d,h,p=l&&es(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&&(d=c.ownerDocument)!==null&&d!==void 0&&d.contains(f)||l!=null&&(h=l.ownerDocument)!==null&&h!==void 0&&h.contains(l));!m&&f;){var E,g,_;m=!((g=f=(E=p=es(f))===null||E===void 0?void 0:E.host)===null||g===void 0||(_=g.ownerDocument)===null||_===void 0||!_.contains(f))}return m}(n))return!n.getClientRects().length;if(e!=="legacy-full")return!0}return!1},Fs=function(n,t){return!(t.disabled||oo(t)||function(e){return xg(e)&&e.type==="hidden"}(t)||MT(t,n)||function(e){return e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"})}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var r=e.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!!or.call(r,"fieldset[disabled] *")||!o.contains(e)}return!0}r=r.parentElement}return!1}(t))},cu=function(n,t){return!(FT(t)||An(t)<0||!Fs(n,t))},xT=function(n){var t=parseInt(n.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},Pg=function(n){var t=[],e=[];return n.forEach(function(r,i){var o=!!r.scopeParent,s=o?r.scopeParent:r,a=function(u,c){var d=An(u);return d<0&&c&&!Mg(u)?0:d}(s,o),l=o?Pg(r.candidates):s;a===0?o?t.push.apply(t,l):t.push(s):e.push({documentOrder:i,tabIndex:a,item:r,isScope:o,content:l})}),e.sort(wT).reduce(function(r,i){return i.isScope?r.push.apply(r,i.content):r.push(i.content),r},[]).concat(t)},Bg=function(n,t){var e;return e=(t=t||{}).getShadowRoot?ws([n],t.includeContainer,{filter:cu.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:xT}):Fg(n,t.includeContainer,cu.bind(null,t)),Pg(e)},Ec=function(n,t){return(t=t||{}).getShadowRoot?ws([n],t.includeContainer,{filter:Fs.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):Fg(n,t.includeContainer,Fs.bind(null,t))},Bn=function(n,t){if(t=t||{},!n)throw new Error("No node provided");return or.call(n,ks)!==!1&&cu(t,n)},PT=kg.concat("iframe").join(","),ns=function(n,t){if(t=t||{},!n)throw new Error("No node provided");return or.call(n,PT)!==!1&&Fs(t,n)};const BT=Object.freeze(Object.defineProperty({__proto__:null,focusable:Ec,getTabIndex:An,isFocusable:ns,isTabbable:Bn,tabbable:Bg},Symbol.toStringTag,{value:"Module"}));function sl(n,t){(t==null||t>n.length)&&(t=n.length);for(var e=0,r=Array(t);e<t;e++)r[e]=n[e];return r}function HT(n,t,e){return(t=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+""}(t))in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}function vp(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),e.push.apply(e,r)}return e}function Np(n){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?vp(Object(e),!0).forEach(function(r){HT(n,r,e[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):vp(Object(e)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(e,r))})}return n}function UT(n){return function(t){if(Array.isArray(t))return sl(t)}(n)||function(t){if(typeof Symbol!="undefined"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(n)||function(t,e){if(t){if(typeof t=="string")return sl(t,e);var r={}.toString.call(t).slice(8,-1);return r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set"?Array.from(t):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?sl(t,e):void 0}}(n)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
91
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}var $T=function(n,t){if(n.length>0){var e=n[n.length-1];e!==t&&e._setPausedState(!0)}var r=n.indexOf(t);r===-1||n.splice(r,1),n.push(t)},jT=function(n,t){var e=n.indexOf(t);e!==-1&&n.splice(e,1),n.length>0&&!n[n.length-1]._isManuallyPaused()&&n[n.length-1]._setPausedState(!1)},$i=function(n){return(n==null?void 0:n.key)==="Tab"||(n==null?void 0:n.keyCode)===9},YT=function(n){return $i(n)&&!n.shiftKey},VT=function(n){return $i(n)&&n.shiftKey},Cp=function(n){return setTimeout(n,0)},ci=function(n){for(var t=arguments.length,e=new Array(t>1?t-1:0),r=1;r<t;r++)e[r-1]=arguments[r];return typeof n=="function"?n.apply(void 0,e):n},$o=function(n){return n.target.shadowRoot&&typeof n.composedPath=="function"?n.composedPath()[0]:n.target},zT=[];const GT=Object.freeze(Object.defineProperty({__proto__:null,createFocusTrap:function(n,t){var e,r=(t==null?void 0:t.document)||document,i=(t==null?void 0:t.trapStack)||zT,o=Np({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:YT,isKeyBackward:VT},t),s={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,manuallyPaused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},a=function(D,O,k){return D&&D[O]!==void 0?D[O]:o[k||O]},l=function(D,O){var k=typeof(O==null?void 0:O.composedPath)=="function"?O.composedPath():void 0;return s.containerGroups.findIndex(function(w){var U=w.container,I=w.tabbableNodes;return U.contains(D)||(k==null?void 0:k.includes(U))||I.find(function(F){return F===D})})},u=function(D){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},k=O.hasFallback,w=k!==void 0&&k,U=O.params,I=U===void 0?[]:U,F=o[D];if(typeof F=="function"&&(F=F.apply(void 0,UT(I))),F===!0&&(F=void 0),!F){if(F===void 0||F===!1)return F;throw new Error("`".concat(D,"` was specified but was not a node, or did not return a node"))}var j=F;if(typeof F=="string"){try{j=r.querySelector(F)}catch($){throw new Error("`".concat(D,'` appears to be an invalid selector; error="').concat($.message,'"'))}if(!j&&!w)throw new Error("`".concat(D,"` as selector refers to no known node"))}return j},c=function(){var D=u("initialFocus",{hasFallback:!0});if(D===!1)return!1;if(D===void 0||D&&!ns(D,o.tabbableOptions))if(l(r.activeElement)>=0)D=r.activeElement;else{var O=s.tabbableGroups[0];D=O&&O.firstTabbableNode||u("fallbackFocus")}else D===null&&(D=u("fallbackFocus"));if(!D)throw new Error("Your focus-trap needs to have at least one focusable element");return D},d=function(){if(s.containerGroups=s.containers.map(function(D){var O=Bg(D,o.tabbableOptions),k=Ec(D,o.tabbableOptions),w=O.length>0?O[0]:void 0,U=O.length>0?O[O.length-1]:void 0,I=k.find(function($){return Bn($)}),F=k.slice().reverse().find(function($){return Bn($)}),j=!!O.find(function($){return An($)>0});return{container:D,tabbableNodes:O,focusableNodes:k,posTabIndexesFound:j,firstTabbableNode:w,lastTabbableNode:U,firstDomTabbableNode:I,lastDomTabbableNode:F,nextTabbableNode:function($){var X=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],V=O.indexOf($);return V<0?X?k.slice(k.indexOf($)+1).find(function(z){return Bn(z)}):k.slice(0,k.indexOf($)).reverse().find(function(z){return Bn(z)}):O[V+(X?1:-1)]}}}),s.tabbableGroups=s.containerGroups.filter(function(D){return D.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(D){return D.posTabIndexesFound})&&s.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},h=function(D){var O=D.activeElement;if(O)return O.shadowRoot&&O.shadowRoot.activeElement!==null?h(O.shadowRoot):O},p=function(D){D!==!1&&D!==h(document)&&(D&&D.focus?(D.focus({preventScroll:!!o.preventScroll}),s.mostRecentlyFocusedNode=D,function(O){return O.tagName&&O.tagName.toLowerCase()==="input"&&typeof O.select=="function"}(D)&&D.select()):p(c()))},f=function(D){var O=u("setReturnFocus",{params:[D]});return O||O!==!1&&D},m=function(D){var O=D.target,k=D.event,w=D.isBackward,U=w!==void 0&&w;O=O||$o(k),d();var I=null;if(s.tabbableGroups.length>0){var F=l(O,k),j=F>=0?s.containerGroups[F]:void 0;if(F<0)I=U?s.tabbableGroups[s.tabbableGroups.length-1].lastTabbableNode:s.tabbableGroups[0].firstTabbableNode;else if(U){var $=s.tabbableGroups.findIndex(function(ot){var M=ot.firstTabbableNode;return O===M});if($<0&&(j.container===O||ns(O,o.tabbableOptions)&&!Bn(O,o.tabbableOptions)&&!j.nextTabbableNode(O,!1))&&($=F),$>=0){var X=$===0?s.tabbableGroups.length-1:$-1,V=s.tabbableGroups[X];I=An(O)>=0?V.lastTabbableNode:V.lastDomTabbableNode}else $i(k)||(I=j.nextTabbableNode(O,!1))}else{var z=s.tabbableGroups.findIndex(function(ot){var M=ot.lastTabbableNode;return O===M});if(z<0&&(j.container===O||ns(O,o.tabbableOptions)&&!Bn(O,o.tabbableOptions)&&!j.nextTabbableNode(O))&&(z=F),z>=0){var q=z===s.tabbableGroups.length-1?0:z+1,J=s.tabbableGroups[q];I=An(O)>=0?J.firstTabbableNode:J.firstDomTabbableNode}else $i(k)||(I=j.nextTabbableNode(O))}}else I=u("fallbackFocus");return I},E=function(D){var O=$o(D);l(O,D)>=0||(ci(o.clickOutsideDeactivates,D)?e.deactivate({returnFocus:o.returnFocusOnDeactivate}):ci(o.allowOutsideClick,D)||D.preventDefault())},g=function(D){var O=$o(D),k=l(O,D)>=0;if(k||O instanceof Document)k&&(s.mostRecentlyFocusedNode=O);else{var w;D.stopImmediatePropagation();var U=!0;if(s.mostRecentlyFocusedNode)if(An(s.mostRecentlyFocusedNode)>0){var I=l(s.mostRecentlyFocusedNode),F=s.containerGroups[I].tabbableNodes;if(F.length>0){var j=F.findIndex(function($){return $===s.mostRecentlyFocusedNode});j>=0&&(o.isKeyForward(s.recentNavEvent)?j+1<F.length&&(w=F[j+1],U=!1):j-1>=0&&(w=F[j-1],U=!1))}}else s.containerGroups.some(function($){return $.tabbableNodes.some(function(X){return An(X)>0})})||(U=!1);else U=!1;U&&(w=m({target:s.mostRecentlyFocusedNode,isBackward:o.isKeyBackward(s.recentNavEvent)})),p(w||s.mostRecentlyFocusedNode||c())}s.recentNavEvent=void 0},_=function(D){(o.isKeyForward(D)||o.isKeyBackward(D))&&function(O){var k=arguments.length>1&&arguments[1]!==void 0&&arguments[1];s.recentNavEvent=O;var w=m({event:O,isBackward:k});w&&($i(O)&&O.preventDefault(),p(w))}(D,o.isKeyBackward(D))},A=function(D){(function(O){return(O==null?void 0:O.key)==="Escape"||(O==null?void 0:O.key)==="Esc"||(O==null?void 0:O.keyCode)===27})(D)&&ci(o.escapeDeactivates,D)!==!1&&(D.preventDefault(),e.deactivate())},T=function(D){var O=$o(D);l(O,D)>=0||ci(o.clickOutsideDeactivates,D)||ci(o.allowOutsideClick,D)||(D.preventDefault(),D.stopImmediatePropagation())},S=function(){if(s.active)return $T(i,e),s.delayInitialFocusTimer=o.delayInitialFocus?Cp(function(){p(c())}):p(c()),r.addEventListener("focusin",g,!0),r.addEventListener("mousedown",E,{capture:!0,passive:!1}),r.addEventListener("touchstart",E,{capture:!0,passive:!1}),r.addEventListener("click",T,{capture:!0,passive:!1}),r.addEventListener("keydown",_,{capture:!0,passive:!1}),r.addEventListener("keydown",A),e},v=function(){if(s.active)return r.removeEventListener("focusin",g,!0),r.removeEventListener("mousedown",E,!0),r.removeEventListener("touchstart",E,!0),r.removeEventListener("click",T,!0),r.removeEventListener("keydown",_,!0),r.removeEventListener("keydown",A),e},C=typeof window!="undefined"&&"MutationObserver"in window?new MutationObserver(function(D){D.some(function(O){return Array.from(O.removedNodes).some(function(k){return k===s.mostRecentlyFocusedNode})})&&p(c())}):void 0,R=function(){C&&(C.disconnect(),s.active&&!s.paused&&s.containers.map(function(D){C.observe(D,{subtree:!0,childList:!0})}))};return e={get active(){return s.active},get paused(){return s.paused},activate:function(D){if(s.active)return this;var O=a(D,"onActivate"),k=a(D,"onPostActivate"),w=a(D,"checkCanFocusTrap");w||d(),s.active=!0,s.paused=!1,s.nodeFocusedBeforeActivation=h(r),O==null||O();var U=function(){w&&d(),S(),R(),k==null||k()};return w?(w(s.containers.concat()).then(U,U),this):(U(),this)},deactivate:function(D){if(!s.active)return this;var O=Np({onDeactivate:o.onDeactivate,onPostDeactivate:o.onPostDeactivate,checkCanReturnFocus:o.checkCanReturnFocus},D);clearTimeout(s.delayInitialFocusTimer),s.delayInitialFocusTimer=void 0,v(),s.active=!1,s.paused=!1,R(),jT(i,e);var k=a(O,"onDeactivate"),w=a(O,"onPostDeactivate"),U=a(O,"checkCanReturnFocus"),I=a(O,"returnFocus","returnFocusOnDeactivate");k==null||k();var F=function(){Cp(function(){I&&p(f(s.nodeFocusedBeforeActivation)),w==null||w()})};return I&&U?(U(f(s.nodeFocusedBeforeActivation)).then(F,F),this):(F(),this)},pause:function(D){return s.active?(s.manuallyPaused=!0,this._setPausedState(!0,D)):this},unpause:function(D){return s.active?(s.manuallyPaused=!1,i[i.length-1]!==this?this:this._setPausedState(!1,D)):this},updateContainerElements:function(D){var O=[].concat(D).filter(Boolean);return s.containers=O.map(function(k){return typeof k=="string"?r.querySelector(k):k}),s.active&&d(),R(),this}},Object.defineProperties(e,{_isManuallyPaused:{value:function(){return s.manuallyPaused}},_setPausedState:{value:function(D,O){if(s.paused===D)return this;if(s.paused=D,D){var k=a(O,"onPause"),w=a(O,"onPostPause");k==null||k(),v(),R(),w==null||w()}else{var U=a(O,"onUnpause"),I=a(O,"onPostUnpause");U==null||U(),d(),S(),R(),I==null||I()}return this}}}),e.updateContainerElements(n),e}},Symbol.toStringTag,{value:"Module"})),XT=Hu(GT),WT=Hu(BT);function wr(n){return wr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wr(n)}var al,ll;function KT(n,t,e){return t&&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,Ug(s.key),s)}}(n.prototype,t),Object.defineProperty(n,"prototype",{writable:!1}),n}function qT(n,t,e){return t=Ms(t),function(r,i){if(i&&(wr(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)}(n,Hg()?Reflect.construct(t,e||[],Ms(n).constructor):t.apply(n,e))}function Hg(){try{var n=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Hg=function(){return!!n})()}function Ms(n){return Ms=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ms(n)}function du(n,t){return du=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,r){return e.__proto__=r,e},du(n,t)}function Ug(n){var t=function(e,r){if(wr(e)!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var o=i.call(e,r);if(wr(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(n,"string");return wr(t)=="symbol"?t:t+""}var Ii=rm,JT=XT.createFocusTrap,ZT=WT.isFocusable,QT=parseInt((al=(ll=/^(\d+)\./.exec(Ii.version))===null||ll===void 0?void 0:ll[1])!==null&&al!==void 0?al:0,10),hu=function(){function n(t){var e;(function(o,s){if(!(o instanceof s))throw new TypeError("Cannot call a class as a function")})(this,n),function(o,s,a){(s=Ug(s))in o?Object.defineProperty(o,s,{value:a,enumerable:!0,configurable:!0,writable:!0}):o[s]=a}(e=qT(this,n,[t]),"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 d,h=a;if(typeof a=="string"&&!(h=(d=this.getDocument())===null||d===void 0?void 0:d.querySelector(a)))throw new Error("`".concat(o,"` as selector refers to no known node"));return h}),e.handleDeactivate=e.handleDeactivate.bind(e),e.handlePostDeactivate=e.handlePostDeactivate.bind(e),e.handleClickOutsideDeactivates=e.handleClickOutsideDeactivates.bind(e),e.internalOptions={returnFocusOnDeactivate:!1,checkCanReturnFocus:null,onDeactivate:e.handleDeactivate,onPostDeactivate:e.handlePostDeactivate,clickOutsideDeactivates:e.handleClickOutsideDeactivates},e.originalOptions={returnFocusOnDeactivate:!0,onDeactivate:null,onPostDeactivate:null,checkCanReturnFocus:null,clickOutsideDeactivates:!1};var r=t.focusTrapOptions;for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(i!=="returnFocusOnDeactivate"&&i!=="onDeactivate"&&i!=="onPostDeactivate"&&i!=="checkCanReturnFocus"&&i!=="clickOutsideDeactivates"?e.internalOptions[i]=r[i]:e.originalOptions[i]=r[i]);return e.outsideClick=null,e.focusTrapElements=t.containerElements||[],e.updatePreviousElement(),e}return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&du(t,e)}(n,Ii.Component),KT(n,[{key:"getDocument",value:function(){return this.props.focusTrapOptions.document||(typeof document!="undefined"?document:void 0)}},{key:"getReturnFocusNode",value:function(){var t=this.getNodeForOption("setReturnFocus",this.previouslyFocusedElement);return t||t!==!1&&this.previouslyFocusedElement}},{key:"updatePreviousElement",value:function(){var t=this.getDocument();t&&(this.previouslyFocusedElement=t.activeElement)}},{key:"deactivateTrap",value:function(){this.focusTrap&&this.focusTrap.active&&this.focusTrap.deactivate({returnFocus:!1,checkCanReturnFocus:null,onDeactivate:this.originalOptions.onDeactivate})}},{key:"handleClickOutsideDeactivates",value:function(t){var e=typeof this.originalOptions.clickOutsideDeactivates=="function"?this.originalOptions.clickOutsideDeactivates.call(null,t):this.originalOptions.clickOutsideDeactivates;return e&&(this.outsideClick={target:t.target,allowDeactivation:e}),e}},{key:"handleDeactivate",value:function(){this.originalOptions.onDeactivate&&this.originalOptions.onDeactivate.call(null),this.deactivateTrap()}},{key:"handlePostDeactivate",value:function(){var t=this,e=function(){var r=t.getReturnFocusNode(),i=!(!t.originalOptions.returnFocusOnDeactivate||r==null||!r.focus||t.outsideClick&&(!t.outsideClick.allowDeactivation||ZT(t.outsideClick.target,t.internalOptions.tabbableOptions))),o=t.internalOptions.preventScroll,s=o!==void 0&&o;i&&r.focus({preventScroll:s}),t.originalOptions.onPostDeactivate&&t.originalOptions.onPostDeactivate.call(null),t.outsideClick=null};this.originalOptions.checkCanReturnFocus?this.originalOptions.checkCanReturnFocus.call(null,this.getReturnFocusNode()).then(e,e):e()}},{key:"setupFocusTrap",value:function(){this.focusTrap?this.props.active&&!this.focusTrap.active&&(this.focusTrap.activate(),this.props.paused&&this.focusTrap.pause()):this.focusTrapElements.some(Boolean)&&(this.focusTrap=this.props._createFocusTrap(this.focusTrapElements,this.internalOptions),this.props.active&&this.focusTrap.activate(),this.props.paused&&this.focusTrap.pause())}},{key:"componentDidMount",value:function(){this.props.active&&this.setupFocusTrap()}},{key:"componentDidUpdate",value:function(t){if(this.focusTrap){t.containerElements!==this.props.containerElements&&this.focusTrap.updateContainerElements(this.props.containerElements);var e=!t.active&&this.props.active,r=t.active&&!this.props.active,i=!t.paused&&this.props.paused,o=t.paused&&!this.props.paused;if(e&&(this.updatePreviousElement(),this.focusTrap.activate()),r)return void this.deactivateTrap();i&&this.focusTrap.pause(),o&&this.focusTrap.unpause()}else t.containerElements!==this.props.containerElements&&(this.focusTrapElements=this.props.containerElements),this.props.active&&(this.updatePreviousElement(),this.setupFocusTrap())}},{key:"componentWillUnmount",value:function(){this.deactivateTrap()}},{key:"render",value:function(){var t=this,e=this.props.children?Ii.Children.only(this.props.children):void 0;if(e){if(e.type&&e.type===Ii.Fragment)throw new Error("A focus-trap cannot use a Fragment as its child container. Try replacing it with a <div> element.");return Ii.cloneElement(e,{ref:function(r){var i=t.props.containerElements;e&&(QT>=19?typeof e.props.ref=="function"?e.props.ref(r):e.props.ref&&(e.props.ref.current=r):typeof e.ref=="function"?e.ref(r):e.ref&&(e.ref.current=r)),t.focusTrapElements=i||[r]}})}return null}}])}();hu.defaultProps={active:!0,paused:!1,focusTrapOptions:{},_createFocusTrap:JT},bg.exports=hu;var tS=bg.exports.FocusTrap=hu;function $g(n){var m;const{children:t,preferredPlacement:e="top-start",anchorElement:r,boundaryElement:i,trapFocus:o=!1,initialFocus:s,...a}=n,{anchor:l,boundary:u}=Q(()=>({anchor:yp(r),boundary:i?yp(i):void 0}),[r,i]);let c=[];u&&(c=[bT({boundary:u}),kT({boundary:u})]);const{refs:d,floatingStyles:h,middlewareData:p}=function(E){E===void 0&&(E={});const{placement:g="bottom",strategy:_="absolute",middleware:A=[],platform:T,elements:{reference:S,floating:v}={},transform:C=!0,whileElementsMounted:R,open:D}=E,[O,k]=at({x:0,y:0,strategy:_,placement:g,middlewareData:{},isPositioned:!1}),[w,U]=at(A);bs(w,A)||U(A);const[I,F]=at(null),[j,$]=at(null),X=et(gt=>{gt!==J.current&&(J.current=gt,F(gt))},[]),V=et(gt=>{gt!==ot.current&&(ot.current=gt,$(gt))},[]),z=S||I,q=v||j,J=tt(null),ot=tt(null),M=tt(O),ut=R!=null,It=ol(R),Rt=ol(T),le=ol(D),Te=et(()=>{if(!J.current||!ot.current)return;const gt={placement:g,strategy:_,middleware:w};Rt.current&&(gt.platform=Rt.current),LT(J.current,ot.current,gt).then(lr=>{const Fe={...lr,isPositioned:le.current!==!1};ni.current&&!bs(M.current,Fe)&&(M.current=Fe,Lu(()=>{k(Fe)}))})},[w,g,_,Rt,le]);ts(()=>{D===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,k(gt=>({...gt,isPositioned:!1})))},[D]);const ni=tt(!1);ts(()=>(ni.current=!0,()=>{ni.current=!1}),[]),ts(()=>{if(z&&(J.current=z),q&&(ot.current=q),z&&q){if(It.current)return It.current(z,q,Te);Te()}},[z,q,Te,It,ut]);const we=Q(()=>({reference:J,floating:ot,setReference:X,setFloating:V}),[X,V]),wt=Q(()=>({reference:z,floating:q}),[z,q]),Ke=Q(()=>{const gt={position:_,left:0,top:0};if(!wt.floating)return gt;const lr=Tp(wt.floating,O.x),Fe=Tp(wt.floating,O.y);return C?{...gt,transform:"translate("+lr+"px, "+Fe+"px)",...Lg(wt.floating)>=1.5&&{willChange:"transform"}}:{position:_,left:lr,top:Fe}},[_,C,wt.floating,O.x,O.y]);return Q(()=>({...O,update:Te,refs:we,elements:wt,floatingStyles:Ke}),[O,Te,we,wt,Ke])}({placement:e,middleware:c,whileElementsMounted:yT});ge(()=>{l&&d.setReference(l)},[d,l]);const f=o?y(tS,{focusTrapOptions:{initialFocus:s,fallbackFocus:".t-fallback-focus",tabbableOptions:{getShadowRoot:!0}},children:y("div",{children:[t,y("span",{className:"t-fallback-focus",tabIndex:-1})]})}):t;return y("div",{ref:d.setFloating,style:{...h,zIndex:1e3,visibility:(m=p.hide)!=null&&m.referenceHidden?"hidden":"visible"},...a,children:f})}function yp(n){return typeof n=="string"?document.querySelector(n):n}function jg(n){const t=ft(),e=it(()=>t.mentionableUsers$.get()),[r,i]=at(0),o=fo(),s=it(o.state$.suggestMentionQuery),a=Q(()=>Object.fromEntries(e.map(p=>[p.id,c0(p.name)])),[e]),l=Q(()=>{if(!s)return[];const p=Ip(s);return p===""?e:e.filter(f=>a[f.id].some(m=>function(E,g){return Sd(E.substring(0,g.length),g)}(m,p)))},[s,e,a]),u=tt(void 0);G(()=>{if(u.current){const p=l.findIndex(f=>f.id===u.current);i(p===-1?0:p)}},[l]),G(()=>{var p;u.current=(p=l[r])==null?void 0:p.id},[r,l]);const c=et(p=>{var m;const f=(m=l[p])==null?void 0:m.id;return f&&"mention-button-"+f},[l]),{containerProps:d,itemProps:h}=_g({focused:r,setFocused:i,buttonId:c});return G(()=>{if(l.length!==0)return o.listenKeydown("mention",p=>Dg(p,{dir:"ttb",focused:r,setFocused:i,itemCount:l.length,onSpace(){if(s){const f=l[r];if(Sd(f.name,Ip(s)))return o.selectMention(f),!0}return!1},onConfirm(){const f=l[r];o.selectMention(f)}})),()=>{o.listenKeydown("mention",void 0)}},[o,r,l,s]),Ao(()=>o.closeSuggester(),".t-mention-suggest-list",l.length>0),l.length===0?null:y($g,{className:"t-mention-suggest-list",...d,anchorElement:".ProseMirror-suggestion",children:l.map((p,f)=>y(eS,{user:p,isFocused:f===r,onSelect:()=>o.selectMention(p),...h(f)},p.id))})}const eS=dn(function(n){const{user:t,isFocused:e,onSelect:r,...i}=n;return y("button",{className:e?"focused":"",onClick:()=>r(t.id),...i,children:t.name})});function Ip(n){return pt(n[0]==="@"),n.substring(1)}function Rp(n,t,e){const r=Ec(n),i=r.indexOf(t);return i===-1?null:r[i+e]||null}const nS=Re(function(n,t){const{children:e,triggerElement:r}=n,{closePopover:i}=Uu(),o=tt(null);Rn(t,()=>o.current),G(()=>{var a;(a=o.current)==null||a.focus()},[]);const s=et(a=>{(function(l,u,c,d){var E;const h=u.querySelectorAll("[t-menu-item]"),p=document.activeElement;if(!p||!p.hasAttribute("t-menu-item")&&!p.hasAttribute("t-menu"))return;const f=Array.from(h).indexOf(p);let m;switch(l.key){case"ArrowDown":m=Math.min(f+1,h.length-1);break;case"ArrowUp":m=Math.max(f-1,0),f===-1&&(m=h.length-1);break;case"Home":m=0;break;case"End":m=h.length-1;break;case"Tab":{const g=c.closest("t-chatbox,t-conversation-list,.t-chatbox,.t-conversation-list"),_=l.shiftKey?Rp(g,c,-1):function(A,T){return Rp(A,T,1)}(g,c);return _==null||_.focus(),void d()}default:return}(E=h[m])==null||E.focus()})(a,o.current,r,i)},[i,r]);return y("div",{"t-menu":"",role:"menu",tabIndex:-1,ref:o,onKeyDown:s,children:e})});function vr(n){const{popoverComponent:t,popoverProps:e,children:r,type:i="popover",initialFocus:o,...s}=n,[a,l]=at(void 0),u=tt(null),[c,d]=at(!1);Ao(et(()=>{var p;d(!1),(p=u.current)==null||p.focus()},[]),"[t-popover-content]",c);const h=i==="menu"?y(nS,{triggerElement:u.current,children:y(t,{...e})}):y(t,{...e});return y(__.Provider,{value:{closePopover:()=>d(!1)},children:[y(rS,{...s,"aria-haspopup":i==="menu"?"menu":"true","aria-expanded":c,onTrigger:()=>d(!0),ref:p=>(f=>{var E;const m=(E=f==null?void 0:f.closest("[t-menu-boundary]"))!=null?E:void 0;u.current=f,l(m)})(p),children:r}),c&&y($g,{"t-popover-content":"",anchorElement:u.current,boundaryElement:a,preferredPlacement:"bottom-start",trapFocus:i==="popover",initialFocus:i==="menu"?"t-menu":o,role:i==="menu"?void 0:"dialog",children:h})]})}const rS=Re(function(n,t){const{onTrigger:e,...r}=n,i=et(o=>{o.key!=="Enter"&&o.key!==" "||e()},[e]);return y("button",{...r,ref:t,onClick:e,onKeyDown:i})});function Dn(n){const{onSelect:t,...e}=n,{closePopover:r}=Uu(),i=et(o=>{o.key!=="Enter"&&o.key!==" "||(r(),t==null||t())},[t,r]);return y("div",{tabIndex:-1,role:"menuitem",onClick:et(()=>{r(),t==null||t()},[r,t]),onKeyDown:i,"t-menu-item":"",...e})}function Yg(n){return Am(n)}function sr(n){var t;return(t=n.photoUrl)!=null?t:function(e,r){const i=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
|
|
92
|
+
<rect x="0" y="0" width="100" height="100" fill="${Am(e)}"/>
|
|
93
|
+
<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>
|
|
94
|
+
</svg>`.replace(/\s+/g," ");return"data:image/svg+xml;base64,"+s0(i)}(n.id,u0(n.name))}function Oo(n){return n<1024?n+" B":n<1048576?Math.floor(n/1024)+" KB":n<1073741824?Math.floor(n/1048576)+" MB":n<1099511627776?Math.floor(n/1073741824)+" GB":Math.floor(n/1099511627776)+" TB"}function gc({latitude:n,longitude:t}){const e=n+","+t;return{imageUrl:`https://maps.googleapis.com/maps/api/staticmap?center=${e}&zoom=15&size=300x200&scale=2&maptype=roadmap&markers=${e}&key=${kO}`,linkUrl:`https://maps.google.com/maps?q=${e}&z=15`}}function Vg(n,t){const[e,r]=at({long:"",short:""});return ge(()=>{let i,o=!0;const s=()=>{const l=Date.now(),u=function(c,d,h){const p=c-d;let f,m,E;const g=new Date(d),_={month:"short",day:"numeric"};if(p<bp)return{changeTimeout:5e3,short:h.JUST_NOW,long:h.JUST_NOW};if(p<kp)f=bp,m="MINUTES",E=h.MINUTES;else if(p<wp)f=kp,m="HOURS",E=h.HOURS;else{if(!(p<iS)){if(g.getFullYear()===new Date(c).getFullYear()){const T=g.toLocaleDateString(h.locale,_);return{changeTimeout:void 0,short:T,long:T}}{const T=g.toLocaleDateString(h.locale,{..._,year:"numeric"});return{changeTimeout:void 0,short:T,long:T}}}f=wp,m="DAYS",E=h.DAYS}const A=Math.floor(p/f);return{changeTimeout:f,short:A+E,long:oS(A,m.toLowerCase(),h.locale)}}(l,n>l?l-2e3:n,t);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)}},[t,n]),e}function Dc(n){n=Math.floor(n);const t=Math.floor(n/3600);n%=3600;const e=Math.floor(n/60);n%=60;const r=o=>o.toString().padStart(2,"0");let i=`${r(e)}:${r(n)}`;return t>0&&(i=`${r(t)}:${i}`),i}const Lp=864e5;function zg(n,t){const e=Date.now(),r=(i=n,o=e,Math.floor((o-i)/Lp));var i,o;if(r<0||r===0)return t.TODAY;if(r===1)return t.YESTERDAY;const s={weekday:"long"},a=new Date(n);if(r<7)return a.toLocaleDateString(t.locale,s);const l=new Date(e);return function(c,d){return Math.floor((d-c)/(365*Lp))}(l.setFullYear(l.getFullYear()-1),n)===0?a.toLocaleDateString(t.locale,{...s,month:"long",day:"numeric"}):a.toLocaleDateString(t.locale,{...s,year:"numeric",month:"long",day:"numeric"})}const bp=6e4,kp=36e5,wp=864e5,iS=6048e5;function oS(n,t,e){return new Intl.RelativeTimeFormat(e).format(-n,t)}function x(n,...t){const e=LO.bind(dt)(n,...t);return Array.isArray(e)?dt(Bt,{},...e):e}function Gg({children:n,className:t,...e}){return y("div",{className:"t-attach-overlay "+t,...e,children:n})}function sS({uploadState:n}){const t=n.error,e=n.uploaded;Ao(()=>n.closePreview("cancel"),".t-upload-preview");const r=tt(null);G(()=>{e&&r.current.focus()},[e]);const i=it(ft().t$);return y(Gg,{className:"t-upload-preview",children:y("div",{className:"t-preview",children:[y(aS,{upload:n.upload,uploaded:e}),t!==void 0&&y("div",{className:"t-error-row",children:t}),y("div",{className:"t-send-row",children:[y("button",{className:"t-cancel",onClick:()=>n.closePreview("cancel"),children:i.CANCEL}),t===void 0&&e&&y("button",{className:"t-confirm-send test__confirm-upload-button",onClick:()=>n.closePreview("send"),ref:r,children:i.SEND_BUTTON_TEXT})]})]})})}function aS({upload:n,uploaded:t}){const e=it(ft().t$);return n.type!=="location"?y(Bt,{children:[y(uS,{upload:n}),y(cS,{upload:n,uploaded:t,t:e})]}):t?y(lS,{location:n.location}):y("div",{className:"t-loading",children:y(ac,{})})}function lS({location:n}){const{imageUrl:t,linkUrl:e}=gc(n);return y("a",{href:e,target:"_blank",rel:"noreferrer",className:"t-location-upload-preview",style:{background:`url(${JSON.stringify(t)}) center center / cover no-repeat`}})}const uS=dn(function({upload:n}){let t=null;const e=n.file;if(n.type==="video"){const r=/[.]ts/i.test(e.name)?"mpegts":"native";t=y("div",{className:"video-container",children:y(dS,{src:n.temporaryBlobUrl,videoType:r,playsInline:!0,controls:!0,preload:"auto"})})}else n.type==="image"?t=y("div",{className:"t-img-container",children:y("img",{src:URL.createObjectURL(e)})}):n.type==="audio"&&(t=y(Qs,{src:URL.createObjectURL(e),filename:e.name}));return t}),cS=dn(function({uploaded:n,upload:t,t:e}){let r;r=n?t.metadata.filename:e.UPLOAD_IN_PROGRESS;let i="",o="";return t.type==="file"&&(i="is-file",n&&(o="file-block")),y("div",{className:`t-filename-row ${i}`,children:y("div",{className:o,children:r})})});function dS(n){const{videoType:t,...e}=n;return y("video",{...e})}function hS(){const n=ke(),t=ft(),e=ei(),r=it(t.state$.isUserConnected),i=it(t.state$.userPermissions);return y(n.ChatHeader,{common:e,isUserConnected:r,permissions:i})}function pS({appId:n,chatHeaderVisible:t,messageFieldVisible:e}){const r=fo(),i=function(){const p=ft(),f=Ce(()=>{const g=p.extUserId$.get(),_=p.errors$.get(),A=p.authTokenState$.get(),T=g&&p.currentUser$.get(),S=p.state$.currentConversation.get(),v=p.state$.extCurrentConversationId.get(),C=v&&p.state$.participants.child(v).get(),R=p.app$.get();return p.device$.get(),_.serverError?"server-error":_.wrongAppId?"wrong-app-id":A==="loading"||A==="idle"?"loading-token":A==="invalid"?"invalid-token":A==="expired"?"expired-token":A==="valid"?_.unknownUser?"unknown-user":_.unknownConversation?"loading-conv-failed":T&&S&&C&&R?"loaded":"loading-data":void pt.unreachable()}),m=Ce({type:"loading"});Yr(g=>{const _=f.get(),A=p.state$.extCurrentConversationId.peek(),T=p.extUserId$.peek(),S=p.appId$.peek();function v(C){m.set({type:"loading"});const R=setTimeout(()=>{m.set(C)},5e3);return()=>clearTimeout(R)}switch(_){case"invalid-token":m.set({type:"auth-failed"});break;case"expired-token":m.set({type:"expired-token"});break;case"wrong-app-id":m.set({type:"wrong-app-id",appId:S});break;case"server-error":m.set({type:"server-error"});break;case"loading-data":case"loading-token":m.set({type:"loading"});break;case"loaded":m.set({type:"loaded",conversationId:A,userId:T});break;case"loading-conv-failed":g.onCleanup=v({type:"inaccessible-conversation",userId:T,conversationId:A});break;case"unknown-user":g.onCleanup=v({type:"unknown-user",userId:T});break;default:pt.never(_)}});const E=Ce({type:"loading"});return Yr(g=>{if(m.type.get()==="loading"){E.set({type:"invisible-loading"});const _=setTimeout(()=>{E.set({type:"loading"})},1e3);g.onCleanup=()=>{clearTimeout(_)}}else E.set(m.get())}),it(E)}(),{attachFile:o,shareLocation:s,uploadState:a}=RO({onClose:()=>r.focus()});G(()=>{r.uploadFile=o},[r,o]);const[l,u]=at(!1),c=et(p=>{o(p.dataTransfer.files[0]),p.preventDefault(),u(!1)},[o]),d=et(p=>{p.preventDefault(),u(!0)},[]),h=et(p=>{p.preventDefault(),u(!1)},[]);return i.type==="invisible-loading"?y(Bt,{}):i.type==="loading"?y(rg,{}):i.type==="inaccessible-conversation"?y(CO,{}):i.type==="unknown-user"||i.type==="auth-failed"||i.type==="wrong-app-id"||i.type==="server-error"||i.type==="unexpected-error"?y(Zs,{appId:n,chatboxState:i}):i.type=="expired-token"?y(ig,{}):i.type==="loaded"?y("div",{className:"t-chatbox-content",onDragOver:d,onDragLeave:h,onDrop:c,children:[t&&y(hS,{}),y(OO,{extConversationId:i.conversationId}),e&&y(ng,{attachFile:o,shareLocation:s}),a&&y(sS,{uploadState:a}),l&&y(Gg,{className:"t-drop-overlay",children:y(Ns,{type:"attach"})})]}):y(Bt,{})}function fS(n,t){return n.map(r=>function(i,o){if(i.type==="text")return function(s,a){const l=uc(a);return rs(s,l)}(i.children,o);if(i.type==="file"&&i.subtype==="video")return`🎥 ${bo(i.url)}`;if(i.type==="file"&&i.subtype==="image")return`📷 ${bo(i.url)}`;if(i.type==="file"&&i.subtype==="audio")return`🎧 ${bo(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,`📎 ${bo(i.url)}`):i.type==="location"?"📍":""}(r,t)).join(`
|
|
95
|
+
|
|
96
|
+
`)}function rs(n,t){return n.flatMap(e=>{if(typeof e=="string")return e;switch(e.type){case"blockquote":case"bold":case"italic":case"strikethrough":case"link":case"actionlink":case"actionLink":case"actionbutton":case"actionButton":return rs(e.children,t);case"bulletlist":case"bulletList":return`
|
|
97
|
+
`+rs(e.children,t);case"bulletpoint":case"bulletPoint":return"- "+rs(e.children,t)+`
|
|
98
|
+
`;case"autolink":case"autoLink":case"codeblock":case"codeBlock":case"codespan":case"codeSpan":case"emoji":case"customemoji":case"customEmoji":return e.text;case"suppressed":return t.contactInfoHiddenText;case"mention":return`@${e.text}`}}).join("")}function Xg(){const n=typeof window!="undefined"?window.crypto:void 0,t=n?()=>n.getRandomValues(new Uint8Array(1))[0]:()=>Math.floor(255*Math.random());return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,e=>(e^t()&15>>e/4).toString(16))}class mS{constructor(t,e,r,i,o,s){this.store=t,this.talkSession=e,this.editorInternals=r,this.onSendMessage=i,this.onDeleteMessage=o,this.onMessageAction=s}async deleteMessage(t){const e=this.store.state$.extCurrentConversationId.peek(),r=this.store.state$.messages.child(e).lookup.child(t).peek(),i=this.talkSession.conversation(e).message(t),[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(t){this.store.state$.editingMessageId.set(t)}async editMessage(t,e){const r=this.store.state$.extCurrentConversationId.peek();await this.talkSession.conversation(r).message(t).edit(e)}setReferencedMessage(t){this.store.state$.referencedMessageId.set(t),setTimeout(()=>this.editorInternals.focus({skipProseMirrorStuff:!0}),100)}async sendMessage(t){const e=this.store.state$.extCurrentConversationId.peek(),r=await async function(s,a){var m,E,g,_,A;const l=s.state$.extCurrentConversationId.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),d=c&&{...c,type:"UserMessage",sender:c.sender,referencedMessageId:(_=(g=c.referencedMessage)==null?void 0:g.id)!=null?_:null};d&&delete d.referencedMessage;const h=s.latestFileUpload,p="content"in a?[Fp(h,a.content[0])]:[ES(a.text)],f="text"in a?a.text:fS(a.content.map(T=>Fp(h,T)),{});return{id:"ephemeral-"+Xg(),type:"UserMessage",sender:s.currentUser$.peek(),createdAt:Date.now(),editedAt:null,custom:(A=a.custom)!=null?A:{},origin:"web",referencedMessage:d,reactions:[],content:p,plaintext:f}}(this.store,t);this.store.state$.ephemeralMessages.child(e).child(r.id).set(r);const i=Qi();this.store.readyForNewMessagesPromise=i.promise;const o=await this.talkSession.conversation(e).send(t);this.store.state$.ephemeralMessageIdMapping.child(e).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(t){const e={type:"file",fileToken:t.fileToken};return this.sendMessage({content:[e],custom:t.custom})}sendLocationMessage(t){const e={type:"location",latitude:t.location.latitude,longitude:t.location.longitude};return this.sendMessage({content:[e],custom:t.custom})}markAsTyping(){const t=this.store.state$.extCurrentConversationId.peek();this.talkSession.conversation(t).markAsTyping()}async toggleReaction(t,e){typeof e!="string"&&(e=e.emoji);const r=this.store.state$.extCurrentConversationId.peek(),i=this.store.state$.messages.child(r).lookup.child(t).peek().reactions.find(s=>s.emoji===e),o=this._getReactionRef(t,e);i!=null&&i.currentUserReacted?await o.remove():await o.add()}async addReaction(t,e){await this._getReactionRef(t,e).add()}triggerMessageAction(t,e,r){const i=this.store.state$.currentConversation.peek();typeof t=="string"&&(t=this.store.state$.messages.child(i.id).lookup.child(t).peek()),this.onMessageAction({action:e,params:r,message:t,conversation:i})}storeDraft(t){const e=this.store.state$.extCurrentConversationId.peek(),r=this.store.currentUser$.peek(),i=this.store.appId$.peek();e&&r&&i&&EO(e,r.id,i,t)}_getReactionRef(t,e){const r=this.store.state$.extCurrentConversationId.peek();return this.talkSession.conversation(r).message(t).reaction(e)}}const ES=n=>({type:"text",children:function(e){return WE(e,{except:["FormattedLink","Actions"]})}(n)});function Fp(n,t){switch(t.type){case"text":case"location":return t;case"file":return function(e,r){return{type:"file",subtype:e.type==="file"?void 0:e.type,...e.metadata,size:e.file.size,filename:e.file.name,fileToken:r.fileToken,url:e.temporaryBlobUrl}}(n,t)}}function Mp(n){return Object.keys(n)}class ul extends Error{constructor(t,e){const r=function(i){if(typeof i=="string")return i;if(Array.isArray(i))return i.join(`
|
|
99
|
+
`);try{return JSON.stringify(i)}catch(o){return String(i)}}(t);super(r),this.userMessage=e!=null?e:r,Object.setPrototypeOf&&Object.setPrototypeOf(this,new.target.prototype)}}const so=console;class gS{constructor(t,e,r,i){this.apiUrls=t,this.appId=e,this.sessionId=r,this.authProvider=i,this._lastPutPromise=Promise.resolve()}async get(t,e={}){const r=this.endpointUrl(t,e),i=await di(()=>this.fetchWithReauth(r),{retries:11});return await this.handleResponse(i,r)}async queuedPut(t,e){await this._lastPutPromise;const r=di(()=>this._doPut(t,e));return this._lastPutPromise=r,r}put(t,e,r){const i=()=>this._doPut(t,e);return r?xp(i,r):di(i,{retries:5})}post(t,e,r){const i=()=>this._doPost(t,e);return r?xp(i,r):di(i,{retries:5})}delete(t,e={}){return di(()=>this._doDelete(t,e),{retries:11})}endpointUrl(t,e={}){const r=new URL(this.apiUrls.internalHttpApiUrl);r.pathname+=`/${this.appId}/${t}`,r.searchParams.set("sessionId",this.sessionId);for(const[i,o]of Object.entries(e))r.searchParams.set(i,o);return r}async _doPut(t,e){const r=this.endpointUrl(t),i=await this.fetchWithReauth(r,{method:"PUT",body:JSON.stringify(e)});return await this.handleResponse(i,r)}async _doPost(t,e){const r=this.endpointUrl(t),i=await this.fetchWithReauth(r,{method:"POST",body:JSON.stringify(e)});return await this.handleResponse(i,r)}async _doDelete(t,e){const r=this.endpointUrl(t,e),i=await this.fetchWithReauth(r,{method:"DELETE"});return await this.handleResponse(i,r)}async handleResponse(t,e){if(t.status>=300){if(t.status===404)throw ps.error(`[${this.appId}][BackendRestClient] Couldn't find resource.`),new ul("Could not find app.",`Could not find given appId: "${this.appId}". You can find your appId on https://talkjs.com/dashboard.`);if(t.status===401){const r=await this.authProvider.getToken();throw ps.error(`[${this.appId}][BackendRestClient] Couldn't authenticate ${e} with token ${r}.`),new ul("User not authenticated.","Could not authenticate user. Check if your signature is calculated correctly.")}if(t.status>=300&&t.status<500){const{error:r}=await t.json();throw new ul(r)}{const r=await t.text();throw new Error(`Got non-success response (${r}) from the server for url: ${e}.`)}}return await t.json()}async fetchWithReauth(t,e){function r(s){const a={Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${s}`};return fetch(t,{...e,headers:a})}const i=await this.authProvider.getToken(),o=await r(i);return o.status!==401?o:(so.error(`401 error from ${e==null?void 0:e.method} ${t}, ${i}`),this.authProvider.refreshToken(),r(await this.authProvider.getToken()))}}function Wg(n){return!n.userMessage}function di(n,{retries:t=30}={}){return lc(t,n,{shouldRetry:Wg,log:so.warn.bind(so),maxDelay:30,initialDelay:.2})}async function xp(n,t){try{return await n()}catch(r){if(!Wg(r))throw r}let e=!1;return t.then(()=>{e=!0}),lc(1e3,n,{initialDelay:.2,maxDelay:30,shouldRetry:()=>!e,log:so.warn.bind(so)})}var pu={exports:{}};(function(n,t){var e="__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 Lo=="object"&&Lo&&Lo.Object===Object&&Lo,d=typeof self=="object"&&self&&self.Object===Object&&self,h=c||d||Function("return this")(),p=t&&!t.nodeType&&t,f=p&&n&&!n.nodeType&&n,m=f&&f.exports===p,E=m&&c.process,g=function(){try{var N=f&&f.require&&f.require("util").types;return N||E&&E.binding&&E.binding("util")}catch(L){}}(),_=g&&g.isTypedArray,A,T=Array.prototype,S=Function.prototype,v=Object.prototype,C=h["__core-js_shared__"],R=S.toString,D=v.hasOwnProperty,O=(A=/[^.]+$/.exec(C&&C.keys&&C.keys.IE_PROTO||""))?"Symbol(src)_1."+A:"",k=v.toString,w=R.call(Object),U=RegExp("^"+R.call(D).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),I=m?h.Buffer:void 0,F=h.Symbol,j=h.Uint8Array;I&&I.allocUnsafe;var $,X,V=($=Object.getPrototypeOf,X=Object,function(N){return $(X(N))}),z=Object.create,q=v.propertyIsEnumerable,J=T.splice,ot=F?F.toStringTag:void 0,M=function(){try{var N=ra(Object,"defineProperty");return N({},"",{}),N}catch(L){}}(),ut=I?I.isBuffer:void 0,It=Math.max,Rt=Date.now,le=ra(h,"Map"),Te=ra(Object,"create"),ni=function(){function N(){}return function(L){if(!bn(L))return{};if(z)return z(L);N.prototype=L;var P=new N;return N.prototype=void 0,P}}();function we(N){var L=-1,P=N==null?0:N.length;for(this.clear();++L<P;){var Y=N[L];this.set(Y[0],Y[1])}}function wt(N){var L=-1,P=N==null?0:N.length;for(this.clear();++L<P;){var Y=N[L];this.set(Y[0],Y[1])}}function Ke(N){var L=-1,P=N==null?0:N.length;for(this.clear();++L<P;){var Y=N[L];this.set(Y[0],Y[1])}}function gt(N){var L=this.__data__=new wt(N);this.size=L.size}function lr(N,L){var P=sa(N),Y=!P&&oa(N),nt=!P&&!Y&&Sc(N),_t=!P&&!Y&&!nt&&Nc(N),mt=P||Y||nt||_t,Xt=mt?function(Ft,qe){for(var ie=-1,ur=Array(Ft);++ie<Ft;)ur[ie]=qe(ie);return ur}(N.length,String):[],re=Xt.length;for(var At in N)mt&&(At=="length"||nt&&(At=="offset"||At=="parent")||_t&&(At=="buffer"||At=="byteLength"||At=="byteOffset")||Oc(At,re))||Xt.push(At);return Xt}function Fe(N,L,P){(P!==void 0&&!No(N[L],P)||P===void 0&&!(L in N))&&na(N,L,P)}function eD(N,L,P){var Y=N[L];D.call(N,L)&&No(Y,P)&&(P!==void 0||L in N)||na(N,L,P)}function To(N,L){for(var P=N.length;P--;)if(No(N[P][0],L))return P;return-1}function na(N,L,P){L=="__proto__"&&M?M(N,L,{configurable:!0,enumerable:!0,value:P,writable:!0}):N[L]=P}we.prototype.clear=function(){this.__data__=Te?Te(null):{},this.size=0},we.prototype.delete=function(N){var L=this.has(N)&&delete this.__data__[N];return this.size-=L?1:0,L},we.prototype.get=function(N){var L=this.__data__;if(Te){var P=L[N];return P===e?void 0:P}return D.call(L,N)?L[N]:void 0},we.prototype.has=function(N){var L=this.__data__;return Te?L[N]!==void 0:D.call(L,N)},we.prototype.set=function(N,L){var P=this.__data__;return this.size+=this.has(N)?0:1,P[N]=Te&&L===void 0?e:L,this},wt.prototype.clear=function(){this.__data__=[],this.size=0},wt.prototype.delete=function(N){var L=this.__data__,P=To(L,N);return!(P<0)&&(P==L.length-1?L.pop():J.call(L,P,1),--this.size,!0)},wt.prototype.get=function(N){var L=this.__data__,P=To(L,N);return P<0?void 0:L[P][1]},wt.prototype.has=function(N){return To(this.__data__,N)>-1},wt.prototype.set=function(N,L){var P=this.__data__,Y=To(P,N);return Y<0?(++this.size,P.push([N,L])):P[Y][1]=L,this},Ke.prototype.clear=function(){this.size=0,this.__data__={hash:new we,map:new(le||wt),string:new we}},Ke.prototype.delete=function(N){var L=vo(this,N).delete(N);return this.size-=L?1:0,L},Ke.prototype.get=function(N){return vo(this,N).get(N)},Ke.prototype.has=function(N){return vo(this,N).has(N)},Ke.prototype.set=function(N,L){var P=vo(this,N),Y=P.size;return P.set(N,L),this.size+=P.size==Y?0:1,this},gt.prototype.clear=function(){this.__data__=new wt,this.size=0},gt.prototype.delete=function(N){var L=this.__data__,P=L.delete(N);return this.size=L.size,P},gt.prototype.get=function(N){return this.__data__.get(N)},gt.prototype.has=function(N){return this.__data__.has(N)},gt.prototype.set=function(N,L){var P=this.__data__;if(P instanceof wt){var Y=P.__data__;if(!le||Y.length<199)return Y.push([N,L]),this.size=++P.size,this;P=this.__data__=new Ke(Y)}return P.set(N,L),this.size=P.size,this};var nD=function(N,L,P){for(var Y=-1,nt=Object(N),_t=P(N),mt=_t.length;mt--;){var Xt=_t[++Y];if(L(nt[Xt],Xt,nt)===!1)break}return N};function So(N){return N==null?N===void 0?"[object Undefined]":"[object Null]":ot&&ot in Object(N)?function(L){var P=D.call(L,ot),Y=L[ot];try{L[ot]=void 0;var nt=!0}catch(mt){}var _t=k.call(L);return nt&&(P?L[ot]=Y:delete L[ot]),_t}(N):function(L){return k.call(L)}(N)}function _c(N){return ri(N)&&So(N)==i}function rD(N){return!(!bn(N)||function(L){return!!O&&O in L}(N))&&(la(N)?U:a).test(function(L){if(L!=null){try{return R.call(L)}catch(P){}try{return L+""}catch(P){}}return""}(N))}function iD(N){if(!bn(N))return function(nt){var _t=[];if(nt!=null)for(var mt in Object(nt))_t.push(mt);return _t}(N);var L=Tc(N),P=[];for(var Y in N)(Y!="constructor"||!L&&D.call(N,Y))&&P.push(Y);return P}function Ac(N,L,P,Y,nt){N!==L&&nD(L,function(_t,mt){if(nt||(nt=new gt),bn(_t))(function(re,At,Ft,qe,ie,ur,ii){var Me=ia(re,Ft),oe=ia(At,Ft),Ic=ii.get(oe);if(Ic)return void Fe(re,Ft,Ic);var ue=ur?ur(Me,oe,Ft+"",re,At,ii):void 0,oi=ue===void 0;if(oi){var ca=sa(oe),da=!ca&&Sc(oe),Rc=!ca&&!da&&Nc(oe);ue=oe,ca||da||Rc?sa(Me)?ue=Me:ri(Lc=Me)&&aa(Lc)?ue=function(bt,De){var Ht=-1,ce=bt.length;for(De||(De=Array(ce));++Ht<ce;)De[Ht]=bt[Ht];return De}(Me):da?(oi=!1,ue=oe.slice()):Rc?(oi=!1,ue=function(bt){var De=(Ht=bt.buffer,ce=new Ht.constructor(Ht.byteLength),new j(ce).set(new j(Ht)),ce),Ht,ce;return new bt.constructor(De,bt.byteOffset,bt.length)}(oe)):ue=[]:function(bt){if(!ri(bt)||So(bt)!=s)return!1;var De=V(bt);if(De===null)return!0;var Ht=D.call(De,"constructor")&&De.constructor;return typeof Ht=="function"&&Ht instanceof Ht&&R.call(Ht)==w}(oe)||oa(oe)?(ue=Me,oa(Me)?ue=function(bt){return function(De,Ht,ce){var uD=!ce;ce||(ce={});for(var bc=-1,cD=Ht.length;++bc<cD;){var ha=Ht[bc],Co=void 0;Co===void 0&&(Co=De[ha]),uD?na(ce,ha,Co):eD(ce,ha,Co)}return ce}(bt,Cc(bt))}(Me):bn(Me)&&!la(Me)||(ue=function(bt){return typeof bt.constructor!="function"||Tc(bt)?{}:ni(V(bt))}(oe))):oi=!1}var Lc;oi&&(ii.set(oe,ue),ie(ue,oe,qe,ur,ii),ii.delete(oe)),Fe(re,Ft,ue)})(N,L,mt,P,Ac,Y,nt);else{var Xt=Y?Y(ia(N,mt),_t,mt+"",N,L,nt):void 0;Xt===void 0&&(Xt=_t),Fe(N,mt,Xt)}},Cc)}function oD(N,L){return aD(function(P,Y,nt){return Y=It(Y===void 0?P.length-1:Y,0),function(){for(var _t=arguments,mt=-1,Xt=It(_t.length-Y,0),re=Array(Xt);++mt<Xt;)re[mt]=_t[Y+mt];mt=-1;for(var At=Array(Y+1);++mt<Y;)At[mt]=_t[mt];return At[Y]=nt(re),function(Ft,qe,ie){switch(ie.length){case 0:return Ft.call(qe);case 1:return Ft.call(qe,ie[0]);case 2:return Ft.call(qe,ie[0],ie[1]);case 3:return Ft.call(qe,ie[0],ie[1],ie[2])}return Ft.apply(qe,ie)}(P,this,At)}}(N,L,yc),N+"")}var sD=M?function(N,L){return M(N,"toString",{configurable:!0,enumerable:!1,value:(P=L,function(){return P}),writable:!0});var P}:yc;function vo(N,L){var P,Y,nt=N.__data__;return((Y=typeof(P=L))=="string"||Y=="number"||Y=="symbol"||Y=="boolean"?P!=="__proto__":P===null)?nt[typeof L=="string"?"string":"hash"]:nt.map}function ra(N,L){var P=function(Y,nt){return Y==null?void 0:Y[nt]}(N,L);return rD(P)?P:void 0}function Oc(N,L){var P=typeof N;return!!(L=L==null?r:L)&&(P=="number"||P!="symbol"&&l.test(N))&&N>-1&&N%1==0&&N<L}function Tc(N){var L=N&&N.constructor;return N===(typeof L=="function"&&L.prototype||v)}function ia(N,L){if((L!=="constructor"||typeof N[L]!="function")&&L!="__proto__")return N[L]}var aD=function(N){var L=0,P=0;return function(){var Y=Rt(),nt=16-(Y-P);if(P=Y,nt>0){if(++L>=800)return arguments[0]}else L=0;return N.apply(void 0,arguments)}}(sD);function No(N,L){return N===L||N!=N&&L!=L}var oa=_c(function(){return arguments}())?_c:function(N){return ri(N)&&D.call(N,"callee")&&!q.call(N,"callee")},sa=Array.isArray;function aa(N){return N!=null&&vc(N.length)&&!la(N)}var Sc=ut||function(){return!1};function la(N){if(!bn(N))return!1;var L=So(N);return L==o||L=="[object GeneratorFunction]"||L=="[object AsyncFunction]"||L=="[object Proxy]"}function vc(N){return typeof N=="number"&&N>-1&&N%1==0&&N<=r}function bn(N){var L=typeof N;return N!=null&&(L=="object"||L=="function")}function ri(N){return N!=null&&typeof N=="object"}var Nc=_?function(N){return function(L){return N(L)}}(_):function(N){return ri(N)&&vc(N.length)&&!!u[So(N)]};function Cc(N){return aa(N)?lr(N):iD(N)}var ua,lD=(ua=function(N,L,P){Ac(N,L,P)},oD(function(N,L){var P=-1,Y=L.length,nt=Y>1?L[Y-1]:void 0,_t=Y>2?L[2]:void 0;for(nt=ua.length>3&&typeof nt=="function"?(Y--,nt):void 0,_t&&function(Xt,re,At){if(!bn(At))return!1;var Ft=typeof re;return!!(Ft=="number"?aa(At)&&Oc(re,At.length):Ft=="string"&&re in At)&&No(At[re],Xt)}(L[0],L[1],_t)&&(nt=Y<3?void 0:nt,Y=1),N=Object(N);++P<Y;){var mt=L[P];mt&&ua(N,mt,P,nt)}return N}));function yc(N){return N}n.exports=lD})(pu,pu.exports);const DS=e_(pu.exports);class _S{constructor(t,e,r,i){this.backendRestClient=new gS(t,e,r,i)}async getApp(t){return function(e){var l;const r=(l=e.configuration)==null?void 0:l.suppressContactInfo,i=typeof r=="string"?JSON.parse(r):void 0,o=i&&new ug(i),s={...e.configuration,suppressContactInfo:o},a=function(u,c){const d={general:{enableFileTransfers:c.includes("file_sharing"),enableLocation:c.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}},
|
|
100
|
+
{{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}},
|
|
101
|
+
The {{app.name}} team`,enableReplyToEmail:c.includes("reply_via_email"),emailThemeType:c.includes("email_templates")?"custom":"standard",emailTheme:"default_email",emailAttachmentMode:"enabledExcludingImages",htmlTemplate:`<div>
|
|
102
|
+
Hi {{recipient.name}}, <br/>
|
|
103
|
+
<br/>
|
|
104
|
+
{{sender.name}} wants to chat with you on {{app.name}}:<br/>
|
|
105
|
+
<br/>
|
|
106
|
+
{{messages.all}}
|
|
107
|
+
<br/>
|
|
108
|
+
<a href="{{app.custom.websiteUrl}}">Join the chat</a>
|
|
109
|
+
<br/>
|
|
110
|
+
<br/>
|
|
111
|
+
On behalf of {{sender.name}},<br/>
|
|
112
|
+
The {{app.name}} team<br/>
|
|
113
|
+
<br/>
|
|
114
|
+
</div>`,textTemplate:`Hi {{recipient.name}},
|
|
115
|
+
|
|
116
|
+
{{sender.name}} wants to chat with you on {{app.name}}:
|
|
117
|
+
|
|
118
|
+
{{messages.all}}
|
|
119
|
+
|
|
120
|
+
{{app.custom.websiteUrl}} Join the chat
|
|
121
|
+
|
|
122
|
+
On behalf of {{sender.name}},
|
|
123
|
+
The {{app.name}} team`},smsSettings:{enabled:c.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:{mode:"off",suppressLinks:!0,suppressEmailAddresses:!0,suppressPhoneNumbers:!0},sameTabLinkRules:[]};return DS(d,u)}(s,e.features);return{appMetadata:{...e.appMetadata,id:e.appMetadata.id},features:e.features,role:a}}(await this.backendRestClient.get("/app",{role_name:t}))}async checkIfAppExists(){return this.backendRestClient.get("/app").then(()=>!0).catch(t=>{if(t.message==="Could not find app.")return!1;throw t})}}class Nr{constructor(t,e,r){this.realtimeWsApiUrl=t,this.internalHttpApiUrl=e,this.restApiHttpUrl=r}getBokensUrl(t,e,r){return this.internalHttpApiUrl+`/${t}/bokens/${encodeURIComponent(e)}?signature=${encodeURIComponent(r!=null?r:"")}`}getRealtimeWsUrl(t,e,r,i,o){const s=encodeURIComponent(e);return this.realtimeWsApiUrl+`/${t}/realtime/${s}?talkjs-client-build=${o!=null?o:"standalone"}&talkjs-core=${r}&talkjs-client-id=${i}`}static fromHost(t){var r;const e=new Nr("wss://realtime.talkjs.com/v1","https://app.talkjs.com/api/v0","https://api.talkjs.com/v1");if(!t)return e;if(t==="@currentHost"){if(typeof location=="undefined")throw new Error("You can only use @currentHost in a browser.");t=((r=window.top)!=null?r:window).location.host}if(t.endsWith("talkjs.com")){const i=t.match(/^(?:\w+-)?([^.]+)\.talkjs\.com$/);if(i){const o=i[1];return["app","cdn","api","realtime"].includes(o)?e:new Nr(`wss://realtime-${o}.talkjs.com/v1`,`https://app-${o}.talkjs.com/api/v0`,`https://api-${o}.talkjs.com/v1`)}return e}return t.includes("localhost")||t.includes("localtest.me")||/^\d+\.\d+\.\d+\.\d+(:\d+)?$/.test(t)?new Nr(`ws://${t}/public_api/v1`,`http://${t}/api/v0`,`http://${t}/public_api/v1`):new Nr(`wss://${t}/public_api/v1`,`https://${t}/api/v0`,`https://${t}/public_api/v1`)}}function Kg(n,t){const e=t.appId,r=t.userId,i="conversationId"in t?t.conversationId:void 0,o=Q(()=>Nr.fromHost(t.host),[t.host]),s=tt(void 0),a=Q(()=>{const d=s.current,h=typeof d!=typeof t.tokenFetcher?t.tokenFetcher:d;return s.current=h,h},[t.tokenFetcher]);ge(()=>{n.updateThemeCustom(t.themeCustom)},[n,t.themeCustom]);const l=Q(()=>Xg(),[t.appId,t.userId,t.token,a]),u=dD.getTalkSession({apiUrls:o,appId:e,userId:r,token:t.token,tokenFetcher:a});G(()=>n.listenForErrors(u,i),[u,n,i]);const c=Q(()=>new _S(o,e,l,u._authProvider),[e,l,u,o]);return G(()=>n.listenForAuthChanges(u,a),[u,n,a]),G(()=>n.listenForUserAndAppChanges(u,c),[n,c,u]),{session:u,restApi:c}}function Ri(n,t,e){const r=tt(n),i=tt(e);return ge(()=>{r.current=n,i.current=e}),et(o=>{r.current&&r.current(o),(t==null?void 0:t.tagName)!=="T-CHATBOX"&&(t==null?void 0:t.tagName)!=="T-CONVERSATION-LIST"||function(s,a,l){for(const u of l){const c=new Event(u);Object.assign(c,a),s.dispatchEvent(c)}}(t,o,i.current)},[t])}function qg(n){G(()=>{const t=window,e=n.current;if(t.cordova&&e){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 e.addEventListener("click",r),()=>e.removeEventListener("click",r)}},[n])}function Jg(){const[n,t]=at(!0);return G(()=>{t(!1)},[]),n}const AS=Re(function(n,t){var C,R;const{onSendMessage:e,onDeleteMessage:r,onMessageAction:i,beforeBrowserPermissionPrompt:o,onMissingBrowserPermission:s,messageFieldPlaceholder:a,messageFieldSpellcheck:l,__hostElement:u}=n;G(()=>{var D;(D=n.__internalOnLoaded)==null||D.call(n)},[]);const c=Jg(),d=tt(u!=null?u:null);qg(d);const h=Ri(r,u,["deleteMessage","delete-message","deletemessage","DeleteMessage"]),p=Ri(e,u,["sendMessage","send-message","sendmessage","SendMessage"]),f=Ri(i,u,["messageAction","message-action","messageaction","MessageAction"]),m={beforeBrowserPermissionPrompt:o,onMissingBrowserPermissionCallback:Ri(s,u,["browserPermissionDenied","browser-permission-denied","browserpermissiondenied","BrowserPermissionDenied"])},{store:E,controller:g,editorInternals:_,session:A}=function(D,O,k,w){const U=D.conversationId,I=Q(()=>new Tm(D.appId,D.userId),[]),{session:F,restApi:j}=Kg(I,D),$=Q(()=>new QE(I.state$.editor,I.device$,I.state$.userPermissions),[I]),X=Q(()=>new mS(I,F,$,O,k,w),[F,I,$,O,k,w]);return $.controller=X,G(()=>{let V,z=!0;const q=F.currentUser.subscribe(async J=>{if(z&&(I.errors$.unknownUser.set(!J),J&&(I.currentUser$.set(J),J.role!==V))){V=J.role;const ot=await j.getApp(J.role);if(!z)return;I.app$.set(ot)}});return()=>{z=!1,q.unsubscribe()}},[j,F,I]),G(()=>{let V=!0;Br(()=>{I.state$.extCurrentConversationId.set(U),I.state$.currentConversation.set(null),I.state$.referencedMessageId.set(null)});const z=F.conversation(U).subscribeMessages(async(ut,It)=>{V&&ut&&(await I.readyForNewMessagesPromise,I.storeMessages(U,ut,It))});I.messageSubscription=z;const q=F.conversation(U).subscribeParticipants(ut=>{V&&ut&&I.state$.participants.child(U).set(ut)});I.participantSubscription=q;const J=F.conversation(U).subscribe(async ut=>{V&&ut&&I.state$.currentConversation.set(ut)}),ot=F.conversation(U).subscribeTyping(ut=>{V&&ut&&I.storeTyping(U,ut)}),M=I.state$.participants.child(U).onChange(({value:ut})=>{if(!ut)return;const It=new Set;for(const Rt of ut)It.add(Rt.user.id);Br(()=>{var Rt;for(const le of Mp(I.onlineSubscriptions))It.has(le)||((Rt=I.onlineSubscriptions[le])==null||Rt.unsubscribe(),delete I.onlineSubscriptions[le],I.state$.isUserConnected.child(le).set(!1))});for(const Rt of It)I.onlineSubscriptions[Rt]||(I.onlineSubscriptions[Rt]=F.user(Rt).subscribeOnline(le=>{le&&I.state$.isUserConnected.child(Rt).set(le.isConnected)}))},{initial:!0});return()=>{V=!1,q.unsubscribe(),J.unsubscribe(),z.unsubscribe(),ot.unsubscribe(),I.messageSubscription=null,I.participantSubscription=null,M();for(const ut of Mp(I.onlineSubscriptions))I.onlineSubscriptions[ut].unsubscribe();I.onlineSubscriptions={},I.state$.isUserConnected.set({})}},[I,U,F]),{store:I,controller:X,editorInternals:$,session:F}}(n,p,h,f),T=et(async()=>{const D=_.state$;if(D.isEmpty.peek()||D.atTextLimit.peek())return;const O=_.getText(),k=E.state$.referencedMessageId.peek();k&&g.setReferencedMessage(null),_.clearText(),E.state$.editor.showEmojiPicker.set(!1),await g.sendMessage({text:O,referencedMessage:k!=null?k:void 0})},[g,_,E]);G(()=>{var O;const D=(O=n.enterSendsMessage)!=null?O:!0;_.onEnter=D?T:void 0},[_,n.enterSendsMessage,T]),G(()=>{_.spellcheck$.set(l)},[_,l]),G(()=>{_.placeholder$.set(a)},[_,a]),Rn(t,()=>({controller:g,editorInternals:_}));const S=et(({error:D})=>y(Zs,{appId:n.appId,chatboxState:{type:"unexpected-error",error:D}}),[n.appId]),v=c?null:y(em,{fallbackRender:S,children:y(am.Provider,{value:_,children:y(cm.Provider,{value:E,children:y(sm.Provider,{value:n.theme,children:y(lm.Provider,{value:m,children:y(dm.Provider,{value:g,children:y(um.Provider,{value:A,children:y(E_.Provider,{value:{sendMessage:T},children:y(pS,{appId:n.appId,chatHeaderVisible:(C=n.chatHeaderVisible)!=null?C:!0,messageFieldVisible:(R=n.messageFieldVisible)!=null?R:!0})})})})})})})})});return u?v:y("div",{className:"t-chatbox"+(n.className?` ${n.className}`:""),style:n.style,ref:d,children:v})});(function(n="Twemoji Country Flags",t="https://cdn.jsdelivr.net/npm/country-flag-emoji-polyfill@0.1/dist/TwemojiCountryFlags.woff2"){if(typeof window<"u"&&hd("😊")&&!hd("🇨🇭")){const e=document.createElement("style");return e.textContent=`@font-face {
|
|
124
|
+
font-family: "${n}";
|
|
125
|
+
unicode-range: U+1F1E6-1F1FF, U+1F3F4, U+E0062-E0063, U+E0065, U+E0067,
|
|
126
|
+
U+E006C, U+E006E, U+E0073-E0074, U+E0077, U+E007F;
|
|
127
|
+
src: url('${t}') format('woff2');
|
|
128
|
+
font-display: swap;
|
|
129
|
+
}`,document.head.appendChild(e),!0}})(),Bu(),function({observableFunctions:n,observableProperties:t,jsonReplacer:e,jsonReviver:r}){if(n)for(const i in n){const o=n[i];ZD.set(i,o),ud.prototype[i]=function(...s){return o.call(this,this._node,...s)}}if(t)for(const i in t){const o=t[i];JD.set(i,o),Object.defineProperty(ud.prototype,i,{configurable:!0,get(){return o.get.call(this,this._node)},set(s){return o.set.call(this,this._node,s)}})}e&&(ld.replacer=e),r&&(ld.reviver=r)}({observableFunctions:{child:(n,t)=>(pt(typeof t=="string"||typeof t=="number","Key should be a string or a number"),Ys.getProxy(n,t.toString()))}}),rn.registerHandler(({level:n,data:t})=>{console[n]("[TalkJS]",...t)});const OS=Re(function(n,t){const e=tt(null),r=Q(()=>new TS(e),[]);Rn(t,()=>r,[r]);const{theme:i,...o}=n,s=Q(()=>({...fu,...i!=null?i:{}}),[i]),a=`${n.userId}|${n.appId}`;return y(hm.Provider,{value:r,children:dt(AS,{...o,key:a,theme:s,ref:e})})});var Fr,Kt,Qe,is;class TS{constructor(t){si(this,Kt);si(this,Fr);pa(this,Fr,t)}deleteMessage(t){return Ut(this,Kt,Qe).deleteMessage(t)}setEditing(t){Ut(this,Kt,Qe).setEditing(t)}editMessage(t,e){return Ut(this,Kt,Qe).editMessage(t,e)}sendMessage(t){return Ut(this,Kt,Qe).sendMessage(t)}sendFileMessage(t){return Ut(this,Kt,Qe).sendFileMessage(t)}sendLocationMessage(t){return Ut(this,Kt,Qe).sendLocationMessage(t)}setReferencedMessage(t){Ut(this,Kt,Qe).setReferencedMessage(t)}toggleReaction(t,e){return Ut(this,Kt,Qe).toggleReaction(t,e)}getMessageFieldText(){return Ut(this,Kt,is).getText()}setMessageFieldText(t){Ut(this,Kt,is).setText(t)}focusMessageField(){Ut(this,Kt,is).focus()}}Fr=new WeakMap,Kt=new WeakSet,Qe=function(){return Ut(this,Fr).current.controller},is=function(){return Ut(this,Fr).current.editorInternals};function SS({conversation:n}){const t=ft(),e=mo(),r=ke(),i=tg(),o=it(t.extCurrentConversationId$),[s,a]=at([]);return G(()=>{const l=e.conversation(n.id).subscribeParticipants(async u=>{u&&a(u)});return()=>l.unsubscribe()},[e,n.id]),s?y(r.ConversationListItem,{common:i,conversation:n,participants:s,isSelected:o===n.id}):null}function vS(){const n=ft(),t=tt(null);G(()=>{let r=!0;const i=t.current;return async function(){var s;let o=0;for(;r&&n.conversationListSubscription&&i.scrollHeight===i.clientHeight&&o<2;)await((s=n.conversationListSubscription)==null?void 0:s.loadMore(20)),o+=1}(),()=>{r=!1}},[n]);const e=et(r=>{const i=r.currentTarget;i.scrollHeight-i.clientHeight-i.scrollTop<15&&n.conversationListSubscription&&n.conversationListSubscription.loadMore(20)},[n]);return y("div",{className:"t-conversation-list-scrollable",ref:t,"t-menu-boundary":"",onScroll:e,children:y(Tl,{each:n.conversationsArray$,children:r=>y(SS,{conversation:r.get()})})})}function NS({appId:n}){ft();const t=function(){const e=ft(),r=Ce(()=>{const s=e.currentUser$.get(),a=e.app$.get(),l=e.errors$.get(),u=e.authTokenState$.get();return l.serverError?"server-error":l.wrongAppId?"wrong-app-id":u==="loading"||u==="idle"?"loading-token":u==="invalid"?"invalid-token":u==="expired"?"expired-token":u==="valid"?l.unknownUser?"unknown-user":s&&a?"loaded":"loading-data":void pt.unreachable()}),i=Ce({type:"loading"});Yr(s=>{const a=r.get(),l=e.extUserId$.peek(),u=e.appId$.peek();switch(a){case"invalid-token":i.set({type:"auth-failed"});break;case"expired-token":i.set({type:"expired-token"});break;case"wrong-app-id":i.set({type:"wrong-app-id",appId:u});break;case"server-error":i.set({type:"server-error"});break;case"loading-data":case"loading-token":i.set({type:"loading"});break;case"loaded":i.set({type:"loaded",currentUser:e.currentUser$.peek()});break;case"unknown-user":s.onCleanup=function(c){i.set({type:"loading"});const d=setTimeout(()=>{i.set(c)},5e3);return()=>clearTimeout(d)}({type:"unknown-user",userId:l});break;default:pt.never(a)}});const o=Ce({type:"loading"});return Yr(s=>{if(i.type.get()==="loading"){o.set({type:"invisible-loading"});const a=setTimeout(()=>{o.set({type:"loading"})},1e3);s.onCleanup=()=>{clearTimeout(a)}}else o.set(i.get())}),it(o)}();return t.type==="invisible-loading"?y(Bt,{}):t.type==="loading"?y(rg,{}):t.type==="unknown-user"||t.type==="auth-failed"||t.type==="wrong-app-id"||t.type==="server-error"||t.type==="unexpected-error"?y(Zs,{appId:n,chatboxState:t}):t.type=="expired-token"?y(ig,{}):t.type==="loaded"?y(vS,{}):y(Bt,{})}class CS extends _m{constructor(){super(...arguments),this.type="ConversationListStore",this.conversationListSubscription=null,this.extCurrentConversationId$=Ot(null),this.conversationsArray$=Ot([]),this.conversationsMap$=Ot({})}listenForConversations(t){const e=t.subscribeConversations(r=>{Br(()=>{this.conversationsArray$.set(r);const i={};for(const o of r)i[o.id]=o;this.conversationsMap$.set(i)})});return this.conversationListSubscription=e,()=>{e.unsubscribe(),this.conversationListSubscription=null}}}class yS{constructor(t,e){this.store=t,this.onSelectConversation=e}selectConversation(t){if(t===this.store.extCurrentConversationId$.peek())return;this.store.extCurrentConversationId$.set(t);const e={currentUser:this.store.currentUser$.peek(),conversation:this.store.conversationsMap$.child(t).peek()};this.onSelectConversation(e)}}const IS=Re(function(n,t){const{__hostElement:e,onSelectConversation:r}=n;G(()=>{var h;(h=n.__internalOnLoaded)==null||h.call(n)},[]);const i=Jg(),o=tt(e!=null?e:null);qg(o);const s=Ri(r,e,["selectConversation","select-conversation","selectconversation","SelectConversation"]),a=Q(()=>new CS(n.appId,n.userId),[]);G(()=>{Br(()=>{a.extUserId$.set(n.userId),a.appId$.set(n.appId)})},[a,n.appId,n.userId]);const{session:l}=Kg(a,n),u=Q(()=>new yS(a,s),[a,s]);G(()=>a.listenForConversations(l),[a,l]),G(()=>{n.selectedConversationId!==void 0&&a.extCurrentConversationId$.set(n.selectedConversationId)},[a,n.selectedConversationId]),G(()=>{const h=n.__hostElement;if(h)return a.extCurrentConversationId$.onChange(({value:p})=>{h.selectedConversationId=p})},[a,n.__hostElement]),Rn(t,()=>({controller:u}));const c=et(({error:h})=>y(Zs,{appId:n.appId,chatboxState:{type:"unexpected-error",error:h}}),[n.appId]),d=i?null:y(em,{fallbackRender:c,children:y(cm.Provider,{value:a,children:y(sm.Provider,{value:n.theme,children:y(dm.Provider,{value:u,children:y(um.Provider,{value:l,children:y(NS,{appId:n.appId})})})})})});return e?d:y("div",{className:"t-conversation-list"+(n.className?` ${n.className}`:""),style:n.style,ref:o,children:d})});var ao,Ps,Zg;class RS{constructor(t){si(this,Ps);si(this,ao);pa(this,ao,t)}selectConversation(t){Ut(this,Ps,Zg).selectConversation(t)}}ao=new WeakMap,Ps=new WeakSet,Zg=function(){return Ut(this,ao).current.controller};const LS=Re(function(n,t){const e=tt(null),r=Q(()=>new RS(e),[]);Rn(t,()=>r,[r]);const{theme:i,...o}=n,s=Q(()=>({...fu,...i!=null?i:{}}),[i]),a=`${n.userId}|${n.appId}`;return y(hm.Provider,{value:r,children:dt(IS,{...o,key:a,theme:s,ref:e})})});function bS(n){const{conversation:t,participants:e,theme:r}=n.common,{ConversationImage:i}=r;return x`
|
|
130
|
+
<div className="t-theme-chat-header">
|
|
131
|
+
<div className="t-inner">
|
|
132
|
+
<div className="t-content">
|
|
133
|
+
<div className="t-image">
|
|
134
|
+
<${i}
|
|
135
|
+
conversation=${t}
|
|
136
|
+
participants=${e}
|
|
137
|
+
common=${n.common}
|
|
138
|
+
/>
|
|
139
|
+
</div>
|
|
140
|
+
|
|
141
|
+
<div className="t-info">
|
|
142
|
+
<${kS} ...${n} />
|
|
143
|
+
</div>
|
|
144
|
+
</div>
|
|
145
|
+
</div>
|
|
146
|
+
</div>
|
|
147
|
+
`}function kS(n){const{common:t}=n;return t.conversation.subject?x`
|
|
148
|
+
<div className="t-title">${t.conversation.subject}</div>
|
|
149
|
+
<div className="t-subtitle">
|
|
150
|
+
<${Pp} ...${n} />
|
|
151
|
+
</div>
|
|
152
|
+
`:x`<div className="t-title">
|
|
153
|
+
<${Pp} ...${n} />
|
|
154
|
+
</div>`}function Pp({common:n,isUserConnected:t,permissions:e}){const{participants:r}=n,i=r.filter(({user:s})=>s.id!==n.currentUser.id),o=i.length===0?r:i;return e.showOnlineStatus?x`
|
|
155
|
+
<span className="t-participants">
|
|
156
|
+
${o.map(({user:s})=>x`
|
|
157
|
+
<span className="t-participant" key=${s.id}>
|
|
158
|
+
<span>${s.name}</span>
|
|
159
|
+
<span
|
|
160
|
+
className="t-online-indicator"
|
|
161
|
+
t-status=${t[s.id]?"online":"offline"}
|
|
162
|
+
></span>
|
|
163
|
+
</span>
|
|
164
|
+
`)}
|
|
165
|
+
</span>
|
|
166
|
+
`:x`<span className="t-participants">${o.map(({user:s})=>s.name).join(", ")}</span>`}function wS(n){const{message:t,messageStatus:e,permissions:r,common:i}=n,{currentUser:o,theme:s,participants:a,chatbox:l,t:u}=i,{Avatar:c,Icon:d,ReferencedMessage:h,TimeAgo:p,MessageActionMenu:f}=s,m=a.length>=3,E=t.sender,g=(E==null?void 0:E.id)!==o.id&&m,_=t.referencedMessage,A=e!=="sending"&&(r.canReplyToMessage||r.canDeleteMessage);let T;return T=E?E.id===o.id?"currentUser":"other":"system",x`
|
|
167
|
+
<div
|
|
168
|
+
className="t-theme-message"
|
|
169
|
+
t-sender=${T}
|
|
170
|
+
t-message-id=${t.id}
|
|
171
|
+
>
|
|
172
|
+
<div className="t-message-row">
|
|
173
|
+
${E&&x`<${c}
|
|
174
|
+
photoUrl=${sr(E)}
|
|
175
|
+
common=${i}
|
|
176
|
+
/>`}
|
|
177
|
+
|
|
178
|
+
<div className="t-message-body">
|
|
179
|
+
<!-- in group chats, show the message sender name in a random color -->
|
|
180
|
+
${E&&g&&x`<div
|
|
181
|
+
className="t-message-sender-name"
|
|
182
|
+
style=${{color:Yg(E.id)}}
|
|
183
|
+
>
|
|
184
|
+
${E.name}
|
|
185
|
+
</div>`}
|
|
186
|
+
${_&&x`<${h}
|
|
187
|
+
referencedMessage=${_}
|
|
188
|
+
common=${i}
|
|
189
|
+
/>`}
|
|
190
|
+
|
|
191
|
+
<${cg}
|
|
192
|
+
common=${i}
|
|
193
|
+
message=${t}
|
|
194
|
+
messageStatus=${e}
|
|
195
|
+
/>
|
|
196
|
+
|
|
197
|
+
<div className="t-message-status">
|
|
198
|
+
<${p} timestamp=${t.createdAt} common=${i} />
|
|
199
|
+
${T=="currentUser"&&x`<${FS} ...${n} />`}
|
|
200
|
+
</div>
|
|
201
|
+
</div>
|
|
202
|
+
|
|
203
|
+
${A&&x`
|
|
204
|
+
<${vr}
|
|
205
|
+
type="menu"
|
|
206
|
+
popoverComponent=${f}
|
|
207
|
+
popoverProps=${{message:t,permissions:r,common:i}}
|
|
208
|
+
className="t-message-action-menu-button"
|
|
209
|
+
aria-label="Message actions"
|
|
210
|
+
>
|
|
211
|
+
<${d} className="t-action-menu-icon" type="horizontalDots" />
|
|
212
|
+
</${vr}>
|
|
213
|
+
`}
|
|
214
|
+
${r.canAddReaction&&x`
|
|
215
|
+
<${vr}
|
|
216
|
+
className="t-add-reaction-button"
|
|
217
|
+
popoverComponent=${hg}
|
|
218
|
+
popoverProps=${{messageId:t.id,colorScheme:"light"}}
|
|
219
|
+
aria-label="Add reaction"
|
|
220
|
+
>
|
|
221
|
+
<${d} type="addEmoji" />
|
|
222
|
+
</${vr}>
|
|
223
|
+
`}
|
|
224
|
+
</div>
|
|
225
|
+
|
|
226
|
+
${t.reactions.length>0&&x`
|
|
227
|
+
<div className="t-emoji-reactions">
|
|
228
|
+
${t.reactions.map(S=>{const v=S.currentUserReacted?"remove your reaction":"add reaction",C=S.count===1?"person":"people";return x`
|
|
229
|
+
<button
|
|
230
|
+
className="t-reaction-button"
|
|
231
|
+
t-active=${S.currentUserReacted?"true":void 0}
|
|
232
|
+
onClick=${()=>l.toggleReaction(t.id,S.emoji)}
|
|
233
|
+
disabled=${!r.canAddReaction}
|
|
234
|
+
aria-label="${S.count} ${C} reacted with ${S.emoji}. Press to ${v}"
|
|
235
|
+
aria-pressed=${S.currentUserReacted}
|
|
236
|
+
key=${S.emoji}
|
|
237
|
+
>
|
|
238
|
+
<span className="t-emoji">${S.emoji}</span>
|
|
239
|
+
<span className="t-num-reactions">${S.count}</span>
|
|
240
|
+
</button>
|
|
241
|
+
`})}
|
|
242
|
+
</div>
|
|
243
|
+
`}
|
|
244
|
+
</div>
|
|
245
|
+
`}function FS({messageStatus:n,common:t}){const{Icon:e}=t.theme;return n==="sending"?x`
|
|
246
|
+
<span className="t-status-icon">
|
|
247
|
+
<${e}
|
|
248
|
+
type="spinner"
|
|
249
|
+
className="t-message-loading-spinner"
|
|
250
|
+
common=${t}
|
|
251
|
+
/>
|
|
252
|
+
</span>
|
|
253
|
+
`:n==="sent"?x`<span className="t-status-icon">✓</span>`:n==="everyoneRead"?x`<span className="t-status-icon">✓✓</span>`:null}function MS(n){const{message:t,permissions:e,common:r}=n,{chatbox:i,t:o}=r;return x` <div className="t-theme-message-action-menu">
|
|
254
|
+
${e.canReplyToMessage&&x`
|
|
255
|
+
<${Dn} className="t-menu-item" onSelect=${()=>i.setReferencedMessage(t.id)}>
|
|
256
|
+
${o.REPLY_TO_MESSAGE}
|
|
257
|
+
</${Dn}>
|
|
258
|
+
`}
|
|
259
|
+
${e.canEditMessage&&x`
|
|
260
|
+
<${Dn} className="t-menu-item" onSelect=${()=>i.setEditing(t.id)}>
|
|
261
|
+
${o.EDIT_MESSAGE}
|
|
262
|
+
</${Dn}>
|
|
263
|
+
`}
|
|
264
|
+
${e.canDeleteMessage&&x`
|
|
265
|
+
<${Dn} className="t-menu-item t-danger" onSelect=${()=>i.deleteMessage(t.id)}>
|
|
266
|
+
${o.DELETE_MESSAGE}
|
|
267
|
+
</${Dn}>
|
|
268
|
+
`}
|
|
269
|
+
</div>`}function xS(n){const{common:t,referencedMessage:e,editor:r,permissions:i,editMessageId:o}=n,{chatbox:s,device:a,conversation:l,t:u,theme:c}=t,{ReplyBar:d,Icon:h}=c,p=o?"edit":"send",f=p==="edit"&&!r.atTextLimit&&r.characterCount>0,m=p==="send"&&r.isEmpty&&i.canShareLocation,E=p==="send"&&r.isEmpty&&i.canShareFile,g=p==="send"&&a.supportsEmojiPicker&&!a.isMobile;return x`
|
|
270
|
+
<div className="t-theme-message-field" t-mode=${p}>
|
|
271
|
+
${r.showEmojiPicker&&x`
|
|
272
|
+
<div className="t-emoji-picker-wrapper">
|
|
273
|
+
<${dc} colorScheme="light" />
|
|
274
|
+
</div>
|
|
275
|
+
`}
|
|
276
|
+
<${Ag} />
|
|
277
|
+
<${jg} />
|
|
278
|
+
|
|
279
|
+
${e&&x`<${d}
|
|
280
|
+
common=${t}
|
|
281
|
+
referencedMessage=${e}
|
|
282
|
+
/>`}
|
|
283
|
+
|
|
284
|
+
<div className="t-wrapper">
|
|
285
|
+
${r.atTextLimit&&x`<div className="t-text-limit-indicator">
|
|
286
|
+
${u.ENTRYBOX_TEXT_LIMIT}
|
|
287
|
+
</div>`}
|
|
288
|
+
<div className="t-text-form">
|
|
289
|
+
${l.access==="Read"&&x`
|
|
290
|
+
<div className="t-readonly">
|
|
291
|
+
${u.ENTRYBOX_PLACEHOLDER_CHAT_READONLY}
|
|
292
|
+
</div>
|
|
293
|
+
`}
|
|
294
|
+
${l.access==="ReadWrite"&&x`
|
|
295
|
+
<div className="t-textbox-column">
|
|
296
|
+
<${ZE} placeholder=${u.ENTRYBOX_PLACEHOLDER} />
|
|
297
|
+
|
|
298
|
+
<div className="t-button-overlay">
|
|
299
|
+
${m&&x`<button
|
|
300
|
+
className="t-location-button"
|
|
301
|
+
t-kind="icon-button"
|
|
302
|
+
aria-label=${u.UPLOAD_SHARE_LOCATION}
|
|
303
|
+
title=${u.UPLOAD_SHARE_LOCATION}
|
|
304
|
+
onClick=${()=>r.shareLocation()}
|
|
305
|
+
>
|
|
306
|
+
<${h} type="locationPin" common=${t} />
|
|
307
|
+
</button>`}
|
|
308
|
+
${E&&x`<button
|
|
309
|
+
className="t-attachment-button"
|
|
310
|
+
t-kind="icon-button"
|
|
311
|
+
aria-label=${u.UPLOAD_SEND_FILE}
|
|
312
|
+
title=${u.UPLOAD_SEND_FILE}
|
|
313
|
+
onClick=${()=>r.attachFile()}
|
|
314
|
+
>
|
|
315
|
+
<${h} type="attach" common=${t} />
|
|
316
|
+
</button>`}
|
|
317
|
+
${g&&x`<button
|
|
318
|
+
className="t-emoji-button"
|
|
319
|
+
t-kind="icon-button"
|
|
320
|
+
aria-label="Insert an emoji"
|
|
321
|
+
title="Insert an emoji"
|
|
322
|
+
onClick=${()=>r.toggleEmojiPicker()}
|
|
323
|
+
>
|
|
324
|
+
<${h}
|
|
325
|
+
type=${r.showEmojiPicker?"close":"emoji"}
|
|
326
|
+
common=${t}
|
|
327
|
+
/>
|
|
328
|
+
</button>`}
|
|
329
|
+
</div>
|
|
330
|
+
</div>
|
|
331
|
+
`}
|
|
332
|
+
${p==="send"&&x`
|
|
333
|
+
<div className="t-send-column">
|
|
334
|
+
<button
|
|
335
|
+
className="t-send-button"
|
|
336
|
+
t-kind="icon-button"
|
|
337
|
+
aria-label=${u.SEND_BUTTON_TEXT}
|
|
338
|
+
title=${u.SEND_BUTTON_TEXT}
|
|
339
|
+
onClick=${()=>r.send()}
|
|
340
|
+
>
|
|
341
|
+
<${h} type="send" common=${t} />
|
|
342
|
+
</button>
|
|
343
|
+
</div>
|
|
344
|
+
`}
|
|
345
|
+
${p==="edit"&&x`
|
|
346
|
+
<div className="t-edit-row">
|
|
347
|
+
<button
|
|
348
|
+
t-action="cancel"
|
|
349
|
+
onClick=${()=>s.setEditing(null)}
|
|
350
|
+
>
|
|
351
|
+
${u.CANCEL}
|
|
352
|
+
</button>
|
|
353
|
+
<button
|
|
354
|
+
t-action="save"
|
|
355
|
+
onClick=${()=>r.send()}
|
|
356
|
+
disabled=${!f}
|
|
357
|
+
>
|
|
358
|
+
${u.SAVE}
|
|
359
|
+
</button>
|
|
360
|
+
</div>
|
|
361
|
+
`}
|
|
362
|
+
</div>
|
|
363
|
+
</div>
|
|
364
|
+
</div>
|
|
365
|
+
`}function PS({className:n="",type:t}){return x`<${BS[t]} className=${`t-theme-icon ${n}`} />`}const BS={attach:function({className:n}){return x`
|
|
366
|
+
<svg
|
|
367
|
+
className=${n}
|
|
368
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
369
|
+
fill="none"
|
|
370
|
+
stroke="currentColor"
|
|
371
|
+
strokeWidth="2"
|
|
372
|
+
strokeLinecap="round"
|
|
373
|
+
strokeLinejoin="round"
|
|
374
|
+
viewBox="0 0 24 24"
|
|
375
|
+
height="24px"
|
|
376
|
+
width="24px"
|
|
377
|
+
>
|
|
378
|
+
<path
|
|
379
|
+
fill="none"
|
|
380
|
+
d="M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48"
|
|
381
|
+
></path>
|
|
382
|
+
</svg>
|
|
383
|
+
`},chevronLeft:Bp,left:Bp,chevronRight:Hp,right:Hp,chevronUp:Up,up:Up,chevronDown:$p,down:$p,close:function({className:n}){return x`
|
|
384
|
+
<svg
|
|
385
|
+
className=${n}
|
|
386
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
387
|
+
fill="none"
|
|
388
|
+
stroke="currentColor"
|
|
389
|
+
strokeWidth="2"
|
|
390
|
+
strokeLinecap="round"
|
|
391
|
+
strokeLinejoin="round"
|
|
392
|
+
viewBox="0 0 24 24"
|
|
393
|
+
height="24px"
|
|
394
|
+
width="24px"
|
|
395
|
+
>
|
|
396
|
+
<line x1="18" y1="6" x2="6" y2="18" fill="none"></line>
|
|
397
|
+
<line fill="none" x1="6" y1="6" x2="18" y2="18"></line>
|
|
398
|
+
</svg>
|
|
399
|
+
`},emoji:function({className:n}){return x`
|
|
400
|
+
<svg
|
|
401
|
+
className=${n}
|
|
402
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
403
|
+
fill="none"
|
|
404
|
+
stroke="currentColor"
|
|
405
|
+
strokeWidth="2"
|
|
406
|
+
strokeLinecap="round"
|
|
407
|
+
strokeLinejoin="round"
|
|
408
|
+
viewBox="0 0 24 24"
|
|
409
|
+
height="24px"
|
|
410
|
+
width="24px"
|
|
411
|
+
>
|
|
412
|
+
<circle fill="none" cx="12" cy="12" r="10"></circle>
|
|
413
|
+
<path fill="none" d="M8 14s1.5 2 4 2 4-2 4-2M9 9h.01M15 9h.01"></path>
|
|
414
|
+
</svg>
|
|
415
|
+
`},locationPin:function({className:n}){return x`
|
|
416
|
+
<svg
|
|
417
|
+
className=${n}
|
|
418
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
419
|
+
fill="none"
|
|
420
|
+
stroke="currentColor"
|
|
421
|
+
strokeWidth="2"
|
|
422
|
+
strokeLinecap="round"
|
|
423
|
+
strokeLinejoin="round"
|
|
424
|
+
viewBox="0 0 24 24"
|
|
425
|
+
height="24px"
|
|
426
|
+
width="24px"
|
|
427
|
+
>
|
|
428
|
+
<path
|
|
429
|
+
fill="none"
|
|
430
|
+
d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"
|
|
431
|
+
></path>
|
|
432
|
+
<circle fill="none" cx="12" cy="10" r="3"></circle>
|
|
433
|
+
</svg>
|
|
434
|
+
`},more:function({className:n}){return x`
|
|
435
|
+
<svg
|
|
436
|
+
className=${n}
|
|
437
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
438
|
+
fill="none"
|
|
439
|
+
stroke="currentColor"
|
|
440
|
+
strokeWidth="2"
|
|
441
|
+
strokeLinecap="round"
|
|
442
|
+
strokeLinejoin="round"
|
|
443
|
+
viewBox="0 0 24 24"
|
|
444
|
+
height="24px"
|
|
445
|
+
width="24px"
|
|
446
|
+
>
|
|
447
|
+
<path
|
|
448
|
+
d="M32 20C30.9391 20 29.9217 19.5786 29.1716 18.8284C28.4214 18.0783 28 17.0609 28 16C28 14.9391 28.4214 13.9217 29.1716 13.1716C29.9217 12.4214 30.9391 12 32 12C33.0609 12 34.0783 12.4214 34.8284 13.1716C35.5786 13.9217 36 14.9391 36 16C36 17.0609 35.5786 18.0783 34.8284 18.8284C34.0783 19.5786 33.0609 20 32 20ZM32 36C30.9391 36 29.9217 35.5786 29.1716 34.8284C28.4214 34.0783 28 33.0609 28 32C28 30.9391 28.4214 29.9217 29.1716 29.1716C29.9217 28.4214 30.9391 28 32 28C33.0609 28 34.0783 28.4214 34.8284 29.1716C35.5786 29.9217 36 30.9391 36 32C36 33.0609 35.5786 34.0783 34.8284 34.8284C34.0783 35.5786 33.0609 36 32 36ZM28 48C28 49.0609 28.4214 50.0783 29.1716 50.8284C29.9217 51.5786 30.9391 52 32 52C33.0609 52 34.0783 51.5786 34.8284 50.8284C35.5786 50.0783 36 49.0609 36 48C36 46.9391 35.5786 45.9217 34.8284 45.1716C34.0783 44.4214 33.0609 44 32 44C30.9391 44 29.9217 44.4214 29.1716 45.1716C28.4214 45.9217 28 46.9391 28 48Z"
|
|
449
|
+
fill="currentColor"
|
|
450
|
+
></path>
|
|
451
|
+
</svg>
|
|
452
|
+
`},plus:function({className:n}){return x`
|
|
453
|
+
<svg
|
|
454
|
+
className=${n}
|
|
455
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
456
|
+
fill="none"
|
|
457
|
+
stroke="currentColor"
|
|
458
|
+
strokeWidth="2"
|
|
459
|
+
strokeLinecap="round"
|
|
460
|
+
strokeLinejoin="round"
|
|
461
|
+
viewBox="0 0 24 24"
|
|
462
|
+
height="24px"
|
|
463
|
+
width="24px"
|
|
464
|
+
>
|
|
465
|
+
<line x1="12" y1="5" x2="12" y2="19" fill="none"></line>
|
|
466
|
+
<line fill="none" x1="5" y1="12" x2="19" y2="12"></line>
|
|
467
|
+
</svg>
|
|
468
|
+
`},search:function({className:n}){return x`
|
|
469
|
+
<svg
|
|
470
|
+
className=${n}
|
|
471
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
472
|
+
fill="none"
|
|
473
|
+
stroke="currentColor"
|
|
474
|
+
strokeWidth="2"
|
|
475
|
+
strokeLinecap="round"
|
|
476
|
+
strokeLinejoin="round"
|
|
477
|
+
viewBox="0 0 24 24"
|
|
478
|
+
height="24px"
|
|
479
|
+
width="24px"
|
|
480
|
+
>
|
|
481
|
+
<path
|
|
482
|
+
fill="none"
|
|
483
|
+
d="M11 19a8 8 0 1 0 0-16 8 8 0 0 0 0 16ZM21.35 21.35 17 17"
|
|
484
|
+
></path>
|
|
485
|
+
</svg>
|
|
486
|
+
`},send:function({className:n}){return x`
|
|
487
|
+
<svg
|
|
488
|
+
className=${n}
|
|
489
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
490
|
+
fill="none"
|
|
491
|
+
stroke="currentColor"
|
|
492
|
+
strokeWidth="2"
|
|
493
|
+
strokeLinecap="round"
|
|
494
|
+
strokeLinejoin="round"
|
|
495
|
+
viewBox="0 0 64 64"
|
|
496
|
+
height="24px"
|
|
497
|
+
width="24px"
|
|
498
|
+
>
|
|
499
|
+
<path
|
|
500
|
+
d="M14.4812 8.18108C14.1942 8.03755 13.8727 7.97744 13.5533 8.00758C13.2338 8.03773 12.9292 8.15693 12.6742 8.35162C12.4191 8.54631 12.2238 8.80867 12.1105 9.10886C11.9972 9.40906 11.9704 9.73503 12.0331 10.0497L16.8435 26.6787C16.9332 26.9886 17.1086 27.2669 17.3493 27.4816C17.5901 27.6963 17.8866 27.8387 18.2047 27.8925L37.7138 31.16C38.6327 31.3417 38.6327 32.6583 37.7138 32.84L18.2047 36.1075C17.8866 36.1613 17.5901 36.3037 17.3493 36.5184C17.1086 36.7331 16.9332 37.0114 16.8435 37.3213L12.0331 53.9503C11.9704 54.265 11.9972 54.5909 12.1105 54.8911C12.2238 55.1913 12.4191 55.4537 12.6742 55.6484C12.9292 55.8431 13.2338 55.9623 13.5533 55.9924C13.8727 56.0226 14.1942 55.9625 14.4812 55.8189L59.0538 33.5326C59.3382 33.3901 59.5773 33.1712 59.7444 32.9006C59.9115 32.6299 60 32.3181 60 32C60 31.6819 59.9115 31.3701 59.7444 31.0994C59.5773 30.8288 59.3382 30.6099 59.0538 30.4674L14.4812 8.18108Z"
|
|
501
|
+
fill="currentColor"
|
|
502
|
+
></path>
|
|
503
|
+
</svg>
|
|
504
|
+
`},spinner:function({className:n}){return x`
|
|
505
|
+
<svg
|
|
506
|
+
className=${n}
|
|
507
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
508
|
+
fill="none"
|
|
509
|
+
stroke="currentColor"
|
|
510
|
+
strokeWidth="2"
|
|
511
|
+
strokeLinecap="round"
|
|
512
|
+
strokeLinejoin="round"
|
|
513
|
+
viewBox="0 0 64 64"
|
|
514
|
+
height="24px"
|
|
515
|
+
width="24px"
|
|
516
|
+
>
|
|
517
|
+
<path
|
|
518
|
+
d="M31.9999 11.1999C26.4834 11.1999 21.1928 13.3913 17.2921 17.2921C13.3913 21.1928 11.1999 26.4834 11.1999 31.9999C11.1999 32.6364 10.947 33.2469 10.497 33.697C10.0469 34.1471 9.43642 34.3999 8.7999 34.3999C8.16338 34.3999 7.55293 34.1471 7.10285 33.697C6.65276 33.2469 6.3999 32.6364 6.3999 31.9999C6.3999 26.9367 7.90132 21.9872 10.7143 17.7773C13.5272 13.5674 17.5254 10.2862 22.2032 8.3486C26.881 6.41099 32.0283 5.90403 36.9942 6.89181C41.9601 7.87959 46.5216 10.3178 50.1018 13.898C53.6821 17.4782 56.1202 22.0397 57.108 27.0056C58.0958 31.9715 57.5888 37.1188 55.6512 41.7966C53.7136 46.4744 50.4324 50.4726 46.2225 53.2855C42.0126 56.0985 37.0631 57.5999 31.9999 57.5999C31.3634 57.5999 30.7529 57.3471 30.3028 56.897C29.8528 56.4469 29.5999 55.8364 29.5999 55.1999C29.5999 54.5634 29.8528 53.9529 30.3028 53.5029C30.7529 53.0528 31.3634 52.7999 31.9999 52.7999C37.5164 52.7999 42.807 50.6085 46.7077 46.7077C50.6085 42.807 52.7999 37.5164 52.7999 31.9999C52.7999 26.4834 50.6085 21.1928 46.7077 17.2921C42.807 13.3913 37.5164 11.1999 31.9999 11.1999V11.1999Z"
|
|
519
|
+
fill="currentColor"
|
|
520
|
+
></path>
|
|
521
|
+
</svg>
|
|
522
|
+
`},play:function({className:n}){return x`
|
|
523
|
+
<svg
|
|
524
|
+
className=${n}
|
|
525
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
526
|
+
fill="none"
|
|
527
|
+
stroke="currentColor"
|
|
528
|
+
strokeWidth="2"
|
|
529
|
+
strokeLinecap="round"
|
|
530
|
+
strokeLinejoin="round"
|
|
531
|
+
viewBox="0 0 24 24"
|
|
532
|
+
height="24px"
|
|
533
|
+
width="24px"
|
|
534
|
+
>
|
|
535
|
+
<polygon points="5 3 19 12 5 21 5 3"></polygon>
|
|
536
|
+
</svg>
|
|
537
|
+
`},pause:function({className:n}){return x`
|
|
538
|
+
<svg
|
|
539
|
+
className=${n}
|
|
540
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
541
|
+
fill="none"
|
|
542
|
+
stroke="currentColor"
|
|
543
|
+
strokeWidth="2"
|
|
544
|
+
strokeLinecap="round"
|
|
545
|
+
strokeLinejoin="round"
|
|
546
|
+
viewBox="0 0 24 24"
|
|
547
|
+
height="24px"
|
|
548
|
+
width="24px"
|
|
549
|
+
>
|
|
550
|
+
<rect x="6" y="4" width="4" height="16"></rect>
|
|
551
|
+
<rect x="14" y="4" width="4" height="16"></rect>
|
|
552
|
+
</svg>
|
|
553
|
+
`},updown:function({className:n}){return x`
|
|
554
|
+
<svg
|
|
555
|
+
className=${n}
|
|
556
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
557
|
+
fill="none"
|
|
558
|
+
stroke="currentColor"
|
|
559
|
+
strokeWidth="2"
|
|
560
|
+
strokeLinecap="round"
|
|
561
|
+
strokeLinejoin="round"
|
|
562
|
+
viewBox="0 0 64 64"
|
|
563
|
+
height="24px"
|
|
564
|
+
width="24px"
|
|
565
|
+
>
|
|
566
|
+
<path
|
|
567
|
+
d="M 16 25.75 L 19.769531 29.523438 L 31.085938 18.210938 L 42.398438 29.523438 L 46.167969 25.75 L 31.085938 10.667969 Z M 16 25.75 "
|
|
568
|
+
fill="currentColor"
|
|
569
|
+
></path>
|
|
570
|
+
<path
|
|
571
|
+
d="M 16 38.515625 L 19.769531 34.746094 L 31.085938 46.058594 L 42.398438 34.746094 L 46.167969 38.515625 L 31.085938 53.601562 Z M 16 38.515625 "
|
|
572
|
+
fill="currentColor"
|
|
573
|
+
></path>
|
|
574
|
+
</svg>
|
|
575
|
+
`},addEmoji:function({className:n}){return x`
|
|
576
|
+
<svg
|
|
577
|
+
className=${n}
|
|
578
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
579
|
+
fill="none"
|
|
580
|
+
stroke="currentColor"
|
|
581
|
+
strokeWidth="2"
|
|
582
|
+
strokeLinecap="round"
|
|
583
|
+
strokeLinejoin="round"
|
|
584
|
+
viewBox="-2 -2 28 28"
|
|
585
|
+
height="26"
|
|
586
|
+
width="26"
|
|
587
|
+
style=${{overflow:"visible"}}
|
|
588
|
+
>
|
|
589
|
+
<circle fill="none" cx="12" cy="12" r="10"></circle>
|
|
590
|
+
<path fill="none" d="M8 14s1.5 2 4 2 4-2 4-2M9 9h.01M15 9h.01"></path>
|
|
591
|
+
<line
|
|
592
|
+
x1="25"
|
|
593
|
+
y1="-1"
|
|
594
|
+
x2="25"
|
|
595
|
+
y2="5"
|
|
596
|
+
stroke="currentColor"
|
|
597
|
+
strokeWidth="2"
|
|
598
|
+
strokeLinecap="round"
|
|
599
|
+
></line>
|
|
600
|
+
<line
|
|
601
|
+
x1="28"
|
|
602
|
+
y1="2"
|
|
603
|
+
x2="22"
|
|
604
|
+
y2="2"
|
|
605
|
+
stroke="currentColor"
|
|
606
|
+
strokeWidth="2"
|
|
607
|
+
strokeLinecap="round"
|
|
608
|
+
></line>
|
|
609
|
+
</svg>
|
|
610
|
+
`},microphone:function({className:n}){return x`
|
|
611
|
+
<svg
|
|
612
|
+
className=${n}
|
|
613
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
614
|
+
fill="none"
|
|
615
|
+
stroke="currentColor"
|
|
616
|
+
strokeWidth="2"
|
|
617
|
+
strokeLinecap="round"
|
|
618
|
+
strokeLinejoin="round"
|
|
619
|
+
viewBox="0 0 64 64"
|
|
620
|
+
height="24px"
|
|
621
|
+
width="24px"
|
|
622
|
+
>
|
|
623
|
+
<path
|
|
624
|
+
fillRule="nonzero"
|
|
625
|
+
fill="currentColor"
|
|
626
|
+
fillOpacity="1"
|
|
627
|
+
strokeWidth="2"
|
|
628
|
+
strokeLinecap="round"
|
|
629
|
+
strokeLinejoin="round"
|
|
630
|
+
stroke="currentColor"
|
|
631
|
+
strokeOpacity="1"
|
|
632
|
+
strokeMiterlimit="4"
|
|
633
|
+
d="M 15 1.25061 C 14.005737 1.25061 13.051758 1.644287 12.348633 2.349243 C 11.645508 3.052368 11.25 4.006348 11.25 5.00061 L 11.25 15 C 11.25 15.994263 11.645508 16.948242 12.348633 17.651367 C 13.051758 18.354492 14.005737 18.75 15 18.75 C 15.994263 18.75 16.948242 18.354492 17.651367 17.651367 C 18.354492 16.948242 18.75 15.994263 18.75 15 L 18.75 5.00061 C 18.75 4.006348 18.354492 3.052368 17.651367 2.349243 C 16.948242 1.644287 15.994263 1.25061 15 1.25061 Z M 15 1.25061 "
|
|
634
|
+
transform="matrix(2.133333, 0, 0, 2.133333, 0, 0)"
|
|
635
|
+
></path>
|
|
636
|
+
<path
|
|
637
|
+
fill="none"
|
|
638
|
+
strokeWidth="2"
|
|
639
|
+
strokeLinecap="round"
|
|
640
|
+
strokeLinejoin="round"
|
|
641
|
+
stroke="currentColor"
|
|
642
|
+
strokeOpacity="1"
|
|
643
|
+
strokeMiterlimit="4"
|
|
644
|
+
d="M 23.75061 12.50061 L 23.75061 15 C 23.75061 17.319946 22.827759 19.546509 21.187134 21.187134 C 19.546509 22.827759 17.319946 23.75061 15 23.75061 C 12.680054 23.75061 10.453491 22.827759 8.812866 21.187134 C 7.172241 19.546509 6.24939 17.319946 6.24939 15 L 6.24939 12.50061 "
|
|
645
|
+
transform="matrix(2.133333, 0, 0, 2.133333, 0, 0)"
|
|
646
|
+
></path>
|
|
647
|
+
<path
|
|
648
|
+
fill="none"
|
|
649
|
+
strokeWidth="2"
|
|
650
|
+
strokeLinecap="round"
|
|
651
|
+
strokeLinejoin="round"
|
|
652
|
+
stroke="currentColor"
|
|
653
|
+
strokeOpacity="1"
|
|
654
|
+
strokeMiterlimit="4"
|
|
655
|
+
d="M 15 23.75061 L 15 28.74939 "
|
|
656
|
+
transform="matrix(2.133333, 0, 0, 2.133333, 0, 0)"
|
|
657
|
+
></path>
|
|
658
|
+
<path
|
|
659
|
+
fill="none"
|
|
660
|
+
strokeWidth="2"
|
|
661
|
+
strokeLinecap="round"
|
|
662
|
+
strokeLinejoin="round"
|
|
663
|
+
stroke="currentColor"
|
|
664
|
+
strokeOpacity="1"
|
|
665
|
+
strokeMiterlimit="4"
|
|
666
|
+
d="M 9.99939 28.74939 L 20.00061 28.74939 "
|
|
667
|
+
transform="matrix(2.133333, 0, 0, 2.133333, 0, 0)"
|
|
668
|
+
></path>
|
|
669
|
+
</svg>
|
|
670
|
+
`},mic:function({className:n}){return x`
|
|
671
|
+
<svg
|
|
672
|
+
className=${n}
|
|
673
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
674
|
+
fill="none"
|
|
675
|
+
stroke="currentColor"
|
|
676
|
+
strokeWidth="2"
|
|
677
|
+
strokeLinecap="round"
|
|
678
|
+
strokeLinejoin="round"
|
|
679
|
+
viewBox="0 0 64 64"
|
|
680
|
+
height="24px"
|
|
681
|
+
width="24px"
|
|
682
|
+
>
|
|
683
|
+
<path
|
|
684
|
+
fillRule="nonzero"
|
|
685
|
+
fill="currentColor"
|
|
686
|
+
fillOpacity="1"
|
|
687
|
+
strokeWidth="2"
|
|
688
|
+
strokeLinecap="round"
|
|
689
|
+
strokeLinejoin="round"
|
|
690
|
+
stroke="currentColor"
|
|
691
|
+
strokeOpacity="1"
|
|
692
|
+
strokeMiterlimit="4"
|
|
693
|
+
d="M 15 1.25061 C 14.005737 1.25061 13.051758 1.644287 12.348633 2.349243 C 11.645508 3.052368 11.25 4.006348 11.25 5.00061 L 11.25 15 C 11.25 15.994263 11.645508 16.948242 12.348633 17.651367 C 13.051758 18.354492 14.005737 18.75 15 18.75 C 15.994263 18.75 16.948242 18.354492 17.651367 17.651367 C 18.354492 16.948242 18.75 15.994263 18.75 15 L 18.75 5.00061 C 18.75 4.006348 18.354492 3.052368 17.651367 2.349243 C 16.948242 1.644287 15.994263 1.25061 15 1.25061 Z M 15 1.25061 "
|
|
694
|
+
transform="matrix(2.133333, 0, 0, 2.133333, 0, 0)"
|
|
695
|
+
></path>
|
|
696
|
+
<path
|
|
697
|
+
fill="none"
|
|
698
|
+
strokeWidth="2"
|
|
699
|
+
strokeLinecap="round"
|
|
700
|
+
strokeLinejoin="round"
|
|
701
|
+
stroke="currentColor"
|
|
702
|
+
strokeOpacity="1"
|
|
703
|
+
strokeMiterlimit="4"
|
|
704
|
+
d="M 23.75061 12.50061 L 23.75061 15 C 23.75061 17.319946 22.827759 19.546509 21.187134 21.187134 C 19.546509 22.827759 17.319946 23.75061 15 23.75061 C 12.680054 23.75061 10.453491 22.827759 8.812866 21.187134 C 7.172241 19.546509 6.24939 17.319946 6.24939 15 L 6.24939 12.50061 "
|
|
705
|
+
transform="matrix(2.133333, 0, 0, 2.133333, 0, 0)"
|
|
706
|
+
></path>
|
|
707
|
+
<path
|
|
708
|
+
fill="none"
|
|
709
|
+
strokeWidth="2"
|
|
710
|
+
strokeLinecap="round"
|
|
711
|
+
strokeLinejoin="round"
|
|
712
|
+
stroke="currentColor"
|
|
713
|
+
strokeOpacity="1"
|
|
714
|
+
strokeMiterlimit="4"
|
|
715
|
+
d="M 15 23.75061 L 15 28.74939 "
|
|
716
|
+
transform="matrix(2.133333, 0, 0, 2.133333, 0, 0)"
|
|
717
|
+
></path>
|
|
718
|
+
<path
|
|
719
|
+
fill="none"
|
|
720
|
+
strokeWidth="2"
|
|
721
|
+
strokeLinecap="round"
|
|
722
|
+
strokeLinejoin="round"
|
|
723
|
+
stroke="currentColor"
|
|
724
|
+
strokeOpacity="1"
|
|
725
|
+
strokeMiterlimit="4"
|
|
726
|
+
d="M 9.99939 28.74939 L 20.00061 28.74939 "
|
|
727
|
+
transform="matrix(2.133333, 0, 0, 2.133333, 0, 0)"
|
|
728
|
+
></path>
|
|
729
|
+
</svg>
|
|
730
|
+
`},stop:function({className:n}){return x`
|
|
731
|
+
<svg
|
|
732
|
+
className=${n}
|
|
733
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
734
|
+
fill="none"
|
|
735
|
+
stroke="currentColor"
|
|
736
|
+
strokeWidth="2"
|
|
737
|
+
strokeLinecap="round"
|
|
738
|
+
strokeLinejoin="round"
|
|
739
|
+
viewBox="0 0 64 64"
|
|
740
|
+
height="24px"
|
|
741
|
+
width="24px"
|
|
742
|
+
>
|
|
743
|
+
<path
|
|
744
|
+
d="M 54.628906 9.371094 C 48.582031 3.328125 40.546875 0 32 0 C 23.453125 0 15.417969 3.328125 9.371094 9.371094 C 3.328125 15.417969 0 23.453125 0 32 C 0 40.546875 3.328125 48.582031 9.371094 54.628906 C 15.417969 60.671875 23.453125 64 32 64 C 40.546875 64 48.582031 60.671875 54.628906 54.628906 C 60.671875 48.582031 64 40.546875 64 32 C 64 23.453125 60.671875 15.417969 54.628906 9.371094 Z M 32 60.042969 C 16.539062 60.042969 3.957031 47.460938 3.957031 32 C 3.957031 16.539062 16.539062 3.957031 32 3.957031 C 47.460938 3.957031 60.042969 16.539062 60.042969 32 C 60.042969 47.460938 47.460938 60.042969 32 60.042969 Z M 32 60.042969 "
|
|
745
|
+
fill="currentColor"
|
|
746
|
+
></path>
|
|
747
|
+
<path
|
|
748
|
+
d="M 18.472656 18.472656 L 45.527344 18.472656 L 45.527344 45.527344 L 18.472656 45.527344 Z M 18.472656 18.472656 "
|
|
749
|
+
fill="currentColor"
|
|
750
|
+
></path>
|
|
751
|
+
</svg>
|
|
752
|
+
`},download:function({className:n}){return x`
|
|
753
|
+
<svg
|
|
754
|
+
className=${n}
|
|
755
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
756
|
+
fill="none"
|
|
757
|
+
stroke="currentColor"
|
|
758
|
+
strokeWidth="1"
|
|
759
|
+
strokeLinecap="round"
|
|
760
|
+
strokeLinejoin="round"
|
|
761
|
+
viewBox="0 0 34 34"
|
|
762
|
+
height="24px"
|
|
763
|
+
width="24px"
|
|
764
|
+
>
|
|
765
|
+
<path
|
|
766
|
+
fillRule="evenodd"
|
|
767
|
+
clipRule="evenodd"
|
|
768
|
+
d="M17 9C17.6443 9 18.1667 9.52672 18.1667 10.1765V19.9988L22.0116 16.1516C22.469 15.694 23.2077 15.6969 23.6615 16.1581C24.1153 16.6193 24.1125 17.3642 23.6551 17.8219L17.8217 23.6586C17.3669 24.1138 16.6331 24.1138 16.1783 23.6586L10.3449 17.8219C9.88754 17.3642 9.88467 16.6193 10.3385 16.1581C10.7923 15.6969 11.531 15.694 11.9884 16.1516L15.8333 19.9988V10.1765C15.8333 9.52672 16.3557 9 17 9Z"
|
|
769
|
+
fill="currentColor"
|
|
770
|
+
></path>
|
|
771
|
+
<path
|
|
772
|
+
fillRule="evenodd"
|
|
773
|
+
clipRule="evenodd"
|
|
774
|
+
d="M2 16C2 7.71852 8.71852 1 17 1C25.2815 1 32 7.71852 32 16C32 24.2815 25.2815 31 17 31C8.71852 31 2 24.2815 2 16ZM17 3.30769C9.99302 3.30769 4.30769 8.99302 4.30769 16C4.30769 23.007 9.99302 28.6923 17 28.6923C24.007 28.6923 29.6923 23.007 29.6923 16C29.6923 8.99302 24.007 3.30769 17 3.30769Z"
|
|
775
|
+
fill="currentColor"
|
|
776
|
+
></path>
|
|
777
|
+
</svg>
|
|
778
|
+
`},location:function({className:n}){return x`
|
|
779
|
+
<svg
|
|
780
|
+
className=${n}
|
|
781
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
782
|
+
fill="none"
|
|
783
|
+
stroke="currentColor"
|
|
784
|
+
strokeWidth="2"
|
|
785
|
+
strokeLinecap="round"
|
|
786
|
+
strokeLinejoin="round"
|
|
787
|
+
viewBox="0 0 24 24"
|
|
788
|
+
height="24px"
|
|
789
|
+
width="24px"
|
|
790
|
+
>
|
|
791
|
+
<path
|
|
792
|
+
fill="none"
|
|
793
|
+
d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"
|
|
794
|
+
></path>
|
|
795
|
+
<circle fill="none" cx="12" cy="10" r="3"></circle>
|
|
796
|
+
</svg>
|
|
797
|
+
`},email:function({className:n}){return x`
|
|
798
|
+
<svg
|
|
799
|
+
className=${n}
|
|
800
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
801
|
+
fill="none"
|
|
802
|
+
strokeWidth="2"
|
|
803
|
+
strokeLinecap="round"
|
|
804
|
+
strokeLinejoin="round"
|
|
805
|
+
viewBox="0 0 16 16"
|
|
806
|
+
height="24px"
|
|
807
|
+
width="24px"
|
|
808
|
+
>
|
|
809
|
+
<path
|
|
810
|
+
d="M4 3C3.46957 3 2.96086 3.21071 2.58579 3.58579C2.21071 3.96086 2 4.46957 2 5V5.201L8 8.432L14 5.202V5C14 4.46957 13.7893 3.96086 13.4142 3.58579C13.0391 3.21071 12.5304 3 12 3H4Z"
|
|
811
|
+
fill="currentColor"
|
|
812
|
+
></path>
|
|
813
|
+
<path
|
|
814
|
+
d="M14 6.33704L8.237 9.44004C8.16416 9.47925 8.08273 9.49977 8 9.49977C7.91727 9.49977 7.83584 9.47925 7.763 9.44004L2 6.33704V11C2 11.5305 2.21071 12.0392 2.58579 12.4142C2.96086 12.7893 3.46957 13 4 13H12C12.5304 13 13.0391 12.7893 13.4142 12.4142C13.7893 12.0392 14 11.5305 14 11V6.33704Z"
|
|
815
|
+
fill="currentColor"
|
|
816
|
+
></path>
|
|
817
|
+
</svg>
|
|
818
|
+
`},movie:function({className:n}){return x`
|
|
819
|
+
<svg
|
|
820
|
+
className=${n}
|
|
821
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
822
|
+
fill="none"
|
|
823
|
+
stroke="currentColor"
|
|
824
|
+
strokeWidth="2"
|
|
825
|
+
strokeLinecap="round"
|
|
826
|
+
strokeLinejoin="round"
|
|
827
|
+
viewBox="0 0 24 24"
|
|
828
|
+
height="24px"
|
|
829
|
+
width="24px"
|
|
830
|
+
>
|
|
831
|
+
<polygon points="23 7 16 12 23 17 23 7" fill="none"></polygon>
|
|
832
|
+
<rect x="1" y="5" width="15" height="14" rx="2" ry="2" fill="none"></rect>
|
|
833
|
+
</svg>
|
|
834
|
+
`},image:function({className:n}){return x`
|
|
835
|
+
<svg
|
|
836
|
+
className=${n}
|
|
837
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
838
|
+
fill="none"
|
|
839
|
+
stroke="currentColor"
|
|
840
|
+
strokeWidth="2"
|
|
841
|
+
strokeLinecap="round"
|
|
842
|
+
strokeLinejoin="round"
|
|
843
|
+
viewBox="0 0 24 24"
|
|
844
|
+
height="24px"
|
|
845
|
+
width="24px"
|
|
846
|
+
>
|
|
847
|
+
<rect x="3" y="3" fill="none" width="18" height="18" rx="2" ry="2"></rect>
|
|
848
|
+
<circle cx="8.5" cy="8.5" r="1.5"></circle>
|
|
849
|
+
<polyline points="21 15 16 10 5 21" fill="none"></polyline>
|
|
850
|
+
</svg>
|
|
851
|
+
`},attachment:function({className:n}){return x`
|
|
852
|
+
<svg
|
|
853
|
+
className=${n}
|
|
854
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
855
|
+
fill="none"
|
|
856
|
+
stroke="currentColor"
|
|
857
|
+
strokeWidth="2"
|
|
858
|
+
strokeLinecap="round"
|
|
859
|
+
strokeLinejoin="round"
|
|
860
|
+
viewBox="0 0 24 24"
|
|
861
|
+
height="24px"
|
|
862
|
+
width="24px"
|
|
863
|
+
>
|
|
864
|
+
<path
|
|
865
|
+
fill="none"
|
|
866
|
+
d="M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48"
|
|
867
|
+
></path>
|
|
868
|
+
</svg>
|
|
869
|
+
`},horizontalDots:function({className:n}){return x`
|
|
870
|
+
<svg
|
|
871
|
+
className=${n}
|
|
872
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
873
|
+
fill="none"
|
|
874
|
+
stroke="currentColor"
|
|
875
|
+
strokeWidth="1"
|
|
876
|
+
strokeLinecap="round"
|
|
877
|
+
strokeLinejoin="round"
|
|
878
|
+
viewBox="0 0 16 16"
|
|
879
|
+
height="24px"
|
|
880
|
+
width="24px"
|
|
881
|
+
>
|
|
882
|
+
<circle fill="currentColor" cx="2" cy="8" r="1"></circle>
|
|
883
|
+
<circle fill="currentColor" cx="8" cy="8" r="1"></circle>
|
|
884
|
+
<circle fill="currentColor" cx="14" cy="8" r="1"></circle>
|
|
885
|
+
</svg>
|
|
886
|
+
`},verticalDots:function({className:n}){return x`
|
|
887
|
+
<svg
|
|
888
|
+
className=${n}
|
|
889
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
890
|
+
fill="none"
|
|
891
|
+
stroke="currentColor"
|
|
892
|
+
strokeWidth="1"
|
|
893
|
+
strokeLinecap="round"
|
|
894
|
+
strokeLinejoin="round"
|
|
895
|
+
viewBox="0 0 16 16"
|
|
896
|
+
height="24px"
|
|
897
|
+
width="24px"
|
|
898
|
+
>
|
|
899
|
+
<circle fill="currentColor" cx="8" cy="4" r="1"></circle>
|
|
900
|
+
<circle fill="currentColor" cx="8" cy="8" r="1"></circle>
|
|
901
|
+
<circle fill="currentColor" cx="8" cy="12" r="1"></circle>
|
|
902
|
+
</svg>
|
|
903
|
+
`},reply:function({className:n}){return x`
|
|
904
|
+
<svg
|
|
905
|
+
className=${n}
|
|
906
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
907
|
+
fill="none"
|
|
908
|
+
stroke="currentColor"
|
|
909
|
+
strokeWidth="2"
|
|
910
|
+
strokeLinecap="round"
|
|
911
|
+
strokeLinejoin="round"
|
|
912
|
+
viewBox="0 0 365.61 285.686"
|
|
913
|
+
height="24px"
|
|
914
|
+
width="24px"
|
|
915
|
+
>
|
|
916
|
+
<path
|
|
917
|
+
opacity="1"
|
|
918
|
+
fill="currentColor"
|
|
919
|
+
fillOpacity="1"
|
|
920
|
+
stroke="currentColor"
|
|
921
|
+
strokeWidth="20.00000191"
|
|
922
|
+
strokeLinecap="round"
|
|
923
|
+
strokeLinejoin="round"
|
|
924
|
+
strokeMiterlimit="4"
|
|
925
|
+
strokeDasharray="none"
|
|
926
|
+
strokeOpacity="1"
|
|
927
|
+
d="M38.6 202.285v-30.656c-41.89-4.634-128.643-3.207-207.204 76.436C-137.337 132.47-100.573 84.491 38.6 43.487v-61.112l69.262 62.334c38.094 34.283 69.342 62.556 69.44 62.829.098.272-30.47 28.059-67.927 61.748l-69.44 62.453-1.335 1.201z"
|
|
928
|
+
transform="translate(178.603 27.624) scale(-1,1)"
|
|
929
|
+
></path>
|
|
930
|
+
</svg>
|
|
931
|
+
`},back:function({className:n}){return x`
|
|
932
|
+
<svg
|
|
933
|
+
className=${n}
|
|
934
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
935
|
+
fill="none"
|
|
936
|
+
stroke="currentColor"
|
|
937
|
+
strokeWidth="2"
|
|
938
|
+
strokeLinecap="round"
|
|
939
|
+
strokeLinejoin="round"
|
|
940
|
+
viewBox="0 0 24 24"
|
|
941
|
+
height="24px"
|
|
942
|
+
width="24px"
|
|
943
|
+
>
|
|
944
|
+
<line x1="19" y1="12" x2="5" y2="12"></line>
|
|
945
|
+
<polyline points="12 19 5 12 12 5"></polyline>
|
|
946
|
+
</svg>
|
|
947
|
+
`}};function Bp({className:n}){return x`
|
|
948
|
+
<svg
|
|
949
|
+
className=${n}
|
|
950
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
951
|
+
stroke="currentColor"
|
|
952
|
+
strokeWidth="2"
|
|
953
|
+
strokeLinecap="round"
|
|
954
|
+
strokeLinejoin="round"
|
|
955
|
+
viewBox="0 0 24 24"
|
|
956
|
+
width="24px"
|
|
957
|
+
height="24px"
|
|
958
|
+
>
|
|
959
|
+
<polyline fill="none" points="15 6 9 12 15 18"></polyline>
|
|
960
|
+
</svg>
|
|
961
|
+
`}function Hp({className:n}){return x`
|
|
962
|
+
<svg
|
|
963
|
+
className=${n}
|
|
964
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
965
|
+
stroke="currentColor"
|
|
966
|
+
strokeWidth="2"
|
|
967
|
+
strokeLinecap="round"
|
|
968
|
+
strokeLinejoin="round"
|
|
969
|
+
viewBox="0 0 24 24"
|
|
970
|
+
width="24px"
|
|
971
|
+
height="24px"
|
|
972
|
+
>
|
|
973
|
+
<polyline fill="none" points="9 6 15 12 9 18"></polyline>
|
|
974
|
+
</svg>
|
|
975
|
+
`}function Up({className:n}){return x`
|
|
976
|
+
<svg
|
|
977
|
+
className=${n}
|
|
978
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
979
|
+
fill="none"
|
|
980
|
+
stroke="currentColor"
|
|
981
|
+
strokeWidth="2"
|
|
982
|
+
strokeLinecap="round"
|
|
983
|
+
strokeLinejoin="round"
|
|
984
|
+
viewBox="0 0 24 24"
|
|
985
|
+
height="24px"
|
|
986
|
+
width="24px"
|
|
987
|
+
>
|
|
988
|
+
<polyline fill="none" points="18 15 12 9 6 15"></polyline>
|
|
989
|
+
</svg>
|
|
990
|
+
`}function $p({className:n}){return x`
|
|
991
|
+
<svg
|
|
992
|
+
className=${n}
|
|
993
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
994
|
+
fill="none"
|
|
995
|
+
stroke="currentColor"
|
|
996
|
+
strokeWidth="2"
|
|
997
|
+
strokeLinecap="round"
|
|
998
|
+
strokeLinejoin="round"
|
|
999
|
+
viewBox="0 0 24 24"
|
|
1000
|
+
height="24px"
|
|
1001
|
+
width="24px"
|
|
1002
|
+
>
|
|
1003
|
+
<polyline fill="none" points="6 9 12 15 18 9"></polyline>
|
|
1004
|
+
</svg>
|
|
1005
|
+
`}function HS(n){const{timestamp:t,isReadMarker:e,isDayMarker:r,common:i}=n,{t:o}=i;return x`
|
|
1006
|
+
<div className="t-message-divider">
|
|
1007
|
+
<div className="t-line" t-side="left">
|
|
1008
|
+
<div className="t-line-segment" />
|
|
1009
|
+
</div>
|
|
1010
|
+
${r&&x`
|
|
1011
|
+
<span className="t-day-marker">${zg(t,o)}</span>
|
|
1012
|
+
`}
|
|
1013
|
+
<div className="t-line" t-side="right">
|
|
1014
|
+
<div className="t-line-segment" />
|
|
1015
|
+
${e&&x`
|
|
1016
|
+
<span className="t-unread-marker">${o.MESSAGELIST_NEW_MARKER}</span>
|
|
1017
|
+
`}
|
|
1018
|
+
</div>
|
|
1019
|
+
</div>
|
|
1020
|
+
`}function US({common:n}){const{typing:t,theme:e}=n,{Avatar:r}=e,{users:i,many:o}=t;if(!o&&i.length===0)return null;const s=o?x`<div className="t-theme-avatar">5+</div>`:i.slice(0,2).map(a=>x`<${r}
|
|
1021
|
+
key=${a.id}
|
|
1022
|
+
photoUrl=${sr(a)}
|
|
1023
|
+
common=${n}
|
|
1024
|
+
/>`);return x`
|
|
1025
|
+
<div
|
|
1026
|
+
className="t-theme-message-list-footer"
|
|
1027
|
+
t-many=${String(o)}
|
|
1028
|
+
aria-label="${function(a,l){return l?"Several people are typing":a.length===1?`${a[0].name} is typing`:a.length===2?`${a[0].name} and ${a[1].name} are typing`:`${a[0].name}, ${a[1].name}, and ${a.length-2} others are typing`}(i,o)}"
|
|
1029
|
+
>
|
|
1030
|
+
<div className="t-typing-avatars" aria-hidden="true">
|
|
1031
|
+
${s}
|
|
1032
|
+
${!o&&i.length>2&&x`<div className="t-theme-avatar">+${i.length-2}</div>`}
|
|
1033
|
+
</div>
|
|
1034
|
+
<div className="t-typing-bubble">
|
|
1035
|
+
<div className="t-typing-animation">
|
|
1036
|
+
<span></span>
|
|
1037
|
+
<span></span>
|
|
1038
|
+
<span></span>
|
|
1039
|
+
</div>
|
|
1040
|
+
</div>
|
|
1041
|
+
</div>
|
|
1042
|
+
`}function $S(n){return x`
|
|
1043
|
+
<span className="t-theme-compact-message-content">
|
|
1044
|
+
<${jS} ...${n} />
|
|
1045
|
+
</span>
|
|
1046
|
+
`}function jS({message:n,common:t}){var s;const e=n.content[0],{theme:r,t:i}=t,{Icon:o}=r;if(e.type==="text")return x`<${cc}
|
|
1047
|
+
block=${e}
|
|
1048
|
+
message=${n}
|
|
1049
|
+
nonInteractive
|
|
1050
|
+
/>`;if(e.type==="location")return x`<${o} type="location" common=${t} /> ${i.LOCATION}`;if(e.type==="file"){if(e.subtype==="image")return x`
|
|
1051
|
+
<${o} type="image" common=${t} />
|
|
1052
|
+
${e.filename}
|
|
1053
|
+
`;if(e.subtype==="video")return x`
|
|
1054
|
+
<${o} type="movie" common=${t} />
|
|
1055
|
+
${e.filename}
|
|
1056
|
+
`;if(e.subtype==="audio")return x`
|
|
1057
|
+
<${o} type="attachment" common=${t} />
|
|
1058
|
+
${e.filename}
|
|
1059
|
+
`;if(e.subtype==="voice")return x`
|
|
1060
|
+
<${o} type="microphone" common=${t} />
|
|
1061
|
+
${i.VOICE_MESSAGE} (${Dc((s=e.duration)!=null?s:0)})
|
|
1062
|
+
`;if(e.subtype===void 0)return x`
|
|
1063
|
+
<${o} type="attachment" common=${t} />
|
|
1064
|
+
${e.filename}
|
|
1065
|
+
`}return null}function YS({block:n,downloadUrl:t,common:e}){const{Icon:r}=e.theme;return x`
|
|
1066
|
+
<div className="t-theme-audio-block">
|
|
1067
|
+
<${Qs} src=${n.url} filename=${n.filename} />
|
|
1068
|
+
|
|
1069
|
+
<a className="t-body-text" href=${t}>
|
|
1070
|
+
<${r}
|
|
1071
|
+
type="attachment"
|
|
1072
|
+
className="t-attachment-icon"
|
|
1073
|
+
common=${e}
|
|
1074
|
+
/>
|
|
1075
|
+
<span className="t-filename">${n.filename}</span>
|
|
1076
|
+
<span className="t-filesize"> (${Oo(n.size)})</span>
|
|
1077
|
+
</a>
|
|
1078
|
+
</div>
|
|
1079
|
+
`}function VS({block:n,downloadUrl:t,common:e}){const{Icon:r}=e.theme;return x`
|
|
1080
|
+
<div className="t-theme-file-block">
|
|
1081
|
+
<a className="t-body-text" href=${t}>
|
|
1082
|
+
<${r}
|
|
1083
|
+
type="attachment"
|
|
1084
|
+
className="t-attachment-icon"
|
|
1085
|
+
common=${e}
|
|
1086
|
+
/>
|
|
1087
|
+
<span className="t-filename">${n.filename}</span>
|
|
1088
|
+
<span className="t-filesize"> (${Oo(n.size)})</span>
|
|
1089
|
+
</a>
|
|
1090
|
+
</div>
|
|
1091
|
+
`}function zS({block:n,downloadUrl:t,common:e}){const{Icon:r}=e.theme,i={"--img-w":n.width||1,"--img-h":n.height||1};return x`
|
|
1092
|
+
<div className="t-theme-image-block">
|
|
1093
|
+
<a
|
|
1094
|
+
href=${n.url}
|
|
1095
|
+
className="t-image-wrapper"
|
|
1096
|
+
target="_blank"
|
|
1097
|
+
rel="noopener noreferrer"
|
|
1098
|
+
>
|
|
1099
|
+
<div className="t-root" style=${i}>
|
|
1100
|
+
<img src=${n.url} className="t-image" />
|
|
1101
|
+
</div>
|
|
1102
|
+
</a>
|
|
1103
|
+
|
|
1104
|
+
<a href=${t} className="t-body-text">
|
|
1105
|
+
<${r} className="download-icon" type="download" common=${e} />
|
|
1106
|
+
<span>${n.filename}</span>
|
|
1107
|
+
<span className="t-filesize"> (${Oo(n.size)})</span>
|
|
1108
|
+
</a>
|
|
1109
|
+
</div>
|
|
1110
|
+
`}function GS({block:n}){const{imageUrl:t,linkUrl:e}=gc(n);return x`
|
|
1111
|
+
<div className="t-theme-location-block">
|
|
1112
|
+
<a
|
|
1113
|
+
href=${e}
|
|
1114
|
+
target="_blank"
|
|
1115
|
+
className="t-root"
|
|
1116
|
+
style=${{background:`${`url(${JSON.stringify(t)})`} center center / cover no-repeat`}}
|
|
1117
|
+
></a>
|
|
1118
|
+
|
|
1119
|
+
<span className="t-body-text">
|
|
1120
|
+
<a href=${e} target="_blank" rel="noopener noreferrer"
|
|
1121
|
+
>${e}</a
|
|
1122
|
+
>
|
|
1123
|
+
</span>
|
|
1124
|
+
</div>
|
|
1125
|
+
`}function XS({block:n,message:t}){return x`
|
|
1126
|
+
<div className="t-theme-text-block">
|
|
1127
|
+
<${cc} block=${n} message=${t} />
|
|
1128
|
+
</div>
|
|
1129
|
+
`}function WS({block:n,downloadUrl:t,common:e}){const{Icon:r}=e.theme;return x`
|
|
1130
|
+
<div className="t-theme-video-block">
|
|
1131
|
+
<div className="t-video-wrapper">
|
|
1132
|
+
<div className="t-root" style=${{"--video-w":n.width||1,"--video-h":n.height||1}}>
|
|
1133
|
+
<!-- We are using media fragments in the src as a workaround to iOS Safari -->
|
|
1134
|
+
<!-- not showing the video preview properly. See: https://muffinman.io/blog/hack-for-ios-safari-to-display-html-video-thumbnail/ -->
|
|
1135
|
+
<video
|
|
1136
|
+
className="t-video"
|
|
1137
|
+
controls
|
|
1138
|
+
preload="metadata"
|
|
1139
|
+
src=${`${n.url}#t=0.1`}
|
|
1140
|
+
playsInline
|
|
1141
|
+
></video>
|
|
1142
|
+
</div>
|
|
1143
|
+
</div>
|
|
1144
|
+
|
|
1145
|
+
<a href=${t} className="t-body-text">
|
|
1146
|
+
<${r} className="download-icon" type="download" common=${e} />
|
|
1147
|
+
<span>${n.filename}</span>
|
|
1148
|
+
<span className="t-filesize"> (${Oo(n.size)})</span>
|
|
1149
|
+
</a>
|
|
1150
|
+
</div>
|
|
1151
|
+
`}function KS({block:n}){return x`<${Qs}
|
|
1152
|
+
className="t-theme-voice-block"
|
|
1153
|
+
src=${n.url}
|
|
1154
|
+
filename=${n.filename}
|
|
1155
|
+
/>`}function qS({photoUrl:n}){return x`
|
|
1156
|
+
<div
|
|
1157
|
+
className="t-theme-avatar"
|
|
1158
|
+
style=${{backgroundImage:`url(${n})`}}
|
|
1159
|
+
/>
|
|
1160
|
+
`}function JS({common:n,conversation:t,participants:e}){const{currentUser:r,theme:i}=n,{Avatar:o,GroupChatImage:s}=i;return t.photoUrl?x`<${o}
|
|
1161
|
+
photoUrl=${t.photoUrl}
|
|
1162
|
+
common=${n}
|
|
1163
|
+
/>`:e.length===0?null:e.length===1?x`<${o}
|
|
1164
|
+
photoUrl=${sr(r)}
|
|
1165
|
+
common=${n}
|
|
1166
|
+
/>`:e.length===2?x`<${o}
|
|
1167
|
+
photoUrl=${sr(e[0].user.id===r.id?e[1].user:e[0].user)}
|
|
1168
|
+
common=${n}
|
|
1169
|
+
/>`:x`
|
|
1170
|
+
<${s} participants=${e} common=${n} />
|
|
1171
|
+
`}function ZS({participants:n}){return x`
|
|
1172
|
+
<div className="t-theme-group-chat-image">
|
|
1173
|
+
<div
|
|
1174
|
+
className="t-mini-avatar"
|
|
1175
|
+
style=${{backgroundImage:`url("${sr(n[0].user)}")`}}
|
|
1176
|
+
></div>
|
|
1177
|
+
<div
|
|
1178
|
+
className="t-mini-avatar"
|
|
1179
|
+
style=${{backgroundImage:`url("${sr(n[1].user)}")`}}
|
|
1180
|
+
></div>
|
|
1181
|
+
${n.length>2&&x`<svg
|
|
1182
|
+
className="t-counter"
|
|
1183
|
+
viewBox="0 0 22 22"
|
|
1184
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
1185
|
+
>
|
|
1186
|
+
<!-- Using an svg as a counter as then we can use clip-path -->
|
|
1187
|
+
<g className="t-group">
|
|
1188
|
+
<!--
|
|
1189
|
+
Note: fill="currentColor" inherits text 'color'
|
|
1190
|
+
from its parent, in this case '.t-group'.
|
|
1191
|
+
-->
|
|
1192
|
+
<rect
|
|
1193
|
+
x="0"
|
|
1194
|
+
y="0"
|
|
1195
|
+
width=${22}
|
|
1196
|
+
height=${22}
|
|
1197
|
+
fill="currentColor"
|
|
1198
|
+
/>
|
|
1199
|
+
</g>
|
|
1200
|
+
<!--
|
|
1201
|
+
Note: fill="currentColor" inherits text 'color'
|
|
1202
|
+
from its parent, in this case '.t-counter'. this means
|
|
1203
|
+
we can get 2 different colours without fiddling with
|
|
1204
|
+
fills in css (which dont seem to work in these cases)
|
|
1205
|
+
-->
|
|
1206
|
+
<text
|
|
1207
|
+
textAnchor="middle"
|
|
1208
|
+
x=${11}
|
|
1209
|
+
y=${Math.round(.666*22)}
|
|
1210
|
+
width=${22}
|
|
1211
|
+
height=${22}
|
|
1212
|
+
fontSize=${n.length>99?10:12}
|
|
1213
|
+
fill="currentColor"
|
|
1214
|
+
>
|
|
1215
|
+
${n.length>99?"99+":n.length}
|
|
1216
|
+
</text>
|
|
1217
|
+
</svg>`}
|
|
1218
|
+
</div>
|
|
1219
|
+
`}function QS({referencedMessage:n,common:t}){const{theme:e}=t,{CompactMessageContent:r}=e;return x`
|
|
1220
|
+
<div className="t-theme-referenced-message">
|
|
1221
|
+
<div className="t-sender-name">${n.sender.name}</div>
|
|
1222
|
+
<div className="t-content">
|
|
1223
|
+
<${r}
|
|
1224
|
+
message=${n}
|
|
1225
|
+
common=${t}
|
|
1226
|
+
/>
|
|
1227
|
+
</div>
|
|
1228
|
+
</div>
|
|
1229
|
+
`}function tv(n){const{common:t,referencedMessage:e}=n,{chatbox:r,t:i,theme:o}=t,{Icon:s,CompactMessageContent:a}=o;return x`
|
|
1230
|
+
<div className="t-theme-reply-bar">
|
|
1231
|
+
<${s} className="t-reply-icon" type="reply" common=${t} />
|
|
1232
|
+
|
|
1233
|
+
<div className="t-body">
|
|
1234
|
+
<div className="t-sender-name">${e.sender.name}</div>
|
|
1235
|
+
<div className="t-content">
|
|
1236
|
+
<${a}
|
|
1237
|
+
message=${e}
|
|
1238
|
+
common=${t}
|
|
1239
|
+
/>
|
|
1240
|
+
</div>
|
|
1241
|
+
</div>
|
|
1242
|
+
|
|
1243
|
+
<button
|
|
1244
|
+
className="t-close-button"
|
|
1245
|
+
title=${i.REPLY_MODE_LEAVE_ARIA_LABEL}
|
|
1246
|
+
aria-label=${i.REPLY_MODE_LEAVE_ARIA_LABEL}
|
|
1247
|
+
onClick=${()=>r.setReferencedMessage(null)}
|
|
1248
|
+
>
|
|
1249
|
+
<${s} className="t-close-icon" type="close" common=${t} />
|
|
1250
|
+
</button>
|
|
1251
|
+
</div>
|
|
1252
|
+
`}function ev({timestamp:n,common:t}){const{t:e}=t,r=new Date(n).toLocaleString(e.locale,{weekday:"short",year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),i=Vg(n,e);return x`
|
|
1253
|
+
<span className="t-theme-time-ago">
|
|
1254
|
+
<span
|
|
1255
|
+
role="time"
|
|
1256
|
+
title=${r}
|
|
1257
|
+
aria-description=${i.long}
|
|
1258
|
+
>
|
|
1259
|
+
${i.short}
|
|
1260
|
+
</span>
|
|
1261
|
+
</span>
|
|
1262
|
+
`}function nv(n){var _,A,T;const{common:t,conversation:e,participants:r,isSelected:i}=n,{currentUser:o,theme:s,conversationList:a}=t,{TimeAgo:l,ConversationImage:u,CompactMessageContent:c}=s,{lastMessage:d}=e,h=r.length>=3,p=(_=d==null?void 0:d.sender)==null?void 0:_.name,f=(A=d==null?void 0:d.editedAt)!=null?A:d==null?void 0:d.createdAt,m=r.filter(S=>S.user.id!==o.id),E=m.length?m:r,g=(T=e.subject)!=null?T:E.map(S=>S.user.name).join(", ");return x`
|
|
1263
|
+
<div
|
|
1264
|
+
className="t-theme-conversation-list-item"
|
|
1265
|
+
t-unread=${e.unreadMessageCount?"":void 0}
|
|
1266
|
+
t-selected=${i?"":void 0}
|
|
1267
|
+
onClick=${()=>a.selectConversation(e.id)}
|
|
1268
|
+
>
|
|
1269
|
+
<${u}
|
|
1270
|
+
conversation=${e}
|
|
1271
|
+
participants=${r}
|
|
1272
|
+
common=${t}
|
|
1273
|
+
/>
|
|
1274
|
+
|
|
1275
|
+
<div className="t-inner">
|
|
1276
|
+
<div className="t-header">
|
|
1277
|
+
<div className="t-conversation-name">${g}</div>
|
|
1278
|
+
|
|
1279
|
+
${f&&x`
|
|
1280
|
+
<span className="t-timestamp">
|
|
1281
|
+
<${l} timestamp=${f} common=${t} />
|
|
1282
|
+
</span>
|
|
1283
|
+
`}
|
|
1284
|
+
</div>
|
|
1285
|
+
|
|
1286
|
+
<div className="t-body">
|
|
1287
|
+
${d&&x`
|
|
1288
|
+
<div className="t-message">
|
|
1289
|
+
${h&&p&&x`<span className="t-message-sender">${p}:</span>`}
|
|
1290
|
+
|
|
1291
|
+
<${c}
|
|
1292
|
+
message=${d}
|
|
1293
|
+
common=${t}
|
|
1294
|
+
/>
|
|
1295
|
+
</div>
|
|
1296
|
+
`}
|
|
1297
|
+
|
|
1298
|
+
<${rv} ...${n} />
|
|
1299
|
+
</div>
|
|
1300
|
+
</div>
|
|
1301
|
+
</div>
|
|
1302
|
+
`}function rv({conversation:n}){const{isUnread:t,unreadMessageCount:e}=n;return t?e===0?x`<div className="t-unread-generic-dot" />`:e>999?x`
|
|
1303
|
+
<div className="t-unread-dot">
|
|
1304
|
+
<span>999+</span>
|
|
1305
|
+
</div>
|
|
1306
|
+
`:x`
|
|
1307
|
+
<div className="t-unread-dot">
|
|
1308
|
+
<span>${e}</span>
|
|
1309
|
+
</div>
|
|
1310
|
+
`:null}const iv=new Promise(n=>{typeof document!="undefined"&&document.readyState==="loading"?document.addEventListener("DOMContentLoaded",n,{once:!0}):n(void 0)});function Qg(n,t,e,r){const i=new Map,o=[],s=[];for(const[d,h]of(a=e,Object.entries(a))){const p=[d,d.toLowerCase(),ov(d)];for(const f of p)i.set(f,d);["string","boolean","number"].includes(h.type)&&o.push(...p),h.required!==!1&&s.push(d)}var a;const c=class c extends HTMLElement{constructor(){super(),this._renderRequested=!1,this._props={},this._renderRoot=null,this._ref={current:null};for(const[h,p]of i){if(Object.hasOwnProperty.call(this,h)){const f=this[h];this.updateProp(p,f),delete this[h]}this.hasAttribute(h)&&this.syncAttributeToProp(h)}}updateProp(h,p){const{type:f}=e[h];if(f==="boolean"&&typeof p=="string"?p=p!=="false":f==="number"&&typeof p=="string"&&(p=Number(p)),p==null){const m=h in this._props;return delete this._props[h],m}{const m=this._props[h]!==p;return this._props[h]=p,m}}syncAttributeToProp(h){const p=i.get(h);pt(p,`Attribute "${h}" should have matching prop`);const f=this.getAttribute(h);return this.updateProp(p,f)}async requestRender(){this.isConnected&&!this._renderRequested&&(this._renderRequested=!0,this._renderRequested=await!1,this.render())}render(){var h;this._renderRoot||(this._renderRoot=(h=this,{render:function(g){yu(g,h)},unmount:function(){Ru(h)}}));const p=s.filter(g=>!(g in this._props));if(p.length>0)return r(p),void this._renderRoot.render(null);const f=Object.assign({},this._props),m=g=>{const _=[...Object.getOwnPropertyNames(g.current),...Object.getOwnPropertyNames(Object.getPrototypeOf(g.current))];for(const A of _)A!=="constructor"&&typeof g.current[A]=="function"&&(this[A]=(...T)=>g.current[A](...T))},E=n;this._renderRoot.render(y(E,{...f,ref:this._ref,__hostElement:this,__internalOnLoaded:()=>{m(this._ref)}}))}async connectedCallback(){await iv;for(const h of o)this.hasAttribute(h)&&this.syncAttributeToProp(h);this.requestRender()}disconnectedCallback(){this._renderRoot&&setTimeout(()=>{this._renderRoot&&(this._renderRoot.unmount(),this._renderRoot=null)})}attributeChangedCallback(h,p,f){p!==f&&this.syncAttributeToProp(h)&&this.requestRender()}};c.observedAttributes=o;let l=c;const u={};for(const[d,h]of i)u[d]={set(p){this.updateProp(h,p)&&this.requestRender()},get(){var p;return(p=this._props[h])!=null?p:null}};return Object.defineProperties(l.prototype,u),Object.defineProperty(l,"name",{value:t}),l}function ov(n){return n.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,e)=>(e?"-":"")+t.toLowerCase())}function tD(n,t){const e=JSON.stringify(t).replace(",",", ");rn.error(`Could not initialize ${n} because the following required props are missing: ${e}.`)}const jp=Qg(OS,"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},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},beforeBrowserPermissionPrompt:{type:"function",required:!1},onMissingBrowserPermission:{type:"function",required:!1},themeCustom:{type:"object",required:!1}},n=>tD("<t-chatbox>",n)),Yp=Qg(LS,"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},themeCustom:{type:"object",required:!1}},n=>tD("<t-conversation-list>",n)),sv=fu;customElements.get("t-chatbox")||customElements.define("t-chatbox",jp),customElements.get("t-conversation-list")||customElements.define("t-conversation-list",Yp),exports.AudioPlayer=Qs,exports.ChatboxElement=jp,exports.ConversationListElement=Yp,exports.Editor=ZE,exports.EmojiPicker=dc,exports.EmojiSuggestBar=Ag,exports.MentionSuggestList=jg,exports.MenuItem=Dn,exports.MessageContent=cg,exports.PopoverButton=vr,exports.ReactionPicker=hg,exports.Text=cc,exports.defaultTheme=sv,exports.formatDuration=Dc,exports.formatFilesize=Oo,exports.getGoogleMapsUrls=gc,exports.getPhotoUrlWithFallback=sr,exports.getRandomColor=Yg,exports.html=x,exports.useTimeAgo=Vg,exports.userFriendlyDate=zg;
|